Lagom: gRPC integration

Created on 3 Jul 2017  路  7Comments  路  Source: lagom/lagom

gRPC is an increasingly-popular option for high-performance communication between microservices and other endpoints, with support for many programming languages. It is based on Protocol Buffers and adds a service definition language and wire format that works over HTTP/2

It should be possible to use gRPC as a communication channel in Lagom as an alternative to plain HTTP/"REST", either between multiple Lagom services, or between a Lagom service and a non-Lagom process.

in-progress service-api service-client feature

Most helpful comment

We are working on it. Recently announced on Akka Gitter channel.
https://github.com/akka/akka-meta/issues/64 (see Akka gRPC section)

This will set the ground for support in Lagom.

All 7 comments

:+1: very much !

How do you see streaming grpc calls fitting into Lagom ? I guess unary calls map nicely onto the already existing rest semantics in Lagom, but bidi streaming for example can go on forever between 2 services.

@jorgheymans I think gRPC streaming calls map well to Lagom's existing support for streaming over a WebSocket. Bidirectional streaming is already well supported.

It maps perfectly, see:

https://www.lagomframework.com/documentation/1.4.x/java/ServiceDescriptors.html#Streamed-messages

A gRPC streamed call is just a Lagom service call with request/response message types of Source[Foo], which is supported in Lagom today already. When I investigated gRPC last year I was incredibly surprised at just how perfectly gRPC fits what we were already doing.

Any progress on gRPC functionality?

We are working on it. Recently announced on Akka Gitter channel.
https://github.com/akka/akka-meta/issues/64 (see Akka gRPC section)

This will set the ground for support in Lagom.

Not yet stable release, but we open sourced the repo while we continue to work on it over here: https://github.com/akka/akka-grpc

Community help is of course very welcome!

All done.

Was this page helpful?
0 / 5 - 0 ratings