4/24/2021 0 Comments Rmi Application In Java Netbeans
The foundation and the main phases (principles) remain the same and Figure 1 depict a very useful representation of how the things are done.RMI is one of the classic methods compared to other modern methods (e.g..NET Remoting, WCF Services etc.), used for accessing objects remotely.RMI is very limited (is the single thing which is able to do it) and it give us a platform-independent understanding.By having the objects remotely stored somewhere, the access to them becomes very transparent for the programmer.
The examples from here are based on original examples from 1. ![]() RMI is using byte streams in order to transfer data and method calling (invocations). This process is done automatically by the RMI infrastructure. The server component will control all the objects by registering them using a naming service. After this process is realized, this interface will be accessed by client programs. By using the same naming service, the client will obtain a reference to the interface, called stub. In the stub, which is local placeholder, the remote object is stored. On the server system, which is remotely, there is a skeleton. In the moment when the client will invoke a method specific to the remote object, it will appear to the client like being invoked directly on the object. In reality, there is a method that is equivalent is called in the stub. The stub will forward the calling and all the parameters to the skeleton that is placed on the remote server. The parameters that can be used are some primitives types which implements Serializable interface. The process of serializing these types of parameters, is known as marshalling 3. Next, the skeleton from the server will convert the stream as a method call with the give parameters. In the end, the skeleton will invoke the method (which is implemented on the server). The phases that we have described above are depicted in the Figure 1. The figure shows a very simplified way of what actually is done at network level. Two more layers are implied at each end of the transmission, transport layer and remote reference layer. In order to gain more knowledge regarding the network layers, go here 2 and here 3. Starting with J2SE 1.2, the skeleton was totally removed and the servers components are communicate with the reference layer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |