INTEXT-36 - Voldemort Adapter#20
Conversation
|
|
@amolnayak311: No, you cannot exclude those jar libraries. Voldemort is not build with Maven, and is not being uploaded to Maven Central Repository. Those libraries are required for integration tests to run against local Voldemort database. Otherwise, you would have to download them manually, and simple Will change the year to 2013 shortly. |
|
The commons, jackson, thift, jetty and I guess all others can come from maven repo. For voldemort jars, dont worry they can be put in Spring source's mvn repository. So eventually we will have to get the jars from the repository and none with the project's source code. |
|
Got your point and it makes sense. What do you think about referencing Voldemort 0.96 with something like If you agree, could you please install Voldemort 0.96 with the given POM in Spring's Maven repository? I will test it afterwards and update build.gradle, remove libraries and .gitignore file. |
|
Hello Spring Team, any recent updates? |
|
Hi Lukasz, I have just added Voldemort to the SpringSource repository - Cheers, Gunnar |
|
Thanks Gunnar, looks good from my working directory :). |
|
Hello Spring Team, In my opinion message store cannot be easily implemented, because Voldemort does not support transactions and row locking - AP system in terms of CAP theorem. During functional testing, I faced issues with concurrent modifications of single message group by two separate message store clients. BTW, any updates regarding code review and documentation? Regards, |
|
Hello, Lukasz. Cheers |
There was a problem hiding this comment.
Any reason for introducing this new interface and not using _o.s.i.s.c.MessageConverter_ instead?
There was a problem hiding this comment.
The main reason standing behind this decision was type safety and clarity. I didn't want user to realize in runtime (or while reading documentation) that the object he receives in MessageConverter#toMessage(Object) method is actually KeyValue<K, Versioned<V>> wrapper, and that I expect him to return KeyValue<K, V> in MessageConverter#fromMessage(Message<P>). If you can think of any better solution or using MessageConverter is preferred, I'll be happy to alter this part of code. I can see that spring-integration-mongodb module also uses MongoDB specific converter.
There was a problem hiding this comment.
What you say makes sense and yes, Mongo adapters do use a custom converter, but that comes from spring data mongo and is used to instantiate the MongoTemplate if one is not provided.
I am comparing this more to the Redis's _o.s.i.r.oRedisStoreWritingMessageHandler_ as that would be a better comparison.
Merging in a way you have implemented shouldn't be a issue in my opinion as we can anytime change things in future to accommodate the changes.But do take a look at the way Redis's adapters are implemented and let us know your views.
There was a problem hiding this comment.
VoldemortConverter allows user to store chosen part of message payload. After quick skip through the implementation of RedisStoreWritingMessageHandler, I guess that it can persist only complete payload objects. Currently I think that payload transformation could be processed by @Transformer outside of Voldemort adapter, so let's omit this issue. More important design decision is the way of determining object's key. This is achieved programmatically in VoldemortConverter, while Redis adapter looks up concrete message header (RedisHeaders.KEY) or evaluates key-expression.
What would be the preferred way of passing/calculating object's key in your opinion? In case it's Redis' approach, I will change Voldemort adapter to work similarly. IMO +1 for Redis.
|
@lukasz-antoniak Apologies for not getting this merged quickly. I want to go through this and review it but I am tied up with some other stuff and unable to do this. Please do not feel that your contribution is not valued :) |
|
I have refactored Voldemort adapter to calculate entry key analogically to Redis module. IMO design looks better now, as there is no extra interface and all you need to code is something like |
|
Hello Spring Team, any recent updates? |
* lukasz-antoniak-INTEXT-36: INTEXT-61 - Add Voldemort Sample INTEXT-36 - Cleanup INTEXT-36 - Add Voldemort Module
|
Did some code cleanup:
Also, I added a (very simple) Voldemort sample to the repo: Furthermore, I have setup the CI infrastructure:
The Sonar Analytics dashboard is here: The snapshot artifacts are automatically deployed to: THANK YOU for the contribution! Looking forward to new PRs! |
Patch for INTEXT-36 JIRA ticket.
Link: https://jira.springsource.org/browse/INTEXT-36
Regards,
Lukasz Antoniak