Replies: 1 comment 1 reply
-
You can spawn any number of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
my name is Basti and i'm building a software as fallback for an emergency dispatch program. It runs locally in a LAN and consists of one "server" PC and a limited number of clients (max. 12 clients). I need to keep track of the state of many emergency units, all with the same behaviour, hence the same machine definition as shown here:
I'm starting the service for each resource (unit) like so:
State transitions are triggered via REST or WebSockets by accessing the unit callsign in the resourceServices object:
resourceServices[callsign].send('setStatus1');
My first question, is this the recommended way for this use case, or more an anti-pattern?
Following this, there is also a machine for the missions, or scene. The running services are also stored in a object. (Machine is WiP):
The next question is about the "connectivity" between the resourceServices and the missionServices, currently i've solved it like this:
Also here, are there better ways to do this?
Thank you very much for your comments and thoughts!
Beta Was this translation helpful? Give feedback.
All reactions