Introducing NoSQL Database (Cassandra) to Enhance Traccar's Scalability and Fault Tolerance

SwayDev2 years ago

Hello Traccar Community,

I wanted to share an exciting plan for introducing a NoSQL database, specifically Cassandra in Traccar.

The recent implementation of horizontal scaling has been a significant milestone for Traccar, allowing Traccar to handle increased user loads and data throughput.

By integrating a powerful NoSQL database like Cassandra, we can take Traccar's scalability and fault tolerance to the next level.

The primary goal behind this addition is to make Traccar more resilient, distributed, and scalable. By leveraging Cassandra's distributed architecture and fault-tolerant design, and the ability to manage massive amounts of data.

Feel free to share your thoughts, suggestions, alternative recommendations, or additional ideas that you believe would benefit.

Integrating Cassandra into Traccar will require significant development work.

Few individuals have expressed their interest in contributing partial funding.

If you would like to sponsor this work, please reach out to the Traccar support team via Email.

You can read more about Cassandra here - Cassandra

Tony Shelver2 years ago

Instead of going to all that work, and possibly affecting performance for existing supported databases, why not investigate something like Citus, which is a Postgres extension and as far as I know should already be supported by Traccar as it uses standard Postgres SQL?
Postgres itself is well supported and well documented.

Citus is open source, and being further developed by Microsoft, so a very stable solution.
https://www.citusdata.com/

Of course you can also distribute tables using the later releases of standard Postgres.

Nikolay 2 years ago

You must not oppose the two things. Cassandra has a huge advantage with read-write operations, especially with write.
This will allow Traccar to get many more possibilities, for example with IoT.

I'm not even sure if Citus could be used at the moment either.
Have you tried it?

SwayDev2 years ago

Implementing a NoSQL database or support for an additional database should not impact or affect the performance of existing supported databases.

In-fact version 5.0 publicly available release note has a good write-up on the possibilities with changes that were implemented in the database management code.

Thank you for sharing about Citus.

Anton Tananaev2 years ago

Cassandra is definitely much more popular option, so I think it's a safer bet.

yariv cohen2 years ago

Interesting choice, Definitely, Cassandra is a great option when it comes to performance, scalability and storing IoT data.
but have you considered the cons associated with it?
For example,
the lack of joins between 'tables' (a general drawback of NoSQL databases)
could potentially make reporting, analysis, and data aggregation more challenging.

Anton Tananaev2 years ago

We actually almost never do joins in Traccar. But there's no plan to replace the current SQL implementation. It will be just another option for the database, so people can opt in or continue using SQL.

B.Ihaba year ago

Hi there,
I will be more than happy to help in development, feel free to contact me if I can help on something.