New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LevelDB native support #1839 #1902
LevelDB native support #1839 #1902
Conversation
b9b7044
to
1a91fbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Preferred implementation of LevelDb is in C++, implementation in Java is much slower (see https://github.com/dain/leveldb#leveldb-in-java). Current PR uses only Java implementation in native. I'd like to investigate possible usage of C++ library in native, but I see it more like an enhancement, because current PR works.
+1. If the LevelDB Java port works well in the native, it is a good state to start with. We can file an issue to track how much interest is there to support also the C++ implementation and consider revisiting it if enough people ask for it.
- Component levelDb uses serialization of
DefaultExchangeHolder
. I've used workaround with Jackson serialization instead. (see https://github.com/apache/camel-quarkus/compare/master...JiriOndrusek:1839-leveldb-native?expand=1#diff-5fbe79b4f16469a82d30051dc3cf564aR46)
Commented inline
- Java implementation of LevelDB uses
methodHandle
which is not supported by GraalVM. I used previous version ofByteBufferSupport
and applied it via substitutions until issue oracle/graal#2761 is fixed. See more information here: https://github.com/apache/camel-quarkus/compare/master...JiriOndrusek:1839-leveldb-native?expand=1#diff-799b2f59808725c0c8b95feacb5b4c8aR25
Commented inline
From my POV this PR could be merged. I'm currently starting to investigate support of C++ levelDB. If this approach will work, I'd enhance this extension (which is working as is)
Let me review properly. so far I looked only at the areas you asked about.
...time/src/main/java/org/apache/camel/quarkus/component/leveldb/OriginalByteBufferSupport.java
Show resolved
Hide resolved
.../runtime/src/main/java/org/apache/camel/quarkus/component/leveldb/ObjectCodecSubstitute.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks @JiriOndrusek ! Some minor suggestions and comments inline.
...nt/src/main/java/org/apache/camel/quarkus/component/leveldb/deployment/LeveldbProcessor.java
Outdated
Show resolved
Hide resolved
...nt/src/main/java/org/apache/camel/quarkus/component/leveldb/deployment/LeveldbProcessor.java
Outdated
Show resolved
Hide resolved
...leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbRouteBuilder.java
Outdated
Show resolved
Hide resolved
integration-tests/leveldb/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
...n-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbTest.java
Outdated
Show resolved
Hide resolved
1a91fbb
to
d4d0258
Compare
d4d0258
to
d0a8bcb
Compare
Do not merge, please! It seems, that current implementation has another limoitation (see https://issues.apache.org/jira/browse/CAMEL-15679?focusedCommentId=17213151&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17213151) This implementation will work only for text based payloads. I'll try to formulate limitations.adoc and try to add some validations. |
d0a8bcb
to
cc04a2e
Compare
I've added into limitation.adoc new limitation. Binary payloads are not supported in native mode. This will be possible once camel-leveldb component is refactored (https://issues.apache.org/jira/browse/CAMEL-15679) Can be merged. |
cc04a2e
to
0ac2c6b
Compare
I rebased on top of the current master. Let's merge if the CI passes. |
fixes #1839
There are several "topics" where I'd appreciate opinion of others.
Preferred implementation of LevelDb is in C++, implementation in Java is much slower (see https://github.com/dain/leveldb#leveldb-in-java). Current PR uses only Java implementation in native. I'd like to investigate possible usage of C++ library in native, but I see it more like an enhancement, because current PR works.
Component levelDb uses serialization of
DefaultExchangeHolder
. I've used workaround with Jackson serialization instead. (see https://github.com/apache/camel-quarkus/compare/master...JiriOndrusek:1839-leveldb-native?expand=1#diff-5fbe79b4f16469a82d30051dc3cf564aR46)Java implementation of LevelDB uses
methodHandle
which is not supported by GraalVM. I used previous version ofByteBufferSupport
and applied it via substitutions until issue Implement method handle support for GraalVM Native Image oracle/graal#2761 is fixed. See more information here: https://github.com/apache/camel-quarkus/compare/master...JiriOndrusek:1839-leveldb-native?expand=1#diff-799b2f59808725c0c8b95feacb5b4c8aR25From my POV this PR could be merged. I'm currently starting to investigate support of C++ levelDB. If this approach will work, I'd enhance this extension (which is working as is)
What do you think, @ppalaga ?
[ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
[ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
[ ] Phrases like Fix # or Fixes # will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
[ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
[ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html