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

Migrate RPC to ConnectRPC #698

Merged
merged 21 commits into from
Dec 15, 2023
Merged

Migrate RPC to ConnectRPC #698

merged 21 commits into from
Dec 15, 2023

Conversation

krapie
Copy link
Member

@krapie krapie commented Nov 28, 2023

What this PR does / why we need it?

Migrate RPC to ConnectRPC.
For more information about this migration, follow: yorkie-team/yorkie#703

With this support, you can resolve several issues:

Any background context you want to provide?

Note

We need to revert docker-compose yorkie image to yorkieteam/yorkie:lastest instead of krapi0314/yorkie:test

What are the relevant tickets?

Fixes yorkie-team/yorkie#668

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@krapie krapie added the protocol changed 📝 Whether the protocol has changed label Nov 30, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 45 lines in your changes are missing coverage. Please review.

Comparison is base (5be4296) 68.67% compared to head (97a0845) 81.75%.
Report is 3 commits behind head on main.

Files Patch % Lines
src/api/converter.ts 89.76% 14 Missing and 12 partials ⚠️
src/client/client.ts 84.53% 12 Missing and 3 partials ⚠️
src/client/auth_interceptor.ts 33.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #698       +/-   ##
===========================================
+ Coverage   68.67%   81.75%   +13.08%     
===========================================
  Files          58       57        -1     
  Lines        9011     4161     -4850     
  Branches      811      805        -6     
===========================================
- Hits         6188     3402     -2786     
+ Misses       2561      502     -2059     
+ Partials      262      257        -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hackerwins hackerwins force-pushed the connectrpc branch 4 times, most recently from 0da6a70 to e05669b Compare December 13, 2023 02:51
@hackerwins hackerwins force-pushed the connectrpc branch 2 times, most recently from d0a2dec to d43e0bc Compare December 13, 2023 05:38
@hackerwins hackerwins marked this pull request as ready for review December 13, 2023 06:15
@hackerwins
Copy link
Member

hackerwins commented Dec 13, 2023

The bundle size has been reduced after introducing connect-rpc.

grpc-web:

-rw-r--r--@  1 hackerwins  staff   340B Dec 13 15:24 tsdoc-metadata.json
-rw-r--r--@  1 hackerwins  staff   137K Dec 13 15:24 yorkie-js-sdk.d.ts
-rw-r--r--@  1 hackerwins  staff   149K Dec 13 15:24 yorkie-js-sdk.d.untrimmed.d.ts
-rw-r--r--@  1 hackerwins  staff   1.2M Dec 13 15:24 yorkie-js-sdk.js
-rw-r--r--   1 hackerwins  staff   1.7M Dec 12 18:44 yorkie-js-sdk.js.map

connect-rpc:

-rw-r--r--@ 1 hackerwins  staff   340B Dec 13 14:42 tsdoc-metadata.json
-rw-r--r--@ 1 hackerwins  staff   137K Dec 13 14:42 yorkie-js-sdk.d.ts
-rw-r--r--@ 1 hackerwins  staff   149K Dec 13 14:42 yorkie-js-sdk.d.untrimmed.d.ts
-rw-r--r--@ 1 hackerwins  staff   740K Dec 13 14:42 yorkie-js-sdk.js
-rw-r--r--@ 1 hackerwins  staff   1.1M Dec 13 11:53 yorkie-js-sdk.js.map

Related to #434

@krapie krapie self-assigned this Dec 14, 2023
@hackerwins hackerwins requested a review from blurfx December 14, 2023 09:57
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

@hackerwins hackerwins merged commit 9ecdd2e into main Dec 15, 2023
2 checks passed
@hackerwins hackerwins deleted the connectrpc branch December 15, 2023 08:50
hackerwins added a commit that referenced this pull request Dec 15, 2023
With this support, we can resolve several issues:

- Removes dependency with Envoy proxy to communicate with grpc-web
- Reduces SDK bundle size by half bundle size of #434
- Standardizes API interfaces to powerful fetch API

For more information about this migration, follow: yorkie#703

---------

Co-authored-by: Youngteac Hong <[email protected]>
hackerwins added a commit that referenced this pull request Jan 8, 2024
A script error occurred when creating a snapshot due to a typo in the
converter during migrating to ConnectRPC.

#698

This commit fixes the typo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol changed 📝 Whether the protocol has changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Research connect-rpc
2 participants