Background
What is Tapestry?
I'll begin by giving a brief introduction to the
Tapestry
project, and some information about this particular release of the Tapestry
code. First, Tapestry is a peer to peer, wide-area decentralized routing
and location network infrastructure developed at University of California
at Berkeley by Zhao et al. To be more specific, Tapestry is an overlay
network that sits at the application layer (on top of an Operating System).
When deployed on separate machines in the network, Tapestry allows any
node to route messages to any other node in the network, given a location
and network independent name. Furthermore, any node in a Tapestry network
can advertise or "publish" location information about objects it possesses,
in a manner such that applications on other Tapestry nodes can find these
objects easily and efficiently, given the object name. Tapestry forms
individual machines into a true peer to peer network, without any points
of centralization which might become points of failure or attack.
What can it do?
So what does Tapestry do for application writers? Well, Tapestry
provides an efficient way for nodes to communicate across an overlay network,
without regard to the underlying IP network topology. Nodes send
messages to each other based on an unique name, generated from a secure
one-way hash of some unique string (such as your email address, your PGP
public key, or your work address). Once a Globally Unique IDentifier
(GUID) is chosen for your node, messages are delivered to you in a fault-resilient
fashion (see the Tapestry TR for details) regardless of where you are, provided
you have inserted yourself into the Tapestry network. The other key
functionality of Tapestry, effcient object location, allows Tapestry nodes
to find the nearest copy of any object in the network, given the object's
unique ID. Furthermore, object location is lightweight, making it easy
to leverage it for application functionality.
In addition to supporting the insertion and removal of nodes from the network,
the basic Tapestry interface contains the following types of messages:
- TapestryPublishMsg ( ObjectGUID )
- TapestryUnpublishMsg ( ObjectGUID )
- TapestryRouteMsg ( NodeGUID )
- TapestryLocateMsg ( ObjectGUID )
Tapestry offers fault-resilient mechanisms for both object location and
point to point message delivery. For object location, Tapestry generates
a small number of deterministic and independent GUIDs for each object. An
object server publishes an object's availability on all of its GUIDs, and
a client issues Tapestry locate requests for all of the object GUIDs in
parallel. This greatly increases availability under fault conditions,
while improving general performance and reducing performance variability.
For point to point message delivery, Tapestry provides pre-calculated
backup routes at each overlay hop. UDP soft-state beacons measure
up-to-date link conditions. Tapestry uses such information and simple fault-avoidance
protocols to route messages around failures, providing successful delivery
with high probability if a path between the endpoints exists.
An illustrative example application
I will now give an example of how Tapestry location and routing can be
combined to providing an interesting network application. One of
the current applications we are developing on top of Tapestry is Shuttle,
a fault-resilient decentralized instant messaging application. I'll
give a quick run through of some Shuttle operations, and show how it leverages
Tapestry functionality to provide an interesting network service.
Shuttle is a fault-resilient, decentralized chat service. When a
new user logs on, the local Shuttle client authenticates the user against
a password entry stored in the distributed network via OceanStore or a similar
file system. After authentication, Tapestry retrieves the user preferences
and contact list, from either an encrypted local store or a distributed service
such as OceanStore. Users signing on publish themselves as available
objects on the local Tapestry node, and locate other available users by doing
object location via Tapestry. Finally, users can use Tapestry to choose
and distribute replicas of encrypted offline messages which can be found
and retrieved the next time a user logs on.
What's in this release?
Tapestry Version 1.0 contains the following functionality:
- Basic Tapestry Java code running on the SEDA stage-driven event model
- Tapestry node insertion
- Using a static configuration built from configuration files
- Using the dynamic iterative insertion of single nodes to existing
Tapestry networks
- Support for multiple backup links per route entry
- Object location
- Object publication with optional tags
- Object location with optional tags
- TapestryFailure messages returned upon the failure of a TapestryLocateMsg
- Message routing
- Routing messages to an exact GUID match
- Routing messages to the node closest in ID to a given GUID
- An initial self-optimizing componentthat monitors link conditions
to decide when to use backup routes
Ben Y. Zhao
ravenben@cs.berkeley.edu
April 5, 2002