ok thanks for your point of view , my conserns is more about the APE
server architecture than a real performance issue
i just wanna know if broadcasting throught a channel is the same as
broadcasting to all user from the related channel...


On 10 déc, 21:28, Pablo Tejada <[email protected]> wrote:
> I think you should code first and worry about performance later. After you
> have it working you could easily check its performance.
>
> I personally deal with performance when refactoring my code.
> On Dec 10, 2011 5:46 PM, "Guillaume" <[email protected]> wrote:
>
>
>
>
>
>
>
> > that was my thought too, thanks for answering.
>
> > Really need to know if in term of perf it is equal (even if its more
> > for my personal information that for real perf issue, i'm not planning
> > to override facebook hehe)
>
> > so my guess is that a channel is just a logic entities and when APE
> > sent to channel, it iterate through user and send to each of them but
> > i need confirmation !
>
> > Thanks
>
> > On 10 déc, 17:12, Louis Charette <[email protected]> wrote:
> > > Hi there,
>
> > > I don't know if it's what you actually need, but if you need to send
> > something only to admin or vice-versa, you could set a property to all
> > user, for example "isAdmin" and put everyone in the same main channel. When
> > you send the message, instead of pushing it to the channel, you loop the
> > list of user in the channel, check the "isAdmin" property and send it after.
>
> > > Something like this:http://pastiebin.com/?page=p&id=4ee3d8ff987f2
>
> > > > //Get Channel
> > > > var chan = Ape.getChannelByName("ChannelName");
>
> > > > //Check the channel exist
> > > > if ($defined(chan)) {
>
> > > >   //Take every connected user one by one
> > > >   chan.userslist.each(function(user) {
>
> > > >     //Check the property
> > > >     if (user.getProperty('isAdmin') == 1) {
>
> > > >       //Send Raw
> > > >       user.pipe.sendRaw("thisRaw", {
> > > >         "msg": params.data.msg,
> > > >       });
> > > >     }
> > > >   });
> > > > }
>
> > > In terms of performance, I don't know thought...
>
> > >   - Louis
>
> > > Le 2011-12-10 à 16:30, Guillaume a écrit :
>
> > > > ok thanks, may i ask that if in term of performance, sending a
> > > > message on a channel
> > > > is the same as sending the message on all users of the channel ?
> > > > i'm not afraid of coding on server side or client side ... :-)
>
> > > > On 10 déc, 16:14, Nicolas Guibert <[email protected]> wrote:
> > > >> Hi,
>
> > > >> My understanding is that messages sent to channels are zero-copied,
> > so it
> > > >> is not a problem to send to someone who does not need to receive.
>
> > > >> For your case, I would advise to only add a few lines of code on the
> > client
> > > >> side, so that you don't deal with the same message twice (an id for
> > each
> > > >> message may be necessary though to keep track of the messages, which
> > means
> > > >> a little bit of code on the server side actually)
>
> > > >> Hope this helps.
>
> > > >> 2011/12/10 Guillaume <[email protected]>
>
> > > >>> HI,I've just started with APE push engine, and i like it much, real
> > > >>> time web is cool !
>
> > > >>> But i'm facing a problem at the time and i would like to know if
> > > >>> someone could help me !
>
> > > >>> Ok basically i put users in differents channels according to
> > > >>> "authorisation groups"
>
> > > >>> Guest are subscribed to channel 1 and Admins to channel 1 and 2
>
> > > >>> Basically i don't want Admins to receive twice the data ,
>
> > > >>> so me first thought is i just need to extract users from both channel
> > > >>> and send data looping on that list.
>
> > > >>> I want to know if its a best practice or if it s a bit overkill
>
> > > >>> Basically i don't know how a send raw on a channel is doing
>
> > > >>> is it a loop or a better process like broadcasting ?
>
> > > >>> ok my skills in C and networking are low so i need help on that
>
> > > >>> Thanks
>
> > > >>> --
> > > >>> You received this message because you are subscribed to the Google
> > > >>> Groups "APE Project" group.
> > > >>> To post to this group, send email to [email protected]
> > > >>> To unsubscribe from this group, send email to
> > > >>> [email protected]
> > > >>> For more options, visit this group at
> > > >>>http://groups.google.com/group/ape-project?hl=en
> > > >>> ---
> > > >>> APE Project (Ajax Push Engine)
> > > >>> Official website :http://www.ape-project.org/
> > > >>> Git Hub :http://github.com/APE-Project/
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "APE Project" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/ape-project?hl=en
> > > > ---
> > > > APE Project (Ajax Push Engine)
> > > > Official website :http://www.ape-project.org/
> > > > Git Hub :http://github.com/APE-Project/
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "APE Project" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/ape-project?hl=en
> > ---
> > APE Project (Ajax Push Engine)
> > Official website :http://www.ape-project.org/
> > Git Hub :http://github.com/APE-Project/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to