The Config Promotion Problem
Join the DZone community and get the full member experience.Join For Free
for enterprise platforms that integrate multiple partners or clients onto a base platform, cms, rules, etl, toggles, case management and bpm (count ’em: six) all share a couple of common factors. partner, client or customer config:
- needs to be deployed into production at a different release cadences than the base product itself.
- needs to be “developed” by a different team than the one that makes the application binary (platform or base product)
i would say that those six are all forms of configuration on top of the binary platform, as shown here:
i’ve three partners illustrated – banana, orange and mango.
promotion not deployment
the trouble is that deployment isn’t quite the right word for what happens when the business decides to go live for one partner (but not others), it is “promotion” and it can be quite granular. the promotions activity is orthogonal to the application binary deployment cycle, and has a flow through environments towards production.
there is a general promotion problem once you decide this is what you need:
consider a tiny json document as representative of any of cms, rules, etl, toggles, case management or bpm as they pertain to a single partner/client. changes over time (left to right) are outlined for a single partner below, as are the promotions through environments (each horizontal line):
specifically, if we had a hot-fix in the middle of a long running change, we’d need a way to work on the former while not waiting for the latter to complete (because we need to fix something asap). environment ps dev1 is where a large team was taking many months to finish that large refresh of one partner. ps dev2 is an environment not being used for such a involved change, and someone to quickly change the config, see how that behaves, and begin the promotions path towards production, without being entangled in a larger unfinished change. ps stands for “pro services”, by the way, which is an i.t. department designation for that team with a separate purpose (and funding model).
as i have it in the diagram above, the promotion to production was not re-typed in the ps-dev1 environment and we’re due a regression when the long running change finally goes live. hopefully that’s clear above – bad timing on promotions causes a regression. incidentally, there are many subtle variations of the above that also cause regressions and lost work.
formal merge is what’s needed
what you really need is to merge during a promotion, and there’s pretty much no technologies out there for those six that doesn’t simply overwrite during promotion. that’s a problem – regressions are embarrassing. therefore, there is a desperate need for these types of things to keep their configuration as source as we conventionally know it, and under formal source-control, and use a formal merge behind the scenes during promotions. you get a ton of safety with that, though perhaps it is a bit harder to code for than today’s use of relational schemas. note that’s not backup to source-control, that’s canonically store in source-control.
one of the key safety aspects is the ability to do a dry-run, where you’d get a detailed warning about a potential clash during a promotion, and time to remediate it.
while i show a general flow of promotions from dev through uat to production, it’s perfectly possible that you could promote from hot-fixes (and business-toggle flips) made directly in production, back to non-production places where they are needed for posterity. indeed, in our particular case, a promotion of that one change (beef to chicken) could be made from dev2 to dev1, thereby preventing the latter error. yes, people change config in production, if the need is urgent enough (or the config change is practiced enough – aka safe).
for a proof of concept two years ago for a “business toggles” application called “app config app”, logan mcgrath and i made a perforce-backed system, that had promotions built in. logan gives decent screen-shots of it in use in a blog posting . we had dry-run and meaningful promotion paths coded in that demo. perforce was chosen because it has strong branch-spec concepts which aid promotions. there’s also a lesser evolved git implementation there, and a started by not finished subversion one.
lastly, you’d want some of wall up between true development (where the application binaries are made), and this place where people are mostly configuring business entities (partners / clients). if there’s source control systems underpinning these it is different ones for dev/qa and ps-dev/uat/prod:
note that diagram is modified from one used in the first in this article series: application architecture in the cd era for pro-services teams (scroll down 2/3). the second in this series adds value too, perhaps: provisioning, deployment and application config cycles
Published at DZone with permission of Paul Hammant, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.