Output Data Flow
The flow of data from the backend services to the web interface is illustrated by the diagram below.

Flow Description
- The web application makes a request via a RabbitMQ message queue. The request structure is a JSON object serialized to a string. The various requests are documented in the System APIs section.
- RabbitMQ delivers the message to a VS Data server process that is subscribed to the queue. The queues are structured as RPC style queues so there may be multiple distributed data servers listening to the same queue. RabbitMQ will deliver the message to a single listener.
- The VS Data Server process parses the request and invokes the proper handler
- For meta data requests (ex. info related to groups or metrics) the Data Server access an internal cache and only queries the Postgresql database if the requested data is not yet present in the cache. For Detail or Activity data requests the Data Server constructs the proper query based on the request data and queries the mongodb database. It then merges this data with cached meta data to build the results.
- The results are formatted as JSON and serialized to a string and returned to the requester.