From Model-Driven Design to Resource Management for Distributed Embedded Systems