speedb-io / speedb

A RocksDB compliant high performance scalable embedded key-value store
https://www.speedb.io/
Apache License 2.0
918 stars 72 forks source link

Java/C Interfaces for EnableSpeedb Features #722

Closed mrambacher closed 1 year ago

mrambacher commented 1 year ago

Fixes: #701

Added Java and C wrappers for SharedOptions and EnableSpeedbFeatures.

Note that I do not know how to test most of this as C/Java have no mechanism of getting the fields that were set via SharedOptions into their wrappers (e.g. I do not know how to get the Cache from an Options -- only how to set it).

udi-speedb commented 1 year ago

Why implement both the C interface and the JAVA interface in the same PR?

udi-speedb commented 1 year ago

Please update HISTORY.md

udi-speedb commented 1 year ago

Please add the license text to all of the files.

udi-speedb commented 1 year ago

@mrambacher - Could you please address all of the comments? Thanks

Guyme commented 1 year ago

waiting on #740

udi-speedb commented 1 year ago

@mrambacher - #742 is now merged. Please adapt this PR accordingly. Thanks

udi-speedb commented 1 year ago

@mrambacher - Please add some simple JAVA sample code to demo the use of the enable speedb feature in JAVA. Maybe a new EnableSpeedbFeaturesSample.java?

udi-speedb commented 1 year ago

What about unit tests to test the interface?

mrambacher commented 1 year ago

What about unit tests to test the interface?

How would you like the API to be tested? Given a SharedOptions, I cannot test that the EnableSpeedb method does anything as I cannot get the information out of the corresponding APIs. For example, there is no Options::GetCache equivalent in C or Java that will return the Cache.

udi-speedb commented 1 year ago

What about unit tests to test the interface?

How would you like the API to be tested? Given a SharedOptions, I cannot test that the EnableSpeedb method does anything as I cannot get the information out of the corresponding APIs. For example, there is no Options::GetCache equivalent in C or Java that will return the Cache.

Please write code that does the best we can at the moment. You can test the simple accessors that will be exposed in JAVA. A JAVA sample code will also demo how the interface should be used by a JAVA user. And, that JAVA code will at least prove that the code compiles and runs without failing.

udi-speedb commented 1 year ago

@mrambacher:

mrambacher commented 1 year ago

@mrambacher:

  • Please address (comment in some way) all of the comments I haven't resolved.
  • Please let me know when you have completed pushing all of the commits that address the comments so I will review the updates. Thanks

@udi-speedb All comments are addressed, except the renaming of the method. I did not add a sample but added some unit tests. Feel free to raise another issue suggesting there should be samples

udi-speedb commented 1 year ago

Closing - To be replace by another pull request.