Smarkets Blog

News and discussion about Smarkets and the gaming industry

Open source software at Smarkets

with 8 comments

I’m an unabashed open source fanboy. At Smarkets, I use a lot of software written by other people. Here is a quick summary of the Smarkets stack; think of them as geek shoutouts.

  • Erlang – Almost everything is built atop the Erlang/OTP application system. I like functional programming. It is easier to manage complexity in a language with reasonably isolated side effects. Erlang’s concurrency primitives have been touted many times before, and conceptualising concurrent systems as communicating sequential processes now feels a lot more natural than other paradigms. As Damien Katz recently mentioned, systems built atop Erlang/OTP don’t seem to suffer the same failures under high load as certain other garbage collected languages do.
  • Distel on Emacs – When writing code (and actually quite a bit more), I like Emacs. When writing Erlang, I like Distel. It provides a natural entry point for debugging pieces of Erlang code. Getting Emacs to communicate with an inferior Erlang VM is especially useful for rapid prototyping. Being able to do everything within Emacs is good for productivity.
  • Mnesia – Arbitrary term storage is a simple way to avoid having to interface with another database management system. Because Mnesia is part of Erlang/OTP, you get it for free.
  • Mochiweb and nginx – Thanks to Bob Ippolito and Matthew Dempsky (and others I’m sure I’ve missed) for the mochiweb HTTP toolkit. It’s lightweight and embeddable, so it was very easy for us to integrate with our backend. Nginx performs well and is very simple to integrate with a backend powered by mochiweb.
  • sgte and StringTemplateFilippo Pacini’s sgte template engine (”inspired by” StringTemplate) was the basis for our templating system.
  • YXA – While we don’t specifically deploy any SIP software, YXA is a great example of well-written Erlang. I learned a lot from reading through Magnus Ahltorp and Fredrik Thulin’s code. It’s been around for several years and has matured quite a bit as a result.
  • Flat files – Writing a binary file to disk is sometimes overlooked as a solid way to persist sequential data that’s only needed locally. I’m not sure who I should thank here, but I think the list would probably be pretty long.

Written by Hunter Morris

April 23, 2008 at 11:29

8 Responses

Subscribe to comments with RSS.

  1. Hey thanks it’s nice to hear about someone actually using Distel. I originally released it a bit too early so most of the feedback I’ve had was along the lines of “it doesn’t work on my computer” so thanks for the counter-balance. :-)

    Luke Gorrie

    April 23, 2008 at 17:45

  2. Hi Hunter,
    happy to know you found sgte useful.

    filippo

    April 24, 2008 at 13:03

  3. Hunter,

    Is there anyway I could get a copy of the presentation you gave to the London User Group meeting… I’m a CIO based in the US that’s very interested in building our next generation web portal in Erlang. But for obvious reasons most of the Erlang brain trust seems to be on your side of the pond.

    Many Thanks,
    SKM

    Scott K. Moore

    May 21, 2008 at 20:19

  4. Scott-

    Hunter posted the slides:

    http://blog.smarkets.com/2008/05/22/talking-smak-london-erlang-user-group-presentation/

    Thanks for your interest. We’re open sourcing Smak, our erlang web framework.

    Best,
    Jason

    Jason Trost

    May 22, 2008 at 18:16

  5. I work for a gambling company and have been arguing for the use of erlang for some time. Your advocacy of the technology will help me enormously to win my case…

    Dude

    June 23, 2008 at 12:49

  6. [...] It is also worth mentioning that an open source alternative to Betfair has been in the news lately: Smarkets! Now you can go play your favorite open source soccer/football game, like Eat the Whistle. These [...]

  7. [...] there are a lot of smart folk out there who thing you’re the next big [...]

    Erlang/OTP >= Ruby/Rails ?

    October 11, 2008 at 10:48


Leave a Reply