gRPC over WebSocket

5,297 views
Skip to first unread message

glert...@gmail.com

unread,
Sep 11, 2017, 4:42:48 AM9/11/17
to grpc.io
Hello everyone,

We are starting to design a new architecture based on a gRPC-first approach. Every integration point we though of are well covered by the actual gRPC design model except one. Our own hardware is deployed into our clients infrastructure (a.k.a intranet) and I would like to:
* Avoid intranet networking issues by letting devices connect to our cloud as clients by using WebSockets.
* Then interchange the roles by making our devices behave as gRPC Server and the cloud as gRPC Client.

We are thinking on deploying Go based backends and C and ARM based embedded devices, which means C-based WebSocket + gRPC Server and Go-based gRPC Client over WebSocket, Is this architecture possible?

I found some issues that may be related to this one but I'm not quite sure. I'll point them anyways.

Anyone which could shed some light on this topic would be really helpful!

References:
* Add support for communication using existing FD (for client and server): https://github.com/grpc/grpc/pull/6610
* assumes host:port style addresses, cannot easily use custom transports, e.g. unix domain sockets: https://github.com/grpc/grpc-go/issues/72
* Support Unix domain socket: https://github.com/grpc/grpc-go/issues/73
* support unix domain socket: https://github.com/grpc/grpc-go/pull/169


che...@gmail.com

unread,
Sep 19, 2017, 6:18:33 PM9/19/17
to grpc.io
How interesting, I also need this for a project.  Both on client and server ends, I need to be able to provide my own FD (which was created by socketpair(), and inherited from a parent process via fork/exec).

And for golang -and- Node.JS (Javascript).

I was able to do this with Thrift with no trouble at all .... in C++, Ocaml, and golang so far.

Is this possible?

I notice that https://github.com/grpc/grpc/pull/6610 doesn't appear to cover golang, but only C++.

glert...@gmail.com

unread,
Oct 26, 2017, 9:20:42 AM10/26/17
to grpc.io
Hi all,

Today I made a Go based prototype and proved that it's feasible. Next week will have a free slot and will try to do it using c++ based library.

Please take a look and give some feedback about the idea and the overall architecture. As it was a prototype there is no even something similar to code quality...hehe[1]

glert...@gmail.com

unread,
Oct 27, 2017, 3:05:06 AM10/27/17
to grpc.io
An update with a general overview architecture, just for the one its interested in this approach:

dan.b...@huawei.com

unread,
Nov 4, 2018, 5:30:55 AM11/4/18
to grpc.io
Any update on a c++ example?
Reply all
Reply to author
Forward
0 new messages