pnl's site

How AA24 Works - Race Condition

In AviAwards 24, we have two systems that work together to ensure that the event runs smoothly. These systems are the Voting Game (Roblox), and Booking Game (Roblox). These two systems allows users to vote for their favorite nominees, and book seats in the theater respectively.

However, as many of you who have recently tried booking a seat on other platforms (like Ticketmaster) may know, there is usually a queue of some sort for booking seats. This is common in many booking systems, and is used to avoid a issue known as “Race Condition”.

What is a Race Condition

A race condition occurs when multiple users try to access and modify the same resource simultaneously, potentially leading to data inconsistency.

In terms of seat booking:

  1. Two users select the same seat at nearly the same time
  2. Both users think the seat is available
  3. Both try to book it simultaneously
  4. System gets confused about who actually owns the seat

Real-world example: Imagine two people trying to sit in the same chair at the same time. Without proper coordination (like taking turns or queuing), they might collide or argue over who got there first.

In terms of Voting:

  1. Two users vote at almost the same instant
  2. Both users’ votes are being processed simultaneously
  3. System tries to update the total vote count
  4. Final count might be incorrect as votes overlap

For example: If the count is 100, and two people vote at once, the system might only count one vote, ending at 101 instead of the correct 102.

As such, this requires us to design a system that could, at their architecture level, prevent these issue from happening.

How AA24 Gets Around Race Condition

To prevent these headaches, the games uses some clever tricks to make sure everything run according to plan:

Seat Booking

Voting

If you want to learn more about some of these approaches, feel free to DM me on Discord. We’ve also open-sourced some of our tools and projects, so you can check them out and use them in your own projects Source of the Voting Game on GitHub Source of the Booking Game on GitHub

And no we did not rig the votes lol

#aa24 #aviawards 24 #roblox

Reply to this post by email ↪