RSS

Tag Archives: tornado

TornadoWeb – nice but incomplete

Quickie: TornadoWeb is a very nice framework.  I used it to build a cool RESTful payment gateway. But after reading Davis‘ blog about asynchronous mongoDB+TornadoWeb I realized that TW is good for very shallow transactions. Any sort of decision making or series of callbacks are non-trivial and as about as much fun as NodeJS’ callbacks.

NOT!

 
Leave a comment

Posted by on 2012/07/08 in architecture

 

Tags:

What is so interesting about the Flask microframework?

I get that Flask has a lot of the same design patterns that Ruby’s Sinatra has. I suppose if one used a metadata approach to application construction/deployment that you might be able to basically interchange between them.

I did a search hoping to find out the differences between Flask and Tornado. I was rewarded with a page from the the Flask development doc. The contributor was suggesting that one might link or cascade Flask with either Tornado, Gevent, Gunicorn or some other proxy setup.

While mentioning Tornado the contributor says…

Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. Because it is non-blocking and uses epoll, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. Integrating this service with Flask is a trivial task:

In the deployment section of the doc Flask makes is clear that the built-in webserver is strictly for development. The reasons are probably very similar to Rails’ webrick but in the case of Flask there are no explanations. Nor is there a recommendation just a list of servers.

I recently deployed a Tornado-ZeroMQ bridge in order to increase the transaction throughput. Sitting in front of the Tornado instance is a traditional webserver like apache, lighttpd, nginx. These webservers are serving static content because that is what they do best and the dynamic requests are passed thru. But why would I deploy lighttpd->tornadoweb->flask? There is plenty of room for improvement here but someone transitioning from sinatra to/from flask could be rewarded.

hello world from their respective websites:
(Flask)

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
  return "Hello World!"

if __name__ == "__main__":
 app.run()

(Sinatra)

require 'sinatra' 
get '/hi' do 
  "Hello World!" 
end
 
Leave a comment

Posted by on 2012/03/22 in Tools, web

 

Tags: , , , , , , , , , ,

Current News and Updates

Google released version 1.5.1 of App Engine. They added some significant APIs and features, however, in my mind it’s missing a GO update.

Tornado has been in version 1.2.1 for a long time… and the developers just release version 2.0. (download here) Looking at the release notes there are 3 major updates and several minor. Many of the minor updates are prerequisites. The most impressive will undoubtedly be support for python 3.2. However there may be some minor backward compatibility issues.

 
Leave a comment

Posted by on 2011/06/22 in beta, ProgLang, updates

 

Tags: , , , ,

 
One Page Docs

Creating a library one page at a time.

One Page Bugs

Reducing the friction of writing and fixing bugs or features.

Follow

Get every new post delivered to your Inbox.

Join 223 other followers