Skip to content

jump the queue design

devonfw-core edited this page Dec 16, 2021 · 13 revisions

Design

JumpTheQueue Scene

Introduction

When visiting public (free) or private (paid) events there are often large queues creating significant waiting times. Ideally the organizer of the event would like to streamline the entry of people into the venue. If people were to arrive right on time they could get into line more efficiently. A website or application could support this process by assigning visitors a queue number. This document describes the design of such a website/application, appropriately named JumpTheQueue.

ℹ️

This document is intended to reflect a real world use case. The design takes this into account by trying to be complete. The implementation however is simplified in order to be more comprehensible. The ℹ️ symbol is denoted on this page, where implementation diverges from design, followed by a short comment about the nature of the difference.

User Stories (by Visitors of an Event)

As a < type of user >, I want < some goal > so that < some reason >.

Epic: Register Event

As a visitor of an event, I want to use a website or an app, which — after registration — provides me with a number (and optional date/time), so I can get convenient access to the event.

User Story: Register

As a user of JumpTheQueue, I want to register with my name, username, password and phone number, comply with the requirements and obtain my queue number.

Acceptance Criteria

A full name (first name / last name) is mandatory. This name as well as the username, password and telephone number must be valid.

User Story: Terms and Conditions

As a user of JumpTheQueue, I accept that the organizer of the event can store my personal data and send me commercial notices (aka “spam”).

Acceptance Criteria

The terms and conditions must be accepted by ticking the corresponding check boxes.

User Story: Join a Queue

As a user of JumpTheQueue, I want to join the queue at the event.

User Story: List Queued Visitors

As a user of JumpTheQueue, I want to see which queue number is currently being processed and what my own queue number is. Optionally, I want to know the estimated remaining time until it’s my turn.

ℹ️

The "remaining time" feature is not further developed/implemented.

User Story: Leave the Queue

As a user of JumpTheQueue, I want to be able to leave a queue I previously joined.

User Story: Verify contact data

As a user of JumpTheQueue, I have to confirm either my E-Mail address or my phone number by entering a code which was sent to me, so my contact-data can be verified.

ℹ️

This feature is not further developed/implemented.

User Interface

Flow

JumpTheQueue App Flow
Figure 1. The basic flow of the application.
  • for new users: fill in a form with your private data (first name, last name, phone number), choose a username and password, tick the box(es) to accept the terms and conditions and finally press a button to “register”

  • for returning users: enter username and password and press a button to "login"

  • in case of validation errors, a suitable error message will be shown

  • if there are no errors an access code will be generated, which will be shown on the following page (this code can optionally be appended with the access date/time)

  • this page could also show a visualization of the queue, listing all currently queued visitors

Mock-Ups

JumpTheQueue Mock-Up
Figure 2. The pages/views of the application.

Model

JumpTheQueue Model
Figure 3. The logical components of the application and their interactions.
JumpTheQueue Event
Figure 4. Each event has multiple queues, each queue holds multiple visitors with access codes.
ℹ️

The "Event" item is not further developed/implemented.

Predicates

Definition
< function name > = < parameters > => < *pure* function >
or
< function name > = trivial : < trivial description >
isnull = (v) => v === null
notnull = (v) => !isnull(v)

isempty = (s: string) => s.length === 0
notempty = (s: string) => !notempty(s)

isEmailAddress = trivial: notnull + notempty + consists of <name>@<domain.toplevel>

isTelephoneNumber = trivial: notnull + notempty + consists of sequence of numbers or spaces (i.e. “4 84 28 81”)

Types

Definition
type < alias > :: < type defs > with predicated: < list of predicates >
or
type < alias > :: trivial: < trivial description >
type ID :: trivial: Unique Atomic Identifier

type NamedItem :: string
with predicates: notnull, notempty

type EmailAddress :: string
with predicates: isEmailAddress

type TelephoneNumber :: string
with predicates: isTelephoneNumber

type Option<T> :: None | T

type Result<T> :: Error | T

type Error :: trivial: Error information with code & error description

Entities & Value Objects

Visitor (Entity)

Field

Type

Id

ID

Username

NamedItem

Name

NamedItem

Password

NamedItem

PhoneNumber

Option< TelephoneNumber >

AcceptedComercial

boolean

AcceptedTerms

boolean

UserType

boolean

AccessCode (Entity)

Field

Type

Id

ID

Ticketnumber

NamedItem

StartTime

Option< DateTime >

EndTime

Option< DateTime >

StartTime

Option< DateTime >

Visitor

NamedItem

Queue

NamedItem

DailyQueue (Entity)

Field

Type

Id

ID

Name

NamedItem

Logo

NamedItem

AttentionTime

Option< DateTime >

MinAttentionTime

Option< DateTime >

Active

boolean

Customers

NamedItem

There must be a 1 - 1 relationship between a Visitor and a VisitorTicker.


Next Chapter: devon4j Overview

Clone this wiki locally