Skip to content

Real Time data

Emil Haugberg edited this page Jun 27, 2019 · 1 revision

For showing the real-time feed on the frontend of the dashboard, we have set up a socket that listens to incoming KV6 messages. It is important to know that these messages use the bison standard, which we have to parse to get the data. We do these in the following steps:

  1. Set up our own socket to which the frontend can subscribe.
  2. Listen to the incoming messages using zeromq. KV6 uses a publish-subscribe architecture, in which we subscribe to their publisher.
  3. Messages are sent as compressed XML messages, requiring us to decompress the incoming message, after which we parse it to JSON (see lines #63 and #71 of the socket code)
  4. Last, we filter the messages to our liking, only sending messages to our connections that are of the ARRIVAL type and have a delay above a certain threshold.

Clone this wiki locally