I don’t think that RMI is the way anymore if RMI is suitable for your task, just do it with EJB, as you will get many functions from the application server, such as security / access control, transaction management, database management, etc. .d. RMI adoption is a painful and empty time.
Another option for distributed programming is to use GridGain , a powerful structure that you can use to easily run your program in the machine’s product cluster. Similarly, you can consider Apache Hadoop
I would start with GridGain because it is very easy to install, just unzip and run, and also relatively easy to integrate with your application.
Edit
The RMI and Messaging systems are slightly different, since the use of synchronous and asynchronous communication should depend on the overall system architecture and how the different components interact with each other. For example, asynchronous communication may be more appropriate if the service call is time consuming, for example, performing a batch operation or archiving large data. In this case, the service client does not support system resources (for example, sockets and threads).
On the other hand, synchronous communication may be more appropriate when the service / function takes a short time, and each remote service depends on the result of the previous one.
iTech source share