GithubHelp home page GithubHelp logo

grpc-asyncio's Introduction

DISCLAIMER: Just a Proof of Concept.

Native Asyncio implementation for gRPC.

This Proof fo Concept implements a simple unary call, implementing a naive asynchronous client which is tested by connecting to an external server that uses the official synchronous implementation for Python.

The following snippet shows how the client is initalized and how the unary call is executed:

grpc_init_asyncio()
channel = await create_channel("127.0.0.1", 3333)
response = await channel.unary_call(
    b'/echo.Echo/Hi',
    echo_pb2.EchoRequest(message="Hi Grpc Asyncio").SerializeToString()
)

Development of grpc-asyncio

To build grpc-asyncio you'll need to clone the repository and build the gRPC package shipped as a git submodule, read which dependencies are needed to build the gRPC package in your OS in this file guide and follow the next commands:

$ git clone --recursive [email protected]:pfreixes/grpc-asyncio.git
$ cd grpc-asyncio/vendor/grpc
$ git submodule init
$ git submodule update --recursive
$ make

For debugging purposes the library can be compiled in debug mode, as can be seen in the following command:

$ CONFIG=dbg make

The debug mode will allow you to get an extra set of messages when the gRPC library is executed with the traces enabled, also debugers will leverage on that by using the extra information emitted by the compiler.

To build the grpc-asyncio package we will go back to the root directory of the grpc-asyncio package and we will follow the next commands:

$ make install-dev
$ make compile

For running the test we will run the following command:

$ make test

The environment variable DEBUG=True can be used to run the test which tells the gRPC library to run in verbose mode. By default when this environment variable is used the debug version of the gRPC library will be used, if the library can not be found the execution will fail.

grpc-asyncio's People

Contributors

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