Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is stub on the "server" and what does skeleton mean?

Tags:

What does stub do on the server side ? And what is a skeleton ?

from wikipedia

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 ?

like image 595
program-o-steve Avatar asked Dec 21 '11 07:12

program-o-steve


People also ask

What is stub and skeleton?

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.

What is a server stub?

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.

What is the purpose of stub and skeleton classes?

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.

What is the difference between stub and skeleton in Web service?

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.


2 Answers

look at the followed picture:

skeleton

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.

like image 114
aMooly Avatar answered Sep 19 '22 22:09

aMooly


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

like image 38
Matjaz Muhic Avatar answered Sep 20 '22 22:09

Matjaz Muhic