|
Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The terms “representational state transfer” and “REST” were introduced in 2000 in the doctoral dissertation of Roy Fielding,[1] one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification. The terms have since come into widespread use in the networking community. The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships between them. ...
Hypermedia is a term used as a logical extension of the term hypertext, in which audio, video, plain text, and non-linear hyperlinks intertwine to create a generally non-linear medium of information. ...
The World Wide Web and WWW redirect here. ...
Year 2000 (MM) was a leap year starting on Saturday. ...
Roy T. Fielding (born 1965) is one of the principal authors of the HTTP specification and a frequently-cited authority on computer network architecture. ...
Hypertext Transfer Protocol (HTTP) is a communications protocol used to transfer or convey information on intranets and the World Wide Web. ...
REST strictly refers to a collection of network architecture principles which outline how resources are defined and addressed. The term is often used in a looser sense to describe any simple interface which transmits domain-specific data over HTTP without an additional messaging layer such as SOAP or session tracking via HTTP cookies. These two meanings can conflict as well as overlap. It is possible to design any large software system in accordance with Fielding’s REST architectural style without using HTTP and without interacting with the World Wide Web. It is also possible to design simple XML+HTTP interfaces which do not conform to REST principles, and instead follow a model of remote procedure call. The difference between the uses of the term “REST” causes some confusion in technical discussions. In computing, network architecture is the design of a computer network. ...
For other uses, see Soap (disambiguation). ...
In Human-Computer Interaction, session management is the process of keeping track of a users activity across sessions of interaction with the computer system. ...
This article is about the HTTP state mechanism. ...
Remote procedure call (RPC) is a protocol that allows a computer program running on one computer to cause a subroutine on another computer to be executed without the programmer explicitly coding the details for this interaction. ...
Systems which follow Fielding’s REST principles are often referred to as “RESTful”. Principles
REST's proponents argue that the Web's scalability and growth are a direct result of a few key design principles: The World Wide Web and WWW redirect here. ...
It has been suggested that this article or section be merged with Scale (computing). ...
- Application state and functionality are divided into resources
- Every resource is uniquely addressable using a universal syntax for use in hypermedia links
- All resources share a uniform interface for the transfer of state between client and resource, consisting of
- A protocol which is:
REST’s client-server separation of concerns simplifies component implementation, reduces the complexity of connector semantics, improves the effectiveness of performance tuning, and increases the scalability of pure server components. Layered system constraints allow intermediaries—proxies, gateways, and firewalls—to be introduced at various points in the communication without changing the interfaces between components, thus allowing them to assist in communication translation or improve performance via large-scale, shared caching. REST enables intermediate processing by constraining messages to be self-descriptive: interaction is stateless between requests, standard methods and media types are used to indicate semantics and exchange information, and responses explicitly indicate cacheability. The term resource is a foundational term in World Wide Web architecture because it is the root of Uniform Resource Identifiers, also known as URIs and URLs. ...
An interface defines the communication boundary between two entities, such as a piece of software, a hardware device, or a user. ...
Multipurpose Internet Mail Extensions (MIME) is an Internet Standard that extends the format of e-mail to support text in character sets other than US-ASCII, non-text attachments, multi-part message bodies, and header information in non-ASCII character sets. ...
In computing, code on demand is a general term for any technology that sends executable software programs from a server computer to a client computer upon request from the clients software (e. ...
Client/Server is a network application architecture which separates the client (usually the graphical user interface) from the server. ...
A stateless server is one that treats each request as an independent transaction, unrelated to any previous request. ...
Look up connector in Wiktionary, the free dictionary. ...
Gateway has several meanings. ...
Firewall may refer to: Firewall (construction), a physical barrier inside a building or vehicle, designed to limit the spread of fire, heat and structural collapse Firewall (networking), a logical barrier designed to prevent unauthorized or unwanted communications between sections of a computer network Firewall (film), a 2006 action film written...
(Fielding 2000, §5.3.1) REST's central principle: resources An important concept in REST is the existence of resources (sources of specific information), each of which can be referred to using a global identifier (a URI). In order to manipulate these resources, components of the network (clients and servers) communicate via a standardized interface (e.g. HTTP) and exchange representations of these resources (the actual documents conveying the information). For example, a resource which is a circle may accept and return a representation which specifies a center point and radius, formatted in SVG, but may also accept and return a representation which specifies any three distinct points along the curve as a comma-separated list. The term resource is a foundational term in World Wide Web architecture because it is the root of Uniform Resource Identifiers, also known as URIs and URLs. ...
A Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource. ...
This article is about the shape and mathematical concept of circle. ...
SVG redirects here. ...
The comma-separated values (or CSV; also known as a comma-separated list or comma-separated variables) file format is a file type that stores tabular data. ...
Any number of connectors (e.g., clients, servers, caches, tunnels, etc.) can mediate the request, but each does so without “seeing past” its own request (referred to as “layering”, another constraint of REST and a common principle in many other parts of information and networking architecture). Thus an application can interact with a resource by knowing two things: the identifier of the resource, and the action required—it does not need to know whether there are caches, proxies, gateways, firewalls, tunnels, or anything else between it and the server actually holding the information. The application does, however, need to understand the format of the information (representation) returned, which is typically an HTML or XML document of some kind, although it may be an image or any other content. In computing, a client is a system that accesses a (remote) service on another computer by some kind of network. ...
In information technology, a server is an application or device that performs services for connected clients as part of a client-server architecture. ...
For other uses, see cache (disambiguation). ...
A tunneling protocol is a network protocol which encapsulates one protocol or session inside another. ...
Claimed benefits Many of the statements below refer to REST in the specific context of Web Services, as opposed to SOAP. REST was originally defined in Fielding’s dissertation in the context of information and media access. Fielding did not originally contrast REST with RPC. For other uses, see Soap (disambiguation). ...
Remote procedure call (RPC) is a protocol that allows a computer program running on one computer to cause a subroutine on another computer to be executed without the programmer explicitly coding the details for this interaction. ...
Advocates claim that REST: - Provides improved response times and server loading characteristics due to support for caching
- Improves server scalability by reducing the need to maintain communication state. This means that different servers can be used to handle initial and subsequent requests
- Requires less client-side software to be written than other approaches, because a single browser can access any application and any resource
- Depends less on vendor software than mechanisms which layer additional messaging frameworks on top of HTTP
- Provides equivalent functionality when compared to alternative approaches to communication
- Does not require a separate resource discovery mechanism, due to the use of hyperlinks in content
- Provides better long-term compatibility and evolvability characteristics than RPC. This is due to:
- The capability of document types such as HTML to evolve without breaking backwards- or forwards-compatibility, and
- The ability of resources to add support for new content types as they are defined without dropping or reducing support for older content types.
REST detractors note the lack of tool support and the scarcity of truly RESTful applications deployed on the web of today. Some claim that REST is applicable to GET, but unproven for other state transfer operations such as PUT. Fielding points out in his thesis that the REST architecture was designed specifically for massive scale hypermedia distribution, and not as a one size fits all architectural style. Indeed, what characterizes REST are the constraints it imposes on any REST-based system. POST is often considered the only necessary client-to-server state transfer operation, and is treated as a mechanism to tunnel arbitrary method invocations across HTTP. Web caching is the caching of web documents (e. ...
Some REST systems have been deployed and gained tools support such as WebDAV which uses not only GET and POST, but also established HTTP methods like HEAD, DELETE, PUT as well as WebDAV-specific HTTP methods: PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, and UNLOCK. WebDAV, an abbreviation that stands for Web-based Distributed Authoring and Versioning, refers to the set of extensions to the Hypertext Transfer Protocol (HTTP) which allows users to collaboratively edit and manage files on remote World Wide Web servers. ...
One common stumbling block in the dialog on Claimed Benefits is focusing too much on web browser support for REST. Gateways, caching servers, proxies, and other REST connectors are the critical components for system design and REST.
RESTful example: the World Wide Web The World Wide Web is the key example of a RESTful design. Much of it conforms to the REST principles. The Web consists of the Hypertext Transfer Protocol (HTTP), content types including the Hypertext Markup Language (HTML), and other Internet technologies such as the Domain Name System (DNS). Hypertext Transfer Protocol (HTTP) is a communications protocol used to transfer or convey information on intranets and the World Wide Web. ...
Multipurpose Internet Mail Extensions (MIME) is an Internet Standard that extends the format of e-mail to support text in character sets other than US-ASCII, non-text attachments, multi-part message bodies, and header information in non-ASCII character sets. ...
HTML, an initialism of HyperText Markup Language, is the predominant markup language for web pages. ...
The Domain Name System (DNS) associates various sorts of information with domain names; most importantly, it serves as the phone book for the Internet by translating human-readable computer hostnames, e. ...
HTML can include JavaScript and applets to support code on demand, and has implicit support for hyperlinks. JavaScript is a scripting language most often used for client-side web development. ...
In computing, code on demand is a general term for any technology that sends executable software programs from a server computer to a client computer upon request from the clients software (e. ...
HTTP has a uniform interface for accessing resources, which consists of URIs, methods, status codes, headers, and content distinguished by MIME type. A Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource. ...
Hypertext Transfer Protocol (HTTP) is a communications protocol used to transfer or convey information on intranets and the World Wide Web. ...
For mime as an art form, see mime artist. ...
The most important HTTP methods are POST, GET, PUT and DELETE. These are often compared with the CREATE, READ, UPDATE, DELETE (CRUD) operations associated with database technologies:[2] Hypertext Transfer Protocol (HTTP) is a communications protocol used to transfer or convey information on intranets and the World Wide Web. ...
In computing, CRUD is an acronym for Create, Read, Update, and Delete. ...
The following table associates several common HTTP verbs with similar database operations, however the meaning of the HTTP verbs do not correspond directly with a single database operation. For example, an HTTP PUT is used to set the value of a resource and may result in either a creation or update as needed. | HTTP | CRUD | | POST | Create, Update, Delete | | GET | Read | | PUT | Create, Update | | DELETE | Delete | HTTP separates the notions of a web server and a web browser. This allows the implementation of each to vary from the other based on the client-server principle. When used RESTfully, HTTP is stateless. Each message contains all the information necessary to understand the request when combined with state at the resource. As a result, neither the client nor the server needs to remember any communication state between messages. Any state retained by the server must be modeled as a resource. Client-server is computing architecture which separates a client from a server, and is almost always implemented over a computer network. ...
A stateless server is one that treats each request as an independent transaction, unrelated to any previous request. ...
The statelessness constraint can be violated in HTTP using cookies to maintain sessions. Fielding notes the risks of privacy leaks and security complications which often arise through the use of cookies, and the confusions and bugs which can result from interactions between cookies and the “back” button in a browser. This article is about the HTTP state mechanism. ...
HTTP provides mechanisms to control caching, and permits a conversation between web browser and web cache to occur using the same mechanisms as between web browser and web server. No layer can access any conversation other than the one it is immediately involved with. It is important to note that HTML links produce "get" HTTP requests. HTML forms allow "get" and "post" methods (in lower-case). The other HTTP methods mentioned here are not available in HTML 4.1 or XHTML 1.0.[3]
REST versus RPC The statements below refer to REST in the context of Web Services, specifically as opposed to SOAP. Note that Fielding’s dissertation presents REST in the context of information and media access, not web services. It does not contrast REST to RPC (remote procedure call). For other uses, see Soap (disambiguation). ...
Remote procedure call (RPC) is a protocol that allows a computer program running on one computer to cause a subroutine on another computer to be executed without the programmer explicitly coding the details for this interaction. ...
- REST
- Resources—Commands are defined in simple terms: resources to be retrieved, stored / get, set—difficult to do many joins
- RPC
- Commands—Commands are defined in methods with varying complexity: depending on “standard”—easier (?) to hide complex things behind a method
- REST
- Nouns—Exchanging resources and concepts
- RPC
- Verbs—Exchanging methods
REST Triangle of nouns, verbs, and content types. A RESTful web application requires a different design approach from an RPC application. An RPC application is exposed as one or more network objects, each with an often unique set of functions which can be invoked. Before a client communicates with the application it must have knowledge of the object identity in order to locate it and must also have knowledge of the object type in order to communicate with it. Image File history File links Resttriangle. ...
Image File history File links Resttriangle. ...
In software engineering, a web application is an application delivered to users from a web server over a network such as the World Wide Web or an intranet. ...
RESTful design constrains the aspects of a resource which define its interface (the verbs and content types). This leads to the definition of fewer types on the network than an RPC-based application but more resource identifiers (nouns). REST design seeks to define a set of resources with which clients can interact uniformly, and to provide hyperlinks between resources which clients can navigate without requiring knowledge of the whole resource set. Server-provided forms can also be used in a RESTful environment to describe how clients should construct a URL in order to navigate to a particular resource. // A hyperlink, is a reference or navigation element in a document to another section of the same document or to another document that may be on a (different) website. ...
A Uniform Resource Locator, URL (spelled out as an acronym, not pronounced as earl), or Web address, is a standardized address name layout for resources (such as documents or images) on the Internet (or elsewhere). ...
Example An RPC application might define operations such as the following: getUser() addUser() removeUser() updateUser() getLocation() addLocation() removeLocation() updateLocation() listUsers() listLocations() findLocation() findUser() Client code to access this application may look something like this: exampleAppObject = new ExampleApp('example.com:1234') exampleAppObject.removeUser('001') With REST, on the other hand, the emphasis is on the diversity of resources, or nouns; for example, a REST application might define the following resources http://example.com/users/ http://example.com/users/{user} (one for each user) http://example.com/findUserForm http://example.com/locations/ http://example.com/locations/{location} (one for each location) http://example.com/findLocationForm Client code to access this application may look something like this: userResource = new Resource('http://example.com/users/001') userResource.delete() Each resource has its own identifier noun. Clients start at a single resource such as the user resource which represents themselves, and navigate to location resources and other user resources. Clients work with each resource through standard operations, such as GET to download a copy of the resource’s representation, PUT to paste a changed copy over the top of the original, or DELETE to remove the data or state associated with the resource. POST is sometimes used interchangeably with PUT, but can also be seen as a “paste after” rather than a “paste over” request. POST is generally used for actions with side-effects, such as requesting the creation of a purchase order, or adding some data to a collection. Note how each object has its own URL and can easily be cached, copied, and bookmarked. HTTP (for HyperText Transfer Protocol) is the primary method used to convey information on the World Wide Web. ...
Uniform interfaces in REST and RPC The uniform interface allows clients to access data from a range of resources without special code to deal with each one, so long as it is actually uniform. The content returned from a user resource could be the globally standard and RESTful HTML, a less RESTful industry standard representation such as UserML, or an unRESTful application-specific data format. Which content is returned can be negotiated at request time. The content could even be a combination of these representations: HTML can be marked up with microformats which have general or industry-specific appeal, and these microformats can be extended with application-specific information. Microformats are mark-up that allow expression of semantics in an HTML (or XHTML) web page. ...
Uniform interfaces reduce the cost of client software by ensuring it is only written once, rather than once per application it has to deal with. Both REST and RPC designs may try to maximise the uniformity of the interface they expose by conforming to industry or global standards. In the RPC model these standards are primarily in the form of standard type definitions and standard choreography. In REST it is primarily the choice of standard content types and verbs which controls uniformity.
Public implementations It is possible to claim an enormous number of RESTful applications on the Web (just about everything accessible through an HTTP GET request or updateable through HTTP POST). Taken more narrowly, in its sense as an alternative to both Web Services generally and the RPC style specifically, REST can be found in a number of places on the public Web: Web services architecture A Web service (also Web Service) is defined by the W3C as a software system designed to support interoperable Machine to Machine interaction over a network. ...
Note that WSDL version 2.0 now offers support for binding to all the HTTP request methods (not only GET and POST as in version 1.1).[4] Blogosphere is a collective term encompassing all blogs and their interconnections. ...
This article is about a type of web application. ...
Really Simple Syndication is a member group of the RSS family for web syndication. ...
The name Atom applies to a pair of related standards. ...
The name Atom applies to a pair of related standards. ...
Flickr is a photo sharing website and web services suite, and an online community platform, which is generally considered an early example of a Web 2. ...
Amazon S3 (Simple Storage Service) is an online storage web service offered by Amazon Web Services. ...
WSDL redirects here. ...
Hypertext Transfer Protocol (HTTP) is a communications protocol used to transfer or convey information on intranets and the World Wide Web. ...
False or weak forms Some interfaces referred to as being "RESTful" do not intentionally respect REST’s architectural constraints. REST advocate Mark Baker uses the term "accidentally RESTful"[5] to describe interfaces that partially follow REST's architectural constraints. For example, Flickr's interface can be considered RESTful in its use of standalone GET operations, but it does not attempt to support the full range of a REST interface. Other interfaces that use HTTP to tunnel function calls or which offer a “POX/HTTP” (Plain Old XML over HTTP) endpoint are also sometimes referred to as "REST" interfaces.[citation needed] Plain Old XML (POX) is a term used to describe basic XML, sometimes mixed in with other, blendable specifications like XML Namespaces, Dublin Core, XInclude and XLink. ...
Implementation challenges Implementation is hampered by limited support for HTTP PUT and DELETE in popular development platforms. For example, in the LAMP platform, support for PUT must be added as a module. Web searches offer few examples of how to implement updating database-driven content using PUT. For example, it is nontrivial to create a PHP script to update http://example.com/thing/1 with a PUT message when /thing.php will serve a GET request with XML generated from a database. Most published patterns for updating entities use the POST method. The acronym LAMP refers to a solution stack of software, usually free software / open-source software, used to run dynamic Web sites or servers. ...
Outside of the Web Just as much of the web can be seen as RESTful or nearly RESTful, a number of existing protocols and architectures have RESTful characteristics. Software which may interact with a number of different kinds of objects or devices can do so by virtue of a uniform, agreed interface. Many of these uniform interfaces follow document-oriented REST patterns rather than object-oriented patterns [should expand on and thus clarify this distinction]:
Modbus Modbus is a protocol which allows memory ranges within PLCs to be addressed. Ranges can be written and read effectively as PUT and GET operations. Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). ...
PLC & input/output arrangements A programmable logic controller (PLC), or programmable controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. ...
JavaBeans JavaBeans and other systems which perform property-based editing follow the PUT and GET model of the REST architectural style. Rather than write object-specific editor code, the code is written once and can interact with various object types. Resources in this model are defined by the combination of an object identifier and a property name. JavaBeans are classes written in the Java programming language. ...
SNMP The SNMP protocol and its object model, which predate the Web, share some characteristics with RESTful systems. A strict verb discipline follows from the protocol's small operator set, and the 'resources' are addressed with a uniform global scheme of Object Identifiers. Most interaction occurs in client-server fashion, and the clients and servers (called managers and agents) can be deployed and evolved independently. Each request-response pair can be understood in isolation. The Simple Network Management Protocol (SNMP) forms part of the internet protocol suite as defined by the Internet Engineering Task Force. ...
It has been suggested that this article or section be merged into Identifier. ...
However, movement through the space of Object identifiers is not assisted by hyperlinks, nor is it considered as traversal through states in a state machine. Also, SNMP usage is generally unconcerned with the WWW requirements of Internet scaling and links between independently authored content.
References - Fielding, Roy T. & Taylor, Richard N. (2002-05), "Principled Design of the Modern Web Architecture", ACM Transactions on Internet Technology (TOIT) (New York: Association for Computing Machinery) 2 (2): 115–150, ISSN 1533-5399, doi:10.1145/514183.514185, <http://www.ics.uci.edu/~taylor/documents/2002-REST-TOIT.pdf>
- Pautasso, Cesare; Zimmermann, Olaf & Leymann, Frank (2008-04), "RESTful Web Services vs. Big Web Services: Making the Right Architectural Decision", 17th International World Wide Web Conference (WWW2008) (Beijing, China), <http://www.jopera.org/docs/publications/2008/restws>
ISSN, or International Standard Serial Number, is the unique eight-digit number applied to a periodical publication including electronic serials. ...
A digital object identifier (or DOI) is a standard for persistently identifying a piece of intellectual property on a digital network and associating it with related data, the metadata, in a structured extensible way. ...
External links - “Architectural Styles and the Design of Network-based Software Architectures”: Dissertation for Doctor of Philosophy, by Roy Thomas Fielding
- RESTwiki: “descriptions of REST, records of the experiences of REST proponents, and resources to help you apply REST [...] to your software or framework”
- “Constructing or Traversing URIs?”: discusses the constraint on components to use “hypermedia as the engine of application state”.
- The REST Dialogues, Part 1: “Getting Data”: one of nine lessons on applying REST to Web-based business, each lesson in the form of dialog between the author and a fictitious senior technical employee of a company conducting Web-based business.
- “REST for the Rest of Us”: “showcases common REST design patterns that can be put to immediate use”.
- “MindTouch: Introduction to REST”: slides and narration explaining REST.
- “RESTify DayTrader”: a tour of a day-trading interface in REST style.
- “Building Web Services the REST Way”
- "InfoQ: A Brief Introduction to REST"
|