Active Objects Provide Robust Event-Driven Applications

The non-determinism inherent in event-driven systems encompassing both networked applications and interactive applications, makes these applications difficult to develop and maintain, despite the availability of powerful libraries. One reason for this is the so-called inversion of control needed to dispatch events to listener objects provided by the application. In this paper we will argue that event-handling with listener objects leads to problems in the applications that may be avoided by resorting to blocking calls and to active objects. The latter concepts provide a uniform approach to robust event-handling, both with respect to the registration and (de)activation of listener objects, as well as the dispatching of events to blocking operations. We will illustrate our approach by discussing how to develop a graphical user interface for an application that must access a remote database. We will also indicate that as a benefit, from a software engineering perspective, our approach leads to a more modular approach to event-based systems and a better insight in the flow of control between listeners, network accesses and the application.