Architecture · Retrospective
One queue, four screens: what building Qtix alone taught me about shared state

From 2014 to 2016 I was a co-founder and director of Asterisque Technology, and the only developer of its product, Qtix. Qtix was a queue management system. A person who needed to visit a service centre could take a queue number on their phone before setting out, follow the line in real time, and decide when to travel instead of spending that time in a waiting room.
As the only developer, I built the Android app, the iOS app, and the web apps that ran on the counter kiosk and on the TV screen that showed the queue. Four kinds of screen, one person, and one queue that all of them had to agree on. The company closed in January 2016. The problem underneath the product is one I keep meeting in other forms: several clients, one piece of shared state, and the question of where the truth lives.
The queue is one thing
A queue looks simple: a list of numbers, a number being served, and a next number to hand out. The difficulty is that every screen wants to read it or change it at once.
A phone asks for a new number. The counter calls the next one. The display announces it. A phone further down the line needs to know how many people are now ahead. If any two of those disagree, a person acts on wrong information. They leave home too late, or they sit in the waiting room the system was meant to spare them.
The rule I would put first is that the queue lives in one place and every screen is a view of it. No client issues a number on its own authority. No client keeps a private idea of who is being served and reconciles it later. A number taken on a phone and a number called at the counter belong to the same sequence because only one place can hand numbers out.
Each screen asks a different question
The screens shared one queue, but each needed something different from it:
- The display needs one answer, visible from across a room: which number is being served now.
- The counter needs to move the queue forward, and to know that what it calls is what everyone else sees.
- A customer's phone needs that customer's number and how far away their turn is.
Treating these as different questions about the same state, rather than as four copies of it, keeps the design clear. A screen that only needs "now serving" has no reason to hold the whole list, and a copy it does not hold is one it cannot get wrong.
Late is not the same on every screen
"Real time" sounds like one requirement. It is really a different tolerance on each screen. A TV display a few seconds behind the counter is a small annoyance, because the people in the room can see the counter for themselves. A phone a few minutes behind is a different kind of failure, because the person holding it may be deciding whether to leave home on the strength of it.
So the useful question for each client is not how fresh its data is, but what a person might do if it is stale. That decides how hard to work at keeping it current, and what the screen should show when it cannot be sure. A phone that has lost its connection should say so, rather than go on showing a position that may have moved.
Recover from the present
Screens drop out: phones lose signal, kiosks restart, displays are switched off at closing time. A client that depends on receiving every change, in order, has no good way back from a gap. A client that can always ask "what does the queue look like now?" and redraw itself from the answer can recover from anything short of the centre itself being unreachable.
That makes the current state of the queue the thing every client must be able to fetch in one request. Updates between those requests are a convenience for speed, not the source of truth.
What building it alone taught me
Being the only developer had one real advantage. The model of the queue lived in one head, so the four clients agreed with each other because I made them agree. It also had a matching weakness. Nothing forced me to write that model down, and rules that exist only in their builder's head are rules nobody else can safely change.
If I were building Qtix now, I would write the queue's rules down before writing the first client. What is a number? Who may issue one? Who may advance the queue? What happens to a number whose holder never arrives? What does each screen show when it is unsure? Every client then implements that document, and a second developer can join without reverse-engineering it from four codebases.
The other lesson is not about architecture. The product was built, but recognition did not turn into enough paying venues, and the company closed. Getting the shared state right made Qtix work. It could not make enough service centres decide to use it, and that was the problem the company most needed to solve.