REST (stands for Representational State Transfer) is a model for accessing resources on a computer network. The term was first introduced in 2000 in Roy Fielding’s doctoral
dissertation , one of the main authors of the HTTP protocol specification.
At that time, the primary standard for web services was XML-RPC. In essence, the standard web services were reduced to some kind of distributed objects, similar to DCOM or CORBA, but, by default, with no state.
Fielding proposed a different model for building distributed systems. In a somewhat simplified form, it looks like this:
- A resource is an object of an information system, for example, “user”, “web page”, “currency quotation”, etc. The resource has some identifier within the system. For example, for HTTP, resource identifiers are URLs.
- Method - the action performed on the resource. When implementing REST via the HTTP protocol, 4 actions (commands) are used: GET, PUT, POST, DELETE. Sometimes there is an analogy with CRUD operations in SQL.
Thus, interaction within the REST system is reduced to performing one of 4 actions on the selected resource. Resources can contain links to other resources, which ensures the coherence of the system and navigation within it.
With this let me finish a brief introduction to REST and go to the
Astoria project.
Astoria is a set of tools for creating data access services in a SQL server through a REST mechanism over HTTP. If the service created using Astoria is located at
localhost / data.svc , then you can access the Customers table by querying
localhost / data.svc / Customers .