Boons, benefits from using Clojure, Datomic

This is a blog about the development of Yeller, The Exception Tracker with Answers

Read more about Yeller here

Five years ago, I was eager to start working with Lisp. I was reading and working through “Structure and Interpretation of Computer Programs” and Paul Graham’s “On Lisp.” But the Lisp languages that I tried just seemed too clunky to really be useful.

Then, I found Clojure.

Today, the open source language that runs on the JVM, along with Datomic, a distributed database with the ability to travel back through time, are part of Yeller’s backbone. They’ve saved me weeks of coding and debugging time and have been a boon for my growing operation and Yeller’s customers.

Clojure wasn’t completely unfamiliar territory when I first started working with it. It reminded me of other languages, especially Ruby, but without some of the gnarlier edges.

It’s a reasonable language on the JVM, which Yeller required. The JVM brings the performance Yeller needs, and Clojure makes the day to day of coding a lot more pleasant.

Clojure’s focus on immutability makes writing “ordinary” code less error prone and enables some very high performance techniques, such as parallel reducers, possible. Yeller receives spikes of events up to 1 million per second per machine and can handle that just fine thanks to the parallelism reducers give you.

In fact, I recently detailed some of the lessons learned about both Clojure and the JVM at Euroclojure. (Which brings me to another point: The Clojure community is universally nice and, I’m thrilled to see, very focused on diversity).

With Datomic, the largest win is having history done “right.” The number of problems I’ve found trivial to solve by looking back at the state of the database when a customer reported an issue is enormous. Likewise, it’s been very useful to ask “which user request caused this transaction.” Yeller tacks on user IDs and details about web requests to every transaction it does to Datomic. Datomic’s architecture has helped Yeller through some really tough downtimes, including its worst one ever. Yeller couldn’t change user data during the downtime, but the website was still available for reads. Users also could see their exceptions. In other words, despite the downtime, Yeller still worked - a major benefit I hadn’t even considered when I started using Datomic

Datomic’s caching also makes it far faster for queries than any other database I could have used for Yeller. I only store user, billing and account information in Datomic. Right now, I can fit the entire database in the object cache in each JVM process, which makes for incredibly fast reads. That’s another benefit for both me and my customers.

Yeller is a small business. I wear all of the hats. History really helps with debugging efficiency. Fixing bugs faster means I can give better customer support. It also means I can go back to working on more important tasks like building new features and talking to customers about their needs.

Users prefer software with great user facing performance. With Datomic and Clojure, Yeller achieves that, and then some.

This is a blog about the development of Yeller, the Exception Tracker with Answers.

Read more about Yeller here

Looking for more about running production applications, debugging, Clojure development and distributed systems? Subscribe to our newsletter: