After a four month period of silence Emperor is still alive and kicking. Some
major changes have been made under the hood during this time and I’m excited to
talk about them.
Rabbit Hole: Easier Deployment
Using Emperor previously required a few setup tasks:
- Install MySQL and create user accounts
- Configuring Emperor to connect to the database and mail server
- Compilation and deployment to a server with the above
This wasn’t particularly complex but I felt that thinks might be easier if
Emperor could be deployed to services like Heroku.
This idea created two problems:
These complications led me decide on two things. The first is that Emperor’s schema
could use some small changes after lessons learned from the first version and
that a simple, REST-based ElasticSearch dependency might serve better in the long run.
PostgreSQL
The change to PostgreSQL gave an opportunity to revamp Emperor’s schema. The
first change was to use sequences for
the numbering of tickets and the latter was to separate mutable and immutable
ticket data into separate tables.
There was of course a lot of SQL rewriting to eliminate some MySQL-isms and take
on new PostgreSQL-isms. Since Emperor uses a very minimal model layer
it is both refreshingly free of abstraction and frustratingly prone to failure
across database vendors.
In the end I feel this was a positive change that benefited Emperor and made for
a better codebase for future changes.
ElasticSearch REST
ElasticSearch has an extensive Java client library
that Emperor previously used via Benny Sadeh’s scalastic.
This heavy depdendency on ElasticSearch’s pile of JAR files and the fact that
ElasticSearch has such a rich REST API irked me and when I ran into hosting troubles
with an in-JVM instance of ElasticSearch it was the final straw. So I created
wabisabi, a pure REST client for interacting
with ElasticSearch.
Picking Up The Pieces
After the two above changes there was lots of fixing to be done. The significant
fundamental changes to Emperor’s model made for a lot of broken functionality
that requires extensive testing. This is of course not the fun part of software
development, so it took longer.
Recently I resumed working on these fixes after moving from Nashville to
San Francisco and today I am happy to tag a new version and to resume using
Emperor for some small day to day projects.
The Future
The landscape of ticketing systems hasn’t changed much since I created Emperor
just over a year ago. JIRA continues
to dominate my professional career and GitHub Issues
provides reasonably powerful issue tracking for OSS projects and small teams. I still think there’s room for middle ground. Maybe it should be hosted?
Working on Emperor cemented my understanding of Scala and reintroduced me to modern JavaScript frameworks. It has reinforced my love of ElasticSearch and given me many a late night of hacking. I expect I will continue developing it in the hopes of finding like minded folks who want a similar system. If not, then it will continue to serve as an excellent platform for learning new things.