Git Product home page Git Product logo

grpc-nodejs-js's Introduction

GRPC NodeJS

Features
  1. Four RPC types
  2. Metadata
  3. Authentication
  4. Deadlines and Cancellation
  5. Compression
  6. Load Balancing
  7. Automatically generated boilerplate
Protocol Buffers
syntax = "proto3"

// Define message types
message EchoMessage = {
    string value = 1;
}

// Define Service and RPCs
service EchoService {
    rpc EchoUnary (EchoMessage) returns (EchoMessage);
    rpc EchoClientStream (stream EchoMessage) returns (EchoMessage);
    rpc EchoServerStream (EchoMessage) returns (stream EchoMessage);
    rpc EchoBidiStream (stream EchoMessage) returns (stream EchoMessage); // BiDirectional
}
gRPC and JavaScript
  1. Two primary environments: Browser and Node.js
  2. Browser has limitations regarding gRPC a. Might not support HTTP2 at all b. Lacks API for line-grained control over HTTP2
  3. Node.js is a typical backend environment

grpc

Install
npm install --save grpc
npm install @grpc/grpc-js // Beta
Project Installation
1. yarn init -y
2. yarn add grpc uuid
3. yarn add @grpc/proto-loader
Project Installation
1. yarn server
2. yarn client

grpc-nodejs-js's People

Watchers

 avatar Shubham D 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.