Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Underlying the HyperText Transfer Protocol (HTTP) is a principle known as Representational State Transfer, or REST. It’s not a protocol—it’s more of an architectural style for information exchange. Though it started with the Web, it has applications in other areas. Understanding a little about REST will not only help you understand other systems, it will design your own communications protocols as well. Once you know about it, you can never get enough REST in your life.
The basic idea of REST is this: there is a thing somewhere on a network. Maybe it’s a database, or maybe it’s a microcontroller controlling your household appliances, like you made in the previous chapter. You either want to know what state it’s in, or you want to change its state. REST gives you a way to describe, or represent, the state of the thing on the Net, and to transfer that representation to a remote user. REST is an addressing scheme for any remote thing.