Android IPC
1. Intent
2. Content Provider
3. Messenger
4. Binder
Intent, Content Provider and Messenger are high level abstraction of Binder. Its underlying communication is based on Binder.
Linux System IPC
1. Socket.
2. Pipe.
3. Semaphore.
4. Shared memory segments
5. Message Queues.
Android libc don't support Sys V IPC's (Semaphore, Shared memory segments, Message queues), because it is prone to kernel resource leakage.
What is Binder?
Its Android IPC framework facilitated by Kernel level Binder driver.
IBinder interface defines the methods that Binder object must implement. AIDL used to define the IBinder Interface. Binder Service is actual Binder object which implement IBinder interface and extends Android Service Component.
Proxy: AIDL auto genenrated interface for client. It un/marshals data and map method calls to IBinder driver transaction.
Stub: Partial implementation of AIDL Interface. It maps the Binder driver transaction in to method call in Binder Service and un/marshals data.
Stub takes care of spanning binder thread in service based on number of clients.
1. Intent
2. Content Provider
3. Messenger
4. Binder
Intent, Content Provider and Messenger are high level abstraction of Binder. Its underlying communication is based on Binder.
Linux System IPC
1. Socket.
2. Pipe.
3. Semaphore.
4. Shared memory segments
5. Message Queues.
Android libc don't support Sys V IPC's (Semaphore, Shared memory segments, Message queues), because it is prone to kernel resource leakage.
What is Binder?
Its Android IPC framework facilitated by Kernel level Binder driver.
IBinder interface defines the methods that Binder object must implement. AIDL used to define the IBinder Interface. Binder Service is actual Binder object which implement IBinder interface and extends Android Service Component.
Proxy: AIDL auto genenrated interface for client. It un/marshals data and map method calls to IBinder driver transaction.
Stub: Partial implementation of AIDL Interface. It maps the Binder driver transaction in to method call in Binder Service and un/marshals data.
Stub takes care of spanning binder thread in service based on number of clients.
0 comments:
Post a Comment