13

ZigBee Smart Energy 2.0

13.1 REST Overview

“Representational state transfer”, or REST is a distributed software architecture style that was described by Roy Fielding in a thesis presented in 2000. The thesis discusses client-server based architectures, analyses the reasons for the success of HTTP and hypertext, and presents a number of constraints that define a RESTful architecture, that is, an architecture that will use the same design principles, and share the same desirable properties as HTTP (scalability, simplicity, reliability …).

13.1.1 Uniform Interfaces, REST Resources and Resource Identifiers

The first design constraint is that interfaces should be “uniform”, based on the concept of exchanging resources. Roy Fielding introduces the concept of a resource, an abstraction for server-side information (and associated native data representation): “Any information that can be named can be a resource”. Resources are associated to resource identifiers. A REST interface will transmit only a representation of such resource, which is a specific way of presenting the resource to a client that can evolve over time, or depend on the client type, while the native data representation evolves independently. Technically, a representation is “a sequence of bytes”, plus representation metadata (to describe the structure and semantics of this byte sequence), and optional resource metadata (to represent information about the resource independent of its representation).

The REST messages ...

Get The Internet of Things: Key Applications and Protocols now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.