Wednesday, February 9, 2011

Brief Introduction to Rest full Web Services

Rest full Web Services
Representational State Transfer (REST) is an architectural style for building distributed systems. The Web is an example for such a system. REST-style applications can be built using a wide variety of technologies. REST's main principles are those of resource-oriented states and functionalities, the idea of a unique way of identifying resources, and the idea of how operations on these resources are defined in terms of a single protocol for interacting with resources. REST-oriented system design leads to systems which are open, scalable, extensible, and easy to understand.

REST Definition
REST is an acronym standing for Representational State Transfer.

Motivation for REST
The motivation for REST was to capture the characteristics of the Web which made the Web successful. Subsequently these characteristics are being used to guide the evolution of the Web.

REST Concepts
Resources are defined by URIs
Resources are manipulated through their representations
Messages are self-descriptive and stateless
There can be multiple representations for a resource
Application state is driven by resource manipulations

REST is built around the idea of simplifying agreement
nouns are required to name the resources that can be talked about
verbs are the operations that can be applied to named resources
content types define which information representations are available

For most applications, HTTP's basic methods are sufficient
GET: Fetching a resource (there must be no side-effects)
PUT: Transfers a resource to a server (overwriting if there already is one)
POST: Adds to an existing resource on the server
DELETE: Discards a resource (its name cannot be used anymore)
Expose directory structure-like URIs
From the standpoint of client applications addressing resources, the URIs determine how intuitive the REST Web service is going to be and whether the service is going to be used in ways that the designers can anticipate

 Stateless nature of restfull web services
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.

1 comment:

  1. Really nice information in REST. I got better idea