Stateless, REST, restful, and Web Services "grooming"

Source: Internet
Author: User

In the process of understanding OpenStack, the concept of REST is often encountered, and is now being scoured through the following: Understanding of Web Service:

Web services are somewhat like computer-friendly web pages, based on standards and protocols that allow programs to exchange information across the network, typically using a program that is a client or service requester (Serice requester) to request information or services, and another program, the server or server provider ( Service provider) to provide information or services.

It is web analytics at a different level, or Web services can be viewed as Dynamic Web pages designed to control clients with computers rather than humans.

Basic Tutorial from Python

Stateless protocol:

A stateless server is a server that takes each request as a separate transaction that is unrelated to any previous request.

HTTP server is an example. Client requests submitted as URLs may contain stateful data such as cookies, which completely specify the required documents without the need for other previously requested contexts or memory.

From WikiPedia

REST

REST (Representation State Transfer, representational status transfer). REST refers to a set of schema constraints and principles. REST observes the entire network from the perspective of resources, and the resources distributed around it are determined by URIs, and the client's application obtains the characterization of the resources through URIs. REST is a design style, not a standard. REST is often based on the use of Http,uri, and XML as well as the HTML of these existing widely popular protocols and standards.

Some features:

    • A resource is specified by a URI.
    • Operations on resources include acquiring, creating, modifying, and deleting resources that correspond exactly to the standard methods provided by the HTTP protocol get, POST, put, and delete.
    • Manipulate resources by manipulating their representations.
    • Define ID for all "things"
    • Link all things together
    • Multiple representations of resources
    • Non-stateful communication

Resources in Rest:

On the server side, application state and functionality can be categorized into various resources. A resource is an interesting conceptual entity that is exposed to the client. Examples of resources are: application objects, database records, algorithms, and so on. Each resource uses a URI (Universal Resource Identifier) to get a unique address.

Stateless in rest:

The most important REST principle of a WEB application is that the interaction between the client and the server is stateless between requests. Each request from the client to the server must contain the information necessary to understand the request. If the server restarts at any point in time between requests, the client will not be notified. In addition, stateless requests can be answered by any available server, which is ideal for environments such as cloud computing. Clients can cache data to improve performance.

From Wikipedia, Baidu Encyclopedia, InfoQ

Restful:

The application or design that satisfies REST is restful.

Original address: Http://hiaero.net/rest-and-restful

Add:

Why is rest so important?

After reading some information, I found that in fact, some of the interfaces I designed before are more or less restful or close to restful, since it is a design style is not the standard, it is not necessary to do so, or how to use how to come, personal understanding.

Stateless, REST, restful, and Web Services "grooming"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.