RMI Vs. Sockets And Object Serialization
RMI vs. Sockets and Object SerializationThe Remote Method Invocation (RMI) is a Java system that can be used to easily develop distributed object-based applications. RMI, which makes extensive use of object serialization, can be expressed by the following formula:RMI = Sockets + Object Serialization + Some UtilitiesThe utilities are the rmi registry and the compiler to generate stubs and skeletons.If you are familiar with RMI, you would know that developing distributed object-based applications in RMI is much simpler than using sockets. So why bother with sockets and object serialization then?The advantages of RMI in comparison with sockets are: * Simplicity: RMI is much easier to work with than sockets * No protocol design: unlike sockets, when working with RMI there is no need to worry about designing a protocol between the client and server -- a process that is error-prone. The simplicity of RMI, however, comes at the expense of the network. There is a communication overhead involved when using RMI and that is due to the RMI registry and client stubs or proxies that make remote invocations transparent. For each RMI remote object there is a need for a proxy, which slows the performance down.(by)Qusay H. Mahmoud
2009-2016 downloadmela.com. All rights reserved.