coreos/fleet — pull request #325 by jonboulle (2014-04-23 00:18:49+00:00)
Title: feat(registry): decouple payload blob and store by hash

Every Payload embeds an entire copy of its blob (which in the current case == systemd unit file) [inside itself](https://github.com/coreos/fleet/blob/789320bef1fbed490425517175276f694f2a1b4e/job/payload.go#L31).

Instead we should hash (e.g. SHA1) the blobs and store them separately in the Registry, addressed by their content. The Payload will then simply contain a reference to the hash.

This will put us in a better place to support things like template units (#303 et al) in future, since unit files will be automatically de-duplicated in the Registry.