Some customers of Opendate run events where internet may or may not be available (or 100% reliable). Regardless of the venue’s internet connection, we as Opendate need to do our best to check customers into events in a timely manner. For large scale outdoor events, failure is simply not an option since we will leave potentially thousands of customers waiting in line to get into the event.
Here is the proposed solution for applications that allow check in to events:
When the device is connected to the internet, it should download all Tickets to the event to have an up-to-date list of the Tickets as possible. We should store this on the Device itself so that it can be referenced as backup later if needed.
While connected to the internet, The device should make API calls to the “Update a Confirm’s Ticket” API endpoint. This is the ideal flow. The server is able to see tickets being checked in/out from all devices at all gates and make the best possible judgement if a Ticket should be checked in or not.
If the API endpoint cannot be reached, the application should fallback to its internally stored list of Tickets from #1:
- The app would search it's cached list of Tickets and attempt to find a ticket with a matching barcode. If one can be found, then it is valid. If not, it is not valid.
- The app would continue to apply logic if the barcode was previously scanned using its own local database. If the ticket was previously scanned, it cannot be used a second time to gain entry to the event.
- When a ticket is scanned for entry/exit in “offline mode”, these ticket barcodes (and times scanned) should be saved in the local database. When the API is able to be reached once again, you can use this API to sync offline scans with the server.