That is not the problem. The problem is handling the same user logged in more than once at another location. You'll have two separately addressable APE sessions, each with its own uniPipe for the same logical user.
On Tue, Aug 24, 2010 at 3:47 AM, Buri <[email protected]> wrote: > Thanks for the answer. > > In my case there is therefore simple way how to handle multiple > sessions. I just write current state of user into db and when he logs > in again, I'll just restore it. But this can be done just because this > app require authorization. I'm not sure how to implement it on open > system. I'll look to it, but my problem has been solved. > > On 24 srp, 00:36, Johnathan Leppert <[email protected]> > wrote: > > It's easy to write your own getUserBySessid or getUserById by hooking > into > > the server side javascript framework, e.g. monitor when a user is added > and > > capture additional meta information in a hash, with a reference to either > > the user object or the pubid. Then, you can easily create a server side > RAW > > to lookup this information and say, send a message to that user's pipe. > > > > The challenge you will run into by bootstrapping the session management > is > > what to do with multiple clients from different locations, but the same > > logical user (for example the same user logged in at home and at work). > Do > > you want both sessions (with different session ids) to receive the same > > messages? Probably so. So you will need to force a session id. However, I > > haven't found a way to do this with APE. You could join the user(s) to a > > special channel (multiPipe) and send to this pipe, but that doesn't seem > > very elegant. And I haven't found a way to force a user's pubid for their > > uniPipe. > > > > Currently I've come up with storing multiple user sessions in a hash on > the > > server, and when I want to message one (or multiple), I send a RAW to all > > "users" on that pipe, by iterating over each one and getting the pubid, > and > > sending the RAW. You'll need to handle the case where the users timeout > > ("deluser") to prevent this structure from growing. > > > > I have a feeling all of this could be done cleanly by giving the option > to > > attach additional subusers to a user, but I'm not sure if that API is > > exposed or not, and I haven't had time to look at the code. > > > > Anyone got any tips on this? > > > > Thanks, > > > > Johnathan > > > > On Mon, Aug 23, 2010 at 5:54 PM, Buri <[email protected]> wrote: > > > Thanks for your time but that's not what I'm asking about. I use APE > > > sessions (distributed with package), where server assigns client an > > > sessid. What I ask is if is there any function similar to > > > getUserByPubid but for Sessid? > > > > > -- > > > 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]<ape-project%[email protected]> > <ape-project%[email protected]<ape-project%[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]<ape-project%[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/
