At what level should I implement communication between nodes in a distributed system?

I am creating a web application that from the first day will be at the limit of what a single server can handle. Therefore, I am considering using a distributed architecture with multiple identical nodes. The goal is scalability (adding servers for more users) and fault tolerance. The nodes need to share some state between them, so some connection between them is required. I believe that I have the following alternatives for implementing this communication in Java:

  • Implement it using sockets and a custom protocol.
  • Use RMI
  • Use web services (each node can send and receive / parse an HTTP request).
  • Use jms
  • Use other high-level infrastructure like Terracotta or hazelcast

I would like to know how these technologies compare to each other:

  • When the number of nodes increases
  • When the number of messages between nodes increases (1000 messages per second and / or messages up to 100 KB, etc.)
  • At a practical level (for example, ease of implementation, accessible documentation, problems with the license, etc.).
  • I’m also interested to know what technologies people use in real production projects (as opposed to experimental or academic).
+3
source share
1 answer

Do not forget Jini .

, -, (, HTTP/RMI/ ).

8 " " , . , , .

Javaspaces, . Javaspaces, ( ) . , , .

+1

Source: https://habr.com/ru/post/1713132/


All Articles