We present a battle-proven architecture for collaboration between loosely coupled actors that share their state using an immutable store and a publish-subscribe pattern. Our data model is suitable for high-performance and complicated algorithmic flows, where multiple threads require access to shared in-memory objects. Our method of managing shared state supports high-performance data-driven and event-driven applications, with generic handling of persistence, record/replay, and application logging. We have implemented it in C++ and used it successfully as the application framework for the iTero intra-oral scanner.