Open Source

Create your own Firehose API with STREST

Written by Dustin Norlander | Posted on: April 13th, 2011

Announcing the open source release of the STREST Protocol, Server and Drivers.

STREST makes it as simple as possible for developers to create scalable streaming Firehoses and high throughput APIs.

While working on the forthcoming Trendrr.com API we began searching for a technology to address a number of semi-unique technical challenges.  First we needed to be able to offer API calls that could handle extremely high volume with low latency while still maintaining the easy to use RESTful/HTTP interface.

Next we had to be able to deliver streaming realtime results at scale. For instance, if user X wants all results for one of their Trendrr projects, then we wanted to provide a simple streaming endpoint. One common approach to addressing this is to use http streams. This works well for certain use cases but we found it a bit limiting due to the fact that once the stream is established, no further communication can come from the client. STREST doesn’t have this limitation which makes it much more flexible when it comes to tailoring your stream results on the fly.  Additionally, STREST is asynchronous so a client to connect to multiple streams simultaneously on a single connection.

Lastly we wanted a way to easily stream results to a browser.

To solve these issues we developed a new protocol called STREST which is compatible with HTTP and allows fully duplexed streaming connections. Our STREST server implementation supports websockets out of the box, and we provide a javascript websocket driver as well as a number of examples.

We are big supporters of opensource software and we are proud to announce the open source releases of the protocol spec, a high quality server implementation and drivers in Java, Python, and Javascript. We think you’ll be amazed at how easy it is to understand and how natural it is to develop APIs with STREST.

Dustin Norlander, Chief Architect of Wiredset/Trendrr

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.