Android IPC Communication mechanism of the third, process communication mode.

Source: Internet
Author: User

Advantages and disadvantages of IPC communication methods:

Comparison of IPC communication methods
Name Advantages Disadvantages Applicable scenarios
Bundle Simple to use Only data types supported by bundles can be transferred Process communication for four components
File sharing Simple to use It is not suitable for high concurrency scenarios and does not make instant communication between processes. Without concurrent access, exchanging simple data is a scenario where real-time is not high.
Aidl Powerful, support one-to-many concurrent communication, support real-time communication. Using a bit more complex, you need to handle thread synchronization. One-to-many communications with RPC requirements
Messenger Functions in general, support one-to-many serial communication, support real-time communication. Cannot handle high concurrency scenarios, RPC is not supported, data is transmitted through Messenger, so only the data types supported by the bundle can be transferred. Low concurrency of one-to-many instant communications, no RPC requirements, or no RPC requirements to return results.
ContentProvider Access to data sources is powerful and supports one-to-many concurrent data sharing, and other operations can be extended through the call method. You can understand constrained aidl, which primarily provides CRUD operations for data sources.

One-to-many inter-process data sharing.

Socet Powerful, can transmit byte stream through the network, support a pair of high concurrent real-time communication. Implementation details are a little cumbersome and do not support direct RPC. Network data exchange.

Note: RPC refers to a remote procedure call, that is, two servers A, B, an application is deployed on a server and wants to invoke the function/method provided on the B server.

Because it is not in a memory space, it cannot be called directly, it needs to express the semantics of the call through the network and convey the data of the call.

Android IPC Communication mechanism of the third, process communication mode.

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.