ShopTalk Blog

How and why we are building ShopTalk

Announcing Diesel

written by Jamie Turner, on Sep 23, 2009 12:06:00 AM.

Here at Boomplex, we're thrilled to see that everyone is excited about async!

We get excited about async too; in fact, the guys at Boomplex have used async approaches in Python for years to tackle many kinds of network applications and protocols. We've dabbled with Twisted, asyncore/asynchat, libevent, eventlet, py's greenlets, stackless, as well as a few iterations/variations of our own thing.

Heck, part of the reason we even made ShopTalk our first product was because we knew it played to our technical strengths and interests--we had learned time and time again how great a match long-polling HTTP and async are for each other. So, we gathered up everything we'd learned and examined it. Then, we tried to design a system that was an amalgamation of the best ideas we'd been exposed to over the years... a system that let us write async the way we really wanted to.

And now, given the community's interest in the general topic, we've decided to open source it. Meet diesel.

It's generator-based to retain a blocking feel, and writing protocol handlers is a cinch. It comes with a complete HTTP/1.1 implementation, so you can get started doing Real Work with it right away.

Here's what an echo server looks like:

from diesel import Application, Service, until_eol

def echo(remote_addr):
    their_message = yield until_eol()
    yield "you said: %s\r\n" % their_message.strip()

app = Application()
app.add_service(Service(echo, 7050))
app.run()

And yes, it's fast; very fast.

The big picture is that we're building a larger framework to make web apps that use scalable, event-driven push behavior, simple and fun to write. What we have right now is just the geeky, low-level core--the "engine".

We plan on rolling out the next two components soon. In the mean time, give diesel a whirl, and drop us a line with any questions, bugs... or just tell us what you're doing with it.

And, like any good Python project, it's in the cheeseshop and on bitbucket.

Do you instant message your coworkers? Try ShopTalk instead. It's better.

Comments

Leave a Reply