Douglas, I replied yesterday but flexcoders/yahoo groups didn't send my post out to the list (I've found reliability of yahoo groups to be poor lately).
 
I'll repost my previous message at the end of this message, but Seth provided a lot of detail that should help you too. For the port range issue, I'll expand on what I wrote yesterday:
 
As for worrying about port assignment and registering them with IANA - I don't think you have to worry. Unless you were boxing it up and reselling it standalone (not sure if the EULA even allows this...  but I'm only using this as an example!) then it might be a concern, but I suspect you control the server deployment so the port range is entirely up to you. If it makes you feel more comfortable just use 1935 for now as this is a well known port. The whole point of this configuration file is that it is configurable - completely configurable!
 
 
FWIW, my post yesterday in response to your previous post was:
 
"The answer is actually maybe - it depends on your application deployment. If you're going to host the SWF files in the same enterprise Java application server that deploys the web application containing the FDS message broker servlet then you can rely on the {server.port} token in the channel endpoint configuration to mean "replace this at runtime with the port used to load the SWF". However more complex deployments are possible and you may have several web servers running on different ports, or even different hosts for channel failover in which case you would need to be aware of the ports no matter what protocol was being used for communication.
 
Alternatively, if you know the exact host name and port (and context-root for that matter) of the FDS web application then you can remove the tokens from the channel endpoint altogether and just hard code the values if it makes it simpler to follow.
 
As for port assignment for RTMP channel endpoints - it can be anything that is allowed on your particular deployment - don't worry about what is in the configuration file by default - just change it as necessary. Note that Flash Communication Server (which was then renamed to Flash Media Server, aka FMS) registered port 1935 with IANA for its usages of RTMP - we originally used the same port for RTMP channels in FDS but we have clients who want to run both FMS and FDS on the same machine and we also ship several sample web application deployments which people may choose to deploy on the same host. So, we had to pick another port for the examples. The point is that it doesn't matter - you control both the client and the server so just change the configuration to meet your needs."
 
Regards,
Pete


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas McCarroll
Sent: Tuesday, October 24, 2006 10:21 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Questions about RTMP ports and channel definitions

Seth, Dirk (and all),

Thanks for your responses. I think that I'm getting a pretty good
understanding now.

I have a few more questions. Both Seth and Dirk suggest that I use port
1935 if I'm not using FMS. But I need a *range* of ports, as I'm running
multiple webApps in the same servlet container. With both 1935 and 2038
I'm going to be trespassing onto other apps' registered ports if I go up
or down. I realize that it's fairly simple to just confirm that these
apps aren't running on my server, and that's what I assume that I'll be
doing. But wouldn't it be even better if Adobe registered a range of
ports? It appears that port numbers up to 49151 can be registered, and
there are plenty of unregistered ports above 10,000...

As a complete port-newbie I realize that there may be some fairly simple
flaw in this suggestion...

And even if it's a good idea it will probably take a while...

But if it does make sense, wouldn't it make sense for me to do it on my
own, now? Select an unregistered range of ports, and use them?

Thanks,

Douglas

Seth Hodgson wrote:
>
> Hi Douglas,
>
> The answer is no. The server name and port you use will be the same
> for all web apps deployed in your servlet container (app server). What
> will differ is the context root portion of the URI (this is what the
> container uses to route an inbound request to the target web app). As
> someone said earlier if you have two servers (say Tomcat and Weblogic)
> both running on the same box they'll use different ports so the FDS
> apps you deploy to either server will need to use the proper port for
> the server they're deployed to. Using the {server.port} token, or
> leaving it out completely if it's 80, is the best approach for
> HTTP/AMF endpoints in your config file.
>
> RTMP is different. HTTP servers and servlet containers don't have
> native support for RTMP so we can't take advantage of existing
> functionality for connection management and raw request parsing and
> handling in the way we can with HTTP based communication. When your
> FDS app starts up, the RTMP endpoint on the server starts an internal
> socket server that binds to the port you specify in the endpoint URI
> in the config file. This socket server is implemented using the Java
> NIO APIs for improved scalability and it handles the RTMP connections
> that clients make to the server. The RTMP endpoint and its internal
> socket server live and die along with the web app, and it can't be
> shared across web apps because apps can be started and stopped
> independently. This means that you need to avoid RTMP port binding
> collisions when you deploy multiple FDS apps to the same server by
> using a unique port for each RTMP endpoint. If a port is already in
> use, the RTMP endpoint throws the exception you saw earlier and the
> web app shuts down because there's no point in running if it can't
> accept and service client connections.
>
> The RTMP protocol was first used by Flash Media Server (formerly known
> as Flash Communication Server), and standard ports have been
> registered with IANA:
>
> macromedia-fcs 1935/tcp Macromedia Flash Communications Server MX
> macromedia-fcs 1935/udp Macromedia Flash Communications server MX
>
> The default FDS port values are offset to 203X as a convenience in
> case you're running FMS on the same box. If you're not running FMS go
> ahead and use 1935. If you have multiple apps, just increment the
> value for each successive FDS app's RTMP endpoint.
>
> HTH,
> Seth
>
> ________________________________________
> From: [EMAIL PROTECTED]ups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:[EMAIL PROTECTED]ups.com
> <mailto:flexcoders%40yahoogroups.com>] On Behalf Of Douglas McCarroll
> Sent: Monday, October 23, 2006 2:51 PM
> To: [EMAIL PROTECTED]ups.com <mailto:flexcoders%40yahoogroups.com>
> Subject: Re: [flexcoders] Questions about RTMP ports and channel
> definitions
>
> I'm getting a little clearer. Thanks Dustin and Stacy!
>
> On a practical level this boils down to a simple practical question: Do
> I need to worry about configuring HTTP and AMF ports when I have several
> webApps on the same server, like I must with RTMP?
>
> I'm pretty sure that the answer is no, but I'd love an authoritative
> answer from Adobe. :-)
>
> And while we're at it, is there a range of port numbers that I should be
> using for the RTMP assignments? The "flex" template app is at 2038. The
> "samples" app is at 2037. How high and low can I go? BTW, my TCP/IP
> Network Administration book (which I obviously haven't fully absorbed
> :-) says that IANA keeps a list of assigned & registered ports. When I
> go to the page (http://www.iana.org/assignments/port-numbers
> <http://www.iana.org/assignments/port-numbers>) these two
> ports are associated with other programs. Might it be a good idea for
> Adobe to find a short range of numbers that isn't already claimed, and
> claim them? Not that I really know anything about this... :-)
>
> Douglas
>
> Dustin Mercer wrote:
> >
> > The server port in this context is actually the HTTP port of your
> > server. The Flex Java architecture picks this up from the web server
> > and binds it to that uri. The reason there is not a problem with that
> > particular port is because it's the standard HTTP port. All web apps
> > can share that port and it's not making any time of remembered
> > connection with the flash client. Only the RTMP channel does that.
> >
> > I don't know about this part for sure, but I think the RTMP channel is
> > something Adobe built into the Flex framework that is like a mini
> > server that enables the "Real Time" portion of the Flex Data Services.
> > Someone from Adobe can correct me if I am wrong, that is only my
> > assumption. Hope that helps!
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]ups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > [mailto:[EMAIL PROTECTED]ups.com
> <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>] On Behalf Of Douglas McCarroll
> > Sent: Monday, October 23, 2006 2:20 PM
> > To: [EMAIL PROTECTED]ups.com <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > Subject: Re: [flexcoders] Questions about RTMP ports and channel
> > definitions
> >
> > Hi Stacy (and all),
> >
> > That makes perfect sense. But am I correct in guessing that code like
> > this...
> >
> > uri="http://
> > {server.name}:{server.port}/{context.root}/messagebroker/amfpolling
> >
> > ...indicates that our webApp is using the same port for AMF as other
> > webApps? (I assume that "server.port" is defined somewhere in FDS
> > compiled code - I can't find it in any of the config files.)
> >
> > ...and if so, why isn't this a problem? Why would several instances be
> > able to listen to the same port for AMF and HTTP? Doesn't make sense.
> > Obviously, there's something here that I don't understand here...
> >
> > Douglas
> >
> > Stacy Young wrote:
> > >
> > > To answer # 1: trying to have two instances of FDS bind to the same
> > > port is the same as trying to run two web servers on the same machine
> > > and bind them both to port 80. It's not a matter of message routing
> > > ...the port is already in use so the second instance will fail
> since it
> > > can not bind to that same port number on startup.
> > >
> > > -Stace
> > >
> > > ------------ ----------------------------------------------
> > >
> > > *From:* [EMAIL PROTECTED]ups.com
> <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > [mailto:[EMAIL PROTECTED]ups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>]
> > > *On Behalf Of *Douglas McCarroll
> > > *Sent:* Sunday, October 22, 2006 1:44 PM
> > > *To:* flexcoders post
> > > *Subject:* [flexcoders] Questions about RTMP ports and channel
> > definitions
> > >
> > > Hi All,
> > >
> > > I recently wrote a post on my blog
> > > <http://www.brightworks.com/flex_ability/?p=17
> <http://www.brightworks.com/flex_ability/?p=17>
> > <http://www.brightworks.com/flex_ability/?p=17
> <http://www.brightworks.com/flex_ability/?p=17>>
> > > <http://www.brightworks.com/flex_ability/?p=17
> <http://www.brightworks.com/flex_ability/?p=17>
> > <http://www.brightworks.com/flex_ability/?p=17
> <http://www.brightworks.com/flex_ability/?p=17>>>> about an error I was
> > > encountering. A kind commenter explained that my problem was caused by
> > > the fact that I had two different webApps running that were both
> > > configured - in their services-config.xml files - so that their RTMP
> > > channels used the same port.
> > >
> > > I want to revise my post to explain this, but want to make sure that I
> > > understand how things work first.
> > >
> > > So I'd welcome any feedback on the following explanations & questions:
> > >
> > > 1. Obviously it is bad to have two different webApps use the same RTMP
> > > port. I assume that webApps can't share the same port because,
> well, how
> > > would they know which webApp a particular message is being sent to? I
> > > suppose that this could be resolved by giving different destination
> > > names to the different webApp's RTMP destinations, but I can
> imagine how
> > > this approach could create problems. Anyway, I'm wondering if anyone
> > > here can explain the crux of the problem more clearly or succinctly...
> > >
> > > 2. I assume that configuring a channel with a specific port number
> (e.g.
> > > uri="rtmp://{server.name}:2038") does two things:
> > > a. It tells the FDS server-side code to listen to that port for that
> > > channel.
> > > b. It tells clients to connect to that port if they're using that
> > > channel. I assume that there's some mechanism whereby clients say,
> "hey
> > > webApp, what port do I use for this RTMP channel?"
> > >
> > > Am I understanding correctly here?
> > >
> > > 3. I'm guessing that sharing ports between webApps isn't a problem for
> > > HTTP and AMF channels. The reason I think this is that they are
> > > configured in channel definitions with URIs like this:
> > >
> >
> uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
> > >
> > > ... as opposed to specifying a specific port, as we do in RTMP channel
> > > defs.
> > >
> > > Do I understand this correctly?
> > >
> > > 4. I'm guessing that the reason why this isn't a problem is that they
> > > don't use a sustained connection, as RTMP channels do. Is this
> correct?
> > >
> > > Thanks in advance for any input! :-)
> > >
> > > Douglas McCarroll
> > >
> > > *AVIS IMPORTANT*
> > >
> > >
> > >
> > > *WARNING*
> > >
> > > Ce message électronique et ses pièces jointes peuvent contenir des
> > > renseignements confidentiels, exclusifs ou légalement privilégiés
> > > destinés au seul usage du destinataire visé. L'expéditeur original ne
> > > renonce à aucun privilège ou à aucun autre droit si le présent message
> > > a été transmis involontairement ou s'il est retransmis sans son
> > > autorisation. Si vous n'êtes pas le destinataire visé du présent
> > > message ou si vous l'avez reçu par erreur, veuillez cesser
> > > immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
> > > jointes, de votre système. La lecture, la distribution, la copie ou
> > > tout autre usage du présent message ou de ses pièces jointes par des
> > > personnes autres que le destinataire visé ne sont pas autorisés et
> > > pourraient être illégaux. Si vous avez reçu ce courrier électronique
> > > par erreur, veuillez en aviser l'expéditeur.
> > >
> > >
> > >
> > > This electronic message and its attachments may contain confidential,
> > > proprietary or legally privileged information, which is solely for the
> > > use of the intended recipient. No privilege or other rights are waived
> > > by any unintended transmission or unauthorized retransmission of this
> > > message. If you are not the intended recipient of this message, or if
> > > you have received it in error, you should immediately stop reading
> > > this message and delete it and all attachments from your system. The
> > > reading, distribution, copying or other use of this message or its
> > > attachments by unintended recipients is unauthorized and may be
> > > unlawful. If you have received this e-mail in error, please notify the
> > > sender.
> > >
> > >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
> > <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>>
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> <http://www.mail-archive.com/flexcoders%40yahoogroups.com>
> > <http://www.mail-archive.com/flexcoders%40yahoogroups.com
> <http://www.mail-archive.com/flexcoders%40yahoogroups.com>>
> > Yahoo! Groups Links
> >
> >
>
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to