Interactive Long Running Shell process?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9
- Joined: Thu Feb 04, 2010 7:12 pm
Interactive Long Running Shell process?
HI Folks,
I looked at Revolution back in the 2.x time frame, but the lack of an asynchronous shell option prevented me from moving forward. Has anything changed in the new Revolution Studio or Enterprise versions?
To clarify my needs, I start an execv process in my Xlib code and get the output from the child process to update the contents of the UI. This process can run from a few milliseconds to days and the amount of data output could climb into the 100's of GiB, so writing to disk and reading from a file descriptor is not a good option.
What I need is something like popen and dup2'd stdin / stdout / stderr handles or tcl's fileevent.
Can I get there with the new stuff (I'm hoping to move some old X11 code to OS X and Windows)?
Thanks,
Tim
I looked at Revolution back in the 2.x time frame, but the lack of an asynchronous shell option prevented me from moving forward. Has anything changed in the new Revolution Studio or Enterprise versions?
To clarify my needs, I start an execv process in my Xlib code and get the output from the child process to update the contents of the UI. This process can run from a few milliseconds to days and the amount of data output could climb into the 100's of GiB, so writing to disk and reading from a file descriptor is not a good option.
What I need is something like popen and dup2'd stdin / stdout / stderr handles or tcl's fileevent.
Can I get there with the new stuff (I'm hoping to move some old X11 code to OS X and Windows)?
Thanks,
Tim
--
Tim
Tim Jones
President / CTO
TOLIS Group, Inc.
http://www.tolisgroup.com
http://ww2.productionbackup.com
Tim
Tim Jones
President / CTO
TOLIS Group, Inc.
http://www.tolisgroup.com
http://ww2.productionbackup.com
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: Interactive Long Running Shell process?
Can you do it with the open process, write to process, read from process and close process commands?
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: Interactive Long Running Shell process?
Tim,
Jan is definitely pointing you in the right direction. I don't know your application use, but know that I use this for hours on end communicating with a running SBCL process and have never had a problem with it.
Jeff M.
Jan is definitely pointing you in the right direction. I don't know your application use, but know that I use this for hours on end communicating with a running SBCL process and have never had a problem with it.
Jeff M.
-
- VIP Livecode Opensource Backer
- Posts: 9
- Joined: Thu Feb 04, 2010 7:12 pm
Re: Interactive Long Running Shell process?
Jeff and Jan,
So that is the new "goodie" I was looking for. When I asked before (back around 2.5), we were looking at the "shell" object and there was no way the execute a command-line helper program that required regular updating of the UI elements over a long period. While the back-end tool was running, there was no way to update the UI.
Are there any code examples? A quick search turned up nothing on my end.
Thanks,
Tim
So that is the new "goodie" I was looking for. When I asked before (back around 2.5), we were looking at the "shell" object and there was no way the execute a command-line helper program that required regular updating of the UI elements over a long period. While the back-end tool was running, there was no way to update the UI.
Are there any code examples? A quick search turned up nothing on my end.
Thanks,
Tim
Last edited by Timpraetor on Fri Feb 12, 2010 12:32 am, edited 1 time in total.
--
Tim
Tim Jones
President / CTO
TOLIS Group, Inc.
http://www.tolisgroup.com
http://ww2.productionbackup.com
Tim
Tim Jones
President / CTO
TOLIS Group, Inc.
http://www.tolisgroup.com
http://ww2.productionbackup.com
-
- VIP Livecode Opensource Backer
- Posts: 9
- Joined: Thu Feb 04, 2010 7:12 pm
Re: Interactive Long Running Shell process?
Even more curiosity - examining the docs/dictionary, it appears that these functions actually were around in the "olden" days. It's too bad someone didn't associate what I'd originally asked back then with the "process" commands as I've stayed away from Revolution because of this apparently missing feature.
For historical (or hysterical) purposes, my original question was support ticket number 2006072010000796.
Looks like I've got some catching up to do
.

For historical (or hysterical) purposes, my original question was support ticket number 2006072010000796.
Looks like I've got some catching up to do

--
Tim
Tim Jones
President / CTO
TOLIS Group, Inc.
http://www.tolisgroup.com
http://ww2.productionbackup.com
Tim
Tim Jones
President / CTO
TOLIS Group, Inc.
http://www.tolisgroup.com
http://ww2.productionbackup.com
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: Interactive Long Running Shell process?
Well, process communication is 'blocking' - in the sense that when you read from process your Rev app is 'stuck' until it receives data from the other process - likewise, it is 'stuck' when you write to process until the process receives that data. So you have to design your interaction correctly to avoid stalling both processes. It would be great if process communication could use callbacks, like socket communication. Oh well, maybe someday 
Other than that, it works fine, and is one of the ways I demonstrated you can interact with Java processes at the RunRevLive'09 conference - you can download the slide show and example code here: http://www.quartam.com/downloads.html
HTH,
Jan Schenkel.

Other than that, it works fine, and is one of the ways I demonstrated you can interact with Java processes at the RunRevLive'09 conference - you can download the slide show and example code here: http://www.quartam.com/downloads.html
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com