Giter VIP home page Giter VIP logo

grpc-up-and-running's Introduction

grpc-up-and-running

License

The study note of the book "gRPC: Up and Running (Kasun Indrasiri)" and the reconstruction of source code.

Study Notes

Experience

Directory Structure

  • docs: The study notes of this books
    • diagram: The diagrams for this repository.
  • examples: The example code of gRPC sub-techniques.
    • loadbalancing: The load balancer for multiple gRPC services.
    • security: The example of the authentication solutions for gRPC.
      • one-way-tls: The one-way TLS authentication.
      • two-way-tls: The two-way (mTLS) authentication.
      • basic-auth: The basic authentication.
      • oauth2: The OAuth 2 authentication.
      • jwt: The JWT authentication.
    • grpc-gateway: The gRPC gateway example.
  • imgs: The images for this repository.
  • productinfo: The hello-world example of gRPC.
  • ordermgt: The gRPC examples for demostrating 4 gRPC communication patterns.

Differences to The Original Source Code

  • Add the detailed instruction about how to install protocol buffer compiler.
  • Add tutorials of writing server code and client code and modularize them by functionality.
  • Flatten the source code by chapter into one application.
  • Make sure the code is runnable (Fix some issues in the original source code).
  • Better documentation.
  • Add comments to make the code easy to read.

Services And Remote Methods

Product Info

Method Pattern Description
AddProduct Unary RPC Add a product.
GetProduct Unary RPC Get a product by product ID.

Order Management

Method Pattern Description
AddOrder Unary RPC Add a new order.
GetOrder Unary RPC Get a order by order ID.
SearchOrders Server-side streaming Get all the orders which has a certain item.
UpdateOrders Client-side streaming Update multiple orders.
ProcessOrders Bidirectional streaming Process multiple orders.
  • All the order IDs will be sent from client as a stream.
  • A combined shipment will contains all the orders which will be delivered to the same destination.
  • When the max batch size is reached, all the currently created combined shipments will be sent back to the client.
  • grpc-up-and-running's People

    Contributors

    wuyichen24 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.