Why (and How) We Built a WebAssembly CMS
At this Year’s WasmDay, a co-located event that is part of CNCF’s KubeCon, Matt Butcher and Radu Matei dove into Bartholomew, the CMS that powers this website. They discuss why Fermyon decided to write a new CMS, how we use it, and how it runs on top of Spin.
We launched Fermyon.com on February 8th, and it was running Bartholomew, our newly minted CMS. We wrote our own CMS in part because we feel strongly that our site should run on the technology that we believe in. But we also wrote it because we were frustrated with the plethora of “Hello World” WebAssembly demos and the comparative absence of real-world applications. We wanted to show that we could indeed build production-quality applications using the technology available today.
Bartholomew is a dynamic CMS, meaning that it renders each page on-demand. This is in contrast to static site generators like Jekyll that render static HTML pages that are then uploaded to a server. Choosing to use a dynamic CMS was in part inspired by Drupal (which Matt Butcher worked on long ago). But it was also born out of our desire to publish content at specific times without requiring a human to push the content at an exact moment.
Bartholomew is not a toy, and not a demo. We wanted it to be a complete production-grade application. To make it so, we implemented a large feature set, including:
- A Markdown and TOML content format
- Handlebars templates
- Extension via Rhai scripts
- SEO optimization
- Easily customizable themes
And how has this CMS performed since we deployed it? Even under heavy load we have seen it handle requests in tens of milliseconds, earning it a 99 out of 100 on Google’s page speed test. And this performance was achieved running small VM instances in AWS. In other words, we did not have to break the bank to run a highly SEO optimized dynamic CMS.
Bartholomew runs on Spin, our WebAssembly framework. Thanks to some recent improvements with Spin, you can get started writing a Wasm app in less than 5 minutes.