Giter Club home page Giter Club logo

autobahn-sync's People

Contributors

touilleman avatar usui22750 avatar

Stargazers

 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

autobahn-sync's Issues

README example works for call() but not publish()/subscribe()

We were going to leverage this for a project, so I popped the example in to quickly evaluate it, but it didn't seem to run as expected out of the box?

When I ran the example in a fresh virtualenv for python 2.7 and 3.5, i see no output from the publish() calls. I flipped the print statements over to a logger and still saw no output?

In [1]: from time import sleep
   ...: from autobahn_sync import publish, call, register, subscribe, run
   ...:
   ...: import logging
   ...: logging.basicConfig(level=logging.DEBUG)
   ...: logger = logging.getLogger(__name__)
   ...:
   ...: @register('com.app.shout')
   ...: def shout(msg):
   ...:     return msg.upper()
   ...:
   ...:
   ...: @subscribe('com.app.idea')
   ...: def on_thought(msg):
   ...:     logger.info("I've just had a new idea: %s" % msg)
   ...:
   ...:
   ...: run()
   ...: while True:
   ...:     # print(call('com.app.shout', 'Autobahn is cool !'))
   ...:     publish('com.app.idea', 'Use autobahn everywhere !')
   ...:     sleep(1)
   ...:
INFO:twisted:Log opened.
DEBUG:autobahn:[MainThread] call bootstrap
DEBUG:autobahn:[CrochetReactor] start bootstrap
DEBUG:autobahn:[CrochetReactor] end bootstrap
DEBUG:autobahn:[CrochetReactor] start register_session
DEBUG:autobahn:Received WELCOME answer to our HELLO: Welcome(session=6306811870588809, roles={u'broker': broker(publisher_identification=True, pattern_based_subscription=True, subscription_meta_api=True, payload_encryption_cryptobox=True, payload_transparency=True, subscriber_blackwhite_listing=True, session_meta_api=True, publisher_exclusion=True, subscription_revocation=True), u'dealer': dealer(payload_encryption_cryptobox=True, payload_transparency=True, pattern_based_registration=True, registration_meta_api=True, shared_registration=True, caller_identification=True, session_meta_api=True, registration_revocation=True, progressive_call_results=True)}, realm=realm1, authid=53E5-HEUF-F9XR-QC3E-MMTP-WFVW, authrole=anonymous, authmethod=anonymous, authprovider=static, authextra=None)
DEBUG:autobahn:[CrochetReactor] callback resolve: Welcome(session=6306811870588809, roles={u'broker': broker(publisher_identification=True, pattern_based_subscription=True, subscription_meta_api=True, payload_encryption_cryptobox=True, payload_transparency=True, subscriber_blackwhite_listing=True, session_meta_api=True, publisher_exclusion=True, subscription_revocation=True), u'dealer': dealer(payload_encryption_cryptobox=True, payload_transparency=True, pattern_based_registration=True, registration_meta_api=True, shared_registration=True, caller_identification=True, session_meta_api=True, registration_revocation=True, progressive_call_results=True)}, realm=realm1, authid=53E5-HEUF-F9XR-QC3E-MMTP-WFVW, authrole=anonymous, authmethod=anonymous, authprovider=static, authextra=None)
DEBUG:autobahn:[MainThread] call decorated register/subscribe
DEBUG:autobahn:[MainThread] start callbacks runner

Timing out on receipt of large data from RPC call

(Firstly, great module! Aside from this issue, it's working great)

When I initiate an RPC call that returns a large amount of data (>2MB), I get a TimeoutError from the call. I recreated the exact sequence with standard a Autobahn implementation and had no issues. Also, I note the timestamp that the server finishes transmitting the data. For the standard Autobahn implementation, the result is available on the client very soon after the server says it has finished. For the autobahn-sync implementation, nothing happens and the timeout occurs.

I've looked through Autobahn and Twisted's code to see if there is a max transimission size parameter somewhere and I can't seem to figure that out.

Socket left open after app.stop()

After calling app.stop(), the (web)socket is left open, according to netstat. Doing app.run() after stop() opens a new socket, but the old one is left open.

Is this intended behaviour?

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.