Organisation of middleware uses two concepts.
Wrappers adapt a component’s functions into something that’s acceptable to the client application. It does this by offering an interface in which the client and server / component can communicate.
Interceptors break the usual control flow to allow other application code to be executed.
In the above example, if object B is replicated, then the client application needs to manually keep track of all the replicas and transmit the invocation call to all of them.
With an interceptor, the Request-Level Interceptor manages these calls, so only one call is needed from the client.
Representational State Transfer is used to provide a convenient interface for services to communicate over the web. One machine acts as a client, while the other acts as a server.