1

I have an application having more than 2 TB of data to be stored in cache, the data will be accessed using NodeJS APIs. For a NodeJS app which would be a better choice, Hazelcast or Redis(or RedisLabs)? Considering following criteria?

  • NodeJS API Support, including connection pooling. Looks like HazelCast doesn't have NodeJS API

I understand that in benchmarking Hazelcast is faster due to multithreaded implementation, and its scalable as well. But can we effectively leverage these good features using NodeJS(need Set datastructure)? Lastly, we can have multiple shards in RedisLabs which will be like having multiple threads or processes working on their respective chunk of data, in that case I believe the Hazelcast's edge due to multi-threaded nature would be true for Redis but not for RedisLabs, Any comments in this?

Prashant Mishra
  • 330
  • 4
  • 15

2 Answers2

5

Hazelcast Node.js client in fact does exist and currently provides following features

  • implementation of Open Client Binary Protocol, Redis uses text-based protocol
  • Map
    • Get
    • Put
    • Remove
  • Smart Client - clients connect to each cluster node. Since each data partition uses the well known and consistent hashing algorithm, each client can send an operation to the relevant cluster node, which increases the overall throughput and efficiency. The client doesn't need to be restarted in case of adding or removing nodes from the cluster.
  • Distributed Object Listener
  • Lifecycle Service

In terms of comparing Hazelcast and Redis server-side features, you find comprehensive doc here.

Thank you

Vik Gamov
  • 5,446
  • 1
  • 26
  • 46
  • I couldn't find support for Set data-structure, any idea if the NodeJS client support Set? – Prashant Mishra Apr 19 '16 at 07:15
  • Could you provide more details of your use case? `ISet` API is defined https://github.com/hazelcast/hazelcast-nodejs-client/blob/master/src/ISet.ts but not implemented yet. We will add `ISet` in the next release. Thank you – Vik Gamov Apr 19 '16 at 20:34
3

Well, I would suggest if you are using very complex data handling/processing you should go with HazelCast, and by nature nodejs is single threaded so if you are using it just to store key-value dont go with it.

There is official API you can use for (NodeJS + hazelcast) but with very limited functionality, uses only KeyVal

If you are just using cache as key-value store Redis is good, fast, FREE!, it can handle huge data as well with some extra setup take look at http://redis.io/topics/partitioning

in terms of support pricing RedisLabs are less costly and if you use Redisson with Redis it can give you all data structure which Hazelcast use :)

BitSet, Set, Multimap, SortedSet, Map, List, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, AtomicLong, CountDownLatch, Publish / Subscribe, Bloom filter, Remote service, Spring cache, Executor service, Live Object service, Scheduler service

RedisLabs is having much more userbase + contributors, HazelCast is bit less if you comapre users, so if your data is 2TB if its just key-value .. Redis be best

Nikita Koksharov
  • 10,283
  • 1
  • 62
  • 71
Amey Jadiye
  • 3,066
  • 3
  • 25
  • 38
  • Thanks for you inputs, any comment on RedisLabs vs HazelCast? – Prashant Mishra Apr 18 '16 at 09:49
  • 1
    Agree to disagree. The initial release of Redis is april 2009, the initial release of Hazelcast is 2008. Hazelcast doesn't come with «heavy license price», it's Apache v2 licensed, open sourced and you can use it for free. Hazelcast (same as RedisLabs) provide technical support on the commercial basis. Thank you – Vik Gamov Apr 18 '16 at 12:17
  • 3rd party extensions are nice. By bringing 3rd party extensions (like `redisson`) into the game, you introducing more moving part to your project that will increase development, maintenance and support cost of the project. Essentially, your project becomes a Axe Soup https://yakovfain.com/2011/09/14/the-axe-soup-cake-mixes-and-frameworks/ Thank you – Vik Gamov Apr 18 '16 at 15:25
  • Agree, its personal choice to have wrapper around already known technology or adapt complete new one .. again its depends on usecase to use redis or hazelcast ;) – Amey Jadiye Apr 18 '16 at 17:14