Building a cricket score fanout system that scales
Kishore Avineni
@kishoreavineni
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.
Outline
Business Requirements
- Teenpatti Gold
- Cricket Betting on Teen Patti Gold
Message fanout
- 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
Build
- Language and other considerations
Buy
- MQTT
- Available MQTT brokers
Comparison
- Scaling
- Development time and maintainance
- Benchmark performace of the different option
- Numbers
Conclusion
- What we ended up choosing and why
- How it has been performing for us
Speaker bio
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.
Slides
https://docs.google.com/presentation/d/1EG3WSKizkVtgrR7jzNKHa7Q76OUX-4RE6HS3AHxFRB8/edit?usp=sharing
{{ errorMsg }}