Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Event-driven routing #263

Open
iasoon opened this issue Sep 21, 2018 · 1 comment
Open

Event-driven routing #263

iasoon opened this issue Sep 21, 2018 · 1 comment

Comments

@iasoon
Copy link
Member

iasoon commented Sep 21, 2018

Currently we are sending messages to a router to identify a connection, and updating the router state with callbacks. This sounds suspiciously like the event-driven parts of our code. Maybe we should introduce this abstraction!

In a far future, event-souring router state might also be really cool to automatically proxy connections etc.

@iasoon
Copy link
Member Author

iasoon commented Sep 23, 2018

To elaborate on this for a bit with an example on why this is cool: suppose we are running a small cluster of mozaic game servers. To simplify this construction, we run one additional server that serves as an entry point (similar to how you'd use nginx as a reverse proxy for running web applications), and routes all messages to the server that is actually handling the game. We route clients based on (clientid, matchuuid). Gameservers could emit an event when they create or end a game, and these events could then be shared with this 'entry server', which could then update its routing table with new (gameserver, matchuuid) pairs to perform its function.

With different kinds of routing messages, we could extend this mechanism from gameservers to anything that communicates over MOZAIC connections.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant