Traccar 5.1 preview

Anton Tananaev2 years ago

We have prepared an alpha/preview version of Traccar. There were a lot of changes both on the backend and frontend, so we want you to try it first before making an official release. Please try if you're ok with some instability and report any issues you encounter.

Backend changes are mostly related to caching. We completely removed old caching system and in most cases we query database directly. This brings us very close to supporting horizontal scaling. Just a few small things remaining. Note that backend might be a bit slower because of this change, but it should use less memory.

On the web app side we have a large number of fixes and improvements. Things like map view for reports, links to Google Maps and Street View, support for traffic and weather overlays and much more. We will provide full list once we get to the official release stage. Make sure to clear browser cache to see the changes.

Download links:

We've also updated demo servers, so everyone can try it out. Once again, please try it out and report any issues and feedback.

Sanjay Shah2 years ago

Do you not think removing cache will kill the performance and make the load shift to the DB in commercial large deployments. This decision can be killing to the growth of the use of traccar.

Mahmoud Kelany2 years ago

in some cases configuration of device will like

  • 30 seconds when ignition on
  • 60 seconds when ignition off
  • 100 meter change in distance
  • 20 degree change in course

By this configuration the devices will generate large data signals every 2 seconds when moving in high way so hitting db read/write in every signal comes I think will kill the db and system specially in large number of devices

Why you don’t you memory cache like redis?

SwayDev2 years ago

Hello,

This is really good progress on the web app side and also on the backend.

Noticed one issue related to devices with no position and hence added it to the Github issues list for the web app.
Github Issue

Anton Tananaev2 years ago

We still have cache where it needs to be. That's why I emphasized that we removed "old caching system". Now we dynamically cache data needed only for the connected devices.

And the whole point of this work is to allow even larger deployments. Removing old caching where everything was in memory was required to make horizontal scaling possible. But it doesn't mean we kill the performance. There will be increase in database usage, but frequently used data is still cached, so the impact should be minimal. We also added a bunch of indexes to improve query performance.

SwayDev2 years ago

Hello Anton,

In this version are we able to deploy multiple nodes and test? If yes how should we go about with that?

I also wanted to know if you have any suggestions or feedback on what I could focus on while testing the backend-related changes.

Overall so far the testing has gone well, and I intend to test it further.

Thanks

Anton Tananaev2 years ago

It is possible, but some small things are still missing and we haven't done extensive testing on it yet.

You would need:

  • Several Traccar instances connected to the same database
  • Configure the same multicast address for them

Example of the config:

<entry key='broadcast.address'>230.0.0.0</entry>
<entry key='broadcast.port'>5000</entry>

Obviously you need to make sure multicast is working on the network instances are on.

As for testing, anything related to APIs and permissions. Creating/updating/deleting objects. Sharing objects. Reports etc.

SwayDev2 years ago

Hello,

I have set up multiple instances as per your instructions and configured the multicast address as well.
However, I get an error when I try to run the 2nd instance.

I may have done something wrong?

root@vmi921515:~# tail -f /opt/traccar/logs/tracker-server.log
2022-06-30 05:44:20  WARN: Failed to initialize a channel. Closing: [id: 0xb01be03e] - Connection refused (Connection refused) - ConnectException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < BasePipelineFactory:117 < ...)
2022-06-30 05:44:20 ERROR: Main method error - StacklessClosedChannelException (...)
2022-06-30 05:48:19  INFO: Operating system name: Linux version: 5.4.0-121-generic architecture: amd64
2022-06-30 05:48:19  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: ojdkbuild version: 11.0.13+8-LTS
2022-06-30 05:48:19  INFO: Memory limit heap: 1990mb non-heap: 0mb
2022-06-30 05:48:19  INFO: Character encoding: UTF-8 charset: UTF-8
2022-06-30 05:48:19  INFO: Version: 5.0
2022-06-30 05:48:19  INFO: Starting server...
2022-06-30 05:48:19  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2022-06-30 05:48:20  INFO: HikariPool-1 - Starting...
2022-06-30 05:48:25 ERROR: HikariPool-1 - Exception during pool initialization. - Connection refused (Connection refused) - ConnectException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < BasePipelineFactory:117 < ...)
2022-06-30 05:48:25  WARN: Failed to initialize a channel. Closing: [id: 0x773bb2fa] - Connection refused (Connection refused) - ConnectException (... < DatabaseModule:79 < <gener:-1 < *:-1 < ... < BasePipelineFactory:117 < ...)
2022-06-30 05:48:25 ERROR: Main method error - StacklessClosedChannelException (...)
Anton Tananaev2 years ago

Enable full stack traces to see what's failing, but it seems like database connection issue.

Edilon 2 years ago

The modifications were pretty cool but something I was surprised was the popup of the vehicle that should be at least at 970px by 140px in the footer, because as far as we add attributes it goes up in front of the map

Anton Tananaev2 years ago

Where did you get those numbers from? The popup is configurable. If it's too big, you can remove attributes.

Edilon 2 years ago

I'm saying it should be horizontally positioned in the footer and not vertically, so it would allow to put more attributes without obstructing the map

Anton Tananaev2 years ago

Please create a GitHub ticket for it with a screenshot of what it looks like now and a mock of what you want it to look like.

Edilon 2 years ago

more or less like that, but would have to reposition the attributes and buttons
https://uploaddeimagens.com.br/imagens/wl0ZaEo

Anton Tananaev2 years ago

Don't forget to create a ticket for it so it doesn't get lost.