About streams and shared objects

In traditional client-server applications, the server is typically used to execute some kind of transaction; the client makes a request, the server performs a database query or some resource-based calculation, and then returns a result to the client. The connection between the client and server is maintained only long enough to complete the transaction.

While you can use Flash Media Server to implement transactions, its core use is handling interactions--coordinating the actions of multiple, connected users, or clients, and transmitting server-side data. Flash Media Server provides two communication models that simplify the process of handling user interactions: streams and shared objects.

Understanding streams

Streams are a time-based flow of synchronized audio, video, and/or data messages that flow from client to server, or from server to client. Streams use a publish and subscribe model that simplifies development of applications that use streams. A published stream can be played in real time (a video chat application, for example), or recorded and played later.

Recorded streams are saved in the Flash Video (FLV) format. Recorded streams can contain data messages, as well as video. You can also create FLV files from existing digital video or audio files by using third-party video encoding utilities, like On2 or Sorenson Squeeze, or export them from Flash. In this way you can use the Flash Media Server to stream prerecorded content.



Live stream




Playback of a stream recorded as a FlashVideo (FLV) file


Understanding shared objects

The two basic types of shared objects you can use when you create media applications are local and remote.

You can think of local shared objects as "Flash cookies": they let you save data to a user's computer for off-line access, or for saving preferences. Local shared objects are a feature of Flash Player and do not require Flash Media Server.

Flash Media Server manages remote shared objects (which have the file) and provides messaging, data synchronization, and data storage services. Flash clients connect, or subscribe, to a remote shared object and receive updates whenever a change is made to that shared object. Also, messages can be sent to all clients connected to a remote shared object. A remote shared object can persist across application sessions, or be temporary.



Shared objects provide data storage and synchronization services for clients.


For more information on how shared objects work, see Understanding shared object flow, The SharedObject class, and About shared object files.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000035.html