The little engine that could

  • The tests were taking a while to run. Enough to disrupt the flow of development. We already attack this problem in creative ways. As the code leaves, so can the tests, as long as we integration test appropriately (more on that later).
  • Coupling in the app led to bugs and difficulty refactoring. As with the test duration, the app “felt” too big.
  • We expect significant increases in both usage and complexity of the app over the next year. If it weren’t going to be heavily used and actively developed, we’d leave the darn thing alone ☺
  • SOA, where appropriate. We like manageably sized apps with clear responsibilities and consistent communication. We do have other services, but those were built outside of our main app from the start. This is our first attempt to splinter the big ‘un itself.
  • The seam was easy to conceptualize. It was simple to visualize which parts of the app would fall into the engine. The interface was straightforward — a small set of data would be sent to the main app and used to create an account.
  • The code we’d break off seemed roughly the right amount. That is, enough to make a difference, but hopefully not so much that we’d throw up our hands and decide that a monster app wasn’t so bad after all.
  • Source-agnostic account creation in the main app. We will eventually populate account data from multiple sources, i.e. doctor referrals or EHR integrations, not just the one application flow.
  • Splitting our app “vertically” addresses the effect of coupling and complexity on feature velocity. We don’t immediately face the problems “horizontal” splits solve, such as allowing developer specialization or targeting performance bottlenecks.
  • Rails engines enable incremental experimentation. We could have jumped straight to registration as a separate app, but the scale of flipping that switch on a live app was daunting. Change should be as incremental as possible — get that sh*t into master.

--

--

--

74 wpm and counting

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sarah Branon

Sarah Branon

74 wpm and counting

More from Medium

Advanced Active Recored Query with Arel

worker queues and avoiding pitfalls of race conditions

Process incoming emails in Rails 6 with Action Mailbox : from development to production