Simon Willison’s Weblog

Subscribe

39 items tagged “async”

2010

Understanding node.js. A king providing orders to his army of servants is a much better analogy than my hyperactive squid. # 18th May 2010, 6:44 pm

node-v0.1.30 (via) A very significant new release of Node.js: the Twisted/Dojo-style Promise abstraction has been removed entirely, causing backwards incompatible changes to a bunch of core APIs. This means the pseudo-blocking Promise.wait() method is gone too, making it even harder to accidentally block your event loop. Instead, user-level libraries are encouraged to add Promise-style abstractions. I’m pleased to see Node sticking to the low-level stuff. # 22nd February 2010, 7 pm

2009

Socket Benchmark of Asynchronous Servers in Python. A comparison of eight different asynchronous networking frameworks in Python. Tornado comes out on top in most of the benchmarks, but the post is most interesting for the direct comparison of simple code examples for each of the frameworks. # 22nd December 2009, 10:34 pm

Google Analytics goes async. This is excellent news—the latest version of the Google Analytics JavaScript is designed to allow for asynchronous loading, so it won’t hold up the rendering of your page. Analytics and banner ads are the two worst offenders when it comes to slowing down page loads. Now if only a banner ad vendor would follow suit... # 2nd December 2009, 6:30 pm

Perl: Love it, or hate it, but don’t ignore it. Phillip Smith calls me out for omitting Perl from my list of Node.js event loop alternatives (I only mentioned Twisted and EventMachine). No conspiracy here, I’m just not connected enough to the Perl community to know what the popular event loop libraries are. To Perl’s credit, Perlbal was the first piece of software I saw that showed me how a single threaded, event loop based system could massively outperform a threaded alternative. # 27th November 2009, 7:51 am

Node.js is genuinely exciting

I gave a talk on Friday at Full Frontal, a new one day JavaScript conference in my home town of Brighton. I ended up throwing away my intended topic (JSONP, APIs and cross-domain security) three days before the event in favour of a technology which first crossed my radar less than two weeks ago.

[... 2009 words]

Twisted inlineCallbacks and deferredGenerator. inlineCallbacks are a brilliant (but seemingly under-promoted) feature of Twisted which use the ability to return a value from a yield statement to make asynchronous callbacks look much more like regular sequential programming. # 25th October 2009, 11:30 pm

Diesel. Yet Another Asynchronous Python Comet Library, of interest because this is the first one I’ve seen that uses Python’s generator coroutines, taking advantage of the return value of the yield statement to feed messages in to a generator function. Currently only works on Python 2.6 on Linux due to a dependency on 2.6’s epoll support. # 23rd September 2009, 5:15 pm

We experimented with different async DB approaches, but settled on synchronous at FriendFeed because generally if our DB queries were backlogging our requests, our backends couldn’t scale to the load anyway. Things that were slow enough were abstracted to separate backend services which we fetched asynchronously via the async HTTP module.

Bret Taylor # 11th September 2009, 5:31 pm