It is not clear what you man by decoupling.
Seems like Traccar is responsible for processing and forwarding data - which mean it is doing its job. How you are handling the data when it gets to your Redis instance is another thing.
Personally, I would not use Web-Sockets for this scenario. Instead. I would forward the data (position and events) to the frontend application and handle the data using a webhooks. Then I can process the data and store this in the application database.
Traccar also comes with an API that you can use.
Thanks for the reply! I think there was a bit of a misunderstanding.
My question is more architectural and design-focused, not about how to forward or consume Traccar data — that part already works fine through WebSocket or I can always use Traccar's Data Forwarding Config,
The main issue is how to calculate trip/report generation from the core server. I want Traccar to focus only on real-time data ingestion and keep its database lean, while moving trip calculation and long-term storage to my own backend.
the answer didn’t really address the reporting/trip calculation side of things — which is the core of what I’m trying to solve. I’m looking for guidance on the best way to replicate or offload Traccar’s internal trip logic externally (e.g., by reusing its algorithm, fetching raw positions, or exporting reports automatically).
Appreciate any insights or experience you might have with this type of setup!
Good morning Team,
I am currently using Traccar v6.10.0 with a MySQL database in my setup. Traccar is responsible for processing device data and forwarding position updates to Redis via its WebSocket API, which are then consumed by custom frontend applications.
My goal is to fully decouple Traccar from the rest of the system and dedicate it solely to data processing. While the current setup is functional, I still rely on Traccar for generating reports (trips).
The main reason for decoupling is to keep the Traccar database as lean as possible. I plan to store trips in my own database, where clients can access them directly. Traccar will only store position data for up to one month, as my devices transmit GPRS signals at 20-30 second intervals, generating a large volume of data.
As part of my experiment, I tried using Traccar's WS socket Events (Device Moving and Device Stop) to calculate trips. However, I found this approach to be unreliable, as it doesn't consistently track trips and result in inaccuracies.
Any recommendations or insights on how best to implement this architecture would be greatly appreciated.
Thanks.