Managing Lengthy Processes
Posted: Fri Mar 26, 2010 3:47 am
Hello all,
I am interested in improving and learning new techniques for managing lengthy processes in Rev.
By a lengthy process I mean a script that may run in isolation take 4-8 hours to run.
I have 6-7 such processes (they function well, but are prototypes that require improvement). Right now they are characterised by repeat constructs that perform various actions on large datasets or in large datagrids. These processes run fine, and well within Rev.
If for some reason I wished to pause/resume, or abort such scripts the keyboard shortcuts for doing so never work. I guess the repeat loop, doesn't give it a chance.
So, I started to pick my way through the RevLive DVD's and having an interest in games I watched Klaus's lectures (Klaus if you are there I really enjoyed your sessions). I started to absorb the piece on triggers and realised that beyond it's importance to game play (keeping the app responsive), I might be able to better control a long process by breaking up the code to various functions and then using 'send' - 'send in time'.
Then again, perhaps then it is better to use local sockets with the added benefit that they can be scripted to behave as background tasks and are threaded to not only allow the application to be responsive during such processes, but also to allow the ability to pause, resume or terminate such a process, and have greater throughput.
Am I on the right track with this? Perhaps there is a better technique? Perhaps one is better than another for database intensive or web enabled apps.
A happy place right now would be to kick off a process (onMouseUp on a button), have on a card somewhere within the interface display some stats a process id, a progress bar etc, and to have the app remain responsive and if at all possible the opportunity to kick off and similarly watch a second process.
Any guidance would be appreciated.
Kind regards, Andrew
I am interested in improving and learning new techniques for managing lengthy processes in Rev.
By a lengthy process I mean a script that may run in isolation take 4-8 hours to run.
I have 6-7 such processes (they function well, but are prototypes that require improvement). Right now they are characterised by repeat constructs that perform various actions on large datasets or in large datagrids. These processes run fine, and well within Rev.
If for some reason I wished to pause/resume, or abort such scripts the keyboard shortcuts for doing so never work. I guess the repeat loop, doesn't give it a chance.
So, I started to pick my way through the RevLive DVD's and having an interest in games I watched Klaus's lectures (Klaus if you are there I really enjoyed your sessions). I started to absorb the piece on triggers and realised that beyond it's importance to game play (keeping the app responsive), I might be able to better control a long process by breaking up the code to various functions and then using 'send' - 'send in time'.
Then again, perhaps then it is better to use local sockets with the added benefit that they can be scripted to behave as background tasks and are threaded to not only allow the application to be responsive during such processes, but also to allow the ability to pause, resume or terminate such a process, and have greater throughput.
Am I on the right track with this? Perhaps there is a better technique? Perhaps one is better than another for database intensive or web enabled apps.
A happy place right now would be to kick off a process (onMouseUp on a button), have on a card somewhere within the interface display some stats a process id, a progress bar etc, and to have the app remain responsive and if at all possible the opportunity to kick off and similarly watch a second process.
Any guidance would be appreciated.
Kind regards, Andrew