Wednesday, December 24, 2003

Re: java rmi basics

Good blog!

this will autogenerate two files with form *_stub.class and *_skel.class. these are known as stub and skeleton classes. rmic is actually a proprietory network protocol. just like any network app, a rmi app has to pass code thru the app layer, transport layer etc. these two classes define how data is to be transferred between the client and server side. rmic basically checks all the remote methods defined and generates the two classes. the stub is on the server side and skel is on the client side. hence the client app communicates with the skel which talks over the network to the stub which to the server class. in this way the app works over the network.

So basically, stub and skel are proxy classes? When you do anything on your client class, it actually communicates with stub which has all the network plumbing to connect and make the request to skel which in turn talks to the server class? That's how it's so easy and straightforward.

Also, the "Naming" stuff... this is just like a directory service isn't it? That's how the server publishes it's service and also how the client finds it.

I suppose this is essentially the same as what web services do, but in a proprietary format. Web services use SOAP (which sits on top of HTTP) and XML instead of rmic and UDDI instead of "Naming". But I guess since it's proprietary it's more efficient.

No comments: