This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Scripting Application Instances
|
117
Streams can be shared by all application instances by defining a special virtual direc-
tory. See “Uploading Prerecorded Streams” in Chapter 5 for more information.
Resource Name Collisions
In theory, each instance manages its own stream and shared object resources with-
out interference from other instances. In one important case, however, stream and
shared object instance names can collide (i.e., two different instances attempt to use
the same resource); naturally, you want to avoid such collisions. Using the previous
example of a courseLectures application, imagine that one client connects to this
URI:
rtmp:/courseLectures/algebra101
and a second client connects to a different URI:
rtmp:/courseLectures/algebra101/vectors
This will start two instances of the courseLectures application: one instance named
algebra101 and the other named algebra101/vectors. If the first instance attempts to
access a shared object at the relative URI of vectors/quizQuestions and the second
attempts to access a shared object at the relative URI of quizQuestions, they will both
be using the same
quizQuestions shared object at the full URI of:
rtmp:/courseLectures/algebra101/vectors/quizQuestions
FlashCom is not designed to handle this situation.
Figure 4-2. Shared object and stream file locations

Get Programming Flash Communication Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.