[英]How to delegate threads to multiple servers and keep a track in which thread is on which server using Java
We have a solution which runs on 13 servers. 我们有一个在13台服务器上运行的解决方案。 I wish to know how do we explicitly delegate threads to different servers and keep a track of which thread was on which server.
我想知道我们如何将线程显式委派给不同的服务器,并跟踪哪个线程在哪个服务器上。
Your application need to implement asynchronous event handling. 您的应用程序需要实现异步事件处理。 One instance (node) of the application will trigger an event to another instance.
应用程序的一个实例(节点)将触发另一个实例的事件。 On receiving the event, the second instance may decide what it should do.
在接收到事件之后,第二实例可以决定它应该做什么。 That way the thread on the first instance will delegate to a thread in the second instance.
这样,第一个实例上的线程将委派给第二个实例上的线程。 Once the second instance is done with the handling, it may notify back to the first instance.
一旦第二实例完成处理,它可以通知第一实例。 Not sure of the architecture of your product (messaging between multiple nodes, if there is any event handling mechanism which is already there etc).
不确定产品的体系结构(在多个节点之间进行消息传递,如果已经有事件处理机制等)。 You may like to check Node.js, Akka.
您可能想检查一下Akka的Node.js。 But not really sure if that will work for you.
但不是很确定那是否适合您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.