Go WEBrick go!

Eric Hodel | Thu, 16 Feb 2006 07:54:00 GMT

WEBrick is a nifty little HTTP server written in Ruby. Since we’ve been having random-image-fun with Apache’s RewriteMap I pulled out my next-best tool, WEBrick, to serve images.

In order to get some speed back I’m using a sendfile(2) extension written using RubyInline. Due to the double-dispatch images end up being noticable slower, but at least I won’t have to restart whole webservers every couple hours to get images back on track.

Posted in ,

Overhead

Eric Hodel | Wed, 15 Feb 2006 08:07:00 GMT

It seems to be Apache and mod_proxy that are making the images slower. ab shows going straight to webrick gives approximately 110 requests per second for -c 100 -n 1000 while webrick via mod_proxy gives approximately 90 requests per secord for the same settings. I wish I could go straight to webrick from the load balancer.

Posted in

MogileFS + NFS = hard

Eric Hodel | Tue, 14 Feb 2006 08:22:00 GMT

Just to salvage my brain, here’s what I need to do to make it work on 43 Things & co.:

  • Make sure www has a homedir (actually, no, fix the code to not need sendfile())
  • Make sure mogstored is set up with a umask of 002
  • Make sure www is in the mogilefs group for all hosts
  • Mount all the nfs shares in the right spots

Posted in ,

AWESOME

Eric Hodel | Mon, 13 Feb 2006 02:31:00 GMT

Breaking Rails’ functional tests into controller tests and view tests will allow easy auditing between the two types of tests.

But first I need to move all the view assertions out of my functional tests.

Posted in ,

httpdump

Eric Hodel | Mon, 23 Jan 2006 07:34:00 GMT

I wrote a nifty little combination of a WEBrick servlet and a ruby-pcap http grabbing example that lets you see the latest HTTP requests that have crossed a network card interface.

All so I can spy on my neighbors (but they can also spy on me).

Posted in , ,

FakeMutex

Eric Hodel | Wed, 11 Jan 2006 01:23:00 GMT

Adding Mutex makes things slower, but you don’t always need it. For our memcache library I’d like to avoid performing locking when we’re running single-threaded (since that’s what happens most of the time). So, I came up with the idea of FakeMutex that simply yields inside its #synchronize method.

FakeMutex doesn’t give back all the performance of not having locking at all, but it does prevent the code from being messed up with lots of tests to see if we should try to lock or not.

Read more...

Posted in ,

The road to Trackmap Editing

Eric Hodel | Sun, 11 Dec 2005 07:35:00 GMT

Wow, the Google Maps API is severely undocumented, but you can do evil, evil things with it.

I’m ripping coordinates out from the points property of a GPolyline then forcing a redraw to do live deletion (along with a bit of XMLHttpRequest). Next up is moving points about the map and then inserting new points.

But, all this javascript is tiring.

Posted in

And yet more trackmap

Eric Hodel | Sat, 26 Nov 2005 10:45:00 GMT

I added some nifty stuff like a map on the front page and a scroller for the photos so you can see them in context. That last one is the Mariposa Sequoia Grove at Yosemite. You can also link straight to a point like this deer I was 8 feet away from.

Now I’ve got the major features all ironed out, and just minor polish-type-features left. (Like not giving a 500 when flickr gets really slow.)

Posted in

Yet More Trackmap

Eric Hodel | Thu, 24 Nov 2005 06:39:00 GMT

Trackmap

Changes in no particular order:

  • Photos can be refetched from flickr
  • Routes can be deleted
  • Time zone offset can be specified so your photostream matches the track correctly
  • Markers bubbles look much better, now with as many as 3 photos
  • Photos in marker bubbles have flickr title as tooltip
  • Map auto-sizes to browser window

TODO in a semi-accurate order:

  1. More text about what actions do
  2. Accounts
    • That save flickr username and TZ offset
    • And only let you delete your routes
  3. Route descriptions
  4. Bookmarkable points
  5. Move show page actions up to a top navbar thingy
  6. Google map on front page
    • With picture in popup
  7. Photo scroller on side
    • That centers a point when you click the photo and brings up the marker
    • And brings up the photo description
  8. Figure out why long routes cause browsers to lock up
  9. Geotag flickr photos
  10. More Markers
    • Cameras
    • Start/Stop

Posted in

Trackmap Improvements

Eric Hodel | Tue, 22 Nov 2005 08:53:00 GMT

  • Attach photos by flickr username, email, or NSID
  • Attach photos from the track create
  • Multiple photo support “N photos total” if more than one photo per point
  • Using the 75×75 size photos for faster loading of bubbles
  • More/better error messages
  • Tracks of unknown format will automatically get emailed to me
  • Switched to the large slider for easy zooming

TODO:

  • Text blurbs
  • Photo titles
  • Track deletion
  • Photo deletion
  • Time zone support
  • Accounts so you don’t have to set your flickr info/time zone offset every time
  • Better-looking markers
  • Marker images

Posted in

Older posts: 1 ... 21 22 23 24 25