Nov. 30th, 2011

elfs: (Default)
I'm having one of those terrible days where technology, or at least my own use of it is failing me. I wanted to work on a story while on the bus, but since I was separated from the Internet I couldn't sync my local copy of my working repository with the one of my desktop.

I wanted to copy a book from my Nook onto my Palm's reader, since I take the Palm with me everywhere. I hadn't backed up the Nook since buying it, however, and I didn't have the cable with me. It was that kind of morning.

I also had a dream about what the UI for my Ptah project should look like, but now I can't remember any of the details other than hearing Steve Jobs' voice saying, "It should make you you want to lick it, but you know you'll get radiation poisoning if you do."
elfs: (Default)
So, week three of Pimsleur's Speak and Read Essential French, Unit I is full of lessons on counting and buying. Number of bottles of beer, and how to calculate change. The CDs from the library are old and out of date, because it's teaching me "un franc," "deux franc," up to "douze franc" and "treize franc."

Not "treize euro." (Google translate suggests "euro treize." This system hasn't taught enough grammar yet for me to know which is correct.)

Shunra suggested, "Give it a couple of months, it may be prescient." Hah!
elfs: (Default)
The other day, I blogged proudly about a piece of code called Switchboard, which allowed you to create a reverse proxy with routes decided by URL rather than host. Nginx does this, but it only has HTTP/1.1 <–> HTTP/1.0 proxying and no control over buffer sizes. Varnish does all 1.1, but no SSL. Pound buffers uploads completely to RAM before forwarding. So I wrote Switchboard.

It turns out Switchboard is a massive hack to get around three bugs in the nodejitsu node-http-proxy library, which is what Switchboard uses. Once I realized this, I submitted three patches to the nodejitsu team, and have happily admitted that my code was a monstrous hack. A much smaller piece of code, two functions, each less than ten lines long, was all that was needed to replace the entire functionality of that 161-line monstrosity.

I'm very pleased with the results, however: I can now do HTTP/1.1 <–> HTTP/1.1 reverse proxying, have complete control over my upload buffer size, and can maintain proxied websockets and socket.io communications channels.

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 7th, 2026 05:47 am
Powered by Dreamwidth Studios