REST - Representational State Transfer
REST defines a set of architectural principles by which you can design Web services that focus on a system's resources, including how resource states are addressed and transferred over HTTP by a wide range of clients written in different languages. It mostly used SOAP- and WSDL-based interface design because it's a considerably simpler style to use. REST basically means that each unique URL is a representation of some object. The HTTP methods GET, POST, PUT and DELETE are a generic interface for each REST resource.
This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping:
Ã¢â‚¬Â¢To create a resource on the server, use POST.
Ã¢â‚¬Â¢To retrieve a resource, use GET.
Ã¢â‚¬Â¢To change the state of a resource or to update it, use PUT.
Ã¢â‚¬Â¢To remove or delete a resource, use DELETE.
REST is Stateless web service, Statelessness in this sense improves Web service performance and simplifies the design and implementation of server-side components because the absence of state on the server removes the need to synchronize session data with an external application. REST Web services need to scale to meet increasingly high performance demands. Clusters of servers with load-balancing and failover capabilities, proxies, and gateways are typically arranged in a way that forms a service topology, which allows requests to be forwarded from one server to the other as needed to decrease the overall response time of a Web service call. Using intermediary servers to improve scale requires REST Web service clients to send complete, independent requests; that is, to send requests that include all data needed to be fulfilled so that the components in the intermediary servers may forward, route, and load-balance without any state being held locally in between requests.
SOAP vs REST
- Rigid - type checking, adheres to a contract
- Easy to consume - sometimes.
- Easy to build - no toolkits required
- Lightweight - not a lot of extra xml markup
- Human Readable Results
Thus, REST based web services are real web services contrary to SOAP and the WS-* standard stack of protocols.