hilbert / hilbert-docker-images

Application with a dynamic choice of docker containers to run
Apache License 2.0
22 stars 8 forks source link

Protection needed to arbitrate station requests and server requests #27

Closed elondaits closed 7 years ago

elondaits commented 8 years ago

If a station starts on its own it'll try to start an application. If a server starts the station it'll also try to start an application. Some arbitration is needed so both things don't conflict.

e.g. An explicit API running in the station for switching apps which has some sort of locking or IPC mechanism (lock or queue). Requests from the server fail if there's a local app switch.

malex984 commented 7 years ago

It has to be part of Hilbert-CLI-Server / Hilbert-CLI-Station design: hilbert/hilbert-docker-images#28

malex984 commented 7 years ago

Currently Hilbert client-side bash script (hilbert-station) uses a lockfile to prevent two actions running in the same time. In case of a lock script execution will fail with an error code 2 (see start_locking in tools/hilbert-station)