Using D3 for realtime webserver stats

I wanted to learn a bit of D3, so I made a small web app that shows (nearly) realtime webserver statistics as pretty graphs. Here’s a demo for my server and a setup guide.

Source on Github Source on Github
(You need both, but the first will get the second via NPM.)

Client code

MediaTemple were nice enough to introduce an API that provides a load of stats about what your server is doing some time ago. This is the same info that you can see in the server status bit of the account centre. Unfortunately the interface there is a bit clunky and it also logs you out (sensibly) after a few minutes’ inactivity.

Inspired by some of the really cool stuff Mike Bostock has done with D3, (mt) Stats gives you the same info with a (hopefully) nicer interface, and maybe even doing quite well with Tufte’s data-ink ratio. You can add as many graphs as you like (if your CPU can take it at least), move them around by dragging and adjust the interval over which stats are shown with the range slider. Keep reading >

MixCloud RSS Converter in Node.js

Continuing my love affair with Node.js, I made a MixCloud to RSS converter last weekend. Just paste in the MixCloud account URL or name you want and it’ll give you an RSS URL in return.

MixCloud RSS Converter

The source is also on GitHub if you want it.

The bit with some reminiscing you can probably skip

While at York, I was involved with (and ran) Breakz for quite a few years. Breakz is a music society that stages drum & bass, dubstep and electronic music events, and has brought some pretty major acts to York, including Chase & Status, Benga, Skream, Brookes Brothers and Ed Rush. Keep reading >

Node.js Video Gallery

A few months ago, I wrote a Metro-style video gallery with Ajax, infinite scrolling and other fun stuff. I’ve now rewritten it in Node.js, which was surprisingly cathartic after coding the PHP original.

There’s a load of bumf about the original PHP version here (mostly relevant) and some supplementary info about this version here, though probably the best thing to do is to try the demo site. Yay!

Source on GitHub Keep reading >

VidStreamer.js – a simple Node.js video streamer

I’ve been really keen to learn Node.js for a while now, so I decided to translate the video gallery I wrote a while ago into Node (nearly done!). At the back end, the video gallery uses xmoovStream Server (site currently dead) to stream the videos to the popular JW Player (I used Flash videos as I wanted to support bitrate switching).

As using a LAMP stack to support a Node app seemed wrong, I wrote a simple JavaScript video streamer. Most of the requirements came from looking at how xmoovStream Server works.

  • Supports http pseudostreaming
  • Streams Flash video and can resume streams
  • Streams other video and file formats and can resume these streams too
  • Works with JW Player’s bitrate switching

Source on GitHub Keep reading >