Due to several key factors, Cyber-physical systems (CPS) pose great challenges in software system design, which are dynamic composition, heterogeneous, adaptation and uncertain in environmental factors. In this paper we present our research on the development of REST-style architecture for CPS. We propose a path towards solving requirements of CPS architecture through Restful principles. By using this architectural style, we have built a prototyping system called the restful smart gateway, which seamlessly integrates conceptual and physical resources into the Web and scale better. Some experiments on the smart gateway are given to illustrate its performance.