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

Moving to a RPC server #28

Open
axyiee opened this issue May 5, 2022 · 1 comment
Open

Moving to a RPC server #28

axyiee opened this issue May 5, 2022 · 1 comment
Assignees
Labels
✨ feature request New feature or request 🔌 grpc This issue or pull request is related to the gRPC modules 🏷️ in progress Issue or pull request that is already being worked on 🚀 performance Issue or pull request for performance improvements ❗ priority: high 🏗️ structuring This issue or pull request is related in how we can improve the project structure

Comments

@axyiee
Copy link
Member

axyiee commented May 5, 2022

Moving to a RPC server

Table of contents:

  1. 📰 Summary
  2. 🤔 Motivations and the proposed solution
  3. 🤷 Final considerations

Summary

We should use a RPC server instead of a REST server for our internal CRUD operations.

Motivations and the proposed solution

We recently proposed the usage of a REST server for both internal and public operations, but in fact, REST is about 7 times slower than a gRPC server for data receiving and 10 times slower than gRPC for data sending, so that's the main reason for avoiding REST in our network.

Another reason for avoiding the REST usage in our server is it requires many workarounds for adding the possibility of internal calls and it is way more insecure. It is obvious that the Public API will still be available for the Rest API, but internally it will access our RPC server though. In other words, internally we will use gRPC directly, and a REST server will be available for public consumption of our services.

The main reason for using gRPC specifically and not another RPC framework is it gRPC is available for our target programming languages (Kotlin is officially supported, and Rust is supported by the community), and it is fast enough. It is also updated very frequently, so we don't expect to be using outdated technologies.

Final considerations

Suggestions are appreciated for new sections in this issue, or if you have a better idea about how to structure or improve our RPC server, feel free to comment down below. Thank you for the attention.

@axyiee axyiee self-assigned this May 5, 2022
@axyiee axyiee added ✨ feature request New feature or request 🚀 performance Issue or pull request for performance improvements 🏷️ in progress Issue or pull request that is already being worked on ❗ priority: high 🏗️ structuring This issue or pull request is related in how we can improve the project structure 🔌 grpc This issue or pull request is related to the gRPC modules labels May 5, 2022
@axyiee axyiee pinned this issue May 5, 2022
@axyiee
Copy link
Member Author

axyiee commented Aug 16, 2022

Progress available on stronghold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature request New feature or request 🔌 grpc This issue or pull request is related to the gRPC modules 🏷️ in progress Issue or pull request that is already being worked on 🚀 performance Issue or pull request for performance improvements ❗ priority: high 🏗️ structuring This issue or pull request is related in how we can improve the project structure
Projects
None yet
Development

No branches or pull requests

2 participants