英文:
Apache Ignite Client
问题
I wanted to understand the pro's/cons of using a client node within a cluster vs an external thin client. Of course, the thin client will be less chatty compared to a client node, and hence, it will have fewer network interactions. Changes in the cluster topology (nodes adding/removing) would not affect the client, while it directly affects the client node.
All of these factors make me wonder if a thin client will always be a better option, or if there are other cases where having a client node makes more sense.
If Apache/GridGain has any documentation or links related to this, that would be helpful.
TIA
英文:
I wanted to understand the pro's/cons of using a client node within a cluster vs a external thin client. Ofcourse the thin client will be less chatty Vs a client node and hence less n/w interactions. Changes in the cluster topology(nodes adding/removing) would not affect the client, while it directly affects the client node.
All these make me wonder will a thin client always be a better option or are then other cases where having a client node makes much more sense.
If Apache/Gridgain has any documentation/links around this. That would do too.
TIA
答案1
得分: 1
我认为在未来的主要版本中不会再有厚客户端;而是会由一个轻客户端取而代之,因为它只使用单一协议和轻量级设计。
目前,厚客户端仍然具有一些特点优势:
- 更快速和更好的发现和通信(拓扑变化)
- 对等类加载
- 近期缓存
- 高级计算能力
- 事件监听
- 完整的数据结构支持/分布式锁定
- 等等
功能的平等性列表不断缩小,但值得一提的是,某些功能可能仅适用于特定平台。例如,在.NET轻客户端中,但在Java中没有。
您已经提到了一些缺点 - 作为一个全局性的集群成员意味着具有与服务器节点相同的义务。即,良好的网络通道和参与所有全局事件。
这意味着在某些情况下,厚客户端可能无法部署并按预期工作。通常涉及到NAT、私有网络、防火墙等问题。
总的来说,我想说,如果您的任务可以由轻客户端来实现,那就使用它。如果所需的功能/API尚不可用,考虑使用厚客户端。例如,如果您需要类似每分钟运行的应用程序的健康检查,那么您肯定会希望为该任务使用轻客户端,而不是触发PME。
英文:
I think there won't be any thick client in future major releases; it will be superseded by a thin one instead because of a single protocol and lightweight design.
At the moment, a thick client still has some features advantage:
- faster and better discovery and communication (topology changes)
- peer class loading
- near caching
- advanced compute capabilities
- events listening
- full data structures support/distributed locking
- etc
The feature parity list is constantly shrinking, but it's also worth mentioning that some features might be available for a particular platform only. For example, in .NET thin client, but not in Java one.
You have mentioned the cons already - being a cluster-wide citizen implies the same obligation a server node has. I.e. a good network channel and participation in all global events.
That means in some cases a thick client might not be deployed and working as expected. Usually it's about NAT, private networks, firewalls, and so on.
In general, I'd say if your task could be implemented by a thin client, use it. If a required feature/API is not yet available, consider using a thick one. For example, if you need something like a health-check for your application running every minute, you definitely would like to have a thin client for that task and not to trigger PME.
答案2
得分: 0
粗客户端了解所有节点、数据分布,在大多数情况下更高效,如果您的部署允许,可以使用它们。另外,粗客户端支持所有GridGain API。
轻客户端轻量级(类似于JDBC驱动程序),通过二进制协议连接到集群,具有明确定义的消息格式,支持有限的API集,并允许支持多种语言:Java、.NET、C++、Python、Node.JS和PHP都可以直接使用。
查看轻客户端与粗客户端的差异文档。
还可以查看轻客户端的功能。
本节解释了如何选择客户端。
例如,粗客户端可用作查询的减少器,从而避免了额外的跳跃(从服务器到轻客户端),在执行分区缓存上的查询时降低了集群负载。
粗客户端还可以直接参与计算作业,通常用作减少器,而轻客户端只需提交作业到集群。
粗客户端还可以接收事件通知。
如果集群拓扑发生变化,粗客户端可以更可靠地重新连接,因为它们了解当前的集群状态。
英文:
Thick clients are aware of all nodes, data distribution, and are more efficient in most cases, use them if your deployment allows for it. Plus, thick clients support all of the GridGain APIs.<br>
Thin clients are lightweight(similar to a jdbc driver), connect to the cluster via binary protocol with a well-defined message format, support a limited set of APIs, and allow for support of multiple languages: Java, .NET, C++, Python, Node.JS, and PHP are supported out of the box.
see docs on thin/thick clients differences<br>
Also take a look at capabilities of thin clients.
This section explains how to choose a client.
For example, a thick client serves as a reducer for queries, thereby you avoid an extra hop(from server to thin client), and lessening the cluster load when executing a query on a partitioned cache.<br>
A Thick client could also directly participate in compute jobs, usually it is used as a reducer, whereas a thin client just submits a job to the cluster. <br>
A thick client could also receive event notifications.
Thick clients could reconnect more reliably(because they know the current
cluster state) if the cluster topology changes.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论