Giter Site home page Giter Site logo

telegraphy's People

Contributors

cmdelatorre avatar d3f0 avatar fzambia avatar glifchits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegraphy's Issues

setup.py not working

On pip install telegraphy console shows:

Downloading/unpacking telegraphy
  Downloading telegraphy-0.1.2.tar.gz
  Storing download in cache at /home/defo/.pip_download_cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftelegraphy%2Ftelegraphy-0.1.2.tar.gz
  Running setup.py egg_info for package telegraphy
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/defo/.virtualenvs/coco/build/telegraphy/setup.py", line 5, in <module>
        with open('requirements.txt', 'rb') as fp:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/home/defo/.virtualenvs/coco/build/telegraphy/setup.py", line 5, in <module>

    with open('requirements.txt', 'rb') as fp:

FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/defo/.virtualenvs/coco/build/telegraphy
Storing complete log in /home/defo/.pip/pip.log

Generalize event transport

Transport are fiexd to XMLRPC in current version. It should be possible to use different implementations such as ZMQ or Redis.

Current Telegraphy implementation relies on Twisted so transport technologies must be implemented in both (async) twisted and (sync) python fashion.

Group/User based event broadcast

Current version does not offer any hints about sending an event to a user or a group of users.

ModelEvents are fixed to model classes, not instances.

In order to support such feature, event naming must be defined, currently appname.ModelName are used. This could be generalized to something like event_prefix.GroupName or event_prefix.UserName.

Deploying telegraphy

I'm not a Twisted expert and unfortunately I haven't found any explanation in the docs on which is the best setup to use telegraphy in production?

Your recommendation would really help me out.

Kind regards

JSON Error

Telegraphy seems to have problems when serializing datetimeformats.
In my case, the field created, a date field:

raise Exception("invalid type for event - serialization failed [%s]" % e)
exceptions.Exception: invalid type for event - serialization failed [datetime.datetime(2014, 3, 5, 20, 10, 30) is not JSON serializable]

Runserver replacement

Implement a command that runs django debug mode internal WSGI server (runserver) as well as telegraphy server with reloading support.

Not possible to install on Mac OS

When trying to install on Mac OS using virtualenv, there are some issues with Twisted (that also seems to cause issues with autobahn) that makes impossible to use telegraphy there.
I know this is not a problem with telegraphy, but just letting you know that is not working on that platform.

cannot marshal recursive dictionaries

I am using MacOSX 10.9.1 and installed telegraphy via pip. I receive the following error message:

Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py in dump_struct, line 723

Request Method: POST

Django Version: 1.6
Python Version: 2.7.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'telegraphy.contrib.django_telegraphy',
'account',
'metron',
'eventlog',
'django_extensions']
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware']

Traceback:
File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/views/generic/base.py" in view
  2.         return self.dispatch(request, _args, *_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/braces/views.py" in dispatch
  3.         request, _args, *_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/Zaumdo/core/mixins.py" in dispatch
  4.     return super(GroupAwareMixin, self).dispatch(request, _args, *_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  5.     return handler(request, _args, *_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/Zaumdo/core/mixins.py" in post
  6.             return super(GroupAwareMixin, self).post(request, _args, *_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  7.     return super(BaseCreateView, self).post(request, _args, *_kwargs)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  8.         return self.form_valid(form)
    
    File "/Users/sebastian/Developer/Zaumdo/Zaumdo/core/mixins.py" in form_valid
  9.         self.group.associate(self.object)
    
    File "/Users/sebastian/Developer/Zaumdo/groups/base.py" in associate
  10.         instance.save()
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/db/models/base.py" in save
  11.                    force_update=force_update, update_fields=update_fields)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  12.                                update_fields=update_fields, raw=raw, using=using)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/dispatch/dispatcher.py" in send
  13.         response = receiver(signal=self, sender=sender, **named)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/telegraphy/contrib/django_telegraphy/events.py" in on_model_create
  14.         self.send_to_gateway(instance, self.OP_CREATE)
    
    File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/telegraphy/contrib/django_telegraphy/events.py" in send_to_gateway
  15.     self.gateway_proxy.send_event(event)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in call
  16.     return self.__send(self.__name, args)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __request
  17.                     allow_none=self.__allow_none)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dumps
  18. data = m.dumps(params)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dumps
  19.             dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  20.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  21.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  22.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  23.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  24.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  25.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  26.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  27.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  28.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  29.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  30.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  31.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  32.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  33.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  34.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  35.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  36.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  37.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  38.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  39.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  40.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  41.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  42.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  43.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  44.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  45.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  46.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  47.         dump(v, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in __dump
  48.     f(self, value, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_instance
  49.         self.dump_struct(value.**dict**, write)
    
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py" in dump_struct
  50.         raise TypeError, "cannot marshal recursive dictionaries"
    

Exception Value: cannot marshal recursive dictionaries

autobahn 0.8 not work

version 0.8 does not work. this version does not support the module listenWS. The version 0.6.2 is not available in pypi. I do?

AuthToken is insecure.

I was just glancing through your code and I noticed that your Gateway AuthToken class uses a uuid3 (configured with a DNS namespace) of a timestamp. It doesn't look like it's used anywhere, but I have to warn you that this will not produce a cryptographically secure value.

I'd like to encourage you to use an HMAC based token signature using a configurable application secret. This is how Django does it (link to Signer) and Tornado (link to create_signed_value) do it.

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.