Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Designing a quiz with up to 100k players in a game(using Spring Boot, ActiveMQ and MongoDB)

 
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I have hobby project which is a backend for a quiz game where up to 100 000 players can participate in a single game. For this to work the platform have to be very scaleable, performant and resilient. I need some help designing this on a higher level.

Here is what I currently have in mind for the design:

- Rest-api; a stateless app scaling horizontally.
- Ws-api; a stateful app with server-sent-events connections, scaling horizontally.
- Moderator; Receives events from Rest-Api, does computations and creates new events for ws-api. This service has less need of scaling but can do it.
Also using ActiveMQ for publishing and subscribing to events.

Current flow: Moderator receive events on an ActiveMQ queue and published events to ws-api on a ActiveMQ topic.

The problem: The problem is that the moderator service does not know when ws-rest is done pushing a certain event to all the players. The synchronisation between all the ws-rest nodes. How do multiple instances report back to a single node without blocking threads in a resilient way?
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic