A simple backend in Go
This examples shows a more full-featured backend in Go. We’ll use the data from the Teltonika tracker sample as the source.
The backend is going to work pretty much like any other IoT backend: Store, convert and forward. Messages received from the devices are decoded, some of the data is stored and the rest is reformatted and forwarded to other systems. We’re going to have a HTML frontend for our backend so the binary messages and metadata is reformatted into a frontend-friendly format.
At the same time the backend is going to store (parts) of the decoded messages in a SQLite database for future reference.
The trackers doesn’t use CoAP for messaging so they will need some sort of message acknowledgement from the backend server.
The backend is going to use the MQTT broker in Span to listen for messages.
Messages
The packet format for the Teltonika packets are documented on this page.
Map
The map is served via the backend server as vector tiles and uses the gotileserver library with OpenStreetMap data.