Software development in real-time and embedded systems has traditionally focused on stand-alone applications with static models for scheduling and resource allocation. Our goal is to facilitate the development of embedded applications in an open system, where tasks and resources arrive and leave dynamically, and their execution is concurrent. We model such applications as a dynamic composition of network services. This paper presents an enabling framework for dynamic service orchestration in cyber-physical systems, based on a modular, reusable, and extensible service-oriented architecture. By taking advantage of a network-wide programming model, adaptive global resource management, and late binding of tasks to resources, the architecture enables execution of dynamic embedded application workloads in a resource-efficient manner.