Common lightweight server communication architecture based on mobile phones

Source: Internet
Author: User

1. XML + HTTP

This communication method is widely used in the instant messaging protocol XMPP and other RSS resources such as podcast;

The advantage of this method is that the server business and interface design will be clearer and simpler;

2. JSON + HTTP

One of the most popular and common ways to interact with servers on mobile phones;

The advantage of this method is that it saves more traffic than the first method, but the interface design and parameter transmission are comparatively more troublesome;

3. Protocol buffer + HTTP

Protocol buffer is a cross-language binary transfer protocol of Google;

This method is obviously efficient, but it will introduce external libraries to increase the package size of the android client. It is not especially performance-demanding and generally not used;

4. TCP

This Protocol is often used when we transmit a variety of large files, or where the performance and traffic requirements are high;

5. UDP

As a heartbeat packet transmission protocol, it is the best option (for example, when pushing data to Alibaba Cloud)

 

 

 

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.