Skip to content

bBankert/grpc-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRPC Comparison

Compare side-by-side the request speed of grpc-web vs normal rest requests

How to compile protos

Install:

  1. protoc-gen-grpc-web
    • Note: you can also globally install it through node with npm i -g protoc-gen-grpc-web and run the same commands
  2. protoc
  3. protobuf-javascript

Ensure that all of these are findable in the PATH

For Windows users, it is recommended to use WSL/WSL2 for compilation due to missing libraries in the current version github issue

Run the CompileProtos.sh file and enter the inputs to generate the client files

How to run the app

  1. Open three terminals

    • One for the client
    • One for the rest-server
    • One for the grpc-server
  2. Run the grpc-server along with the envoy proxy with the commands:

# Envoy proxy
docker run -d -v "$(pwd)"/envoy.yaml:/etc/envoy/envoy.yaml:ro \
    -p 8080:8080 -p 9901:9901 envoyproxy/envoy:v1.22.0

# Server
node index.js
  1. Run the rest-server with node index.js

  2. Run the react app with npm run start

  3. Have fun!

About

Comparing grpc (web) with normal rest requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published