Research has yielded many theories, methods, and tools to help application developers use distributed systems [Tan95], distributed languages [BST89], and distributed algorithms [CM88, Lyn96]. Our programming model and theories of structured composition build on this research and recent work in formal methods [DS90, CT92, AL93, Cha94, Lam94, CS95].
To supplement our model, we are designing and implementing a communication infrastructure [CRS96], in which processes can be written as multithreaded Java objects called dapplets. Using the compositional theory described in this paper, dapplets can be composed into sessions, wherein the states of the component dapplets can be modified in a peer-to-peer fashion through transactions. We provide formally verified reliable libraries for synchronization between threads (e.g., single-assignment variables, reusable barriers, locks, and semaphores, as specified in [SC96]), and will be working on formally verified reliable libraries providing services for use in sessions (e.g., tokens, clocks, distributed data structures, and stack layering facilities, as specified in [CRS96]).
Our implementation shares many design features of network objects [BNOW95], including distributed typechecking, transparent remote invocation, marshaling, and buffered streams. A network object is an object whose methods can be invoked by other local and remote programs; network objects ensure distributed type safety with the narrowest surrogate rule, which allows programmers to export new versions of distributed services as subtypes of previous versions. Many systems, including the Obliq distributed scripting language [Car95], have been built using Modula-3 network objects. Obliq objects have state and are local to a site; Obliq enables a dynamic form of distributed programming, where objects can redirect their behavior over the network, and where computations can roam between network sites.
Obliq allows mobility of program code as well as the context in which the code operates; similarly, Telescript [Whi94] allows mobile agents that carry their context with them as they move from location to location. Whereas Obliq contexts can include established network connections, agents are self-contained and resource-limited: instead of communicating remotely with other locations, agents move themselves to a remote location site and communicate locally. Agents share collaborative characteristics with our dapplets: they can run unattended for a long time, meeting and interacting with other agents.
Although our dapplet support for collaborative distributed application development was implemented using Java, the theories and tools for composition we propose are employable in conjunction with other platforms, such as CORBA-compliant Object Request Brokers [Obj95]. CORBA is a language-independent industry standard for remote invocation; through Object Request Brokers, objects in one location in a network can invoke methods on other objects in the network in a location-independent manner. This characteristic is best suited for client-server application development; however, the structured compositional approach described in this paper can also be a useful design methodology when developing CORBA-compliant distributed peer-to-peer object computations.
Putting the concepts discussed in this paper into the distributed object context, processes are objects that interact using remote procedure calls [BN84], and the interfaces through which they receive messages are the public interfaces they export. Sessions are conglomerations of interacting objects; such object interface definitions are part of the CORBA standard, which defines an implementation language-independent interface definition language. This interface definition provides a convenient framework in which to specify the behavior of services available to sessions as well.
An example of a CORBA-like object system is the Inter-Language Unification (ILU) system [Gro96]. The object interfaces provided by ILU hide implementation distinctions between different languages, between different address spaces, and between operating system types. ILU can be used to build multi-lingual distributed object systems; remote procedure call services can be described and used as ILU objects.
Whereas CORBA provides a useful architecture for disseminating structured information, the World Wide Web [BLCGP92] has proven useful as a mechanism for distributing less structured information. As a result, many research groups [OW96] are presently working on systems and applications in which distributed (and possibly mobile) objects interact over the World Wide Web. One interesting approach is the idea of nodes with scalable intelligence [Fuc96], in which the objects of a peer-to-peer system dynamically integrate tools into distributed cooperative applications. To support ad hoc collaborations, these objects can employ domain-specific little languages to handle interactions, and these languages can be understood both by the agent objects themselves and the humans who interact with them. In future work, we plan to investigate this approach and others in the context of specifying, reasoning about the composition of, and implementing our processes and sessions for distributed collaborations.