Brief and comparison of three mainstream Web service implementation schemes (REST+SOAP+XML-RPC)

Source: Internet
Author: User
Tags soap

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

The following is a brief introduction:

REST: characterize state transitions (representational, Transfer), using the standard HTTP method (Get/put/post/delete) for Web services to bring all Web The services of the system are abstracted as resources, and rest observes the whole network from the point of view of resources, the resources distributed everywhere are determined by URIs, and the client's application obtains the representation of resources by URI. HTTP protocol abstract Get,post,put,delete is like the database of the most basic additions and deletions, and the internet is like a variety of resources on the database record (perhaps this analogy is not very good), for the operation of various resources can always be abstracted into these four basic operations, After defining the rules for locating resources, the operation of the resources can be implemented through standard HTTP protocols, and developers will benefit from this lightweight protocol. Rest is a kind of software architecture style, not protocol or specification, is a development method for network application, can reduce the complexity of development and improve the scalability of the system.

SOAP: Simple Object access Protocol is a standardized communication specification that is used primarily in Web services (Web service). Using a simple example to illustrate the SOAP usage process, a SOAP message can be sent to a Web site that has a Web Service feature, for example, a database with room rate information, which is indicated in the parameters of the message as a query message, and this site returns an XML-formatted message that contains The results of the query (price, location, feature, or other information). Because data is passed in a standardized and analytical structure, it can be used directly by third-party sites.

XML-RPC: A distributed computing protocol for Remote Procedure calls (Remotes procedure Call,rpc) that encapsulates the calling function through XML and uses the HTTP protocol as the delivery mechanism. Later, with the introduction of new features, this standard slowly evolved into today's SOAP protocol. The XML-RPC agreement is a registered patent project. The XML-RPC sends an HTTP request to the server that installed the protocol. The client that makes the request is generally the software that needs to be called to the remote system.

A simple comparison of three different schemes

XML-RPC has slowly been replaced by soap, it is seldom used now, but it still has copyright, I do not introduce more here
Maturity Level: Soap is better than rest on maturity

efficiency and ease of use : Rest is better

Security on: SOAP security is higher than rest because rest is more concerned with efficiency and performance issues

overall , because RESTful Web services are significantly more concise than complex soap and xml-rpc comparisons, more and more Web services are beginning to be designed and implemented in restful style. For example, Amazon.com provides close-to-rest-style Web services for book searches, and the Web services provided by Yahoo are restful. Rest is appropriate for resource-based service interfaces, and is particularly well suited for scenarios where the requirements for efficiency are high, but not for the security requirements. However, the maturity of soap can be provided to many developing languages, which facilitates the design of interfaces with high security requirements. So I think purely to say what design patterns will occupy a dominant position does not make any sense, the key is to see the application scenario, it is the old saying: The right is the best

At the same time it is important to not distort the rest now many Web sites are the follow-up to develop a rest-style interface, in fact, are learning its shape, do not know its heart, finally made no fish and fish, performance, security and can not guarantee, the apostles have a look like a sample of the skin.

Reference: http://hi.baidu.com/ripen/item/2eb66b460f632b33fa896007

Brief and comparison of three mainstream Web service implementation schemes (REST+SOAP+XML-RPC)

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.