Giter VIP home page Giter VIP logo

grpc-sideband's Introduction

gRPC sideband data support

Overview

the gRPC sideband library is intended to be used in conjunction with a standard gRPC service to provide low latency or high bandwidth communication between the client an server. In most cases gRPC streaming support is sufficient but in cases where large amounts of data (>1-2GB/s) needs to be streamed, or the communication needs to happen with very low latency (<30us).

The sideband channel supports a variety of methods for communication:

  • SHARED_MEMORY - use a shared memory region for communcation. This works when both the client and the server are on the same computer.
  • DOUBLE_BUFFERED_SHARED_MEMORY - Same as shared memory but with a double buffered memory region so that the server can write the next set of data while the client is reading.
  • SOCKETS - uses a standard TCP socket to stream the data. this is especially useful for testing an implementation since it uses standard hardware.
  • SOCKETS_LOW_LATENCY - uses a standard TCP socket that has been configured for low latency use. This will comsume more CPU than a standard socket setup.
  • HYPERVISOR_SOCKETS - Not currently implemented.
  • RDMA - Uses RDMA to perform the data transfer. Network cards must both support RDMA.
  • RDMA_LOW_LATENCY - Users RDMA with a low latency communcation model for the data transfer. This will consume more CPU than standard RDMA communication.

This project supports Windows, Linux and Linux RT.


Examples

The gprc-perf performance testing repo contains examples on how you can incorporate sideband communication into your gRPC based API.

Example 1 - Low Latency Communication

The grpc-perf performance testing repo has a simple example of how to integrate side-band communication with a gRPC API. The purpose of this example is use the sideband channel for 2-way low latency communication.

Client implementation is in PerformSidebandMonikerLatencyTest

The server code which implements the initiation of the streaming in NIPerfTestServer::BeginTestSidebandStream

The client will then use the Data Moniker service to performance the read-write loop which is implemented by the server in NIMonikerServer::BeginSidebandStream

The read write loop is implemented by the server in NIMonikerServer::BeginSidebandStream

Example 2 - High bandwidth communication

In this example the clinet and server perform a streaming communication call using a standard gRPC bidirectional stream. A sideband channel is established to transfer large payload data as part of the call.

Client code is in PerformSidebandReadTest

Server code is in NIPerfTestServer::TestSidebandStream


Building

See Building

grpc-sideband's People

Contributors

ccifra avatar shruthi-ravi 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.