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

Use a single system for events #245

Closed
Shatur opened this issue May 1, 2024 · 2 comments · Fixed by #262
Closed

Use a single system for events #245

Shatur opened this issue May 1, 2024 · 2 comments · Fixed by #262

Comments

@Shatur
Copy link
Contributor

Shatur commented May 1, 2024

Instead of registering multiple systems, we can use a single system by using custom functions (similar to what we do for components).
This will make the public API simpler and more efficient.
Bevy did a similar optimization recently: bevyengine/bevy#12936 and we can benefit from the provided EventRegistry.

@notmd
Copy link

notmd commented May 12, 2024

I will try to take this. And will try to fix the 1 channel per event as well. This is really a foot gun for us and also limits the amount of events the app can have.

@Shatur
Copy link
Contributor Author

Shatur commented May 12, 2024

I will try to take this.

Great, I will be happy to review it. Let me know if you have any questions about the implementation.

And will try to fix the 1 channel per event as well.

We need control over reliability guarantee. So maybe 3 channels for each event type. I think I rushed a bit with this suggestion. Having a separate channel for each event is better for bandwith. When messaging backend sends a message, it includes the channel ID into it. And if we use only 3 channels for each event type, we will also need to include event ID.
So let's keep separate channel for each event.

@Shatur Shatur linked a pull request May 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants