I've been thinking for a while about a strongly typed binary CM system based on Golang (Rust would work as well).
The model depends on something that compiles to a single binary and compiles very fast. Typically golang fits this bill. I've not played with Rust just yet but if it compiles fast, it would work as well.
The workflow goes something like this:
- Upload source to the "server" component.
- Server component compiles a binary for all hosts it has registered that the code would apply to (i.e. role:webserver)
- Optionally for unknown clients, the binary is compiled on-the-fly when the host checks in and provides at least platform information. The coolest part is that golang is easily cross-compiled so this works for all platforms that check in.
- The entire CM run is contained in a single binary artifact. It can be rsync'd down or some more efficient method of transferring large blobs (golang binaries aren't small)
This has a few downsides:
- golang is less "reachable" than ruby or the Puppet language
- Lack of a "dynamic" approach/flexibility
- Lack of a generic approach/templated code
Adam Jacob suggests that Rust's macro support would work here in interesting ways. I've also considered using the lua bridge similar to what heka provides. The downside here is that you lose a lot of the safety you get.
I've yet to prototype this out but it's something I've been thinking about for almost a year now.