PhD thesis: A Reference Architecture for Distributed Software Deployment