The system operates on a server-client relationship, in which the client (the apps) request information from our two servers to give to the user. To support multi-camera functionality, there must be one server for each camera. Amazon Web Services (AWS) is used to store high-resolution photos on the cloud.
Server-Side
Each camera is connected to an FPGA board, in which the Data Collection System runs (DCS). The DCS is responsible for obtaining the raw input and converting it into bitmap data. Ideally, the DCS should retrieve two frames per second to send to the Web Interface System, which compresses the data and sends the resulting high-resolution photos to the Data Service.
The Data Service is a server hosted in the AWS. This saves the photo in an S3 bucket on the AWS and creates a unique identifier for each photo. The Data Service also creates a unique URL for each photo, through which the mobile application can retrieve their desired photos through an HTTP request. These photos are then sent to the Mobile Service.
The Mobile Service provides an API for the app to request and retrieve the photo via a URL. The URLs are composed of the camera’s Universally Unique Identifier and the timestamp of the photo. The photos are sent to the app upon the user’s request.
Client-Side
The mobile application first verifies that the user is in the correct location to use the app. This is to prevent outside members from accessing photos from a private event. By obtaining the user’s coordinates via GPS, the app determines whether to let the user continue.
Once the user is accepted into the application, they are able to choose between two cameras connected to the FPGA boards. Through this, the app is able to determine the camera’s UUID. Now, the user can tap the “capture” button to retrieve the photo at the exact moment they wish (to the nearest second). Using the UUID and the time at which the user pressed the “capture” button, the app constructs URLs to obtain the photos from the past three seconds.
The user is now free to browse the presented photos to either save in their phone or to share via social media. Otherwise, the user can retake a different set of photos to view.
Synchronization
The synchronization of the server and client is crucial in ensuring a positive user experience. This way, the app retrieves the exact photos the user requested. To achieve this, a network time server is used. A network time server implements the Network Time Protocol (NTP). NTP uses a variety of data sources such as atomic clocks and GPS to determine a “true time” based on Universal Coordinated Time.
Both the server and the client are connected to Google’s public NTP server, ensuring the synchronization of their clocks.
More information on NTP can be found at Cisco Systems.