Converting my CMS to use the ShortBus and more of a pub sub model
As you may know I recently started a new job at my old company. As the new guy I have been sitting in as many meetings as possible trying to learn as much as I can about the underlying system, our methodology, what is important to the business, how we are going to achieve our deadlines, etc. During these meetings I have heard mention of the “ShortBus” time and time again. This was odd as we are building a system around NServiceBus…an enterprise level message bus (among other things). I was really under the impression that there was some great divide between the engineers “THEM” and the architects “ME” (…and my team). I really thought they were dogging us! Gonna have to push a boulder up hill in order to move a pebble…here we go again.
I finally asked today…what is this ShortBus you keep talking about?
It turns out that a a co-worker of mine, Matt Hinze, created a little toolset that is sort of a pub / sub in memory bus that also seems to tie in well with some CQRS-ish patterns. They use it primarily as a mediator between reading and writing data. It is perfect if you want to decouple your system a touch more.
In my case I am looking to remove a skosh of complexity in order to make my tiny CMS that much more testable but also to make it more extensible. I haven’t really posted anything about my CMS. But…my CMS is non-standard, built on top of AWS, and using the AWS blob storage (S3) almost entirely as its data store. This was done primarily as a spelunking exercise in the Amazon eco-system. It was also done so that I could get rid of my big metal hosting provider. I went from $250/mo down to $10 or so.
Given the store I ended up having a series of indexes to keep up to date which allows me navigate the structure in various ways. This works great for me. But managing a denormalized read layer as I throw new bits at it would be much easier if I published an event to the system and had a bunch of workers that just responded to that. It would mean a new feature would simply be a new set of event handlers.
Let’s give it a try…
Thank you Matt Hinze!