What does stub do on the server side ? And what is a skeleton ?
This is a diagram from wikipedia. I installed stub both on the server machine and the client machine. I understand that stub helps in the networking on the client side but what does stub do on the server side ?
Also in the above figure what does skeleton mean ?
Stub − A stub is a representation (proxy) of the remote object at client. It resides in the client system; it acts as a gateway for the client program. Skeleton − This is the object which resides on the server side. stub communicates with this skeleton to pass request to the remote object.
Service stubs are simulations of an actual service, which can be used to functionally replace the service in a test environment. A stub server replaces the actual application server. From the point of view of the client application, the service stub looks identical to the actual service that it simulates.
The stub performs type checking. The skeleton is defined in a class which implements the interface stub. When a caller wants to perform remote call on the called object, it delegates requests to its stub which initiates communication with the remote skeleton.
Stub and SkeletonSkeleton belongs to service provider side and stub belongs to receiver side. At lower level stub and skeleton communicate with each other. From client side the business objects communicates with stub objects and stub takes the responsibility form the message and invoke the web service.
look at the followed picture:
To be short,stub and skeleton are counterparts in a web service setup. Skeleton belongs to service provider side
and stub belongs to receiver side
. At lower level stub and skeleton communicate with each other.
From client side the business objects communicates with stub objects and stub takes the responsibility form the message and invoke the web service. Once the invoking is done, at service provider side, skeleton is the parallel object for stub and it receives the request message and understands it and passes on the information to service side business objects.
Stub and skeleton both hide some complexity.
The stub hides the serialization of parameters and the network-level communication in order to present a simple invocation mechanism to the caller.
The skeleton is responsible for dispatching the call to the actual remote object implementation.
http://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmi-arch2.html
http://www-itec.uni-klu.ac.at/~harald/ds2001/rmi/rmi.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With