AWS, cloud computing, Java

Part 2: Nevado JMS, Ehcache JMS WAN replication and AWS

This post is a followup to what is now part one, of my research into using Ehcache, JMS, Nevado, AWS, SNS and SQS to permit cache events to be replicated across different data-centers.


In my first post I was able to successfully get Ehcache’s JMS Replication to function using Nevado JMS as the provider after patching the serialization issues, however as noted in that article, the idea of sending the actual cached data when any put/update occurred (if the cache replicator is configured that way) in Ehcache on any given node sounded like it might get out of hand. Secondly, polling from SNS is slow! Apps can generate thousands of remove events that need to be distributed globally, consumers in other DC’s will get way behind; batching optimized for SNS is needed. Given that I started looking at writing my own prototype of something lighter weight but eventually came to the realization that the existing Ehcache JMS replication framework could be customized/extended to permit the modifications that were needed.

Out of this came the ehcache-jms-wan-replicator project on GitHub. There is a diagram below showing the concept in general however I suggest you read the on Github instead because as this research evolves I’ll be updating that project. So far it seems to work pretty well and is plays fine running side-by-side with any existing Ehcache (RMI/JGroups) replication you already have configured. This is been intergrated in a Liferay 6.2 Portal cluster across two data-centers in a test setup and so far is working as expected.

Hopefully this will give others some ideas or be useful to someone else as well.

2 thoughts on “Part 2: Nevado JMS, Ehcache JMS WAN replication and AWS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s