Answer the question
In order to leave comments, you need to log in
How to easily exchange messages between Java applications?
There are several Java applications (7) between which I need to exchange json messages with minimal delay, now they are all on the same machine, but then they can be on different ones. As far as I understand, you need to dig towards JMS, but its implementations (for example, ActiveMQ) seemed to me too heavy for my task, and I don’t want to implement interaction through sockets manually. What can you advise?
Answer the question
In order to leave comments, you need to log in
If you need a minimum delay, then you need to abandon json in favor of binaries, such as protobuf. Cut everything as much as possible in messages, leaving only the really important. It is advisable to use pure udp if possible, or if losses are critical, take tcp.
As an option for a really simple solution, you can try kryonet, where the out-of-the-box serializer is quite convenient.
Also, if your data is shared, then try without messages at all! Look towards hazelcast.org or apache ignite. These are In-Memory DB systems, caches that live in memory and distribute data between nodes.
The point is, one client publishes data in a distributed hash, and all the rest immediately read this information, with buns, preference and courtesans. Very handy, especially for distributed computing or shared session storage, or for data exchange.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question