We describe the language-independent architecture of Triveni, a process-algebra-based design methodology that combines threads and events in the context of object-oriented programming. Triveni is compatible with existing threads standards such as Pthreads and Java threads, and with event models based on the Observer pattern. In particular, Triveni allows existing threads in the host language that conform to an Observer-pattern-based interface to be used as subcomponents. Dually, Triveni processes can be used as embedded systems in the host programming language if communication is arranged via the registration and notification mechanisms of the Observer pattern.
We have realized Triveni in Java as an API, JavaTriveni, that also includes an environment for specification-based testing; the detailed algorithms and design of JavaTriveni are described in [CJJ+98]. We present here the general design methodology underlying Triveni, using JavaTriveni as a concrete example. We also describe a case study in JavaTriveni, involving the re-implementation of a piece of telecommunication software, the Carrier Group Alarms (CGA) software of Lucent Technologies' 5ESS switching system.