Skip to content
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

Research connect-rpc #668

Closed
hackerwins opened this issue Aug 11, 2022 · 7 comments · Fixed by yorkie-team/yorkie-js-sdk#698
Closed

Research connect-rpc #668

hackerwins opened this issue Aug 11, 2022 · 7 comments · Fixed by yorkie-team/yorkie-js-sdk#698
Assignees
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers

Comments

@hackerwins
Copy link
Member

hackerwins commented Aug 11, 2022

Description:

There is an alternative to grpc-web called connect-web. We've been struggling a bit with grpc-web(not providing bidirectional, forcing Envoy, etc...).

The following might be considered together:

  • Can it be work with gogo/protobuf?
  • Can we remove Envoy from the server for the web?
  • Are all APIs working normally after replacing with connect-web?
  • Does it provide bi-directional communication?

Let's research connect-web.

Why:

  • It might work around the limitations of grpc-web.
@hackerwins
Copy link
Member Author

We have to look into it a little more, but it seems to be much more stable than before.

https://connectrpc.com/

@krapie
Copy link
Member

krapie commented Oct 26, 2023

This is very interesting. I never thought of a library that supports compatibility with browsers and gRPC.
It seems like it supports most of the gRPC features, including bidi streaming without Envoy translation.

If we can introduce this library successfully with SDKs, we can achieve several performance advantages and mitigate the limitations of the current server structure.

@krapie
Copy link
Member

krapie commented Oct 28, 2023

I have ran some demos of ConnectRPC, and I could see that server and browser communicating well without the Envoy proxy.

But it seems like they have no plans to support bidi streaming on browser: connectrpc/connect-es#419
The reason is that browser can support HTTP/2 but API for full-duplex is still limited.

Nevertheless, it is still a good alternative of gRPC-web since we can remove Envoy proxy and achieve several performance advantages.

@hackerwins
Copy link
Member Author

Thanks for the research. We have SDKs and server. I wonder if we should replace them all at once or gradually one by one.

@krapie
Copy link
Member

krapie commented Oct 30, 2023

I think it will be good to introduce ConnectRPC on go server and JS SDK first, then introduce other SDKs so that we can test and benchmark while keeping compatibility with other SDKs.

ConnectRPC supports multiplexing of gRPC, gRPC-web, and Connect protocols, so there will be no problem if we replace go server and JS SDK first, then introduce to other SDKs.

go server and JS SDK will communicate with the gRPC-web protocol; meanwhile, meanwhile go server and other SDKs like iOS and Android will communicate with the gRPC protocol.

@hackerwins hackerwins added enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers and removed discussion 💭 Need to be discussed labels Nov 1, 2023
@krapie
Copy link
Member

krapie commented Nov 2, 2023

I made a PoC on branch connectrpc, and now yorkie server supports three protocols(grpc, grpc-web, connectrpc) simultaneously. 

I thought gRPC-web based yorkie-js-sdk could now communicate with connect-go based yorkie server without envoy, but it did not work.

This was because connect-go did not support grpc-web-text format that yorkie-js-sdk is using (connect-go only supports grpc-web format). Ref: https://connectrpc.com/docs/multi-protocol

So full PoC of connectRPC will be possible after I PoC on yorkie-js-sdk.

@hackerwins hackerwins transferred this issue from yorkie-team/yorkie-js-sdk Nov 7, 2023
@hackerwins hackerwins changed the title Research connect-web Research connect-rpc Nov 17, 2023
@krapie
Copy link
Member

krapie commented Nov 28, 2023

I have made PoC of yorkie-js-sdk as well, and it works perfectly.
No Envoy, only ConnectRPC based yorkie client and yorkie go server!

Screenshot 2023-11-28 at 10 27 19 PM

I will soon open PRs for ConnectRPC migration in yorkie and yorkie-js-sdk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants