Why nameko did not use something like JSON RPC for serialization?

From @worldmind on Sun Feb 25 2018 11:34:30 GMT+0000 (UTC)

As I understood after reading questions #455 and #354 (not found info in docs) nameko use own, non standard, calls serialization to json.
On my opinion it make difficult using nameko in heterogeneous environments, for example yesterday on by.pycon.org I ask @tarekziade why in Mozilla they write REST microservices, and answer was because they using not only python.

Copied from original issue: https://github.com/nameko/nameko/issues/516

What’s the status on Nameko support gRPC?

There’s nothing beyond a partial proof of concept at the moment.

I have a hyper-h2 HTTP2 server extension running in Nameko, and I’m attempting to hook up the GRPC components. It’s really just an experiment at this point because I am new to both GRPC and HTTP2.

I want the eventual API to look something like:

class Service:

    def say_hello(self, request, context):
        return HelloReply(message="Hello, %s!" % request.name)

Quick update. I’ve actually got a working prototype now, of an entrypoint and a DependencyProvider client.

It’s very rough around the edges but I’ll put together a repo in the next few days and will iterate from there.

1 Like

There’s a decent start here:

A few things are notably missing:

  1. The service name is hardcoded in the headers, whereas it should support proper service name and package name extracted from the proto definition.
  2. Timeouts not supported
  3. Message compression not supported

I will try to fill in these blanks and then cut a first release.

The first release of nameko-grpc is on PyPI now :tada:

All of the missing features listed above have been added, as well as a few other bells and whistles. I’ve also transferred the repo to the nameko org on Github. You can find it at: https://github.com/nameko/nameko-grpc.


Checkout article and examples of using gRPC Extensions: