Dick,

I am doing something similar. I take the data retrieved from the server and
store it in an array who's keys are populated with a structure containing
each record. You could, I guess, also just store the recordset within each
key in the array. Personally preference.  This complex data is stored in
the shared object scope of flash (flash cookies). Which works very nicely
for storing complex data. Each record within the array contains a
'lastmodified' date.

Each record on the server, in the DB, also has a last modified date.

So each time flash run's it:

1) Looks for the shared object, if it does not exist it creates it.
2) creates a list/array of ID's and LastModified dates from the
SharedObject Data
3) Call the remote method to getNewData(array_of_existing_data)

4) On the server side, all of the records for  the client are pulled from
the DB, and there last modified dates are compared to the dates that were
passed to the method. Any records with dates greater than the dates passed
from flash are marked for retrieval. Also, any NEW data is also marked for
retrieval. This data is then returned to flash

5) Flash looks at the returned data and updates the SO (shared Object)
key's which have new/modified data and adds any new data returned to the array.

Thats it... was that to general?

You can also add an argument to the CFC method, like 'flush', which would
return ALL data regardless of the lastmod dates...

Brook

At 02:21 PM 2/6/2004, you wrote:
>I have been working on my first real Flash app.
>
>It is a real-time stock portfolio display.
>
>Server side is a CFMX program that retrieves real-time quotes from
>another web site
>
>The real-time data is combined with (relatively) static data from an
>on-site database
>
>The server and client exchange data using Flash remoting
>
>1) At the start of each day (or when the client logs on), the clients
>entire portfolio (static data) is transferred to the client and
>displayed  in a grid (Flash dataGrid)
>
>2) When the Market opens (or when the client logs on), initial
>real-time data for the client portfolio is sent to the client to
>populate the grid
>
>I have these 2 steps working -- a little slow, but they each only
>happen once per day per portfolio.
>
>3) The next step is to transmit only the changes to the client, and
>update the grid, as quickly as tpossible.
>
>Here's where I could use some help/ideas.
>
>The way I see it, the Flash client will "request" changes from the
>server as whenever it can receive them (immediately after receiving the
>last changes)
>
>the server will maintain state and a have a copy of the data on each
>client  so the CFMX program can determine what has changed since the
>last changes were sent to the client -- so it can eliminate any
>unnecessary data to reduce bandwidth.
>
>I have implemented similar programs (including a version of this app)
>using _javascript_ and/or meta tag refresh to trigger the client to make
>repetitive requests to the server.
>
>What is the best way to do this in a Flash client?
>
>If anyone has an examples or can point me to a good reference it will
>be greatly appreciated.
>
>TIA
>
>Dick
>
>----------
>[
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to