A Distributed cluster-mode Match maker system implemented in NodeJs that can operate at scale and supports any number of nodes(machines) [TESTED in 10-12 Docker containers, and works like a charm].
There are 2 projects coupled in backend folder. One is Websocket layer where users can interact with, and Second is Stream processor which does all the heavy work (Matching, Adding to pool, Setting User status, Creating Matches).
client side project coded in React, which just acts as a simple interface to interact with the servers (Connecting, Searching a match, Cancel searching, Disconnecting).
- Fully functional Distributed Match-maker application.
- Clean code (under beta stage).
- Container orchestractor with token generator.
- Lobby System.
- Actual game to play with.
I am interested in all things related to multiplayer games and game development stuff and wanted to try out how games match-maker works under the hood. I started researching about this topic, but the resources I was able to find was very little. As no one really talks about their In-House tech and architecture. But I tried my best to implement a match maker in a distributed fashion.
- NodeJs
- Socket.io
- Nats (Streaming & Pub/Sub)
- Redis
- Docker
- Spin up the docker compose file
- Open browser and navigate to localhost:5173
- Create multiple tabs of the same frontend client to simulate multiple users.
- click on
Connect
button to connect to the server using websocket(socket.io). - Select whatever (profile) settings you want and press Find a match.
- Once 4 player start a match with the same config, all of them will get a message saying match found.
- Nats Youtube playlist to lear about it. It is an alternative to Kafka with simplicity, written in Go. NodeJs library used for this project.
- Redis Distributed Locks post by Martin kleppmann.
- Call Of Duty's match maker reference.
- A conference talk at GDC about match-making based on skills, ranking and latency.
- Redis commands.
- Researching how distributed systems operate.