Netty framework

amin2 months ago

We know traccar use netty framework as Network engine for getting data from gps to store database. I want to know is there any queue in traccar for store data to database? Suppose we have 100 devices that send data to database.maybe database can't store this data simultaneously

Anton Tananaev2 months ago

Kind of. Those devices will probably use different threads and if your database is slow, it will just take longer to process. But the data won't be lost, unless something actually fails.

amin2 months ago

What's your idea to increase speed of database? Is it good to use rabbit mq? Because when we use a lot of devices, the traccar got slow to show positions of them.

Anton Tananaev2 months ago

You have to figure out what the bottleneck is first.

amin2 months ago

Traccar use web socket to get positions from database and send them to the front.is it Right? I think when we have a lot of devices this process take more time and got slow.

Anton Tananaev2 months ago

Only initially positions are loaded from the database.

amin2 months ago

It means real time positions don't loaded from database and directly received from gps and send to front end?

Anton Tananaev2 months ago

Yes.

amin2 months ago

So why when have for example 100 devices traccar got slow to show real time positions and there is a lag to show them ?

Anton Tananaev2 months ago

I don't have enough information to answer that question. That's why you need to investigate what is slow exactly.

amin2 months ago

Thank you anton I will investigate and I will ask with more information

amin2 months ago

anton you said real time positions don't loaded from database but in this link: AsyncSocket.java
you send data through wesocket in this way:

    public void onUpdatePosition(Position position) {
        sendData(Map.of(KEY_POSITIONS, List.of(position)));
    }
Anton Tananaev2 months ago

Not sure I understand the point.