Real time web in django

telegraphy: enabling real time web in python / django

Posted by Elías Andrawos 4 years, 1 month ago Comments
The browser-based web experience is mostly request-response: your browser requests for a resource, a server responds. That was good enough for some time. But since its begginings, the Internet hasn't stopped growing and it is now being used in ways never before imagined.

Social networks, the possibility to remotely monitor and control many kind of hardware devices and to know the status or issues related to software processes, all kinds of collaborative work. These are all new and exciting ways to profit from the global networking capabilities.

So now, sites and applications cannot always wait for a client to request something. The old-style web is not enough and sometimes we need the real-time webGood news is that it is already out there, still young, but ready to be used: “a set of technologies and practices that enable users to receive information as soon as it is published by its authors” [1]. Google apps or Facebook are probably the best examples of this.

So far so good. There are a lot of new standards, tools, techniques, services and sophisticated frameworks whose objective is to generate server-side events, that reach our client-side web-applications in real-time (or near). But, as usual, it's not that easy. Because when I said “a lot” I mean exactly that! And it's not only that there are many of them, but also that they are highly specialized and not always straightforward to use.

In order to have an application with real-time capabilities you must deal with non-trivial things such as non-blocking, asynchronous servers, message queues, WebSockets, etc., and probably integrate them with your existing infrastructure.

This is certainly a hot topic, where even the most mature tools have still some way to go. Basically all the existing technologies and frameworks are either very specialized so they don't solve the whole problem (that is: emit server-side events and handle them in the frontend), or they are really complicated to use, or they are not well documented.

We finally reach the point of this blog post. 

By now, I hope you have at least an intuitive idea of how complicated the subject can be. In any case, as tricky as it is, we face this problems in some of our projects. That's why we started Telegraphy, mainly to support and ease our future work.

We aim to develop well documented and tested tools that are simple to install and use, which rely on open standards and protocols, to emit and handle asynchronous, server-side events in real-time.

It’s initial implementation is highly biased towards Django (for the web-app and client-side parts) but it's designed to be easily extended to any WSGI framework.

Documentation: http://telegraphy.readthedocs.org/

Code: https://github.com/machinalis/telegraphy/

Online demo: http://telegraphy.machinalis.com

Pypi package: https://pypi.python.org/pypi/telegraphy/

Discussions group: http://groups.google.com/group/telegraphy/

For more details, read the documentation. Or get the code, follow the examples and start contributing!

[1] http://en.wikipedia.org/wiki/Real_time_web

Author: Carlos De La Torre


Previous / Next posts


Comments