Building a cricket score fanout system that scales
Want to build an alternative to the popular cricket score websites out there? While building a feature on Teenpatti Gold which involved Cricket scores [in a more time critical scenario], we had the same problem.
While this might not seem like a monumental problem, this is Teenpatti Gold we are talking about. When this goes live, it has to be available on a game that has millions of daily active users! Scaling as the user base grows is not an option.
This caused us to explore different options involving protocols, languages and the everyday question, build or buy? We evaluated everything including piggybacking on an existing TCP connection to a protocol typically used for IoT. We built our own PoCs in NodeJS, Go and Scala and pit them against some of the tech out there.
- Teenpatti Gold
- Cricket Betting on Teen Patti Gold
- Multiplayer games
- Rooms and fanout of messages in rooms
Challenge with fanout in a no room scenario
- Fanning out messages to all connected clients
- Do all of this while still being realtime in processing messages from the client
Fanout as a separate service
- Considerations and performance requirements
Build vs Buy
- Language and other considerations
- Available MQTT brokers
- Development time and maintainance
- Benchmark performace of the different option
- What we ended up choosing and why
- How it has been performing for us
I am Kishore Avineni and I work as a Software Engineer at Moonfrog Labs, India’s top mobile gaming company. I have 8 years of experience in which I have literally tossed atomic clocks in my hand (And on one unfortunate occasion dropped it in front of my manager) and have written code to check measurements in picoseconds and code to debug network latencies in seconds. And for the past year have been working on one of the most played indian games in the country.