Mail as a “message bus”

Since I recently published Oplog and the beginnings of syscerone/machinfo 2.0 to github I decided to address a question I get a lot from developers. People always ask why I use email as a “message bus”.

  1. It’s ubiquitous – Chances are you already have email set up! Not only that, it’s probably already well monitored and troubleshot. For most of you it’s used daily and you will DEFINITELY hear if your email system isn’t working even if your monitoring system doesn’t catch any issues. That means there’s one less system you have to manage, maintain, monitor, troubleshoot, or any of those other tasks and gotchas.
  2. It has built-in encryption – as long as you’re using TLS between your internal mail servers and relays you don’t need to worry about encryption.
  3. It has built-in congestion control
  4. It has built-in retry logic
  5. No need to open another port!
  6. It’s programmatically trivial to address
  7. it works!

I’m not saying it’s prefect, and I wouldn’t use it for any real time applications, but if your application can stand a little lag, email might be an acceptable choice. Take OpLog for instance. It’s mostly an information gathering and aggregation service, so real time isn’t a requirement. There are lots of potential inputs for it, so having to create some kind of traditional message bus hooks into all those sources could potentially be a significant amount of work. If you’re using any kind of proprietary software it’s possible you might not be able to create message bus hooks for it at all, but there’s a fair chance you can make it send an email one way or another.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: