As one of the key infrustructure, Android Binder provide one of the IPC mechanism in Android system. Some people thought that Android Binder reused the Open Binder released by ACCESS/PalmOS and studied the mechanism based on the documents on ~hackbod/openbinder/docs/html/index.html.
1. Difference between Android Binder & OpenBinder
Then what's the difference between Android Binder and OpenBinder? What is the functionalities and position in Android? And how many IPC mechanism are provided in Android system?
As android engineer said:
"the OpenBinder docs on ~hackbod/openbinder/docs/html/index.html refer to a very different version of the
Binder. What we have in Android is similar in concept, but shares none
of the same code (we had to rewrite everything because the OpenBinder
implementation is MPL and our code needs to use the Apache 2.0
license), and is very stripped down in functionality to do only the
things we needed in Android.
Also technically none of this has anything to do with Dalvik, but
is in a layer above Dalvik and part of the Android platform libraries.
The main API for interacting with the Binder is android.os.IBinder and
android.os.Binder."
The basic hirerarchy looks like this:
Android platform libraries
android.os.IBinder, android.os.Binder....
middle layer including Binder...
Dalvik
2. IPC mechanism in Android
And there are also several mechanism for IPC as below:
(1). For native code, you have most everything Linux 2.6 provides.
(2). For code written in Java, you have the typical socket / nio calls.
(3). In addition, you have the Binder calls.
In a word, Which you use depends on what features you need, what you plan to interact with, and how portable you want it to be not only via JNI/Java APIs.
阅读(1361) | 评论(0) | 转发(0) |