orbited + stomp + django disconnect question

29 views
Skip to first unread message

Rafael Szefler

unread,
Mar 23, 2011, 1:04:59 PM3/23/11
to Orbited Discussion
Hi, I'm trying to write simple chat app using orbited + stomp +
django. I've managed to write most of the code and it's actually
working. But how can I notify my django server when a user leaves the
chat? I've read somewhere that it is possible to configure orbited
server to make an http callback to the application (with the user's
key) when a user disconnects. But there was no specifics. How to
achieve that?

Please, help me. I've already spend 3 days on this and I have enough.

Mario Balibrera

unread,
Mar 23, 2011, 2:00:49 PM3/23/11
to orbite...@googlegroups.com
Hi Rafael. If you're using MorbidQ for stomp, you can use RestQ. Here's how:

http://morbidq.com/trac/wiki/RestQ

Try it out.

-mario

--
You received this message because you are subscribed to the
Orbited discussion group.
To post, send email to
   <orbite...@googlegroups.com>
To unsubscribe, send email to
   <orbited-user...@googlegroups.com>
For more options, visit
   <http://groups.google.com/group/orbited-users>

Nicolas Echaniz

unread,
Mar 23, 2011, 2:19:42 PM3/23/11
to orbite...@googlegroups.com


Hi Rafael,

I've been working on a similar thing. You can find it here:
https://bitbucket.org/nicoechaniz/django-live/

I believe you are referring to Morbid's RestQ[0]

I've implemented that in django-live. My implementation is quite naive, but
maybe it will get you started.

Is your code available somewhere?

Cheers,

NicoEchániz

[0] http://www.morbidq.com/trac/wiki/RestQ

Rafael Szefler

unread,
Mar 23, 2011, 6:03:46 PM3/23/11
to Orbited Discussion
Hi guys, thank you for your replies.

I tried RestQ, but I only can do some monitoring. I can write a python
script which can react to the event that someone disconnected, but I
don't know how to implement to force a request. What I mean is that if
I have django code:

def userLeft(request):
do something

binded to some URL. How can I fire it from a RestQ script? Sorry, but
I'm really new to this things and I think I need some help.

I will look to django-live tomorrow, thank you for your advice!

Best regards,
Rafael

Willi Richert

unread,
Mar 24, 2011, 11:38:53 AM3/24/11
to orbite...@googlegroups.com
That, however, only works if the user leaves the page to another one.
Not, if he just closes the browser. You will have to rely on polling
or tweak some of Orbited's twisted code to achieve it.

2011/3/23 Mario Balibrera <mario.b...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages