Simple understanding of Web service three ways to implement

Source: Internet
Author: User
Tags soap representational state transfer resource web services

Web Service Concept:

According to the definition of the Consortium, Web Services (Web service) should be a software system that supports the interactive operation of different machines across the network. Network services are usually made up of many application interfaces (APIs) that perform requests for services submitted by customers over the remote server side of the network. Simply put, server-side services are provided to clients.

How the WEB service is implemented:

(1) Remote Procedure Call (RPC)

RPC protocol is to solve the different client Cross-platform access to the server, the original Web service is RPC deployment, it is a network from remote computer programs to request services, without the need to understand the underlying network technology protocols. RPC is not dependent on the specific network transport Protocol, TCP, UDP, HTTP, and so on. Due to various transformations and details, RPC also derives a variety of remote process communication protocols. Because of its tight coupling, the future will not be very promising.

(2) Service-oriented architecture (SOA)

In a service-oriented schema, traffic is driven by messages and is no longer an action (method call). This Web service is also known as a message-oriented service.

(3) Descriptive state transfer (REST)

Architecture Design for rest

REST (representational state Transfer) is a lightweight Web service architecture style that is significantly simpler to implement and manipulate than soap and XML-RPC, and can be implemented entirely through the HTTP protocol, Cache caching can also be used to improve responsiveness, performance, efficiency, and ease of use over the SOAP protocol.

The rest architecture follows the CRUD principle, and the crud principle requires only four behaviors for resources: Create, read (read), update (update), and delete (delete) to complete its operation and processing. These four operations are atomic operations, an operation that can no longer be divided, by which you construct complex operations, just as mathematically arithmetic are the most basic operations of numbers.

The rest architecture gives people a real understanding of what our network protocol HTTP would look, and the operations of resources, including acquiring, creating, modifying, and deleting resources, correspond exactly to the get, POST, put, and Delete methods provided by the HTTP protocol. So rest limits the operation of HTTP to a URL resource within the four of get, POST, put, and delete. This kind of design and development method for network application can reduce the complexity of development and improve the scalability of the system.

Rest Design Guidelines

The rest architecture is designed for Web applications to reduce the complexity of development and increase the scalability of the system. Rest presents the following design guidelines:

All things on the web are abstracted as resources (resource);

Each resource corresponds to a unique resource identifier (resource identifier);

The resources are operated through a universal Connector interface (Generic connector interface);

The various operations on the resource do not change the resource identifier;

All operations are stateless (stateless).

Using the rest architecture

For developers, the concern is how to use the rest architecture, and here's a quick way to talk about the problem. Rest is not just a new architecture, it brings a whole new way of thinking in the Web development process: Designing the system structure through URLs. Rest is a simple set of design principles, an architectural style (or pattern), not a specific standard or architecture. Rest architecture has many successful cases, such as Facebook,yahoo, etc.

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.