Developer Day Notes 5: Lightning Talks

Impromptu – Andrew Bedra

Scheme, hooks into OS X: ports, camera, goal is creating art in Lisp. Code live to create art in front of an audience

Audio track, built-in iSight, and an OpenGL presentation that will go along with it. Starting with a piano sample; create a base melody loop. Create an OpenGL “presence” and define an animation… in this case, a rolling spiral and tweaks to constants are saved each time he evals the buffer.

Adding to the structure of the music, the animation. “The idea here is that you can start from a simple cube an animate it, rotate it, turn it into a sphere, end up with all kinds of spheres.”

He can put in video, capture images or the stream, add filters like bloom, blur, blend. “You can imagine a concert shaping up with this.”

Comet Experience – Mohan Sukara

Virtual team, have been working together about 3 years. Most of us are in Europe.

When they lost a project it prompted them to introspect on process and they decided to build a project management tool that pulled together their chat, project tracker, and task to-do list. Started with TCL but moved to Rails.

Real-time was a puzzle, though. Someoe heard of Comet and decided to build in Python where good tools were available.

So we built even before we knew exactly where we were going and we built something nice. We sent it to TechCrunch, entered the TechCrunch 50, and it’s live at samepage.in. Thinks it’s built in Comet, Twisted and Dojo but he’s not the techie.

One problem was that they started building a whole platform and they raised funding that… disappeared with the crunch. But they saw opportunities to create products, like real-time stock quotes to trading firms that needed to get over a 6-8s delay.

You don’t know where things will take you, so just embrace it, make your mistakes, and go on.

Apps for America 2 – Jeremy Carbaugh

A bit of “reverse shameless self-promotion”. He works at the Sunlight Foundation [which rules] and wanted to talk about the launch of data.gov. Over the next month they’ll go from about 40 to maybe 8,000 data sets.

So Sunlight is having a contest, if you create an open source app based on data.gov app there are significant cash prizes and a free trip to the Gov 2.0 Expo

“This is your democracy, take ahold of it.”

Progressive Caching – Ben Scofield

This is part of his previous Developer Day talk on this topic, sort of a continuation.

Rails has three caches: page caching (entire HTML output), action caching (runs normal filters but otherwise skips work), fragment caching (bits of HTML pages).

MyPullList.com is an app for comic book fans who want to track the comics they wish to buy each week. Standard approach is to grab all the items, loop over them, and show the “pull” badge on the comic if the user wants to pull it.

A better approach is to cache the HTML so it can come straight off the disk, but then how do you add the pull badges that differ by user? Well, when the page is loaded, you can use AJAX to make a second request that returns JSON with the individual user’s data to add the pull badges. Instead of 617ms for a response from the server, it’s about 135ms for the first request + AJAX request. Wow! A great way to cache the common public stuff and send just the custom stuff.

This is such a win because the initial request bypasses all the Rails stack.

On many pages (examples are Odeo.com and Amazon.com), usually large parts of the page can be cached except a few personalized bits. You can’t cache Squidoo pages (personal “you’d be interested in” results) and Twitter (personal subscribe list), but it’s nice.

One problem, though, is that this depends on Javascript. (Hulu’s implementation is… unusual, at best.)

Q: Why not just use the fragment caching and also cache the ? A: You’re still hitting the Rails stack. It’s a great technique, but that’s sometimes too slow for some applications.

Q: Another technique is ESI. A: Yes, ESI works nicely. It might even let you replace this.

Q: ESI? A: Edge Side Includes. Created by Akamai and caches fragments in Akamai or Varnish.