3. Comparison of Client/Server Model Implementation
3.4 Comparison of Implementation of Client/Server
Model's
Studying the two implementations reveals a number of issues, both
positive and negative, about each mechanism.
The basic application architectures differ significantly.
The socket architecture is a very simple client to server topology.
This is in stark contrast to the RMI architecture, which requires
the use of an interface to acknowledge the remote services.
As a result of this the actual implementation of
the connection is simpler using the socket mechanism which only
requires the client to create a socket instance and initialise
the connection by specifying the port to use to communicate. However
the simplicity of creating the connection is matched only by the
complexities faced when communicating through the connection.
As we know sockets communicate by transmitting streams of data
between client and server. Thus all data needs to be processed
into a transmittable form (primitive data type) explicitly at
by the sender before data is transmitted. The receiver of the
data stream must process the data from its transmitted form into
form that allows it to interpret the data.
Contrast this with the RMI implementation where
the process of registering the service with the rmiregistry may
be more draw out but than simply establishing a direct connection
but the benefits this provides is evident in the ease with which
remote services are accessed. Remote services can be accessed
as if they were local to the client. More importantly, because
RMI supports the passing of objects and primitives no processing
is required to data during remote transmissions.
Overall, the greater sophistication of the RMI mechanism
makes it a far more practical solution for the above application.
However the RMI mechanism is only a viable solution in java environments
while the socket mechanism could be applied to any language environment.
Next Page