-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSockets or socket.io interface #152
Comments
Grpc does work. Grpc gateway proxy server based on nginx or the golang grpc gateway. This gateway is the standard approach to this problem. But I am not super familiar with the exact message pattern semantics that liftbridge client should enforce. Web grpc can't do bidirectional steaming for example but that's rarely needed. Maybe someone else can offer advice about that aspect |
Does this solve the problem? It solves the proxy on the server, so that NATS/liftbridge isn't exposed on the internet, but the client problem is a different one: Web browsers only allow outgoing http(s) traffic via JS. If I am not mistaken, there is no way to contact a grpc server directly. I found something interesting, though, which might work: https://github.com/grpc/grpc-web Still, it would be a lot easier if there was a direct way for connecting via socket.io, even though less performant, I believe performance would be better than running through proxies. |
a websocket server via liftbridge client as bridge to liftbridge/nats is work great. websocket connect to gRPC should work, if message is not plain string , it need some data searilized / un-searilized. |
We got grpc golang and flutter web working using envoy and grpc gateway Now seeing if liftbridge works through it for flutter web. The advantage is that it's all pure grpc and it's codegen for client and server |
You can run envoy without docker BTW on linux and mac. Not windows ( yet). |
Issue #375 opened for an MQTT bridge. This could allow for an embedded MQTT broker that handles websockets, for a browser connection |
Just like NATS, Liftbridge only offers a gRPC interface. gRPC is great for servers but doesn't work inside browsers, so I would consider a second WebSockets or socket.io interface as extremely useful.
Right now, to use NATS/Liftbridge from a browser directly, a proxy is required.
The text was updated successfully, but these errors were encountered: