Ideas for queuing jobs from multiple flows


I’m controlling an Arduino for a few experiments. The control includes some basic sensor requests and also some mechanic motors for occasional movement of the experiment.

I have a few flows that make requests to this device and I need a good idea / practice to how to manage these requests so they don’t interfere with each other yet still receive confirmation that the request happened.

My current implementation is having the different flows use “link out” to the master flow that controls the device, who in turn executes the requests. The originating flow waits until a global variable’s state changes to finished and then continues with the rest of the flow (lots of problems - mainly no queue so two flows can ask which will result in the device going crazy. Also, no specific confirmation).

I was thinking of using a gate (specifically q-gate) node and change the link flows to ActionFlows (so the flow will continue when the task is complete, instead of waiting for a global variable that might even be updating for another flow. However, I don’t think this is possible with q-gate as probably the queue runs as a separate task)

Maybe ActionFlows alone can solve my problem?

Hope someone can shed some light.

Thank you!

Can you solve the problem by having a system that queues requests wherever they come from, and not requiring to inform the originator when the action is complete? If not can you give an example of the sort of activity that makes this not viable so we can understand the requirement more fully.

@Yadest, your requirement is a fairly common one, but as @Colin says, you will need to provide a more detailed specification before we can help. My only recommendation at this point is that you consider using MQTT for passing messages between the flows initiating the requests and the "master" flow. The traffic is likely to be both many-to-one and one-to-many, and MQTT handles this well.