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

Add support to loopback RPCs #436

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open

Conversation

felippeduran
Copy link
Member

@felippeduran felippeduran commented Jan 17, 2025

The current implementation doesn't support RPC calls to the same server or server type. Although it's nice to block this functionality to avoid developer error, there are some scenarios where it could be interesting to have those. One example is to isolate features in a monolithic server to then migrate later to separate services more easily.

One downside of there RPCs is the unnecessary overhead. In order to avoid such problem, this merge request creates a loopback flow inside the RemoteService class, bypassing nats or gRPC implementations and calling the remote handlers directly. In order to keep an intuitive trace, it also mimics the span structure of regular RPCs.

Tests have been fixed/edited to incorporate the new use case.

@felippeduran felippeduran changed the base branch from main to v2 January 17, 2025 13:04
@felippeduran felippeduran changed the title Fix/support loopback rpcs Add support to loopback RPCs Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant