Now that I'm further down the road with this project, I am still
running into problems with flex, java, blazeds, and multi-threading. 
The main roadblock right now is:

1. I don't know how to launch multiple instances of my flex app.

Each time I do a java exec call to start the flex app, it always runs
at the same url in the same window.  So if I send it data for several
charts, each running in a thread and sending out data over the channel
periodically, it will not produce the images properly but becomes
confused since it's not designed to handle multiple charts at once and
even if it was, that would be very inefficient as I would have to pass
ALL the data each time rather than just passing the lion's share at
startup with small updates periodically thereafter.

The application needs to produce .png snapshots every few
minutes/seconds, etc. - a different set of images for each chart. 
Since I don't want to have to reload old chart data with each new
snapshot (I just want to update the charts with the newer data) it
seems like the flex app should be persistently running on the server,
a different instance for each chart.  I can do all of this with a
single instance of my app and one thread no problem, but I'm running
into dead ends trying to get multiple chart snapshots working.  Should
I try getting a single flex app to handle all of the charts?  Or can I
get multiple instances of my app to run simultaneously and pump out
these images?



--- In flexcoders@yahoogroups.com, "gjessup1" <[EMAIL PROTECTED]> wrote:
>
> Should work...no problem. I guess you would just have each different
> chart invoking a different remote method, or at least handling the
> results differently. No reason that should not work at all.
> 
> Each time the page is loaded and a chart is selected, it creates a
> seperate instance, and each instance invokes the method
> seperately...so yes, seperate threads.
> 
> Seems like a fine approach to me. Unless you are going to have some
> huge number of users..then you may want to involve a queue to cache
> changes, but current approach seems good to start with.
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "netdeep" <deepnet@> wrote:
> >
> > Here is a diagram of what the program needs to do:
> > 
> > 
> > Database
> >    /\
> >     |
> >     |
> >    \/
> > Manager.java queries database
> > (for each Report in Database spawn Thread)
> >     | 
> >     |
> >    \/
> > Thread to queries database every X sec/min/hrs to get new data for
chart
> > (thread launches Flex RIA report frontend)
> >     |
> >     |
> >    \/
> > Flex app subscribes to Thread as consumer to listen for new data to
> draw chart
> > to messages from ONLY that thread.
> > 
> > 
> > The desired effect is that the user could go to a master web portal
> and select which report he wants to see.   This web portal serves 
> > up whatever chart the user requests in a separate web page.
> > 
> > Maybe my approach is off, but that's how I've been coming at it so
far.
> > 
> > Thanks for any help you can offer.
> >
>


Reply via email to