Code Monkey home page Code Monkey logo

hotdot's Introduction

Hotdot - Realtime webapp using Django + Orbited + Twisted

What is Hotdot?

A very complete example of how to a create a realtime web application using Django + Orbited + Twisted.

Read more about the motivation behind Hotdot: http://clemesha.org/blog/2009/dec/17/realtime-web-apps-python-django-orbited-twisted

Currently the example is: Realtime Voting Both: Collaborative Realtime Voting, Chatting, and Editing Polls.

Is Hotdot a 'Realtime Web Framework'?

Not currently. Maybe it should turn into one? UPDATE [12/27/2009]: I've started work on making Hotdot more "framework" like. That is, I'm making it easier to "plug in" your own application logic, etc, by following a small set of conventions. The work-in-progress code is in this branch: http://github.com/clemesha/hotdot/tree/framework

For comparison, consider Tornado (http://www.tornadoweb.org), which is the 'realtime web framework' used to build FriendFeed. Tornado is minimal and clean, and does include some very nice features beyond just being a non-blocking webserver.

My proposition with Hotdot is that the combination of Django, Orbited, and Twisted results in a more 'full-featured realtime web framework', with a greater community and total features, than can be found in Tornado.

How and Why?

The combination of Django + Orbited + Twisted is everything you need to make a 'real-world' realtime web application with Python.

Their roles:
  • Django: Excellent web framework for creating the backbone of a great web application.
  • Orbited: Realtime web (Comet) library to build the realtime components with.
  • Twisted: Scalable asynchronous network lib, for serving Orbited (and Django too, with WSGI!)
Other reasons for Hotdot:

Install

  1. Recommended: Use a virtualenv and install with pip, to get them type:

    easy_install virtualenv pip
    
  2. Create a fresh virtualenv:

    virtualenv --no-site-packages hotdot_env
    
  3. Install dependencies into your virtualenv:

    #You must have Django 1.0+ and Twisted 9.0+
    
    pip -E hotdot_env install -U django orbited twisted simplejson
    
  4. Move into your virtualenv and activate it:

    $ cd hotdot_env
    $ source bin/activate
    
  5. Get a copy of Hotdot from here:

    curl http://github.com/clemesha/hotdot/tarball/master
    
    #Or clone a copy:
    
    $ git clone git://github.com/clemesha/hotdot.git
    

Usage

  1. In the directory hotdot/djangoweb, type:

    django-admin.py syncdb --pythonpath='.' --settings='settings'
    
  2. In the toplevel directory hotdot, type:

    twistd -ny server.py
    
  • Now open browser to http://localhost:8000/
  • Also see settings in server.py and djangoweb/settings.py
  • To change host interface, see server.py->INTERFACE and djangoweb/settings.py->INTERFACE.

Tests

  1. In the directory hotdot/djangoweb, type:

    django-admin.py test --pythonpath='.' --settings='settings'
    

Details of how Hotdot works

(WORK IN PROGRESS)

  • Orbited as a Twisted Service
  • Django running from twisted.web.wsgi
  • Authentication using Twisted Cred+Django models
  • Filtering + modification + logging of in-transit Orbited messages
  • STOMP as the default, example protocol.

Why the name Hotdot?

'Hot' as in the latest goodness. 'Dot' as in _D_jango + _O_rbited + _T_wisted.

License, Questions, Contact

Hotdot is licensed under the BSD. Please fork a copy here!: http://github.com/clemesha/hotdot Contact: Alex Clemesha <[email protected]> | http://twitter.com/clemesha

hotdot's People

Contributors

clemesha avatar ssteinerx avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.