1

I want make a simple quiz game with a lobby system. I have some doubts about the architecture to use in my system, my idea was to use a central server to manage the lobbies and every time a lobby is created, instantiate a new LobbyVerticle, the communication between client and server was entrusted to the event Vert.x bus. The game must respect scalability and distribution. Thanks for your suggestions.

Arsh Coder
  • 688
  • 9
  • 33
Stardustt
  • 19
  • 2

1 Answers1

0

Vert.x does not implement a strict actor model, therefore, you won't have actor specific features like mailboxes and persistent actors, with that said, I would opt for an approach where you have N lobby verticles instances where n = 2 * CPUs, each of the verticles can handle any existing lobby, I would then share lobby state using clustered shared-data-api (requires cluster manager like hz) if persistence is required you could write a verticle that persists data in a write-behind fashion.

If you want to go for an actor-oriented approach choose another tool like light bend akka

  • Thanks for the reply, for the client side i want use a web page, so i found on vertx doc that i can use SockJs for the communication. the approach where i create a event bus in each Verticle for comunicate with client is good? – Stardustt Dec 21 '21 at 15:31