any benefit from using Hazelcast instead of MongoDB to store user sessions/keys? any benefit from using Hazelcast instead of MongoDB to store user sessions/keys? mongodb mongodb

any benefit from using Hazelcast instead of MongoDB to store user sessions/keys?


Disclaimer: I am the founder of Hazelcast...

  1. Hazelcast is much simpler and simplicity matters a lot.
  2. You can embed Hazelcast into your application (if your application iswritten in Java). No need to deploy and maintain remote nosqlcluster.
  3. Hazelcast works directly with your application objects. NoJSON or any other format. Write and read java objects.
  4. You canexecute Java code on your in-memory data. No need to fetch andprocess data; send your code over to the data.
  5. You can listen forthe updates on your data. "Notify me when this map or key isupdated".
  6. Hazelcast has rich set of data structures like queue,topic, semaphores, locks, multimap etc. Imagine sharing a queueacross multiple nodes and be able to do blocking queue poll/takeoperation... this is really cool :)


Hazelcast is an in-memory grid so it should be significantly faster than MongoDB for that kind of usage. They also have pre-made session clustering code for Java servlets if you do not want to create that yourself.

Code for the session clustering here on github. Or here for Maven artifact.