Infrastructure As Intent
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.
-
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]