Example:
I am building a system that will monitor the state of external switches from devices. In order to catch the state change I would need to create an event loop that every so often would check the state. If the state changes then do something.
I may want a sequence of things to happen if the state changes. Then return and the loop continues. Like scan.
I may need several loops all running simultaneously watching various things. Returning variables etc.
I have never run Lua as server app. But know Lua quite well. I use it now for controlling industrial machines like a PLC.
Any help is appreciated.