Skip to main content

Posts

Showing posts from November, 2013

Redis messaging using Spring and Kryo serialization

Redis is famous enterprise key/value data store which provides simple messaging using publisher/subscriber . I've decided to use the system to notify remote nodes (components) about a change of state between those components. Spring among the others allows to use it's templating system to decouple business logic from messaging system used under the hood. The use of spring data for Redis guarantees a solution which does not utilize any redis command in the code. Redis contains serialized content, either byte[] or string. So the last thing to reveal is domain model serialization. I've decided to fast binary serialization using  Kryo framework as a winner of battle of serializators . Maven First of all, it's necessary to define all dependant components. Obviously, usual component like spring itself missing. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <dependency> <groupId> com.esotericsoftware.kryo </groupId> <artifactId> kryo &l