This project demonstrate the concept of RMI API in Java programming.
This project demonstrate the concept of RMI API in Java programming. The concept of RMI in Java is that, the client can use the services provided by a server which is on a different Java Virtual Machines (JVM), making remote calls to it. The client talks to a proxy server, which is in the same JVM as the client, and in turn talks to the actual server on a different JVM. So for the client it feels as if it is talking to a local server.
The abstraction between client and server communication is taken care by the RMI API, for the client to make remote calls on the server, it has to know what all methods are available for it to use. The representation of the service provided by the server to the client is in the form of an interface which the server implements. Therefore, the key to understanding RMI is to remember that interfaces define behaviour and classes define implementation. RMI supports two classes that implement the same interface. The first class is the implementation of the behaviour, and it runs on the server. The second class acts as a proxy for the remote service and it runs on the client. In order to initiate the communication process RMI objects needs to have Stub and Skeleton Layer.
The screen shots below includes the original Sketch and class diagram for the Java Swing for both the client and server application for sending and receiving data.
The goal of the project to design and implement RMI-based Server/Client application was achieved. The classes for the math practice-test application were designed using appropriate Java Development Kit (JDK) programing language. As an added value to the project some design like Graphic User Interface (GUI) and security policy were added. The application classes were also tested using Ubuntu (Linux Operating System). The added work for this design can themselves become a complete topic for another project design. For example, the effect of adding security policy on server and client classes can be a large research project while enhancing the security of the application and considering users’ comfort. The following have been accomplished by the end of the project:
This project has received first class marks for its implementation and deployment.
Below are a list of technologies that I have used to develop the project:
Java RMI is a useful mechanism for invoking methods of remote objects. Java RMI allows one JVM to invoke methods of another, and to share any Java object type, even if client or server has never come across that object type before. It is an alternative to low level sockets. RMI is a form of Remote Procedural Call (RPC) that is available on other systems. Instead of creating objects on local machines you create some of the objects on other machines and you communicate with those objects as you would normally do with local objects.
This project provided me a good insight and underestanding of some of the Java RMI technology principles, which I might encounter in the future in some legacy product during my professional career.
I have more than 8 years experience building rich sand-alone and web applications for clients in different IT sectors.
I graduated from the University of Westminster in the United Kingdom with first class honours in Computer Networks and Communications Engineering. I currently work for Dutch company as a Senior Software Engineer.