Chinaunix首页 | 论坛 | 博客
  • 博客访问: 467795
  • 博文数量: 153
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 1724
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-08 11:55
文章分类

全部博文(153)

文章存档

2011年(1)

2010年(55)

2009年(88)

2008年(9)

我的朋友

分类: LINUX

2009-01-16 10:33:18


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.



阅读(1334) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~