Multi-Tasking on Rev - Was copy large files in Rev on Mac

xavier.bury at clearstream.com xavier.bury at clearstream.com
Tue Dec 18 05:20:59 EST 2007


Hi Dave,

The communications is made without communication of any sort. This allows 
things to be queud like transaction logs for DBs and there is no timeout 
issues ever.

What i did is the following:
- One app that generates batch commands in a transaction folder and every 
5 generations, launches an agent that executes those (a simple for loop in 
a batch). The batch commands write a log and then delete themselves. This 
app stays active all the time.
- One app that looks at a log folder for (of all things!) log files - if 
any are present, processing starts to read the files, process the output 
and send that to the DBs for later display - this app stays active all the 
time.
- One reporting app, it just reads my DB files and does the reporting, 
charts, exports if needed, etc...

I could have used some socket protocols but in our environment, firewalls 
rule and those in charge of the firewalls require too much paperwork and 
time to implement them - if and when they get it right too :)

For some other purposes, you could also have your application master clone 
and launch other applications - thus creating some sort of threads (with a 
rather heavy overhead for your memory compared to real threads). This was 
my first idea but the batches do the same much more efficiently. To work 
with these clones, you would need to create settings files for each clone 
assuming they recognize their own settings files - such as 
settings_cloneAppNameID.ini - which is just a text file comprising your 
parameters - although you could also use arguments when launching it, i 
haven't tested them...

I liked the simple approach of batches... Light, fast and easy to debug 
thanks to the logs. Just for the sake of it, i also write a transaction 
log to keep track of what happens each day.

Hope that helps
Cheers
---------------------=---------------------
Xavier Bury


use-revolution-bounces at lists.runrev.com wrote on 18/12/2007 10:59:20:

> Hi,
> 
> I have the same problem but creating a database rather than copying a 
> file.
> 
> Xavier, you said you split an App into a number of smaller Apps to 
> achieve this, how did you communicate between the Apps? I can see you 
> can use AppleEvents on Mac, but how do you do it on windows?
> 
> Thanks a lot
> All the Best
> Dave
> 
> On 5 Dec 2007, at 12:34, xavier.bury at clearstream.com wrote:
> 
> > Hi Klaus,
> >
> > Welcome to the "We Need Threads In Rev" club :))
> >
> > The only way to get around this limitation is to write some extra 
> > compiled
> > applications to do the work to be threaded...
> > If you remember i just recently split a big application into 
> > smaller parts
> > because of this too...
> >
> > Problem is that one could eat your cpu doing the processing while the
> > others wait for CPU threads. Even with 4 CPUs...
> >
> > Triple the work per thread but oh well...
> >
> > How long until CPU safe threads come to rev? Anyone? Anyone?
> >
> > cheers
> > Xavier
> >
> > use-revolution-bounces at lists.runrev.com wrote on 05/12/2007 13:18:42:
> >
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution



----------------------------------------------------------------------------
Clearstream Services S.A.
42 Avenue JF Kennedy, L-1855 Luxembourg
Société anonyme is organised with limited liability
in the Grand Duchy of Luxembourg R.C.S. Luxembourg B 60911.


-----------------------------------------
Visit us at http://www.clearstream.com

IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream
International does not accept legal responsibility for the contents
of this message.

The information contained in this e-mail is confidential and may be
legally privileged. It is intended solely for the addressee. If you
are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. Any views expressed in
this e-mail are those of the individual sender, except where the
sender specifically states them to be the views of Clearstream
International or of any of its affiliates or subsidiaries.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead

END OF DISCLAIMER


More information about the use-livecode mailing list