binder ipc in android

183 views
Skip to first unread message

Ubuntu guy

unread,
Jul 17, 2012, 1:35:38 AM7/17/12
to android-platform
Hello,

I'm trying to understand the reason as to why binder is used for
IPC over other mechanisms like sockets.
Starting gingerbread, pipes were used to dispatch key events to
applications (over binder) for performance and was primarily meant for
games. So i guess, performance wouldn't have been a reason. So what
else is the reason to use binder over sockets?

Jean-Baptiste Queru

unread,
Jul 17, 2012, 9:05:26 AM7/17/12
to android-...@googlegroups.com
Binder has additional features that sockets don't have. E.g. binder
allows passing file descriptors across processes.

JBQ
> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>



--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Chris Stratton

unread,
Jul 17, 2012, 1:06:01 PM7/17/12
to android-platform
On Jul 17, 9:05 am, Jean-Baptiste Queru <j...@android.com> wrote:
> Binder has additional features that sockets don't have. E.g. binder
> allows passing file descriptors across processes.

So do unix domain sockets. Most would assume that inspired Binder's
capability to do so. But Binder can do similar magic and reference
counting on other sorts of objects, shich sockets would not without
building on top of them.


> JBQ
>
>
>
>
>
>
>
>
>
> On Mon, Jul 16, 2012 at 10:35 PM, Ubuntu guy <sam_...@yahoo.co.in> wrote:
> > Hello,
>
> >     I'm trying to understand the reason as to why binder is used for
> > IPC over other mechanisms like sockets.
> > Starting gingerbread, pipes were used to dispatch key events to
> > applications (over binder) for performance and was primarily meant for
> > games. So i guess, performance wouldn't have been a reason. So what
> > else is the reason to use binder over sockets?
>
> > --
> > You received this message because you are subscribed to the Google Groups "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.

Dianne Hackborn

unread,
Jul 17, 2012, 3:11:02 PM7/17/12
to android-...@googlegroups.com
There are a lot of semantics that are used extensively through the system.  Binder provides a capability-based security model.  This is used for things like being able to create a binder object which is handed to other processes, and can be verified with the same identity when it returns to the original process.  Trying to build this stuff in user space would require a third process arbitrating identities between the other processes.
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Reply all
Reply to author
Forward
0 new messages