I have a user scenario where launching an ocean script is part of a larger script. And the syntax to launch the script is:
ocean -restore <filename.ocn>
At the end of filename.ocn, it is "exit()"
So, the larger script serves its function, it invoked the ocean environment in the middle and exited the environment after the ocean script finished, and then it moves on to execute the rest of the code.
One catch, as you might already know, is that entering the ocean environment has a quite some time overhead, about 15-45 seconds, which is actually a big portion compared to the total execution time of the larger script.
And I need to execute the script quite often, so it would make sense if I can have a background icfb process that is in standby/listening mode, so that I only need to pay the time overhead once.
What I assume how it will work is:
1. Create an icfb background process in standby mode
2. When main script is executed and at the code where <filename.ocn> was to be executed, the ocean script is sent to the background icfb process to be executed
3. The main script waits for the icfb process to signal a 'finish' flag, gets the returned value, and move on to the rest of the script.
I would like to be shed some light on whether the above "pseudo code" is correct, or suggestion for better implementation, or some hints about how to implement the above pseudo code.