Remote Procedure Call Architecture

Divya Bandara
3 min readJul 16, 2020

RPC Architecture

RPC Architecture

Remote Procedure Call (RPC) is an architecture that uses to request a service from a program that is located in another computer through a network. The specialty of RPC protocol is, the requesting service should not understand the network’s details.

RPC model consist of a client and a server where requests are done by the client and the services are providing by the server. This architecture works as a regular procedure call and works as a synchronous operation requesting program and it is suspended until the results of the remote procedure are returned.

There are three main communication primitives available in RPC model.

By following “HelloWorld” program, it shows how the RPC model is used in real world.

File structure of the developed system is as follows. It consists of

· HelloWorld.java

· HelloWorldPublisher.java

· HelloWorldImpl.java

· HelloWorldClient.java

HelloWorldClient.java

HelloworldClient consists of the client URL (server endpoint) which client uses to connect with the server.

And the response to the client, from server is caught by the HelloworldClient.java

By running the URL in the browser, we get the following XML file.

By running the HelloWorldPublisher, the develoed hello world web service is deployed in URL , “http://localhost:9999/ws/hello

HelloWorld.java

@webservice — in the HelloWorld.java file is an annotation used to makes itself available over the internet and uses a standardized XML messaging system. It implements the JWS file as a web service.

@webmethod — annotation use to expose the method as a public operation.

@SOAPBinding — annotation use to map the web service onto the SOAP message protocol.

HelloWorldImpl.java

HelloWorldImpl.java use to implement the method in HelloWorld interface.

Output

This is the output we get by running the HelloWorldClient.java file.

--

--