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 commands/events into payload to enable more generic message passing #3

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

matthewpaul
Copy link
Contributor

This change modifies existing message format to migrate commands/events into a payload section and utilize destination header in root of RelayMessage. This allows us to be more generic with respect to our software architecture, and pass relay messages around which can be inspected for payload. We can also utilize the default destination field present in all orb-relay messages to enable new application behaviors that do not require dedicated handlers in the service.

…oad section and utilize destination header in root of RelayMessage
}
}

message RelayMessage {
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it make sense to have an optional origin string too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely could make sense. I'll hold off on adding until we see a viable use case for it. Easy to add :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually... Don't we need it even now? Imagine self serve flow scenario. App sends message to Orb. Orb needs to know where to respond.

Our self serve integration tests rely on having both clients know each other app_id and orb_id - that's just how we wrote tests.

In real life scenario, app or orb that receive message, will not know the sender - we should add it now.

@matthewpaul matthewpaul merged commit e8a791e into main Aug 12, 2024
5 checks passed
@matthewpaul matthewpaul deleted the matt/generics branch August 12, 2024 19:21
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.

3 participants