JAVA RPC (Remote Procedure Call)

  1. The calling stub is suspended when parameters are transferred across the network to the stub where the procedure is to execute. The call is a local procedure call with parameters pushed onto the stack in the normal way.
  2. The client stub packs the procedure parameters into a message and makes a system call to send the message. The packing of the procedure parameters is called marshalling.
  3. The client’s local OS sends the message from the client machine to the remote server machine.
  4. The server OS passes the incoming packets to the server stub.
  5. The server stub unpacks the parameters called unmarshalling
  6. When the server procedure is finished, it returns to the server stub, which marshals the return values into a message. The server stub then hands the message to the transport layer.
  7. The transport layer sends the resulting message back to the client transport layer, which hands the message back to the client stub.
  8. The client stub unmarshalls the return parameters, and execution returns to the caller.

Advantages of Remote Procedure Call

Disadvantages of Remote Procedure Call

Implementation

Server Side

  1. HelloWorld.java
  • import javax.jws.WebMethod;
  • import javax.jws.WebService;
  • import javax.jws.soap.SOAPBinding;
  • import javax.jws.soap.SOAPBinding.Style;

Client Side

  • import java.net.URL;
  • import javax.xml.namespace.QName;
  • import javax.xml.ws.Service;

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hyperconnectivity and Openness in the Digital Age — The Computing Conference 2018

Photo by bruce mars on Unsplash

Integrating Serverless with SaaS-based Cloud Data Warehouses

WLSDM Scheduler: How to deploy an application to a WebLogic Server automatically and visualize the…

Git Basics For Beginners

Moving on..

Hadoop: A Brief Introduction

Mind the gap… Day 8 of Makers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paul issack minoltan

Paul issack minoltan

More from Medium

Create Your Own Echo Server in Java

Inversion of Control & Dependency Injection

Pitfalls I Encountered Building a REST API