Siena (v.1.5.5) API documentation

Siena 1.5.5 API Documentation

This is the documentation of the implementation of Siena for the Java language.

See:
          Description

Packages
siena Core components of the Siena API and server
siena.comm Communication mechanisms used by Siena.

 

This is the documentation of the implementation of Siena for the Java language.


Copyright © 2000-2005 University of Colorado. Copyright © 2005-2008 Antonio Carzaniga.
Author: Antonio Carzaniga.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Please, send comments, suggestions, complaints about this documentation to Antonio Carzaniga <(firstname.lastname@unisi.ch)>.


Basics

Siena is a publish/subscribe service. The abstract interface of Siena is embodied in the Siena interface. An application typically uses an implementation of the Siena interface to publish Notifications or to subscribe for some notifications of interest.

Notifications

An event notifications is a set of named attributes. Each attribute has a type and a value (see AttributeValue). For example:

string stock "XYZ"
int quantity 2500
float price 3.1415

Attribute names must be unique in a notifications.

Selection Mechanisms for Subscriptions

Siena offers two kinds of selection mechanisms:

How Notifications are Delivered to Subscribers

A subscriber must implement the Notifiable interface. Siena delivers notifications to a subscriber by calling the notify method on the subscriber object. Notifiable has two variants of the notify method: notify(Notification n) is called to notify a single notification, while notify(Notification s[]) is called to notify a sequence of notifications.

A subscriber must provide both implementations, even if it will never receive sequences of notifications. In this case, the subscriber can implement:

    public void notify(Notification[] s) {};

How to Set Up a Siena Service

How to Access the Siena Service

Objects can publish or subscribe by accessing an implementation of Siena. Their Siena access point can also be connected to a larger network of Siena servers. There are two ways to access the Siena service:

How to Set Up a Network of Siena Servers

You can run a stand-alone Siena server with StartServer. For example:

    java siena.StartServer -port 4321 -master tcp:host.domain:5432
starts up a Siena server, on the local host, using port 4321, and connecting it to another Siena server running on host "host.domain" on port 5432.

This building block can be used to create a network of servers (with a hierarchical topology). It is important to create the network of Siena servers according to the topology of the underlying network. For example, suppose you have an existing topology of servers, one running in the cs.colorado.edu domain and one running at ics.uci.edu, and suppose you want to run another server at cs.colorado.edu, then the obvious thing to do is to connect it to the server running at cs.colorado.edu.

Examples

You can find an example of a simple interested party in InterestedParty.java, and a simple object of interest in ObjectOfInterest.java.


Siena (v.1.5.5) API documentation

Copyright © 2000-2005 University of Colorado.
Copyright © 2005-2008 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga