Corey Prophitt's Website

July 16, 2020

Introducing Olifant

Olifant is a web service that enables you to monitor websites or web services. If a monitor fails a check you will be notified via a communication channel such as email or IRC.

A screenshot displaying Olifant's monitoring service.

Olifant was built from the ground up with Go and no external libraries (minus a PostgreSQL driver). No JavaScript libraries or CSS frameworks were used. Pages are rendered server side via Go templates.

I currently use Olifant to monitor a number of my own websites (such as The service was built with my own use cases in mind but you may find the service useful as well.

Why build another monitoring service?

The short answer: I was unable to find a simple monitoring service that supported notification channels I care about such as IRC. Furthermore, my issues with Ruby on Rails have been growing as of Rails 6. A simple monitoring service seemed like a great way to test building a complete web service entirely in Go. Why did I use Go? Well, read on.

Go? Rails?

I have dabbled with Go in the past, mainly for micro services and command line tools that needed to crunch a lot of data. My goto for building complete web services has always been Ruby on Rails. I currently have two successful products running on Rails 5 and I continue to maintain those products today. When I started Olifant I had originally used Rails 6, however some of the changes from Rails 5 irked me.

Rails 6 now uses webpacker instead of the old asset pipeline. That on its own isn't a bad thing, but I generally don't enjoy the Node ecosystem.

  1. The node_modules folder tends to grow to ridiculous sizes.
  2. NPM and Yarn tend to spit out a lot of warnings and I find myself constantly hunting down the reason and trying to fix them. I eventually begin ignoring them.
  3. In the past I have spent many days debugging package.json dependency conflicts and issues. I have grown to really dislike the package management. This may have improved in the last year, but I doubt it.
My general thoughts regarding the Node ecosystem is it moves too fast, package developers are too liberal with the dependencies they choose and the end result is a mess with lots of incompatibilities and warnings.

The first impression I had with Rails 6 wasn't a great one. Not long after I ran rails news I started seeing a large number of yellow warnings-- all from yarn. Not really something I want to see the moment I start a new project. I can't imagine what a large project maintained over a long period of time would be like.

From there things got more weird. I wanted to give Stimulus a try and I set up Bootstrap for Rails 6. The instructions were convoluted and I ended up with style packs in my app/javascript/packs folder. Ummm, ok. Hopefully this experience has been cleaned up since the initial release and I hope people have found better ways to integrate Bootstrap and other JavaScript frameworks. My overall experience with the new asset manager left me feeling a bit bummed out.

I thought about going back to Rails 5 which is more familiar to me and feels more Railsy. However, I started to doubt the future of Rails. Who knows what Rails 7 would bring, or 8. I knew some day I would need to upgrade from Rails 5 and I was not confident Rails would be a good fit for me anymore.

After careful consideration I decided to give Go a test drive. I chose Go for a few reasons:

  1. Simple language that is familiar to me (I used to do C programming).
  2. The ability to do concurrency with ease and without other dependencies like Redis and Sidekiq.
  3. Great performance with minimal resource requirements.
  4. Staticly linked binaries make deployment simple and fast.
  5. A rich standard library with networking, templating and other critical functionality.
The experience building Olifant with Go has been a good one. Like any language or framework there were gotchas along the way but nothing too bad. The best way I can describe Go is minimal and simple, and there's nothing wrong with that. It was a refreshing experience and I will happily use Go as my goto for complete web services moving forward.

What's next for Olifant?

Olifant is released and available to the public but a number of features I would like are still missing. I will be releasing frequent updates to the service while I use the service and find more features I need.