I've built my application in python (using greenthreads from eventlent) and I was supposed to use Orbited as comet server to pass requests from user-end javascript code to my application.
Sadly, I found that Orbited is dead, site is down for a few weeks and it lack python 2.7 support.
Could you recommend some good replacements?
You could build a comet server using gevent, meinheld, mongrel2, tornado, twisted, or uwsgi, all of which have long-polling examples. This list isn't exhaustive. You could also consider using WebSockets instead, several have WebSocket examples as well.
I haven't used it personally, but it seems that CometD has a Twisted-based implementation of its protocol.
It seems that for now the best option is to use Socket.io, which offer simple and feature-rich programming interface both on server and client side. The python options are:
gevent-socketio
SocketTornad.IO
socketIO-client
http://meteorserver.org/
Probably that won't register as an answer as you are looking for a server written in Python. Still, I would recommend this efficient server written in Perl. After all, IMHO, as an out-of-the-box/off-the-shelf solution it's as good as any other Python-based server can get.
Related
Is there a wamp implementation for tornado?
Since we already use tornado, I don't want to set up twisted for this ...
Some of the features of WAMP, on top of Tornado, can be found in this open source project, TornwAMP:
https://github.com/ef-ctx/tornwamp
Not that I am aware of. FWIW, a list of WAMP implementations can be found here.
I have a web application im currently working on in python. I'm using Django as my web framework currently. I intend to integrate real-time web features into the application using ajax push. However, I'm a bit confused as to what python based push server i should adopt. I've heard of a few of them, Orbited, Gevent, Tornado, but my main issue right now is that i'm a green horn when it comes to realtime web applications. I'd like to use python and i'd like a framework with good documentation.
A lot of people choose gevent for webapps with real-time features because of the speed, ease of use and a number of supporting packages.
Take a look at these packages:
gevent-socketio
django-socketio
and these tutorials:
Evented Django part one: Socket.IO and gevent
New and hot, part 4: Pyramid, Socket.IO and Gevent
Real-time Web Apps with Django and WebSockets
Hope this helps.
APE seems a cool thing.
I think it's not a problem to make it work with PDjango as a backend.
I think the most popular is tornado open-sourced by facebook. It also has pretty decent documentation.
I'm very interested in making real-time web apps with Django. Unfortunately, I'm having more than a little bit of problem with setting things up. Some options I'm considering:
Orbited: Seems to be the choice for Django. Unfortunately, their domains have seemingly expired, and with it pretty much all of the documentation I'd need to get it working. I've followed a tutorial on http://mischneider.net/?p=125 but I'm having a mysterious error (see No handlers could be found for logger "stomp.py").
Meteor: I have to say, their website impresses me. Unfortunately, I'm running Windows and there seems to be an abject lack of documentation for anything regarding Windows. So I'm lost.
Cometd: Similar problem: Just don't understand installation.
Tornado: Requires pycurl, which in turn requires curl. Keeps throwing a problem with CURL_DIR then libcurl.lib. After hours of tinkering, have effectively thrown up my hands in frustration.
Please help. I'm very willing at this point to consider, well, ANYTHING. Well, at least if it's documented to a point where I can figure out how to install it and use it with Django.
Any help appreciated.
To do real-time web apps using comet techniques (or websocket) you need a server that can handle long-lived connections and a javascript client. Most of the comet libraries give you both (APE, orbited, etc). Working with websockets seems preferable to me, it's part of HTML5, the client code is really simple to implement, etc. I'd suggest finding an asynch framework/server you like, and implementing the live/real-time part of your project with it.
Gevent has a long-polling asynch chat demo built on Django. Gevent is quite popular and well documented.
Eventlet is a nice concurrent networking library, it's pretty well documented.
Twisted is of course the de facto asynchronous networking library for Python. Here's an example of using websockets with twisted.
Meinheld is a nice lightweight asynchronous webserver, it uses greenlet and has examples of usage with Django, and with websockets.
Uwsgi has great asynchronous support, and tons and tons of features, several examples of various approaches. It has a fair bit of documentation as well.
Also check out the bottle documentation for a good primer on asynchronous applications.
Take a look at EvServer : EvServer documentation.
I want to access web service in Python or/and Perl scripts. What are the most popular and reliable libraries today?
I read this question, and I know about SOAPpy and ZSI. Can anybody say something about this libraries? Are they reliable enough for use in production?
If you're talking about SOAP then for Python I would definitely recommend suds :
https://fedorahosted.org/suds/
Checking couple of libraries for SOAP (including suds) only ZSI worked reliably for me. It is not complicated to use and it just works(tm). I recommend that.
Perl has fantastic CPAN libraries available for doing SOAP. Probably the easiest would be SOAP::Lite:
SOAP::Lite is a collection of Perl modules which provides a simple and lightweight interface to the Simple Object Access Protocol (SOAP) both on client and server side.
See more on the CPAN page.
Can you tell me: could I use twisted for p2p-applications creating? And what protocols should I choose for this?
The best solution is to use the source code for BitTorrent. It was built with Twisted until they switched over to a C++ implementation called Utorrent.
Last known Twisted version of BitTorrent
http://download.bittorrent.com/dl/archive/BitTorrent-5.2.2.tar.gz
Older versions
http://download.bittorrent.com/dl/archive/
As an alternative, you also might want to take a look at Vertex.
It is a p2p library built on top of Twisted and comes with goodies like bypassing firewalls.
Its probably more complete than the other people's sample.
Link to Vertex
https://github.com/twisted/vertex
bittorrent twisted python client/server
Yes, twisted was used to create the initial version of Bittorrent. There are some opensource libraries to start from.
Yes, you can absolutely use twisted to create a p2p application. The one that comes first to my mind is Dtella (http://dtella.org/). It's uses the Direct Connect protocol.
They provide the source code, so that could get you started. I know that quite a few different university networks have DC hubs running. That seems to be the ideal use of this protocol.