Skip to content
/ feeds Public

work in progress: a Django based Event Publish Subscribe server with Tornado and SockJS

Notifications You must be signed in to change notification settings

elishowk/feeds

Repository files navigation

Feeds for Videotag

It's a real-time and multi-user messaging and synchronization back-end for Django, built-on alos on Tornado and SockJS It's developed at CommOnEcoute SAS (Paris, France) under GNU AGPL 3

Install

1- install Redis-server 2- install django-tastypie, sockjs-tornado, thoonk and hiredis in your virtualenv

API

The REST is built with Django-Tastypie. If you create an Event item, you'll get a corresponding JSON by requesting its path according to default Tastypie behavior.

Feeds

  • Integration of SockJS-tornado
  • provides a client-side javascript class named 'Feeds' (see "static/feeds/feeds.js")
  • To start tornado within django's configuration (install Redis server) use $ env/bin/python ./manage.py socketserver

Event JSON specification

  • json exchanged between static/feeds/feeds.js and the server follow the following rules
event = {
    category: 'feed',
    feed: 'a feed name',
    action: 'join' | 'leave' | 'get_ids' | 'get_all' | 'get_item' | 'retract' | 'publish',
    uuid: 'optional uuid sent by the client to reference a callback client-side',
    id: '32 characters UUID4 hexa + (event.timecode  || nothing), required in get_item() and retract() actions',
    type: 'namespaced event, eg. feed.join, feed.leave, required',
    from: 'user unique id, required',
    datetime: 'seconds since EPOCH when publish action happened, required'
    timecode: '5 digits, optional'
    metadata: { clientDefined: 'metadata'}
};

About

work in progress: a Django based Event Publish Subscribe server with Tornado and SockJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published