HazelCast vs. CouchBase

592 views
Skip to first unread message

Andrew Kim

unread,
Aug 21, 2014, 9:52:45 PM8/21/14
to haze...@googlegroups.com
Hi All,
Currently I looking for Share Data product.
So, I narrow down 2 products. HazelCast and CouchBase.
Based on my survey, CouchBase doesn't support Availability of CAP theorem. But HazelCast supports it.
But some guys told me, CouchBase supports Availability.
I really want to know what is different between HazelCast and CouchBase.
Is there anybody who can explain it to me?

Thank you,
Andrew

David Brimley

unread,
Oct 3, 2014, 6:00:34 AM10/3/14
to haze...@googlegroups.com
Hi Andrew

I'm by no means an expert on Couchbase, but I know a little, which I hope will answer most of your questions.

To directly answer you question on CAP, I would say that both solutions provide an AP solution.  However with Hazelcast you can achieve data consistency and availability with sync backups(replicas) which is default setting, although you can go for async replicas for performance and sacrifice C.  But beware, when P occurs you lose C. 

I believe this is not the case with Couchbase where replicas are only ever eventually consistent, replicas are streamed to a queue and then are written over to another node in the cluster.

Similarities are :-
  1. Both are Apache 2 Open Source projects, that also offer Professional Support and Enterprise editions.
  2. They both provide High Availability and In Memory Caching of data.
  3. They both distribute data using partitions.
  4. They both scale horizontally.
  5. Both provide optimistic and pessimistic locking.

differences I've found are :-
  1. Couchbase uses C for the Memory Cache (based on Memcached), Erlang for the Communications Manager.  Hazelcast on the other hand is written in Java and runs on the JVM.
  2. Couchbase is a Key/Value Document Store whereas Hazelcast provides multiple storage structures such as Key/Value (Map, MultiMap), Queue, Set, List, Topic.
  3. Couchbase follows a traditional Client/Server model.  Hazelcast can be accessed via Client/Server or because it is a Java jar you can embed Hazelcast within your own application. 
  4. Couchbase offers disk persistence out of the box, Hazelcast provides a Java Interface in which Cache Misses and Puts can be coded against any backing store of your choice, for example another RDBMS, noSQL, HDFS, network.
  5. Couchbase stores data as primitive types and complex types are stored as JSON documents.  Keys are Strings in Couchbase.  Hazelcast is storing Objects that are serialised and de-serialised as they move over the wire to the cluster nodes, both keys and values.  
  6. Lastly, and for me personally this is a big differentiator, as a Java and C# developer I found the learning curve for Hazelcast to be very low, its just the standard Java Collections you're used to (but underneath its distributed). I've also found people using Hazelcast for a multitude of use cases, not just as a HA Data Store.  Additionally I feel Hazelcast is stronger in the areas of distributed compute with its Executors, EntryProcessors and Map Reduce APIs.  Also, don't forget the Distributed Primitives you have access to in Hazelcast, such as AtomicLong, Semaphore, CountdownLatch.  In a nutshell I'd say Hazelcast offers more than just being a Distributed Data Store, I see it as a Distributed ToolKit AND HA Data Store.
However please note that I am a Hazelcast employee offering you this information, obviously do your own research.  I've tried to state the facts for both products as I understand them.  I'm happy to be corrected if I've misunderstood or misrepresented Couchbase in any way.

Regards



David Brimley
Senior Solutions Architect
 

Reply all
Reply to author
Forward
0 new messages