Firebase queue performances

101 vues
Accéder directement au premier message non lu

Larrieu Olivier

non lue,
24 nov. 2015, 15:01:3224/11/2015
à Firebase Google Group
Hello
I want to develop an application which use Firebase for data storage and use firebase queue to query a nodejs server.
All works fine before i wrote a stress script.
The scenario is:
The client send a task to the queue,
the nodejs server use firebase queue and consume the tasks.
For each tasks the node server do an elasticsearch request and before resolve it push the result in the client response path.

The stress script creates 40 tasks by interval of 20 seconds.
It is emulate a reasonable trafic for a given period.

Then i send a task from an other client the response take about 5 seconds.

I ve tried to configure the on différents value of numWorkers but not significative change appear.

So my question is what i miss or are there limitation whith Firebase Queue ?

Thanks
Regards

Kato Richardson

non lue,
25 nov. 2015, 17:59:4325/11/2015
à Firebase Google Group
Larrieu,

It's going to be hard to help troubleshoot such a broad performance without a minimal repro. Can you isolate which part of the code is taking a long time to process? If it's the ES queries, you can batch those and improve performance. Is it download time? If so, less bytes in the payload (see structuring data) will be the best answer.

The first step will be isolating the issue by cutting out components until you know exactly where the bottleneck occurs.

☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/59ae36a1-c004-4aff-b4c5-0083ac265804%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Larrieu Olivier

non lue,
26 nov. 2015, 20:06:4126/11/2015
à Firebase Google Group
Hello and thanks for your answer

Yes the part whis is taking time is the queue which is slowly to depil the tasks.
The option numWorkers do not seems to change things.
On looking the queue working threw the firebase dashboard it seems than the queue depil by paquets of about 5 tasks.
But in the same time another are added.
Perhaps using a queue is not finally the good way to acheive my needs.
The queue is finally not a tools to do things in realtime i assume.

Perhaps should i listen the tasks path and manage myself each owners ?
But how firebase manage two writes in the same time in the same path ?
Exemple:
rootRef.child ('tasks').child ('getDatas').set ({owner:an_uuid, query:{my query}})

Is firebase in it s core manage the concurencie ?

Larrieu Olivier

non lue,
26 nov. 2015, 20:06:4126/11/2015
à Firebase Google Group
After more reflexions and tests i ve found the way to do the things.
The queue was absolutely not the good tool for my needs.
I ve simply used the powerfull events
child_added and child_changed to listen for owner requests.
The rapity is awesome and the code more clean.

I ll come soon to post an article on how i proceed.

Thanks to firebase team for this great techno.

Regards
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message