I've been working on a method to offload some processing ...
Server Main shells out to Server Aux which does it's thing and returns a result back to Server Main and then Server Aux quits. This allows many instances of Server Aux to run at the same time, if needed.
Before I delve too deep into it, consider this scenario as an alternative to the above ...
B4X UI Client app calling a B4J Non-UI Server (Server Main) via websocket to perform a task.
Within the B4J Non-UI Server websocket class, it offloads the processing to another B4J Non-UI Server (Server Aux) via websocket.
Once completed, the results are then passed back up the chain to the Client app.
Server Main handles many clients simultaneously and then so would Server Aux by extension, yes?
Can Server Main act as a websocket client at the same time that it's acting as a server?
This system has many clients (B4A / B4I / Web) and Server Main handles them all wonderfully EXCEPT that some functions can take a long time to complete (already optimized) and the fact that if I want to make a change or addition to the abilities, I have to take Server Main down. Doing it as above, I would only have to take down/update Server Aux (actually, there may be many Server Aux's) but leave Server Main responsive to other activities from the Client apps. This way, I only have to have 1 Server Aux running but it has the ability to serve multiple client requests coming from Server Main (just like Server Main does for its' Client Apps).
Thoughts?