Infrastructure As Intent

12 Feb 2022

Following on from my previous post, I saw a subsequent article on the same site looking at the problem from a different angle. The part that most interested me was the preservation of intent across multiple languages, in this case the programmatic AWS CDK used to define a resource graph in the abstract, and the representation you send to the cloud to turn the definition into (virtual) reality.

This is closely related to a central issue I found when working on this problem; secondary notation. This is all the bits of the program that are ignored when it is executed, but provide vital information to help a human reader understand it1. It can take various forms, not all of which make sense in a particular context. Things like variable names and comments make sense in most (but not all) languages. In contrast, a textual language can convey secondary information by the choice of (non-significant) whitespace and parentheses, whereas a visual language might do so with the shape, colour and position of the corresponding element. Both are valuable forms of secondary notation, yet there isn’t a good way to represent them in the other context.

The solution I explored revolved around ensuring that secondary notation was preserved across translations between languages (even when it isn’t visible), and crucially across modifications to the program. This is essentially the same problem that Kehoe describes in relation to CDK and Cloud Formation — how to avoid the author’s intent being lost in translation between forms. The concrete example he mentions, InGraph, takes this idea and purports to provide a rich, high level language environment where intent (or secondary notation) is preserved in the move to and from AWS’s services. I’ll need to dig deeper to determine how successful it is in this regard, but regardless it’s a powerful approach to this problem and many others.

  1. As always, things are never this clear-cut; there isn’t necessarily one single way to “execute” a program. But you get the idea. [back]

This site is maintained by me, Rob Hague. The opinions here are my own, and not those of my employer or anyone else. You can mail me at rob@rho.org.uk, and I'm robhague on Twitter. The site has a full-text RSS feed if you're so inclined.

Body text is set in Georgia or the nearest equivalent. Headings and other non-body text is set in Cooper Hewitt Light. The latter is © 2014 Cooper Hewitt Smithsonian Design Museum, and used under the SIL Open Font License.

All content © Rob Hague 2002-2019, except where otherwise noted.