HazelcastInstance vs HazelcastClient

痞子三分冷 提交于 2019-12-06 21:48:59

问题


I am novice in hazelcast and I have a few questions.

As I understand hazelcast comes with two entities HazelcastInstance(as I understand it is server) and HazelcastClient.
These entities even packed into different jars.

I have noticed that in our project we use only HazelcastInstance. I have asked collegues why don't we use HazelcastClient. As I understand their explanation HazelcastInstance has more possibilities than HazelcastClient. Thus

HazelcastInstance = HazelcastClient + AnotherFeatures

But for me it strange that these entities packed to different packages if it is truth.

Please explain me when should I use HazelcastClient and when HazelcastInstance


回答1:


HazelcastInstance, as you said correctly, is a Hazelcast member instance. Therefore it stores information and can execute tasks in the cluster. A HazelcastClient though is just a proxy to another running Hazelcast cluster. You can imagine it as the JDBC connector when thinking about relational databases. It neither stores data itself, nor does it execute tasks sent through the ExecutorService feature.

If your colleague name it "more features", well fair enough, I would prefer to say server-server environment and client-server environment :)



来源:https://stackoverflow.com/questions/40104361/hazelcastinstance-vs-hazelcastclient

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!