Which Real Time Communications Protocol

132 views
Skip to first unread message

Mario Osorio

unread,
Dec 20, 2013, 11:58:39 AM12/20/13
to django...@googlegroups.com
My app will have to communicate different customers (Linux devices, Windoze devices, iOS devices and Android devices at least).

Overall, any of these customer devices will start one of many processes and some of the other devices are required to respond by letting their users know about the just initialized event. The original event might in turn start related events with more or less the same behavior.

I will be using email and SMS as 'secondary weapons', but I need some sort of real time communications protocol as primary so whatever devices that are connected and need, will be notified immediately. (I'm not sure I'm making much sense at this point)

What communications protocol can I use so that it:
  • offers real time response
  • is as simple as possible
  • works in as many different customers as possible

Thanks a lot in advanced!

Sergiy Khohlov

unread,
Dec 20, 2013, 12:01:08 PM12/20/13
to django-users
telnet and xmlrpc is a good choice. I'm working on the similar project
Many thanks,

Serge


+380 636150445
skype: skhohlov
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/17ffdba6-041f-49b8-b688-aa5cdb4a7130%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Mario R. Osorio

unread,
Dec 20, 2013, 12:10:02 PM12/20/13
to django-users
Thanks a lot Serge!


Dtb/Gby
=======
Mario R. Osorio

“If I had asked people what they wanted, they would have said faster horses.”
 ― Henry Ford

http://www.google.com/profiles/nimbiotics


You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/vZQ3C4DS73g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Bill Freeman

unread,
Dec 20, 2013, 12:49:49 PM12/20/13
to django-users
WebSockets runs over standard HTTP or HTTPS connections, getting past firewalls and other restrictions (e.g.; the hotel WiFi will let you web browse, but not use other ports).  Since WebSockets is standard HTML5, libraries for it will become more and more common.  There are also older "push" technologies (COMET, long poll, etc.).

You can also ad hoc something on these ports.


Dig

unread,
Dec 21, 2013, 7:52:19 AM12/21/13
to django...@googlegroups.com

Hi Serge,

  May I know the capacity of your system with telnet/xmlrpc?

I'm intresting in this topic, and the next project could have a push scenario.

Thanks.

Regards,
Dig

Dig

unread,
Dec 21, 2013, 7:55:05 AM12/21/13
to django...@googlegroups.com

Hi Bill,

  Is there any django project support websocket? Thanks.

Regards,
Dig

Liam Thompson

unread,
Dec 21, 2013, 11:00:51 AM12/21/13
to django...@googlegroups.com
you could try http://json-rpc.org/

Prashanth

unread,
Dec 21, 2013, 11:13:04 AM12/21/13
to django...@googlegroups.com

Id pick Json over xml too as it's easier to manipulate and debug Json serializable python objects. You can also write your own encoders/decoders, might help: http://pymotw.com/2/json/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Mario Osorio

unread,
Dec 21, 2013, 4:17:33 PM12/21/13
to django...@googlegroups.com
Thanks to everyone contributing to my question ... I will be evaluating all options soon!

Branko Majic

unread,
Dec 24, 2013, 12:42:32 PM12/24/13
to django...@googlegroups.com
On Fri, 20 Dec 2013 08:58:39 -0800 (PST)
Mario Osorio <nimbi...@gmail.com> wrote:

> My app will have to communicate different customers (Linux devices, Windoze
> devices, iOS devices and Android devices at least).
>
> Overall, any of these customer devices will start one of many processes and
> some of the other devices are required to respond by letting their users
> know about the just initialized event. The original event might in turn
> start related events with more or less the same behavior.
>
> I will be using email and SMS as 'secondary weapons', but I need some sort
> of real time communications protocol as primary so whatever devices that
> are connected and need, will be notified immediately. (I'm not sure I'm
> making much sense at this point)
>
> What communications protocol can I use so that it:
>
> - offers real time response
> - is as simple as possible
> - works in as many different customers as possible
>
> Thanks a lot in advanced!
>

A bit of a late suggestion, and I'm not sure if it will cover all of
your requirements above, but have you considered using XMPP? You could
even use it for "offline" delivery (i.e. the messages are stored on the
server until client connects).

When it comes down to its complexity, I'd say it's not really an option
if you don't have existing libraries for all the platforms you need,
though. Python has a couple of neat (client) implementations that are
easy to use, of course.

Best regards

--
Branko Majic
Jabber: bra...@majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.
signature.asc

Bill Freeman

unread,
Dec 30, 2013, 12:52:43 PM12/30/13
to django-users
I'm not aware of one, but I haven't been doing much Django lately.  I guess nobody else reading this thread knows of one either.

There may be a problem making websockets be passed through by (the current implementations of) mod_wsgi, Apache httpd, nginx, etc.  I'm using it with Tornado (which supports websockets out of the box) and no front end server.


Nikolas Stevenson-Molnar

unread,
Dec 30, 2013, 2:14:23 PM12/30/13
to django...@googlegroups.com
I would suggest using another framework or tool for this specific purpose. For example, I use the nginx-push-stream-module (https://github.com/wandenberg/nginx-push-stream-module) and have been happy with it. It's very lightweight, easy to use, and supports WebSockets and Long Polling. When I have a background task (Celery) which needs to push data to the client, it simply sends a POST request to Nginx with a channel id and the payload and the Nginx module handles the rest.

The reason for this (someone please correct me if I'm wrong on this) is that Django isn't meant to hold connections indefinitely. Ideally you want to get a request and turn around a response as quick as possible. Using the nginx-push-stream-module, you let Nginx handle all the persistent connections (which it does very well with 10k+ connections).

_Nik

Mario R. Osorio

unread,
Dec 30, 2013, 3:32:05 PM12/30/13
to django-users
Thanks!


Dtb/Gby
=======
Mario R. Osorio

“If I had asked people what they wanted, they would have said faster horses.”
 ― Henry Ford

http://www.google.com/profiles/nimbiotics


Tom Evans

unread,
Jan 8, 2014, 6:56:19 AM1/8/14
to django...@googlegroups.com
On Mon, Dec 30, 2013 at 7:14 PM, Nikolas Stevenson-Molnar
<nik.m...@consbio.org> wrote:
> The reason for this (someone please correct me if I'm wrong on this) is that
> Django isn't meant to hold connections indefinitely. Ideally you want to get
> a request and turn around a response as quick as possible. Using the
> nginx-push-stream-module, you let Nginx handle all the persistent
> connections (which it does very well with 10k+ connections).
>

I wouldn't say "wrong"....

Django provides WSGI connection adapters and a framework for handling
HTTP requests. These adapters and framework are great at handling
regular HTTP requests.

However, Django is not *just* a WSGI connection adapter and a HTTP
framework, it is a python library for doing all kinds of things. You
can take any python websocket implementation and do things "in django"
with it - use your models, access your cache, render templates, create
and validate forms, etc - because django is simply another library you
can use whenever you are programming in python.

Cheers

Tom

Nikolas Stevenson-Molnar

unread,
Jan 8, 2014, 11:08:22 AM1/8/14
to django...@googlegroups.com
Thank you, that's a very good point! I'm so used to thinking about
Django in the context of the request/response cycle that I didn't think
about pairing it with a websocket framework to take on that task.

_Nik

Mario R. Osorio

unread,
Jan 8, 2014, 3:17:55 PM1/8/14
to django-users

Thanks to both of you

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/vZQ3C4DS73g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages