Saturday
05Dec2009

Nitrogen, Riak, and 1,000 Lines of Erlang

UPDATE: See the video of my talk on Nitrogen, Riak, and SlideBlast.com.


Check out SlideBlast.com, a tool I created that lets you share and control a slide presentation on the web. SlideBlast was built using Nitrogen and Riak, and is an example of exactly how much you can do with the right tools and 1,000 lines of code. (Ok, it's more like 1,130 lines, but who's counting?)

The full source code is available on GitHub: http://github.com/rklophaus/SlideBlast

How it Works

  1. Upload a .pdf or .zip file.
  2. Share a link with your remote audience.
  3. Start presenting. As you flip through slides, your attendees' slides change, too.

Components

SlideBlast runs on Erlang and uses the following projects:

  • Nitrogen to create a slick, Comet-based user interface.
  • Riak to store slide show data (including the images) with a flexible schema.
  • Mochiweb as the underlying HTTP server.
  • Ghostscript to split and convert .pdf files into images.
  • Imagemagick to create image thumbnails.
  • SyntaxHighlighter to transform uploaded code files into beautiful HTML.
    (Try uploading an .erl, .cs, .cpp, .js, .java, .sh, or .sql file!)

Why I Built SlideBlast.com

I built SlideBlast for my talk Nitrogen and Riak by Example, presented at the Erlang User Conference 2009 in Stockholm, Sweden. In the presentation, I briefly cover both Nitrogen and Riak, and then describe some of the techniques used to build SlideBlast. The video should be online soon, check it out.

Reader Comments (2)

Rusty,

I love what you're doing with Nitrogen & Riak and wanted to use SlideBlast as a starting point for learning. Unfortunately I'm having difficulty getting it running, wondering if you can point me in the direction of the problem.

it looks to me that my install is failing on the riak start within caster (I've tried both the mochi & inets versions), though I can manually start & test riak from the command line.

the install recipe was from the README.markdown, though I've subsequently tried a full download / build of riak.

macosx 10.6
erl

any suggestions?
any forum that you would point me to (other than your blog?)

keep up the great work!

----- trace ----

=CRASH REPORT==== 4-Mar-2010::19:52:57 ===
crasher:
initial call: application_master:init/4
pid: <0.170.0>
registered_name: []
exception exit: {bad_return,
{{caster_inets_app,start,[normal,[]]},
{'EXIT',
{undef,
[{riak,start,[["riak.config"]]},
{caster_inets_app,start,2},
{application_master,start_it_old,4}]}}}}
in function application_master:init/4

March 4, 2010 | Unregistered Commenterdewd

Rusty,
I tried a prior version of Riak (v0.6), and everything worked like a charm. I'll put a note about version dependencies on the github wiki...
thanks again -- great (!) learning aid :-)
--dewd

March 4, 2010 | Unregistered Commenterdewd

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>