opendal
opendal copied to clipboard
feat(bindings/java): add java binding
Explanation:
- Mutex lock free: in Java, class constructor is thread-safe so calling native method doesn't need a lock.
- Holding pointer of operator in
Operator.java
and free it when Java instance be destroyed by GC. - Java doesn't native support async/await, maybe we can try Kotlin.
- Readme for usage
- [ ] Development/Contribution guide.
- [ ] Exceptions need polish to conform Java files related interface.
- [ ] Cucumber test cases
- [ ] Experiment: Java doesn't support async/await hence using Kotlin to implement async related API.
Thank you for the pull request! At OpenDAL, we prefer to split pull requests into smaller chunks for faster review and merging. It would be better if we create a tracking issue instead.
In this PR, I expect to the basic setup, and future impove can be done later.
- Readme for usage
- [ ] Development/Contribution guide.
- [ ] Exceptions need polish to conform Java files related interface.
- [ ] Cucumber test cases
- [ ] Experiment: Java doesn't support async/await hence using Kotlin to implement async related API.
Thank you for the pull request! At OpenDAL, we prefer to split pull requests into smaller chunks for faster review and merging. It would be better if we create a tracking issue instead.
In this PR, I expect to the basic setup, and future impove can be done later.
Sure, I will put them in readme for memo and will add issues after this pr get merged.
You can use the following command to format license:
docker run -it --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native format
You may track them in #1572
- Java doesn't native support async/await, maybe we can try Kotlin.
Sounds good. Can it be integrated? Or is it possible to directly implement Java binding using Kotlin?
You may track them in #1572
Thanks.
- Java doesn't native support async/await, maybe we can try Kotlin.
Sounds good. Can it be integrated? Or is it possible to directly implement Java binding using Kotlin?
Yes, both integration or writing in Kotlin entirely work for Java and Kotlin. A open question is how do we handling running model for Executor and Waker:
- Keep them in Kotlin
- Keep them in Rust
- Both language has them separately.
A open question is how do we handling running model for Executor and Waker
We can consider implementing them in the future, but for now let's prioritize blocking support. I believe it's best to address one problem at a time.