Introducing Whirlwind, the Real-Time Web Framework

Written by Matt Dennebaum | Posted on: March 23rd, 2011

The Wiredset/Trendrr team is proud to announce the open source release of our new python web framework named Whirlwind. You can check out the code and docs on the trendrr/whirlwind github page.

Whirlwind is a collection of cutting edge technologies that have been pulled together and enhanced to deliver a simple to use, massively scalable and blazingly fast web framework. We’ve taken some of today’s fastest open source technologies and bundled it with a lot of features and tools that make rapid development of new apps a snap.

The whirlwind code base was originally developed as the underlying web framework for the most recent version of trendrr.com. As the focus of our business has shifted from over-time to real-time we quickly realized that our previous web stack just wasn’t built for speed. We did a lot of digging around and came up with a stack that is a better fit for managing and delivering the massive amounts of data we process in a more real-time manner.

The core of the Whirlwind framework builds off of the genius work being done by Facebook with Tornado. We integrated Mako templates and swapped out our old MySQL database back-end for the robust, but simple, NoSQL database, MongoDB. Add to that a bunch of other helpful bells and whistles and we came out the other side with a very fast and scalable web framework that is simple to use and drastically improves our ability to rapidly develop new apps.

Here is a list of some of the more notable features that you get out of the box:

  • Structured app templates
  • Session management
  • Multi-threaded request decorators
  • Request route decorators
  • Helpful template filters
  • Mongo ORM
  • Flash messaging
  • Role based user authentication
  • Simple multiport start/stop init.d script
  • Easy admin script for generating new apps and cookie secret hashes
  • Middleware plugin system
  • Database and file logger
  • Pagination
  • Static error templates

With all that said, we would suggest you don’t take our word for it. Give it a shot and let us know what you think. We hope that you will find it as useful as we have and would love any feedback, patches, feature suggestions or help you would like to offer. We feel very strongly that giving back to the open source community is vital and we would like to thank everyone that is out there creating innovative software that makes what we do possible. Stay tuned to the trendrr github profile for all the latest news and updates on all our open source projects.

  • http://news.database.loggeddata.com/want-fast-scalable-python-apps-try-whirlwind/ Want Fast, Scalable Python Apps? Try Whirlwind | LoggedData.com

    [...] dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • http://www.macsoftware.com/news/want-fast-scalable-python-apps-try-whirlwind/ Want Fast, Scalable Python Apps? Try Whirlwind – MacSoftware

    [...] media analytics tool for businesses.Trendrr dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • http://mashable.com/2011/03/24/python-whirlwind/ Want Fast, Scalable Python Apps? Try Whirlwind

    [...] media analytics tool for businesses.Trendrr dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • http://www.rocketnews.com/2011/03/want-fast-scalable-python-apps-try-whirlwind-mashable/ Want Fast, Scalable Python Apps? Try Whirlwind (Mashable) | Stock Market News – Business & Tech News

    [...] dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • http://swhaugen.com/?p=56780 Want Fast, Scalable Python Apps? Try Whirlwind | Stu Haugen

    [...] dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • http://blog.clofresh.com Anonymous

    Why aren’t you using bitly’s asyncmongo library (https://github.com/bitly/asyncmongo)? The mongo library you’re using will block on db requests and basically serialize your tornado server, since it’s single threaded.

  • Anonymous

    That’s very true and something we have worked on addressing with our @threaded request decorator. Give it a look and let us know your thoughts. There are some basic docs on it here: https://github.com/trendrr/whirlwind/wiki/Docs

  • http://blog.clofresh.com Anonymous

    Oh I see. So basically you’re gonna assume that most of the io is fast enough not to block the main thread and when you know a handler is particularly slow you delegate it to a thread. Pretty good.

  • http://businesssmallbusiness.org/uncategorized/want-fast-scalable-python-apps-try-whirlwind/ Want Fast, Scalable Python Apps? Try Whirlwind – Creating business for the small business

    [...] dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • Ebot Tabi

    Definitely the document is not that something one will think of learning about the framework. just about how to setup.

  • Ebot Tabi

    Have some thing problems while trying to test the whirlwind i get this: raise AutoReconnect(“could not find master”)
    pymongo.errors.AutoReconnect: could not find master

  • Anonymous

    Make sure you have mongodb running. Here is a thread in our new google group that goes over it. We added some info in the docs on github as well.

    http://groups.google.com/group/whirlwind-dev/browse_thread/thread/9e751b92da1c7c05

  • Ebot Tabi

    having had times getting it working, since i am more used to using tornado with mysql db, will keep trying on it. really love to migrate my location based app to mongodb and whirlwind. loving the implementation and i hope you guys will make it grow and become imposing , i also look forward to contribute to whirlwind.

  • Ebot Tabi

    got mongodb running but stilll having the following errors, from application.models.user import User
    File “/home/evans/myapp/application/models/user.py”, line 23, in
    @Mongo.db.connection.register
    AttributeError: ‘NoneType’ object has no attribute ‘connection’

  • http://emiel.neuralforce.com/blog/?p=211 Want Fast, Scalable Python Apps? Try Whirlwind | Emiel's Tech Blog

    [...] media analytics tool for businesses.Trendrr dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • Ebot Tabi

    Please guys i don’t if any is experiencing the same issue like me setting up whirlwind, but i think whirlwind should also have a support for mysql, or if there is any tip on how to get that work will be grateful to know how to get mysql working with whirlwind, i am having serious difficulties with mongodb on ubuntu 10.10

  • Ebot Tabi

    did any one saw this message: creating new session
    Exception AttributeError: “‘NoneType’ object has no attribute ‘ui’” in <bound method Session.__del__ of > ignored

  • Anonymous

    Whirlwind is specifically setup to work with mongodb. Many of the features depend on it. More then likely we won’t be adding in mysql support any time soon. That said your welcome to fork a copy from github and add in support for mysql if you’d like.

    Also please post any further questions you have in the whirlwind google group.
    http://groups.google.com/group/whirlwind-dev

  • http://blog.all4socialmedia.com/2011/03/24/want-fast-scalable-python-apps-try-whirlwind/ All 4 Social Media Blog | Blog | Want Fast, Scalable Python Apps? Try Whirlwind

    [...] dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]

  • http://cashklick.swhaugen.com/?p=17085 Want Fast, Scalable Python Apps? Try Whirlwind | CashKlick

    [...] dev Matt Dennebaum wrote on the parent company’s blog, “As the focus of our business has shifted from overtime to realtime, we quickly realized [...]