Title:
Distributed Applications on the WWW:
Coordinating Java Agents with PageSpace

Authors:

Paolo Ciancarini
Dept. of Computer Science,
Univ. of Bologna,
Pza. di Porta S. Donato, 5,
I-40127 Bologna, Italy.
mailto:cianca@cs.unibo.it

Robert Tolksdorf
Technische Universität Berlin,
Fachbereich 13, Informatik,
FLP/KIT, FR 6-10,
Franklinstr. 28/29,
D-10587 Berlin, Germany.
mailto:tolk@cs.tu-berlin.de
Tel: +49-30-314-25184
FAX: +49-30-314-73622

Fabio Vitali
Dept. of Computer Science,
Univ. of Bologna,
Pza. di Porta S. Donato, 5,
I-40127 Bologna, Italy.
mailto:vitali@cs.unibo.it

Davide Rossi
Dept. of Computer Science,
Univ. of Bologna,
Pza. di Porta S. Donato, 5,
I-40127 Bologna, Italy.
mailto:rossi@cs.unibo.it

Andreas Knoche
Technische Universität Berlin,
Fachbereich 13, Informatik,
FLP/KIT, FR 6-10,
Franklinstr. 28/29,
D-10587 Berlin, Germany.
mailto:knoche@cs.tu-berlin.de

Keywords:
Java, Linda, Coordination, Internet, Web Applications,
Open Distributed Systems

Distributed Applications on the WWW: Coordinating Java Agents with PageSpace

Paolo Ciancarinigif - Robert Tolksdorfgif - Fabio Vitali tex2html_wrap_inline576 - Davide Rossi tex2html_wrap_inline576 - Andreas Knoche tex2html_wrap_inline580

Abstract:

The current Web does not support distributed applications well. Existing approaches are oriented to centralized applications at servers, or local programs within clients. To overcome this deficit, a platform for distributed, coordinated Java agents within the Web is designed with PageSpace.

We take a specific approach to coordinate agents in PageSpace applications, namely variants of coordination language Linda that support rules and services to guide their cooperation. This technology is integrated with the standard Web technology and the programming language Java.

Several kinds of agents life in the PageSpace: User interface agents, personal homeagents, the agents that implement applications, and the kernel agents of the platform. Within the architecture it is possible to support fault-tolerance and mobile agents as well.

Keywords: Java, Linda, Coordination, Internet, Web Applications, Open Distributed Systems

Introduction

  The Web has evolved into the dominating platform for information systems on the Internet. There is increasing demand to use it as a platform for distributed applications in which processing of information occurs. For example, the application domains workflow management and electronic commerce are classes of applications that require distributed access and processing due to the distributed nature of the work these applications support. Still there is no widely accepted platform for implementing distributed applications on top of the Web.

PageSpace is such a platform that has the potential to provide sufficient functionalities to do so. It is based on the core Web technology for access and presentation, on Java as the execution mechanism, and on coordination technology to manage the interaction of agents in a distributed application. This paper describes the rationale for our platform, its design, and the implementation strategy currently applied.

Currently, the field of electronic commerce is of particular interest for the application of platforms like PageSpace. In fact, electronic commerce should serve as a benchmark for the validation of our approach wrt. applications requirements. Appendix A summarizes the requirements.

This paper is organized as follows. In the following section, we review approaches to implement applications that require active processing on the Web. We then describe the technology, on which our specific approach to coordination in distributed applications is based. The next section describes the PageSpace platform and its various kinds of agents. Then, the current approach taken in engineering and implementing PageSpace is outlined. We finally point out how the design can support fault-tolerance and mobility of agents. A summary and the bibliography conclude the paper.

Existing Approaches for Web Applications

  Since 1993 the Web as the dominating Internet service has evolved into the most popular and widespread platform for world wide accessible information systems. The software for accessing and offering information on the Web is available in the public domain for all hardware and operating system platforms in use.

At its core, the Web is a static hypertext graph in which multimedia pages of information marked up in HTML are offered by servers, retrieved by clients with the HTTP protocol and displayed in a graphical interface that is very easy to use. Because of its high availability, it becomes more and more desirable to use the Web as a platform for dynamic, distributed applications. The support of the core Web platform for applications is very rudimentary - only the CGI mechanism allows for processing of information that is entered by the user in forms, or retrieved from auxiliary systems, such as database servers.

A number of mechanisms has been proposed and implemented to make the Web a platform for distributed applications. The following classification is structured according to the loci of activity that are possible with such mechanisms.

The PageSpace platform falls into the last category, as only here activity is really distributed. We provide a middleware platform that is smoothly integrated with the dominating core Web technologies and also addresses issues of integrating the user interfaces of applications with the Web. The key conception is the use of coordination technology to manage the interaction amongst PageSpace agents. This is the topic of the next section.

Coordination Technology for the Web

    The PageSpace platform ([CKTV96]) is based on the notion of agents that use coordination technology for their interactions. We use the term agent reflecting that processing is performed in such an entity. Applications are composed by a set of distributed agents. Each user has a homeagent that provides the interface to the PageSpace and its agents. We rely on Java as the main implementation language for our agents. In the main focus of the PageSpace is the issue of coordination amongst these distributed, concurrent agents, and we explored the use of Linda-like coordination technology to solve that coordination problem.

Basic Coordination Technology

  Three issues are important in a distributed, concurrent application: How do agents synchronize their work, how do they communicate, how is activity started? Amongst the various approaches to solve this coordination problem, is one specific line of research called coordination technology that is based on the concepts introduced by the language Linda ([CG89b]).

The following characteristics make Linda-like coordination attractive for distributed applications on the Web:

We use specific flavors of Linda-like coordination as described in the next section.

Coordination Technology in PageSpace

  Coordination technology based on Linda has a repository of shared elements and operations for the addition and withdrawal as its core. In appendix B we give more details on coordination technology and its flavours in PageSpace. In order to use this basic coordination mechanism for the Web, a Linda embedding into Java was defined for PageSpace and implemented. This system - derived from Jada ([Ros]) - forms our coordination kernel.

However, the pure data oriented style of coordination as in the original Linda-conception is not suited to support open distributed applications. It can well be used to keep state within one application, but it becomes difficult to support multiple applications that share one tuplespace.

Thus, we introduce two additional flavors of coordination styles in PageSpace. We do so by adapting the operations from two other coordination languages, that can be built on top of the repositories provided by the basic coordination technology from Jada:

Kinds of Agents in PageSpace

  In the PageSpace architecture, we distinguish several kinds of agents, denoted by the names from the Greek alphabet:

Figure 2 shows an application in the PageSpace. There is an alpha in the users browser which is generated by a Beta. A set of Deltas implement the functionality of the applications, and a Zeta provides access to a CORBA based coordination environment. The PageSpace environment is established by a set of Epsilon agents on different nodes. Note that Deltas and Zetas are location independent, Alpha is located at the users machine, Beta is at some fixed location, and Epsilons are present on each participating matching.

   figure93
Figure 2: An application in PageSpace

In the following, we describe these kinds of agents in more detail.

User Interfaces and Homeagents

 

The PageSpace and its application are accessible to the user from any Web browser. This browser can be located at a different machine than the actual agent that performs an application. Also, the user can move during that interaction from one browser and machine to others. Thus, it is necessary, to deal with the user interface of an application separately. Two characteristics of the user interface in PageSpace are:

The latter characteristic shows the potential of PageSpace to support any of the structures for applications on the Web as outlined in section 2:

Each user of the PageSpace has a persistent representation in the net, called the homeagent or ``Beta''. It has two faces - one to the user, one to the PageSpace.

For the user, it provides the interface to the PageSpace and the applications and agents therein. Figure 3 shows that interface for an example Poker application, which we call ``Alpha'', when it is manifested in the browser. This display is shown, when the user contacts his or her homeagent by retrieving a specific URL.

   figure112
Figure 3: The interface to PageSpace for the user

Alpha consists of multiple sections. One part of the user interface does provide operations of Beta - to use applications, and to start and stop own agents in the PageSpace. A list of arrived messages shows the results of interactions with applications in the PageSpace. If the browser supports this feature, the queue is updated by a client-pull mechanism. When a message is selected, the user interface of that application is displayed in the third section of the Alpha interface.

The other ``face'' of Beta is that it is a persistent representation of the user in the net. From Alpha, a user can use applications and start agents. However, he or she does not have to be online, while the application is running. Consider as an example a groupware application in which users all around the world participate in some work.

It would be unacceptable to force the users to be logged into the PageSpace all the time, as such a distributed work is asynchronous in nature. Thus, while there is no connection to the user, Beta can still receive messages from a joined application.

Thus, Beta is looks like a complete agent to the PageSpace. However, it does only store incoming messages in a persistent store until the user retrieves them and reacts to them. In a future PageSpace, we will explore mechanisms to instruct Beta to automatically react to incoming messages, where possible.

Applications and Agents

  Applications in the PageSpace are composed of agents, called ``Deltas''. In an application in use, three sorts of Deltas are involved:

The agents that offer generic services can be started by a user within the PageSpace. They remain therein and answer to service requests by other agents until they are withdrawn by their owner. In future versions of the PageSpace, several kinds of accounting for the use of agents and services, can be introduced.

Delta agents are programmed by inheriting from a class from the package pagespace.delta instead of java.object. Thereby, it is easy to enforce a certain functionality of Deltas and to provide a default behavior where possible by using the object-oriented features of Java.

The integration of legacy applications and gateways to other coordination environments can be achieved by wrapping and gateway agents that are called ``Zeta''. They are similar to Deltas in that they offer services to the PageSpace, however, they implement them by interacting with a closed application or via some middleware protocol to other middleware specific object.

The Implementation of the PageSpace Platform

 

The PageSpace is currently implemented as a prototype used for demonstration purposes and for the exploration of further concepts. This prototype follows the implementation strategy outlined in the following. Work remains to be done on the engineering of the platform, however, we believe that the main principles of our architecture can remain unchanged.

The PageSpace Kernel Agents

  On each machine participating the PageSpace, one Epsilon agent is running. It can be considered the kernel of PageSpace. Each Epsilon runs on a Java virtual machine and manages multiple threads. Epsilon has several purposes:

Figure 5 shows an excerpt of the logical structure of the Epsilon kernels. The several objects that run in threads are connected by sets of streams both for purposes of data exchange and management.

   figure148
Figure 5: An outline of the logical structure of Epsilon

In middleware platforms, the issues of accessing services and naming are central. In PageSpace, we do not enforce a (distributed) registry of existing agents, but take a different approach similar to the way of accessing pages in the Web.

As Epsilon knows about all agents it is managing, it is able to provide lists of these and their interfaces. The natural way to access such a list is by providing it with the built-in HTTP server for Web access. Thus, the ``name'' of an agent for the outside world is a simple URL.

Users that want to use agents, keep their personal list of known agents - just as one does for known Web pages with a bookmark-list. This list is used by Beta to offer the use of agents and applications to the user. It can be extended by the user, and be the subject to public catalogs of agents - resembling search engines and index services on the Web.

For example, for a service-based use of the PageSpace, the interface of a requested agent has to be passed to the coordination operations. This interface is accessible from the Epsilon that manages an respective agent. Beta retrieves it via HTTP, and construct the appropriate coordination operation.

Distributed PageSpaces

  The Epsilon kernels manage and coordinate agents on one machine. For distributed applications, these kernels have to have a distribution architecture and according protocols. A special concern with such a protocol is scalability - the ability to provide efficient coordination for a platform involving a large number of machines.

The approach of establishing a shared repository of information can lead to scalability problems due to the amount of overhead for replication. We can take a flexible approach to structuring the system to overcome these problems.

We follow the approach of the Internet to scalability: The set of machines that participate in the PageSpace is organized in a loose hierarchical fashion: Locally connected machines follow a replication schema in a logical sub-PageSpace and one machine is defined as the gateway to other sub-PageSpaces. Thereby, we imitate the interconnected subnets of the Internet.

The specific organization of Epsilons within one sub-PageSpace is a local decision. Known architectures for distributed implementation of Linda-like systems include full replication of a repository to all nodes, no replication with a single, centralized repository, no replication of repositories in a ring-like organization ([Pol95]), or a partial replication as in [CG86]. As long as there is one defined node that follows a gateway protocol to other sub-PageSpaces, our architecture supports all of them. In fact, the current Jada implementation uses a centralized or fully replicated repository, whereas Laura implements a partial replication scheme.

For a gateway, a ``routing-table'' exists that instructs the gateway to which other sub-PageSpaces requests for matching elements shall be forwarded. Thus, the distribution structure can be statically or dynamically configured.

This configuration will be based on the structure and behavior of the agents within a sub-PageSpace, and supports them in their coordination requirements. The several flavors of coordination employed in PageSpace give way to several intelligent optimizations, that are to be evaluated.

Features of the PageSpace Platform

  The PageSpace architecture has several features that are yet to be explored. In this section, we point to two of them, namely fault tolerance and mobility. We show how these features can be introduced to the platform, and how they are enable by the design of the platform.

Conclusion

  The PageSpace is a platform to support distributed applications on top of the Web. We provide a framework that is based on the core Web technologies and Java, and add a specific approach to coordinating distributed agents in applications, namely Linda-like coordination technology. Our approach is generic towards the usage of several variants of coordination technology, as demonstrated with data-oriented, service-based, and rule-driven coordination styles. The design of the platform is enabling for a straightforward implementation of several desirable features, such as fault tolerance and mobility of agents.

Our platform is capable to support open distributed applications. In the PageSpace effort, we now focus on supporting coordinated applications in electronic commerce. Based on a prototypical implementation the platform will be engineered and validated by implementing applications from the named domain. More information on PageSpace can be found on the Web at |http://www.cs.tu-berlin.de/ pagespc|.

Acknowledgments. PageSpace has been supported by the EU as ESPRIT Open LTR project #20179. For useful discussions on electronic commerce, the authors would like to thank Carmine del Rosso, VGS, Milano.

References

CCR96
S. Castellani, P. Ciancarini, and D. Rossi. The ShaPE of ShaDe: a coordination system. Technical Report UBLCS-96-5, Department of Computer Science, University of Bologna, 1996.

CG86
Nicholas Carriero and David Gelernter. The S/Net's Linda Kernel. ACM Transactions on Computer Systems, 4(2):110-129, 1986.

CG89a
Nicholas Carriero and David Gelernter. How to Write Parallel Programs: A Guide to the Perplexed. ACM Computing Surveys, 21(3):323-357, 1989.

CG89b
Nicholas Carriero and David Gelernter. Linda in Context. Communications of the ACM, 32(4):444-458, 1989.

CKTV96
Paolo Ciancarini, Andreas Knoche, Robert Tolksdorf, and Fabio Vitali. PageSpace: An Architecture to Coordinate Distributed Applications on the Web. Computer Networks and ISDN Systems, 28(7-11):941-952, 1996. Proceedings of the Fifth International World Wide Web Conference.

GC92
David Gelernter and Nicholas Carriero. Coordination Languages and their Significance. Communications of the ACM, 35(2):97-107, 1992.

Pol95
Andreas Polze. An Efficient Implementation of Decoupled Communication in Distributed Environments. In Günter Hommel, editor, Quality of communication based systems, pages 163-178. Kluwer Academic Publishers, 1995.

Ros
Davide Rossi. Jada: multiple tuple spaces for Java á la Linda.
http://www.cs.unibo.it/~rossi/jada/.

Tol95
Robert Tolksdorf. Coordination in Open Distributed Systems. Number 362, Reihe 10 in VDI Fortschrittsberichte. VDI Verlag, 1995. ISBN 3-18-336210-4, PhD Thesis.

Tol96
Robert Tolksdorf. Coordinating Services in Open Distributed Systems with Laura. In Paolo Ciancarini and Chris Hankin, editors, Coordination Languages and Models, Proceedings of Coordination '96, LNCS 1061, pages 386-402. Springer, 1996.

Electronic commerce on the Web

 

The domain field of financial institutions (eg. banks, investment and mutual funds) is a lively, fast-growing, and important market for WWW technologies, as witnessed by the number of sites supporting financial data or research on financial applications of WWW technology.

This is because financial institutions must face new relevant factors like markets globalization, novel financial instruments, increased demand of value-added services finalized to end-users (home-virtual banking), and effective management of the related information problems. Financial institutions will be obliged to develop a new generation of distributed multiuser applications to satisfy these new demands. Internet/Intranet technology will be a powerful tool to realize this new generation of networking applications and services.

The widespread interest in the World Wide Web by the financial institutions is witnessed by the number of sites supporting financial data or research on financial applications of WWW technology. For instance, in Germany Bank24 offers home banking services over the WWW. In April 1996, Cassa di Risparmio di Spoleto inaugurated the first Internet home banking service in Italy. At the other end of the spectrum of financial services currently offered over the Internet, first sites show up, where customers can freely trade stocks using the Internet for a very competitive fee. Pointers to examples of innovative uses of WWW technologies in financial markets can be found in |http://www.wiso.gwdg.de/ifbg/finance.html|.

Technologies currently used for implementing information and operation services in financial institutions are strongly conventional and proprietary. Although they guarantee a high quality for conventional services, when new ones have to be designed, implemented, and integrated they are often not satisfactory, insufficient or too expensive to be used.

Although advanced applications on WWW already now include e-mail systems, audio-video realtime/anytime conferencing, financial data retrieval, etc., the current technology of Web middleware is not really adequate to support the services necessary to develop interactive Internet and Intranet multiuser applications. Furthermore, it is important to note that the usual kind of service banks provide is not public. In fact, it is personalized towards confidentiality and towards recognition of the customers personal financial situation and interests. Thus, there is a strong demand on providing secure, personalized, and confidential online services to customers, for example personal account monitoring and portfolio management.

An important test-bed for WWW technologies are those branches of financial institutions which need and rely upon realtime information delivery systems. An important example is the logic distribution of stock exchange data to all the geographically distributed branches of a bank. Another example is the distribution of software updates, that is an expensive operation involving several people and sometimes decreasing the quality of services offered by the branches.

Currently, branch services relying upon data coming from the central branch are typically implemented in a conventional way using a central mainframe host, which usually is already overloaded with other managing tasks on behalf of the central branch. This solution is not elegant, not efficient, and in any case not satisfactory from the point of view of information integration capabilities. Most of the current Web applications also rely on these centralized architectures to build Intranet systems and applications for elaborate financial data, which is expensive to get and difficult to manage and redistribute, because of the low level of the network technologies currently used.

The PageSpace environment may show to be a powerful tool to realize a new generation of networking applications and services in the area of financial applications. The PageSpace technologies will be studied and applied to develop solutions for several needs, including:

Coordination Technology

  Linda introduces an abstraction for programming concurrent agents and defines a very small set of coordination operations. In a program based on Linda, a set of agents work on a task within a shared environment, called the tuplespace. It is a collection of tuples that contain information relevant for the application. Many variants of tuplespaces, like distributed, or hierarchically structured ones, have been studied over the last fifteen years.

Linda's primitives provide means to manipulate that shared tuplespace, thereby introducing coordination operations. A tuple can be emitted to the tuplespace by an agent performing the out-primitive. As an example, |out(<"amount",10,a>)| emits a tuple with three fields, that contain a string, an integer, and the contents of the program variable a. This operation is non-blocking.

Two blocking primitives are provided to retrieve data from the tuplespace: in and rd. Both take a template as argument - for example |in(<"amount",?int,?b>)|. A matching rule defined in Linda governs the selection of a tuple from the tuplespace: The template and the tuple must have the same length, the types of the fields must be the same, and - for a constant field (an actual) - values of fields have to be identical.

The example pattern retrieves a tuple that contains the string amount as the first field, followed by an integer, followed by a value of the same type as the program variable b. The notion ?b means that the retrieved value is to be bound to the variable b after retrieval. The difference between in and rd is that the former removes the matching tuple, while rd leaves it untouched in the tuplespace. Both operations are blocking - as long there is no matching tuple found in the tuplespace, they do not return. Linda makes no further guarantees on the selection of matching tuples and waiting operations.

It has been demonstrated ([CG89a]) that Linda is capable to express all major styles of coordination in parallel programs. in is a very powerful operation - it combines synchronization (the operation blocks until a matching tuple it found) with communication (the binding of values to program variables). Linda's operations together form a so-called coordination language ([GC92]). Combined with a sequential programming language, a new language for concurrent systems is generated. This combination is called embedding and can be implemented by changes to the programming language, by preprocessing source code, by libraries, or can be provided an extended operating system.

Basic coordination technology in PageSpace: Jada

 

With the language Jada, the Linda approach has been adapted to PageSpace. Differently from other Linda-like implementations, which usually include a preprocessor, Jada is merely based on a set of classes to be used to access a tuple space.

In Jada a tuple is represented by the tuple.Tuple class and contains a set of objects. Thus, |Tuple my_tuple=new Tuple(new Integer(10),"test");| is an example of a Jada tuple It includes two actual fields; the first item is an Integer object valued 10, the second one is a String valued ``test''. To build a tuple with one formal field of type String we can write |Tuple formal_tuple=new Tuple(new String().getClass());|. Thus, a Class type used as argument in the constructor of a tuple is used to represent a formal field.

To build a tuple space using Jada we write |tuple_space=new TupleSpace();| We can share this object between multiple threads. When we want a thread to put a tuple into the tuple space we write |tuple_space.out(new Tuple(new Integer(10),"test"));|

This tuple can be later read by another (or even by the same) thread using the or the methods: |Tuple read_tuple=tuple_space.read(new Tuple(new Integer(10),"test"));| The access to the tuple space performed by the and operations is associative: these operations return a tuple matching that used as argument. Jada uses the same matching rule described above for Linda.

To support distributed programming, the classes TupleServer and TupleClient allow remote access to a tuple space. In fact, each tuple space is a shared remote resource available through a tuple space server running on some host at a specific port. This way we can run as many tuple space servers as we like in a network, so that applications can independently operate on several, distributed tuple spaces. TupleServer is a multithreaded server class which translates requests received from the TupleClient class in calls to the methods of the TupleSpace class. TupleClient interfaces with a remote TupleServer object, holding the real tuple space, and requests it to perform the , and operations.

Service-Based Coordination in PageSpace:

introduces the abstraction of a service-space shared by all agents in an open system which is a collection of forms. A form can contain a description of a service-offer, a service-request with arguments or a service-result with results.

In , a service is described as an interface consisting of a set of operation signatures. The signatures describe the types of the operations in terms of their names and their argument- and result-types. It is therefore a record of function-types. A form contains a description of this interface-type for service-identification. Putting a service-request form into the service-space triggers the search for a service-offer form so that the interface-type of the offer is in a matching relation to that of the request.

In , no names are used for the identification of services or for the types of data involved in an operation. Instead, a service offered or requested is described by an interface signature consisting of a set of operations signatures. The operation signatures consist of a name and the types of arguments and parameters.

therefore puts emphasis in stating what service is requested, not on which agent is requested to perform it. A crucial point therefore is the identification of services.

In interfaces are notated in the service type language STL. In [Tol95] we formally defined a type-system which is used in the definition of the semantics of such interface definitions. This type system includes rules for subtyping and this subtyping is the key for 's identification of services: Given the interface descriptions in forms, a service offer matches a service request, if the type of the interface offered is a subtype of the one requested.

Subtyping in is defined so that a type A is a subtype of B if all values of type A can be substituted when a value of type B is requested. The ``values'' we type are services. The subtyping enables us to use a service of type A if a service of type B is requested.

A service is the result of an interaction between a service-provider and a service-user. In , two operations coordinate this interaction for the service-provider, and .

An agent that is willing to offer a service to other agents puts a serve-form into the service-space. It does so by executing , which takes as parameters the type of the service offered and a list of binding rules that define to which program variables arguments for the service should be bound.

When a is executed, a serve-form is built from the arguments. Then, the service-space is scanned for a service-request form whose service-type matches the offered service by being a supertype. The provided arguments are copied to the serve-form and finally bound to program variables. blocks as long as no matching request-form is found.

After performing the service requested, the service-provider uses to deliver a result-form to the service-space. A result-form is built which consists of the service-interface and - depending on operation - a list of result values according to the binding list. The agent is responsible to store the results of the service properly in those variables. The operation is performed immediately and the form is put into the service-space. An agent offering services usually operates in a loop consisting of the sequence -perform the service-.

An agent that wants to use a service has to execute 's third and last operation, . Its arguments are the service-type requested, the operation requested, arguments for the operation and a binding-list.

When executing , two forms are involved: a service-put form and a service-get form. The first is constructed from the service-interface and the arguments and then inserted to the service-space. If another agent performs a -operation and the service-put- and serve-forms match, the arguments are copied as described above and the service-provider starts processing the requested operation.

The service-get form is constructed from the service interface and the binding list for the results. Then, a matching result-form is sought in the service-space and - when available - the results are copied and bound to the program variables. When the request-form is entered to the service-space, it is matched with some serve-form. When the result-form is retrieved, the results are bound to program variables of the requesting agent.

The interaction of agents coordinating services with consists either of putting a request for a service to the service-space, finding a matching offer form and copying of arguments or of trying to get the results of a service, by finding a matching result-form and copying of the results. This interaction is uncoupled, as service-provider and -user remain completely anonymous to each other.

Rule based coordination in PageSpace: Shade

 

For rule based coordination, the coordination language Shade has been embedded to Java and uses the coordination primitives of Jada. A Shade program is a collection of classes; each object in a Shade application is an instance of a class. Each class contains a set of rules which define the behavior of the objects which are instances of that class. A class can be extended using inheritance, i.e. its behavior can be modified adding new rules. Objects are class instances and have a state. A state change can happen when a rewriting rule is applied to the object state or when an object receives a message.

Since it denotes a rewriting rule, a Shade method has a head and a body. The head is used to trigger the method itself and gets items from the object state, while the body puts items in it. Semantically, each object is a tuple space with associated rewriting rules. When a rule is activated, by satisfying a guard which can remove matching items from the tuple space or simply check for their existence, an action is performed. The action is one of writing items in the object's tuple space, writing items in other objects' tuple spaces (i.e. sending a message), or creating a new object.

Shade is especially useful for coordinating distributed objects. The action of writing in other objects' tuple spaces is performed by a special form of message passing. A message's address is a pattern; messages are delivered to each object whose name matches the given pattern. This way we can easily express with the same basic mechanism point-to-point, multicast, and broadcast communications. Messages are not just associative, they are also persistent: each time a new object is created, it receives all messages generated before its creation whose addresses match its own name.

Each object in Shade has a name, a class, and a state. The name is the pattern used to deliver messages. The type defines the object behavior (a Shade program is indeed a collection of classes definitions, where a class is a set of rules). The state is the contents of the multiset associated to the object, implemented as a tuple space. A Shade/Java program consists of a set of classes; each class includes a set of methods composed from a head and body part.

The head is a transaction over the local tuple space. If all operations can be performed, they commit and the body is executed. The head can contain the following operations:

The body of a Shade/Java method can contain the following actions:

...Ciancarini
Dept. of Computer Science, Univ. of Bologna, Pza. di Porta S. Donato, 5, I-40127 Bologna, Italy. mailto:{cianca|vitali|rossi}@cs.unibo.it http://www.cs.unibo.it/{ cianca| rossi}
...Tolksdorf
Technische Universität Berlin, Fachbereich 13, Informatik, FLP/KIT, FR 6-10, Franklinstr. 28/29, D-10587 Berlin, Germany. mailto:{tolk|knoche}@cs.tu-berlin.de http://www.cs.tu-berlin.de/ tolk/
 


Robert Tolksdorf
Thu Nov 21 08:59:47 MET 1996