Google Groups

Re: Why do I need to set a 'channel' on my .load function?


Micael Ribeiros Apr 6, 2012 2:25 AM
Posted in group: APE Project
Thank you for the info Pablo Tejada.

Ive followed up on what you guys said but I still cant get my user
pipe.

On a 'ready' event on the client I dont even have a 'ape.core.user', I
do have a 'ape.core.users' but the pipe isnt there either.
On a 'raw' returned from the server I do have 'ape.core.user', but
still without a pipe, I do have a 'ape.core.user.pipes' but it seems
to be empty: ape.core.user.toSource() returns:
({casttype:"uni", pubid:"7ff9cce7030e0aa0237de7fdea2228f0", properties:
{pubid:"6528966ec91a721b9c861bc32e02e77b",
sid:"b82tq41f36gpbekcte7bl48hd5", uid:""}, pipes:{}})
(dont mind the 'sid', its the user php session id, I need it to detect
the user session on another application)

Can I get the user pipe from the pubid, if yes, how?

Regards,

On Apr 5, 7:55 pm, Pablo Tejada <ptejad...@gmail.com> wrote:
> Check this outhttp://www.ape-project.org/docs/client/core/user.html
>
> Just make sure to check for the core.user property from a ready event
>
> Sent from my iPhone
>
> On Apr 5, 2012, at 1:41 PM, Micael Ribeiros <xtcp.m...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Thank you all for the help and information.
>
> > Ill try to solve my problem with identifying the user pipe on the
> > client and/or how to send the messages to the server on that pipe and
> > get back to you.
>
> > Regards
>
> > On Apr 5, 5:35 pm, Pablo Tejada <ptejad...@gmail.com> wrote:
> >> I think you should keep on coding and worry about performance
> >> optimization later.
>
> >> When a user is connected to the APE server, or any comet server, it is
> >> given an identifier also know as the pubid or publisher id. This pubid
> >> is essentially the index/name of the user object/pipe. Regardeless of
> >> how many channels a user joins it will use the same pubid.
>
> >> You can look at a pipe as a two way tunnel for reciving and sending
> >> messages to the server. So you can recieve and send data throught the
> >> user object/pipe without been in a chnnel.
>
> >> A channel is just a goup of pipes, that is why is reffered as an multipipe.
>
> >> Now, my suggestion to you is to have all users join a channel that you
> >> could use to broadcast messages and for private communication with
> >> specific users use their user pipes
>
> >> Sent from my iPhone
>
> >> On Apr 5, 2012, at 10:57 AM, Micael Ribeiros <xtcp.m...@gmail.com> wrote:
>
> >>> Does a pipe get created when a user connects to the APE Server? If it
> >>> does and if I use a 'private' channel I would be creating another
> >>> pipe, so 2 pipes would be created for each user. I want to avoid doing
> >>> that and just use the first pipe that was created, but I cant seem to
> >>> 'pass' that pipe to the user, and using for example "this.core.join"
> >>> on the client throws me error 001.
>
> >>> The second option that you mentioned, using a 'global' pipe/channel to
> >>> send messages between the server and the client seems to be the best
> >>> alternative to what Im trying to achieve, but still each user would be
> >>> connected to two pipes. Or am I wrong? Im actually not quite sure how
> >>> APE's pipes work but from what I could understand if the user connects
> >>> a pipe gets created, and I REALLY want to use just that pipe before
> >>> putting the user on others channels.
>
> >>> Regards
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "APE Project" group.
> >>> To post to this group, send email to ape-p...@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> ape-project...@googlegroups.com
> >>> 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 ape-p...@googlegroups.com
> > To unsubscribe from this group, send email to
> > ape-project...@googlegroups.com
> > 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/