Friday 27 May 2016

RMI and Sockets

This post will compare the solution to choose when a program from a client calls a program in the server in distributed applications. Both scenarios can be implemented using Sockets or RMI. But when this question arises what are the advantages and inconveniences of every one? 




RMI vs Sockets

  • Solution:
    • Sockets allow to build a custom solution
    • RMI is a prebuilt architecture. 
  • Language:
    • RMI provides remote communication between programs written in Java.
    • Sockets allow communication with any other language different from Java.
  • Resources
    • RMI consumes more resources in the network.
  • Complexity
    • RMI hides serialization and network communication details, also thread management is done by RMI system. RMI also allows dynamic class loading.


RMI Architecture