Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
    Bookmark Topic Watch Topic
  • New Topic