Binder Kit

< SHandler Patterns | OpenBinder | Binder Recipes >

The Binder could be described as a "framework framework". It doesn't do anything itself, but is an enabling tool for implementing other rich frameworks, such as the view hierarchy, media framework, etc.

Conceptually, the Binder has many similarities to COM and CORBA it defines a generic object/component model, a standard mechanism for describing interfaces to objects (through IDL), allows component instances to live in different processes and takes care of IPC details when interactions occur between them, and has a facility for registering, discovering, and instantiating components.

Unlike COM and CORBA, the Binder includes a number of basic features that make it more suitable for system-level programming. For example, the Binder IPC Mechanism propagates the current thread priority across IPC calls, which is important for multimedia applications. It also supports recursion between processes (and generally models IPC as a local function call), so that the system can arbitrarily place components in different processes, depending on security/stability vs. performance behavior determined at run time.

The Binder also includes facilities for registering components (through static "manifest" descriptions, not requiring a registry as in COM), which clients can use to discover and make use of components/features in the system. The Binder system takes care of loading and unloading as needed the executable images implementing components, effectively eliminating the need for manual implementation of plug-in management.

In lieu of a Windows-like Registry, the Binder Data Model is used to provide a hierarchical namespace containing active objects as well as simple data. This namespace is itself defined through a set of standard Binder interfaces, so anyone can implement a Binder component that fully participates in the namespace. For example, there is a Binder component called the "Settings Catalog" that implements the namespace APIs for simple data on top of a flat persistent storage; an instance of this component is placed in the full namespace at "/settings" for others to use.

A rich multi-threaded environment is supported by the Binder, based on a threading model like COM's "free threaded" components. Binder components are generally expected to be thread-safe; Threading Conventions describes the high-level threading facilities and guidelines that are used to make it easier to write multi-threaded code and make efficient use of threads in the system.

The Binder Kit is built on top of the Support Kit, which provides a standard set of basic programming APIs, such as reference counted objects, threading, and containers.

Note:
The current source tree has the Binder Kit and Support Kit combined together in the same directory (support). This page only describes the Binder APIs there.

Topics