What is the easiest way to exchange some variable information between edge workflows?
I was thinking of using application globals, but it doesn’t look like I can change a global value from an edge workflow. Read something about useing Redis or Mongo, but isn’t there a better way?
You’re referring to communication between two different edge workflows running on the same edge compute device? If you just want to share information between the two and access it as needed, I’d recommend the SQL Node using SQLite. Any workflow on the device can write to and read from the same local database file.
If you’d rather an event-based approach - as in, take some immediate action in Workflow B when Workflow A changes a value - you have a number of options …
- Workflow A sends data using a UDP Send Node and Workflow B picks it up with a UDP Trigger.
- Configure your edge compute device to run a local MQTT broker. Then, Workflow A publishes to the local broker with an MQTT Node and Workflow B is subscribed to that local broker topic with an MQTT Trigger.
- Configure your device to run a local webserver (enabled by default). Workflow A sends a message to localhost using an HTTP Node and Workflow B picks it up with an HTTP Request Trigger.
- Workflow A creates or edits a file using the File: Write Node and Workflow B picks it up with a File: Watch Trigger or File: Tail Trigger.
Then, if you wanted to store that value, you could use a Storage: Set Node on Workflow B.
Might be related… can you UDP Send to a local SQL DB ip / port and stash data that way?
But the SQL Node look to be able to read and write… seems like the easiest