When the function returns, the skeleton will accept the return value, convert that into the standard format, and send it back to the stub. As you can guess, the stub converts the return value into the native format for its machine and returns the value to the client program. RPC was a major step forward, providing a means to build machine-independent distributed processing solutions. However, it was born in the age of procedural programming and does not support objects well. RPC defined a standardized data representation for sending information between computers.
ORBs understand how to communicate with other ORBs and find objects in the network.
Furthermore, clients and servers may be programmed in different languages. Comparison of these technologies is beyond the scope of this article. The syntax for invoking remote methods is almost exactly the same as local method invocations, making it easy to program distributed applications. Parameters passed in method calls between machines can be any Java object. RMI can work with true sub-classes.