« Return to Thread: Messaging services struggle

Re: R: Messaging services struggle

by Walter Tak :: Rate this Message:

Reply to Author | View in Thread

Never used those. I rather create relative simple pieces of code myself than
trying to get complex non-well-documented classes to work.

Just break down your needs on paper. Start drawing some boxes and arrows.
Write down functions, methods, requests, parameters, values etc.

Then start writing a simple application (red5/java) and some Flash/Flex
functions. You'll be surprised how fast you'll have a working base.

And the best thing ; you invest in your architecture , application and
coding-skills instead of trying to figure out what the author of that
pre-made class
had in mind when he was designing and developing his classes.

In the end your own classes might look more or less the same but that time
you'll know how and why the code works.

----- Original Message -----
From: "Ettore Paolillo" <Ettore.Paolillo@...>
To: <red5@...>
Sent: Wednesday, 01 July 2009 17:33
Subject: [Red5] R: Messaging services struggle


Thank you for the insight. But then, what's the use of the messaging classes
(org.red5.compatibility.flex.messaging.messages.*). They appear suited to
deal with destinations, channels, consumers, producers and so on and with a
messaging model based on a produce/subscribe model. I may be dead wrong, but
I can't understand what else these classas could be about.
Any hints?
Regards,
Ettore

> -----Messaggio originale-----
> Da: red5-bounces@... [mailto:red5-bounces@...] Per conto
> di Walter Tak
> Inviato: mercoledì 1 luglio 2009 15.27
> A: red5@...
> Oggetto: Re: [Red5] Messaging services struggle
>
> Messaging is nothing more than sending a fews string to one specific or
> all
> clients from the server.
>
> You'd want to create your own method/function in Red5 that will accept a
> few
> parameters like:
>
> public void incomingMessage( String msgText, String msgTarget ) {
>     // if the target is empty we'll send the message to all clients
> connected to this room/scroop
>     // if the target has an ID we'll iterate through all connections and
> see
> if one has that ID and then send the message to that single connection
> }
>
> On the flash/flex side you could create a custom function as well, that
> you'd add to the client object of NetConnection , something like:
>
> function incomingMessage(msgText:String, msgSenderID:String,
> msgSenderName)
> {
>     // if the sender is a ID then it's a private incoming message,
> especially for you, put the message in a private popup box or somethign
>     // if the sender is empty then it's a public message that should be
> printed in the public/generic textarea
> }
>
> Best OOP practise is to create a new class and use that as the client
> object
> e.g.
>
> ...
> connection = new NetConnection();
> connection.client = new CustomClientNetConnection();
> ...
> class CustomClientNetConnection{
>     public function incomingMessage(msgText:String, msgSenderID:String,
> msgSenderName):void {
>         // do stuff
>     }
> }
> ...
>
> You get the idea.
>
> Walter
>
>
> > Hi,
> >
> > I'm struggling with getting RED5 messaging services to work with a Flex
> > client. In particular it isn't clear to me how to define and set a
> > suitable
> > channel for the "producer" and "consumer" entities in the client.
> >
> > Can messaging work over rtmp or is it limited to http channels?
> > Also, how should I configure red5-web.xml to enable support for
> messaging?
> > Are there any examples or tutorials I could consider similar to the
> > excellent J. Bauch "Migration Guide" which helped me a lot in setting up
> > Remote Object support?
> >
> > I'm sorry for the many questions but even after a lot of googling and
> > searching through the mailing list it appears that messaging and data-
> push
> > is one of the less debated issues in RED5.
> >
> > Thank you in advance for any light you will shed on this topic.
> > Regards,
> > Ettore


_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org

 « Return to Thread: Messaging services struggle