My employer recently set me out on a project to figure out a way to move configuration data from one legacy Rails app to another different Rails API, with disparate data models. Of course, there are many ways to do this, but as someone who has been the victim (and instigator of) unnecessary service-oriented architecture design, we wanted to avoid standing up a separate service to achieve these goals. Also, my team is currently tasked with overhauling our SOA to something smaller, so anything that could begin to reduce that scope was a good thing.
After some digging into Gregor Hohpe and Bobby Woolf’s Enterprise Integration Patterns, we realized what we needed was a message bus. Now, we could implement this ourselves, but the overhead cost would be too great.
This is when I found out about AWS EventBridge, a relatively new service on AWS executing standard event bus interactions.
This seemed like a good choice for our purposes (we use AWS for many things, custom events cost $1.00/million events sent) and we set ourselves out on a POC. It took little time to figure out the ins and outs and our integration ending up being pretty straightforward, but I initially had trouble finding any blog posts or readings about utilizing EventBridge with two existing large web applications. Most of what I could find online was, say, connecting a partner integration of Salesforce and storing data to DynamoDB, or triggering Cloudwatch events via the default EventBridge, etc.
Hopefully to save you some headache of staring at AWS SDK documentation for hours on end, I’ve set up a sample repo to use as a guide to follow along.
Prereqs:
#eventbridge #event-driven-architecture #aws #rails #integration