Simon Willison’s Weblog

Subscribe
Atom feed for nodejs

47 items tagged “nodejs”

2010

Why is Diaspora built on Ruby on Rails instead of Node.js?

Because Node.js had almost no visibility at all six months ago when Diaspora started. Also, Node.js has only very recently stopped breaking API backwards compatibility on a regular basis. Plus the Ruby library ecosystem is much, much larger than the Node.js ecosystem.

[... 81 words]

Would you recommend using Google Go with web.go, or Node.js for a new web server project which will involve high IO?

If you already know JavaScript, picking up Node.js is pretty easy. It also has a much larger community of web developers around it at the moment than web.go, which means there’s more example code / open source bits and pieces floating around.

[... 69 words]

What companies are using Node.js in production in Texas?

There’s a list on this page: https://github.com/joyent/node/w...

[... 23 words]

nodejitsu’s node-http-proxy (via) Exactly what I’ve been waiting for—a robust HTTP proxy library for Node that makes it trivial to proxy requests to a backend with custom proxy behaviour added in JavaScript. The example app adds an artificial delay to every request to simulate a slow connection, but other exciting potential use cases could include rate limiting, API key restriction, logging, load balancing, lint testing and more besides.

# 28th July 2010, 11:34 pm / http, javascript, node, nodejs, proxy, recovered

pdf.js. A JavaScript library for creating simple PDF files. Works (flakily) in your browser using a data:URI hack, but is also compatible with server-side JavaScript implementations such as Node.js.

# 17th June 2010, 7:39 pm / datauri, javascript, node, nodejs, pdf, recovered

Parsing file uploads at 500 mb/s with node.js. Handling file uploads is a real sweet spot for Node.js, especially now it has a high performance Buffer API for dealing with binary chunks of data. Felix Geisendörfer has released a new library called “formidable” which makes receiving file uploads (including HTML5 multiple uploads) easy, and uses some clever algorithmic tricks to dramatically speed up the processing of multipart data.

# 2nd June 2010, 3:57 pm / binary, buffers, felixgeisendorfer, files, html5, javascript, node, nodejs, uploads, recovered

A HTTP Proxy Server in 20 Lines of node.js. Proxying is definitely a sweet spot for Node.js. Peteris Krummins takes it a step further, adding host blacklists and an IP whitelist as configuration files and using Node’s watchFile method to automatically reload changes to them.

# 28th April 2010, 1:24 pm / nodejs, proxy, http, node, javascript, peteris-krummins

Step for Node.js. A further iteration on the attempts to make callback-based programming in Node.js easier to manage, this time making clever use of the ’this’ keyword to represent the next callback in the chain.

# 13th April 2010, 11:02 am / step, nodejs, callbacks, javascript

webhook-relay. Another of my experiments with Node.js: webhook-relay is a self-contained queue and webhook request sending agent. Your application can POST to it specifying a webhook alert to be sent off, and webhook-relay will place that request in an in-memory queue and send it on its own time, avoiding the need for your main application server to block until the outgoing request has been processed.

# 19th March 2010, 10:17 am / nodejs, node, javascript, webhooks, experiments, projects, webhookrelay

Node.js, redis, and resque (via) Paul Gross has been experimenting with Node.js proxies for allowing web applications to be upgraded without missing any requests. Here he places all incoming HTTP requests in a redis queue, then has his backend Rails servers consume requests from the queue and push the responses back on to a queue for Node to deliver. When the backend application is upgraded, requests remain in the queue and users see a few seconds of delay before their request is handled. It’s not production ready yet (POST requests aren’t handled, for example) but it’s a very interesting approach.

# 28th February 2010, 11:02 pm / node, nodejs, javascript, highavailability, http, rails, redis

kriszyp’s node-promise. Another elegant approach to managing asynchronous flows in Node, including running things both in parallel and serial.

# 28th February 2010, 3:50 pm / node, javascript, callbacks, nodejs, promise

“Do” it fast! Tim Caswell’s Do library has been upgraded for compatibility with Node v0.1.30, and now has a clever Do.convert() method which wraps Node’s low-level APIs with the Do libraries “continuable” abstraction.

# 22nd February 2010, 7:02 pm / do, tim-caswell, node, nodejs, javascript

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 / node, nodejs, javascript, promise, twisted, dojo, async

do. A library for Node that adds a higher level abstraction for dealing with chained and parallel callbacks.

# 17th February 2010, 5:43 pm / do, node, nodejs, javascript

How To Node. New blog about Node.js, with a superb series of tutorials aimed at both experienced and new JavaScript developers. The stuff on managing callbacks (including running them in both series and parallel) is pretty eye-opening.

# 17th February 2010, 5:42 pm / node, javascript, callbacks, nodejs

dogproxy. Another of my experiments with Node.js—this is a very simple HTTP proxy which addresses the dog pile effect (also known as the thundering herd) by watching out for multiple requests for a URL that is currently “in flight” and bundling them together.

# 3rd February 2010, 1:05 pm / scaling, node, nodejs, projects, javascript, dogproxy, dogpile, thunderingherd

Hot Code Loading in Node.js. Blaine Cook’s patch for Node.js that enables Erlang-style hot code loading, so you can switch out your application logic without restarting the server or affecting existing requests. This could make deploying new versions of Node applications trivial. I’d love to see a Node hosting service that allows you to simply upload a script file and have it execute on the Web.

# 31st January 2010, 1:57 pm / nodejs, node, blaine-cook, erlang, deployment, javascript