views:

153

answers:

1

I have Flex call a C# dll which starts a long batch process (10 minutes). This process is actually a PERL program which periodically outputs progress messages. I want to be able to stream these messages back to a text area in Flex. Can someone point me to an example of such an arrangement?

Mark.

A: 

What it sounds like you're looking for is a messaging bus that can push messages back to the Flex client, rather than having the Flex client poll for status.

Just in case you are open to polling, you could do that very easily by standing up a ASPX page that returns XML data about the progress of the batch process. Since you're already kicking off the batch process from Flex I'm assuming you're familiar with that approach.

If you want a true messaging solution, you can use the open source Fluorine FX product and its implementation of RTMP:

http://www.fluorinefx.com/

If you download the installer it comes with a sample application called DateFeed which includes the client and server code for setting up a simple RTMP endpoint and subscribing to it from Flex.

cliff.meyers
Thanks. I forgot to add a critical piece of information. Up until now we have been using WebOrb for all our database interaction, and this was how i tried calling the batch Perl program, using a Process.Start() call. And no, I've never used the ASPX polling approach. How does that work?
Mark Kalbskopf
How does the Perl program output its progress? Does it write to standard output or to a file?
cliff.meyers
The Perl program currently writes to Standard Out. It's basically a program to Parse an XML file and write records to a MySql database. As it works it's way thru the rather large XML file, it spits out progress messages. Its these messages that I want to appear in a Flex window. I have just experimented with the Data Push example on the webOrb site, but I haven't got it to work yet.
Mark Kalbskopf