Clancy Merrick
Clancy Merrick

Reputation: 1017

What is the fastest way for JVMs on separate machines in a LAN to communicate with other?

I would like to setup an array of powerful computers with each "node" running a JVM-based large scale application in such a way that every such node is able to do the following in the fastest or most efficient manner:

  1. Notify others of its presence
  2. Broadcast to all other nodes
  3. Send and receive data between particular nodes
  4. Determine how many other nodes are active and also their IP addresses

I was thinking TCP/UDP as a first choice but I'm not that familiar with RMI and the thought of all nodes being listeners to a JMS message queue crossed my mind also.

And then I believe there are fast "hardware" connection options (rather than just CAT-6 LAN cables).

Could someone suggest the best protocol and/or method of connecting the nodes to achieve the most efficient communication?

Upvotes: 0

Views: 84

Answers (1)

GhostCat
GhostCat

Reputation: 140427

Serious non-answer: do not do that.

What I mean is: even when performance is your top-target; in the end you intend to create a large software project that is meant to last.

And it is pretty simple: anything that you invent yourself; and anything that you do in a "non-standard" will cost you much more compared to adapting standard technology to your problem. Everybody working on this will require specialized knowledge - that makes it harder to staff your team. It makes it harder to find good tooling, good support, ...

Beyond that, you are somehow contradicting yourself. You say that you are unfamiliar with Java RMI (a standard, well document technology) - and that is a factor for you to not choose that. But then you are wiling to go for technologies that are much more of a niche than Java RMI?! That reads like "I have to get to the other city quickly, but I don't want to use the bicycle; as I don't know how to ride that. So somebody tell me how to use that motorbike thing".

In that sense, my answer is: first get clear on your requirements. "Immediate performance" is just one aspect there. A sustainable solution requires more than just meeting that one goal.

Upvotes: 2

Related Questions