Giter Site home page Giter Site logo

grpc-training's Introduction

gRPC Training

For sharing session purposes only, this repo will evolve along with the training session

Prerequisite

Update your PATH so that the protoc compiler can find the plugins in Unix environment you can do this:

export PATH="$PATH:$(go env GOPATH)/bin"

And on windows can follow this step https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/

Sample Case

We will create a simple scenario where there are 3 services with following dependencies order

Order Service ---call--> Product Service ---call--> Inventory Service

How to Run

  • First, make sure the .proto files compiled whenever you change it, by running make protoc inside this root directory
  • Open 3 terminals, and on each of it cd to service-inventory, service-order and service-product directory
  • Change DB_READ_URL and DB_WRITE_URL on Makefile at service-inventory to your running local database
  • And then on each terminal run go mod tidy to get the dependency if this is your 1st run, follow with make run to run the gRPC server for each respective service
  • Try to hit the order gRPC, which will call the product and also the inventory service

IMPORTANT NOTE

The proto buffer shared via symbolic link in each service, which is not an appropriate way, in the real implementation better expose the proto into an importable package

grpc-training's People

Contributors

essajiwa avatar

Watchers

 avatar

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.