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.
 
Pete
 
 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas McCarroll
Sent: Monday, October 23, 2006 5:51 PM
To: [email protected]
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) 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:[EMAIL PROTECTED]ups.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>
> 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:[EMAIL PROTECTED]ups.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>>> 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>
> Search Archives:
> 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