Code Monkey home page Code Monkey logo

client-server-rpc's Introduction

Client-Server-RPC

Distributed program for client server message passing involving Remote Procedural Call, using Google Protocol Buffer(Protobuf)

This work has been submitted by Prakhar Yadav towards completion of Assignment 3: Remote Procedure Call, of Advance Operating Systems course. Make sure to read all the mentioned instructions.

Files included

  • client.cpp

  • server.cpp

  • my.proto

Requirements

  • C++ 11
  • Google Protocol Buffer library

Compilation instructions

This work assumes that g++ compiler and Google Protocol Buffer have already been installed. If not, then make sure to install them. Please read about installation of aforementioned requirements based on the machines (OS) being used.

Step-1: run protobuf compiler for defined message protocol, to generate the protobuf files to use with client/server programs. This is to be done for both machines i.e. client and server machines.

protoc -I=./ --cpp_out=./ ./my.proto

Step-2: compile the respective files in respective machines with following commands

Linux machine instructions

for server

g++ -std=c++11 -pthread my.pb.cc server.cpp `protoc --cflag --libs protobuf` -o server

for client

g++ -std=c++11 -pthread my.pb.cc client.cpp `protoc --cflag --libs protobuf` -o client
MacOS machine instructions

for server

g++ -std=c++11 -lprotobuf my.pb.cc server.cpp -o server

for client

g++ -std=c++11 -lprotobuf my.pb.cc client.cpp -o client

Running instructions

For this experiment we have made sure to connect the machines on the same network to identify the machines easily over the network. If the machines are placed on different networks, then take note of the unique IPv4 addresses.

Also, the port number that has been used by us for establishing the communication with server has been hard-coded to 5001.

Open the terminal in respecctive machines and use the following command for running the respective executables:

for server

./server

for client

./client

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.