View RSS Feed


Interfaces: The Heart of RMI

Rate this Entry
, 07-07-2012 at 06:23 PM (1024 Views)
One principle is associated with RMI architecture and that is the implementation of behavior and definition of behavior are totally separate concepts. Code is allowed by RMI which defines what behavior is and also the code which keeps it separate.

This is nicely fitted with the distributed system needs where clients have major concern regarding the service definition and servers to be focused to provide the services.

Remote service definition in RMI is coded by usage of a Java interface. In a class, the remote service implementation is being coded. Hence, RMI could be understood by remembering that classes would be defining the implementation and interfaces would define the behavior.

Separation is illustrated in this given diagram:

Name:  1.jpg
Views: 132
Size:  13.7 KB
Remote service definition 1

It shall be remembered that an executable code is not present in java interface. Two classes are supported by RMI which would be implementing the similar interface. First class is the behaviorís implementation that would run at server. Second one acts to be proxy and runs at client. This is shown as following:

Name:  1.jpg
Views: 170
Size:  16.9 KB
Remote service definition 2

Submit "Interfaces: The Heart of RMI" to Facebook Submit "Interfaces: The Heart of RMI" to Digg Submit "Interfaces: The Heart of RMI" to Submit "Interfaces: The Heart of RMI" to StumbleUpon Submit "Interfaces: The Heart of RMI" to Google