AT-SPI on D-Bus Wiki (archival)
Note: This is an archived snapshot of the Open Accessibility Workgroup's AT-SPI on D-Bus wiki page. The information contained here is historical, and should be considered out-of-date. The current version of the AT-SPI on D-Bus wiki page can be located at:
<a href=“http://a11y.org/d-bus” class=“external free” title=“http://a11y.org/d-bus” rel=“nofollow”>http://a11y.org/d-bus</a>
Original Introduction
This page serves as a summary of the various technical issues related to the suggested D-Bus migration of AT-SPI. It intends to serve as a summary of the current state of discussions (facts, agreements, open questions).
Contents
Note to page contributors
Small factual errors or ambiguities should simply be updated with an improved wording.
For open issues, it can be helpful to add your name to comments. Such discussions should be replaced with an updated summary of the point once a conclusion has been reached to help readability.
Please add a date wherever the information is subject to possible change in the future.
Please update outdated content.
Background facts
Trolltech is implementing AT-SPI support for
Qt, both on the Unix desktop and on embedded devices like mobile phones. This support is not ABI compatible with the existing AT-SPI implementation, which does not run on embedded devices.
(comment added September 2006)
The current AT-SPI implementation contains some dependencies that impede its adoption in the KDE desktop and for KDE-based assistive technologies. (September 2006)
Trolltech and KDE wish to move AT-SPI onto D-Bus, which is a toolkit-neutral IPC protocol. It was designed for GNOME/KDE interoperability and is used in the Linux kernel. It is extremely portable.
AT-SPI was originally designed for, and is currently implemented by the
GNOME project using CORBA, an object-based IPC/RPC technology. CORBA is very portable but somewhat heavier weight than D-Bus. A number of feature gaps exist between D-Bus and CORBA.
Qt 4.2 will contain D-Bus bindings.
KDE 4 will use D-Bus extensively.
Evaluation of D-Bus and CORBA
information last reviewed and updated 24 July 2008 by Mike Gorse
Future Extensibility
Supporting additional scripting languages
It would be good to extend AT-SPI to allow accessible remote access to applications. This would also make it possible to run applications as another user (sudo).
Common Obstacles for Both CORBA and D-Bus
The current AT-SPI implementation assumes that a GNOME desktop is used. (September 2006)
API compatibility: How can we keep the needed changes in assistive technologies small?
Most existing language bindings for AT-SPI are CORBA-specific
TODO: Which parts of the APIs exactly are ORBit2 specific or CORBA specific?
For Python bindings, the CORBA specific part is much smaller.
D-Bus bindings usually hide such implementation specific details.
The use of cspi as a long-term compatibility layer is discouraged by its author.
If we decide against a quick to migration to D-Bus, then we need to define a new abstraction layer for AT clients to guarantee a stable
API long-term. Otherwise the migration headaches will be even greater in the future if more assistive technologies are coded to ORBit2-specific bindings.
If we decide to allow the use D-Bus and CORBA at the same time, then how will the two registries interoperate?
One possible solution is to have a registry that speaks both D-Bus and CORBA.
Another possible solution is to make sure that KDE and Qt applications speak both CORBA and D-Bus until enough assistive technologies speak D-Bus, and that the existing assistive technologies continue to speak CORBA until all atk is ported to D-Bus.
Unfamiliar technology:
Some of the accessibility developers lack D-Bus knowledge (but there are developers in all of the KDE, GNOME, Linux, BSD and freedesktop.org communities who would be able to help).
The KDE developer community lacks
CORBA knowledge, which is an obstacle for implementing the bridges. The few KDE developers with CORBA knowledge claim to have had bad experiences with CORBA during KDE 1.x times, but the GNOME team still has a lot of CORBA experience and could be asked for help.
Obstacles for Migrating AT-SPI Onto D-Bus
The quality of the Python/glib bindings is currently lacking. (TODO: details) (September 2006)
The Python bindings are currently being rewritten.
The existing Python bindings block when making a call to a non-existent object (during introspection. There is a workaround for this).
The existing Python bindings do not create an org.freedesktop.DBus.Introspectable interface on an application's top-level object, making discovery of accessible objects problematic.
A central component is the Registry daemon so a new D-Bus implementation will be required (see above).
Object lifetime is an issue. D-Bus does not impose or offer any object lifetime support, but some parts of AT-SPI require it.
We can probably assume that most AT-SPI objects are owned by the applications and destroyed when the application widgets are destroyed. But with that assumption, there are one or two AT-SPI objects that are problematic. For example, StateSet objects can be created by any part of the system (clients or applications). A workaround may be passing the StateSet object by value, but this solution is uncertain.
Implementing object reference counting on top of D-Bus may be a performance problem.
Need to standardize on object references. A D-Bus object reference is usually an object path (Example “/org/freedesktop/accessibility/TheWidget”), but to fully specify an object reference, one must also know the bus name (service), and possibly the interface where the object lives.
AT dependencies on AT-SPI:
Orca, LSR, Accerciser, AT-Poke, GOK, Dasher, Gnome-Mag, Dogtail, LDTP.
Application dependencies on AT-SPI:
ATK/GAIL, Java Access Bridge, UNO/OpenOffice, XUL/Firefox, Eclipse, Workplace.
Obstacles for Using the Existing CORBA Implementation in KDE
Szenario D: Parallel Use of D-Bus and CORBA
We implement a registry that speaks both D-Bus and CORBA, allowing applications and assistive technologies to choose.
Pros:
The proven infrastructure continues to be used.
No GNOME dependencies for KDE, even short-term.
Forward-looking.
Compatibility with embedded environment.
KDE accessibility aids can be written with simple shell scripts.
A single IPC is used in KDE everywhere.
Cons:
Biggest amount of required code (both short-term and long-term).
A lot of work before full interoperability is achieved.
Implementing a shared registry for D-Bus and AT-SPI is likely more work than writing a new registry for D-Bus.
QAccessible must either be bridged twice, or be bridged to ATK.
Some code for KDE assistive technologies needs to be written twice (for instance, the higher-level
API client bindings).
An untested infrastructure used for KDE Accessibility.
Two different IPCs are used for accessibility.
Current Work (Updated 24 July 2008)
Work is on-going by Mark Doffman of CodeThink and Mike Gorse of Novell. Mark has written some notes on some of the design changes in the DBus implementation of AT-SPI being worked on. In summary, remote reference counting is not being done for performance reasons, and some of the data associated with objects will be cached by the at-spi bindings to avoid the need to make round-trip calls to the application for all queries. The code is at git://git.codethink.co.uk/git/atspi-dbus.