Re: SOT Flash Remoting Help

2004-02-06 Thread Brook Davies
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 forthe 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
displayedin 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
clientso 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]




RE: SOT Flash Remoting Help

2004-02-06 Thread Cameron Childress
If you don't already have it, go buy Flash for Server Geeks.It will make
your task a whole lot easier and should answer most of your present and
future questions.

http://www.flashforservergeeks.com/fsg/

-Cameron

-
Cameron Childress
Sumo Consulting Inc
---
land:858.509.3098
cell:678.637.5072
aim:cameroncf
email: [EMAIL PROTECTED]

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 2:22 PM
To: CF-Talk
Subject: SOT Flash Remoting Help

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
displayedin 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
clientso 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]




Re: SOT Flash Remoting Help

2004-02-06 Thread Dick Applebaum
Thanks Cameron

I ordered the hard copy, but have been reading it online at O'Reilly 
Safari bookshelf.

Very well done, but a little out of date (Pre Flash MX 2004  
Professional)

I am on chapter 4 and haven't found anything yet(that I understand 
well enough) to satisfy my need.

What I need is kinda' like a Ticker -- but it's not!

Or, kinda like a Chat -- but it's not!

What I want is kinda' like a streaming client but,unlike a Ticker, 
the stage (grid) never moves-- only the values and colors of the cells 
will change.

Unlike a chat, as soon as I get a packetof changes from the server, I 
want to request another, before processing this one-- no artificial 
delays to minimize traffic -- to the contrary, I want the client to 
request and consume data as often as it can.

I currently am using 2 different streamer-fed client apps provided by a 
3rd party. One is a Java applet, the other isawindows-only native 
app.

Surprisingly, my own CFMX/HTML combination outperforms both.They look 
like they are performing faster/better and update cells more often but 
the data is less current

During peak hours, these streamer apps will get behind 5-10 minutes

I could rewrite my CFMX/HTML app to use DHTML and/or hidden frames to 
improve performance and provide a better UI.

But Flash remotingseems to offer much better efficiency, UI, etc.

Dick

On Feb 6, 2004, at 5:02 PM, Cameron Childress wrote:

 If you don't already have it, go buy Flash for Server Geeks.  It 
 will make
your task a whole lot easier and should answer most of your present 
 and
future questions.o request another

 http://www.flashforservergeeks.com/fsg/

-Cameron


snip
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: SOT Flash Remoting Help

2004-02-06 Thread Dave Carabetta
 I ordered the hard copy, but have been reading it online at O'Reilly
 Safari bookshelf.

 Very well done, but a little out of date (Pre Flash MX 2004 
 Professional)


Are you sure it's the right book? My copy is entitled:

Flash MX Professional 2004 for Server Geeks
(http://www.amazon.com/exec/obidos/ASIN/0735713820/nateweisscom-20/103-55873
98-9313411)

It definitely covers MX '04, etc. Perhaps you have an older edition?

Regards,
Dave.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: SOT Flash Remoting Help

2004-02-06 Thread Cameron Childress
As Dave pointed out, the only edition I am aware of is specifically written
for Flash Professional 2004, but also includes some stuff for non-pro users.
You might want to skip ahead to Chapter 8 Connecting to Servers with Flash
Remoting.That chapter goes over data binding and lots of advanced Flash
remoting concepts.Also relevant to what you are doing (probably) is
Chapter 10 Flash and Sessions.

-Cameron

-
Cameron Childress
Sumo Consulting Inc
---
land:858.509.3098
cell:678.637.5072
aim:cameroncf
email: [EMAIL PROTECTED]

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 5:42 PM
To: CF-Talk
Subject: Re: SOT Flash Remoting Help

Thanks Cameron

I ordered the hard copy, but have been reading it online at O'Reilly
Safari bookshelf.

Very well done, but a little out of date (Pre Flash MX 2004 
Professional)

I am on chapter 4 and haven't found anything yet(that I understand
well enough) to satisfy my need.

What I need is kinda' like a Ticker -- but it's not!

Or, kinda like a Chat -- but it's not!

What I want is kinda' like a streaming client but,unlike a Ticker,
the stage (grid) never moves-- only the values and colors of the cells
will change.

Unlike a chat, as soon as I get a packetof changes from the server, I
want to request another, before processing this one-- no artificial
delays to minimize traffic -- to the contrary, I want the client to
request and consume data as often as it can.

I currently am using 2 different streamer-fed client apps provided by a
3rd party. One is a Java applet, the other isawindows-only native
app.

Surprisingly, my own CFMX/HTML combination outperforms both.They look
like they are performing faster/better and update cells more often but
the data is less current

During peak hours, these streamer apps will get behind 5-10 minutes

I could rewrite my CFMX/HTML app to use DHTML and/or hidden frames to
improve performance and provide a better UI.

But Flash remotingseems to offer much better efficiency, UI, etc.

Dick

On Feb 6, 2004, at 5:02 PM, Cameron Childress wrote:

 If you don't already have it, go buy Flash for Server Geeks.It
 will make
your task a whole lot easier and should answer most of your present
 and
future questions.o request another

 http://www.flashforservergeeks.com/fsg/

-Cameron


snip
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]