- 2069 Chaitra · 3+5 marks
Middleware importance; RPC operation
Short answer
Middleware hides heterogeneity, provides distribution transparency and common services. RPC lets a client call a remote procedure: the stub marshals arguments, sends them to the server stub, which unmarshals, calls the procedure, and returns the result.
How do you convince that middleware plays the important role in Distributed System? Explain the operation of RPC in client server communication in Distributed System.
Importance of middleware
Middleware is a software layer between the application and the operating system/network of each node that hides heterogeneity and gives a uniform programming model (RPC, RMI, message queues, ORB, transactions). Examples: CORBA, Java RMI, DCOM, web services.
Its role:
- hides differences in hardware, OS, network and languages (heterogeneity), via IDL and standard data formats;
- provides distribution transparency (location, access, replication, failure);
- gives common services: naming, security, transactions, events, persistence;
- makes application development easy (programmers write application logic, not network code) and promotes openness and interoperability.
Without middleware each application would have to deal with sockets, data conversion and failures, and could not run on mixed systems. That is why a distributed system is described as having a middleware layer (Tanenbaum) which gives the "single system" view on top of independent computers.
Operation of RPC in client-server communication
Remote Procedure Call (RPC) lets a program call a procedure that runs in another address space, normally on another computer, with the same syntax as a local call. The network communication is hidden from the programmer.
Operation
Client process Server process
+---------------+ +---------------+
| Client: call | | Server |
| procedure | | procedure |
| Client stub | | Server stub |
| RPC runtime |<-network->| RPC runtime |
+---------------+ +---------------+
- The client calls the client stub like a local procedure.
- The stub marshals (packs) parameters into a message (for example using XDR) and passes it to the RPC runtime, which sends it.
- The server's runtime receives it and gives it to the server stub, which unmarshals the parameters.
- The server stub calls the actual procedure.
- The result goes back the same way (marshalled, sent, unmarshalled) and the client call returns.
Interface definition: an interface description (IDL) is compiled to generate the stubs, so both ends agree on data types.
Request-reply: the client blocks until the reply arrives (synchronous). A binder (port mapper) locates the server, and timeouts with retransmission handle lost messages; the call semantics are normally at-least-once or at-most-once.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Reliable client-server communication · Distributed System, chapter 9
- RPC and its communication semantics · Distributed System, chapter 2 · asked 3×
- True distributed system; middleware organisation · Distributed System, chapter 3
- Middleware role; CORBA and services · Distributed System, chapter 4
- Distributed object, IDL; RPC vs RMI · Distributed System, chapter 2
- Object communication; RPC vs RMI · Distributed System, chapter 2
- Client-server versus distributed object architecture · Software Engineering, chapter 3
- Client/server architecture and FTP operation · Internet and Intranet, chapter 3
- Client-side versus server-side scripting · Web Technology, chapter 3 · asked 3×
- Server before client; TCP reliability · Computer Networks and Security, chapter 5 · asked 2×