Three kinds of mainstream WebService implementation scheme (REST/SOAP/XML-RPC) brief and comparison __restful software architecture style

Source: Internet
Author: User
Tags soap

The three mainstream Web services implementations currently known are:
REST: Representational state transitions (software architecture style)
SOAP: Simple Object Access Protocol
XML-RPC: Remote Procedure Call protocol

Brief Introduction:

REST: Characterize state transitions (representational states Transfer), using a standard HTTP method (Get/put/post/delete) for Web services to abstract the services of all WEB systems into resources, Rest from the perspective of resources to observe the entire network, distributed throughout the resources are determined by the URI, and the application of the client through the URI to obtain the representation of resources. The HTTP protocol abstract Get,post,put,delete is like the database the most basic additions and deletions to check, and the Internet resources are like records in the database (perhaps this analogy is not very good), for the operation of various resources can always abstract into these four basic operations, After defining the rules for locating resources, the operation of resources can be achieved through a standard HTTP protocol, and developers will benefit from this lightweight protocol. Rest is a kind of software architecture style, not protocol and nonstandard, it is a kind of development method for network application, which can reduce the complexity of development and improve the scalability of the system.

SOAP: Simple Object Access Protocol (PROTOCOL) is a standardized communication specification that is used primarily in Web services (Web service). Using a simple example of soap usage, a SOAP message can be sent to a Web site with Web Service functionality, for example, a database containing information about the price of a room, and the message's parameters indicate that this is a query message, and this site returns an XML-formatted message containing The query results (price, position, feature, or other information). Since data is passed in a standardized, analytical structure, it can be used directly by Third-party sites.

XML-RPC: The Distributed computing protocol for a Remote procedure call (procedure Call,rpc) that encapsulates the function via XML and uses the HTTP protocol as the transport mechanism. Later, with new features being introduced, the standard slowly evolved into today's SOAP protocol. The XML-RPC agreement is a registered patent project. XML-RPC sends an HTTP request to a server that has this protocol installed. The client that makes the request is generally the software that requires a call to the remote system.

simple comparison of three kinds of schemes

XML-RPC has slowly been replaced by soap, and it's rarely used, but it's still copyrighted, and I'm not going to do much about it here.
Maturity: SOAP is superior to rest in maturity

Efficiency and ease of use: rest is better.

Security: SOAP is more secure than rest because rest is more concerned with efficiency and performance issues

Overall, because the rest-mode Web services are significantly simpler than complex soap and XML-RPC comparisons, more and more Web services are being designed and implemented in restful style. For example, Amazon.com provides near-rest-style Web services for book lookups, and Yahoo offers Web services that are restful. Rest is appropriate for resource-oriented service interfaces, and is particularly suited for scenarios where efficiency requirements are high, but security requirements are not high. And the maturity of soap can give the need to provide for the development of languages, for the security requirements of the interface design more convenient. So I think that the pure design pattern will occupy the dominant position does not have any significance, the key or to see the application scene, it is the old saying: suitable is the best

At the same time, it's important not to twist the rest. Now many sites have followed the development of rest-style interface, in fact, are learning its shape, do not know its heart, and finally made nondescript, performance does not go, security and guarantee, there is a seemingly like a sample of the skin.

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.