Sending 'live' data to the iPad
To implement a live virtual dashboard, we need to send data over to the iPad application with very less latency.
Attempt 1:
We hosted an HTTP server on the BeagleBone to send data to the application. The app polled for 'new data' every 300ms. Also, every time the connection is establish the http header takes 200ms. This approach is not useful because of this overhead and more importantly the battery gets drained very soon due to constant polling.
To solve this problem, we needed some mechanism to keep the connection open and asynchronously send data when available.
Node JS and Socket IO to the rescue:
By using socket connection, we are able to keep the connection open and transmit data as and when generated. Node JS server transmits to the app when new data is available from the car and upon receiving the 'new data' event, application updates the database and the UI accordingly.










