  Recent advances in ICT enable the evolution of the manufacturing industry to
meet the new requirements of the society. Cyber-physical systems,
Internet-of-Things (IoT), and Cloud computing, play a key role in the fourth
industrial revolution known as Industry 4.0. The microservice architecture has
evolved as an alternative to SOA and promises to address many of the challenges
in software development. In this paper, we adopt the concept of microservice
and describe a framework for manufacturing systems that has the cyber-physical
microservice as the key construct. The manufacturing plant processes are
defined as compositions of primitive cyber-physical microservices adopting
either the orchestration or the choreography pattern. IoT technologies are used
for system integration and model-driven engineering is utilized to
semi-automate the development process for the industrial engineer, who is not
familiar with microservices and IoT. Two case studies demonstrate the
feasibility of the proposed approach.
