This thesis presents a language-based, safely programmable middleware for the simple, high-level, and expressive construction of composable open systems. The middleware provides services for pickling, components, and
distribution. All are based on a minimal set of primitives and syntax extensions, such that they otherwise can be completely implemented and customized in a high-level language with automatic memory management, exception handling, higher-order functions, futures, and dynamic types. Using this approach, it becomes possible to describe the complete architecture of the middleware system, and to leverage the language’s safety features in the middleware itself.