Three Web Service implementation methods

Source: Internet
Author: User
Tags representational state transfer

Three Web Service implementation methods

Web Service concept:

According to W3C definition, Web service should be a software system to support interaction between different machines on the network. Network services are usually composed of many application interfaces (APIs). They execute service requests submitted by the customer through the remote server of the network. Simply put, the server provides services to the client.

Web Service implementation method:

(1) Remote Procedure Call (RPC)

The RPC protocol is generated to solve cross-platform server access for different clients. Originally, Web services were deployed using RPC, which is a kind of request Service from remote computer programs through the network, you do not need to understand the protocols of the underlying network technology. Rpc does not depend on specific network transmission protocols. tcp, udp, http, and so on can all be used. Due to various transformations and differences in details, the corresponding rpc also derives various remote process communication protocols. Due to its tight coupling, there will be little to do in the future.

(2) Service-Oriented Architecture (SOA)

In a service-oriented architecture, communication is message-driven, instead of an action (method call ). This kind of WEB Service is also called message-oriented service.

(3) declarative state transfer (REST)

REST Architecture Design

REST (Representational State Transfer) is a lightweight Web Service architecture style, its implementation and operations are much more concise than SOAP and XML-RPC, can be fully implemented through HTTP protocol, the Cache can also be used to increase the response speed. The performance, efficiency, and ease of use are superior to those of the SOAP protocol.

The REST architecture follows the CRUD principle. The CRUD principle only requires four actions for resources: Create (Create), Read (Read), Update (Update), and Delete (Delete) you can complete the operations and processing. These four operations are an atomic operation, that is, an operation that cannot be further divided. They can be used to construct complex operation processes, just as the four arithmetic operations in mathematics are the most basic arithmetic operations of numbers.

The REST architecture allows people to really understand the original appearance of our network protocol HTTP, operations on resources, including obtaining, creating, modifying, and deleting resources, correspond to the GET, POST, PUT, and DELETE methods provided by HTTP, therefore, REST limits HTTP operations on a URL resource to GET, POST, PUT, and DELETE. This design and development method for network applications can reduce development complexity and improve system scalability.

REST Design Guidelines

The REST architecture is designed for Web applications to reduce development complexity and improve system scalability. REST proposes the following design principles:

Everything on the network is abstracted as a resource );

Each resource corresponds to a unique resource identifier );

Operate resources through the general connector interface (generic connector interface;

Operations on resources do not change resource identifiers;

All operations are stateless ).

Use REST Architecture

For developers, they are concerned about how to use the REST architecture. Here we will briefly discuss this issue. REST is not only a new architecture, but also a new way of thinking in the Web development process: designing the system structure through URL. REST is a simple design principle, an architectural style (or model), not a specific standard or architecture. The REST architecture has many success stories, such as Facebook and Yahoo.

Related Article

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.