Bitmunk 3.2.2: Good Relations and Greening

We are happy to announce the latest release of the Bitmunk Website and the PaySwarm software. It has been three months since our last release. This launch has a number of new features that are pretty exciting:

  • Green Computing – We have replaced the standard Apache+PHP+Smarty web server stack with the Monarch Web server stack. This has improved performance by 468% and reduced the number of servers we need by a factor of 4. Reducing our carbon footprint by 4x is not only green, but greatly reduces long-term operating and maintenance costs as well.
  • Semantic Web – We have published a new set of over 74 million pieces of machine-readable data in our pages, 11 million of which consist of pricing data via the Good Relations Vocabulary. We are using RDFa to publish the data.
  • The Experience – Finding and buying what you want is now faster, with less annoying screens in the way between you and your music. The PaySwarm software now supports Windows 7 (32-bit and 64-bit versions).

Green Computing

Performance is a big deal for the Bitmunk and PaySwarm software, mainly because it needs to run on low-power cellphones and set top boxes, all the way up to high-performance multi-core, multi-machine clusters. Similarly, as a start-up, we don’t want to have to spend more money than we have to on hardware, power, cooling and maintenance. Over the past year, we’ve been slowly moving away from Apache and PHP to a Web server stack called Monarch. Monarch is a small footprint, modular HTTP server written in C++. It supports a Smarty-like templating language and provides all of the facilities that are familiar to those using an Apache+PHP+Smarty development stack. Monarch also allows us to integrate our high-performance REST-based web services with our web page rendering.

So, just how small and fast is it? The entire Monarch Web Server consists of around 1.8MB of binaries (on top of a standard Linux install). Loading a web page that is based on a template that must be processed is more than 4 times faster via Monarch than it is via Apache+PHP+Smarty. Preliminary testing has shown Apache to serve roughly 56.31 requests per second. The same test shows Monarch serving roughly 263.44 requests per second. Monarch achieves this performance without any sort of template caching, where-as the Apache stack utilizes template caching. We expect Monarch’s cached results to be many, many times faster than Apache’s results.

Does this mean that everyone should run out and replace their Apache+PHP+Smarty stack? The answer will be, in almost all cases, no. Monarch requires that the application programming is done in C++, and the number of people that are capable of doing good C++ development is far fewer than the number of people that are capable of doing good PHP development. There are plans for a compiled scripting language for Monarch, but those are a part of our 20% (fun) time at the company.

The latest code for Monarch has been released as open source software on github.

Semantic Web

Digital Bazaar’s Founder, Manu Sporny, is currently involved in helping to develop technology for Linked Data at the World Wide Web Consortium. Specifically, he is co-chair of the RDFa Working Group, which is creating technologies to markup “things” on the Web such as music, movies, books, prices, people, events and other human concepts so that machines can recognize and use them to make the Web smarter.

We have a policy of eating our own dog food at Digital Bazaar, which is why we are using Monarch as our primary web server as well as marking up most of our data using RDFa. If you don’t know much about RDFa yet, there is an introduction to the semantic web and a video describing RDFa Basics on YouTube for those that would like to learn more.

The bottom line is that, with this release, we are publishing over 74 million triples. The vocabularies that are being used include Dublin Core, Media, Audio, Google, VCard, and Good Relations. 11 million of those triples are Good Relations triples, which are used to denote pricing and availability data for our entire music catalog – over one million songs and albums.

The Experience

Last, but not least, we have made the website much easier to use. There are a number of subtle changes to the graphics on the website that make the interface look more polished – things like drop-shadows around the text input boxes, better edges around content boxes, and faster page loading times. We have also made the identity verification and purchase process faster. Account management has been improved as well, but don’t take our word for it – give the new Bitmunk a spin for yourself.

5 Responses to "Bitmunk 3.2.2: Good Relations and Greening"

  1. Laszlo Török Posted June 5, 2010 at 9:27 am

    Hi,

    If you are considering a compiled scripting language for your web stack, than you should probably look at HipHop which compiles PHP to C++ and is available under an open source license.

    http://developers.facebook.com/blog/post/358
    http://wiki.github.com/facebook/hiphop-php/

    Regards,

    Laszlo

  2. Thanks for the link Laszlo, we may support HipHop via a module eventually (since Monarch is modular, there is no need to play favorites). However, we’ve been thinking along a different route.

    Why not use V8? Javascript for the client side /and/ the server side. Javascript on V8 is nine times faster than the equivalent PHP code (mean time):

    http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=v8&lang2=php

    We were thinking – why not use a scripting language that Web developers are already very familiar with and that is faster than PHP? Granted, there is the issue of libraries and bindings, but providing Javascript for both client-side and server-side programming would make server-side page processing faster than PHP on average and it would also not require knowledge of PHP for server-side development. One could even imagine a Javascript debugger that would attach to the server via a REST-based protocol. You could use the same debugger for both client-side and server-side debugging.

    Food for thought… there is no timeline on accomplishing this – it’s still an active R&D project at Digital Bazaar.

  3. quite sure that HaXe targets V8 (as well as php, c, java, as3, javascript, iphone, android etc) – but still can’t bring myself to jump in with two feet.

    very interesting thought re v8, trying to think of reasons why to go for it myself. If I think it’s a good move for you guys at Digital Bazaar..

  4. Laszlo Török Posted June 22, 2010 at 4:29 am

    Interesting approach, but it is surely viable.
    The major issues with adopting are really tool support and libraries.
    However, there are already a few pioneers experimenting with server-side JS.

    I liked the interview with Attila Szegedi, chief architect at Adeptra Inc, where he talks about why he thinks server-side JS is cool. (They use Rhino so they have JDK)

    http://www.infoq.com/presentations/javascript-in-the-enterprise

  5. Laszlo Török Posted June 22, 2010 at 4:49 am

    Link to the actual interview:

    http://www.infoq.com/interviews/szegedi-rhino