Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="https://github.com/fiorix/cyclone/blob/master/README.rst" rel="nofollow noreferrer">Cyclone</a>, a Twisted-based 'network toolkit', based on/similar to facebook/friendfeed's <a href="https://github.com/facebook/tornado" rel="nofollow noreferrer">Tornado</a> server, contains support for WebSockets: <a href="https://github.com/fiorix/cyclone/blob/master/cyclone/web.py#L908" rel="nofollow noreferrer">https://github.com/fiorix/cyclone/blob/master/cyclone/web.py#L908</a></p> <p>Here's example code:</p> <ul> <li><a href="https://github.com/fiorix/cyclone/blob/master/demos/websocket/websocket.tac" rel="nofollow noreferrer">https://github.com/fiorix/cyclone/blob/master/demos/websocket/websocket.tac</a></li> </ul> <p>Here's an example of using txwebsocket:</p> <ul> <li><a href="http://www.saltycrane.com/blog/2010/05/quick-notes-trying-twisted-websocket-branch-example/" rel="nofollow noreferrer">http://www.saltycrane.com/blog/2010/05/quick-notes-trying-twisted-websocket-branch-example/</a></li> </ul> <p>You may have a problem using SQLAlchemy with Twisted; from what I have read, they do not work well together (<a href="https://stackoverflow.com/questions/3017101/twisted-sqlalchemy-and-the-best-way-to-do-it">source</a>). Are you married to SQLA, or would another, more compatible OR/M suffice? </p> <p>Some twisted-friendly OR/Ms include <a href="https://code.launchpad.net/~therve/storm/twisted-integration" rel="nofollow noreferrer">Storm</a> (a fork) and <a href="http://findingscience.com/twistar/" rel="nofollow noreferrer">Twistar</a>, and you can always fall back on Twisted's core db abstraction library <a href="http://twistedmatrix.com/documents/11.0.0/api/twisted.enterprise.adbapi.html" rel="nofollow noreferrer">twisted.enterprise.adbapi</a>. There are also async-friendly db libraries for other products, such as <a href="https://github.com/hybridlogic/txMySQL" rel="nofollow noreferrer">txMySQL</a>, <a href="https://github.com/fiorix/mongo-async-python-driver/tree/master/txmongo" rel="nofollow noreferrer">txMongo</a>, and <a href="https://github.com/deldotdr/txRedis" rel="nofollow noreferrer">txRedis</a>, and <a href="https://launchpad.net/paisley" rel="nofollow noreferrer">paisley</a> (couchdb).</p> <p>You could conceivably use both Cyclone (or txwebsockets) and <a href="http://dev.scrapy.org/browser/scrapyd?order=name" rel="nofollow noreferrer">Scrapy</a> as child services of the same MultiService, running on different ports, but packaged within the same Application instance. The services may communicate, either through the parent service or some RPC mechanism (like <a href="https://launchpad.net/txjsonrpc" rel="nofollow noreferrer">JSONRPC</a>, <a href="http://twistedmatrix.com/documents/current/core/howto/pb-intro.html" rel="nofollow noreferrer">Perspective Broker</a>, <a href="http://twistedmatrix.com/documents/11.0.0/api/twisted.protocols.amp.html" rel="nofollow noreferrer">AMP</a>, <a href="http://twistedmatrix.com/documents/11.0.0/web/howto/xmlrpc.html" rel="nofollow noreferrer">XML-RPC</a> (<a href="https://github.com/fiorix/cyclone/tree/master/demos/rpc" rel="nofollow noreferrer">2</a>) etc), or you can just write to the db from the scrapy service and read from it using websockets. Redis would be great for this IMO.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload