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). Deployed as a network connecting a set of machines, Tapestry allows any member node to route messages to any other node in the network, given a location and network independent name. Furthermore, Tapestry functions as a decentralized directory service for any objects residing on nodes in the network. A node in a Tapestry network can advertise or "publish" location information about an object it possesses. Any other Tapestry node can then act as a client, and send messages to this object, as long as it knew the object's unique identifier. These messages route through the overlay from node to node until they arrive at the node where the object is stored, such that the path taken is a small factor longer than the shortest path from the client node to the object's location.

Tapestry forms individual machines into a true peer to peer network, without any points of centralization which might become points of failure or attack. Along with other recent research efforts such as Chord, Pastry, Kademlia, Tapestry is an example of a structured peer-to-peer network. More information on structured peer-to-peer networks can be found in a recent paper by Dabek, Zhao, Druschel, Kubiatowicz and Stoica, found here.

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 a nearby 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.

The Tapestry network is extremely resilient to changes in the network. It quickly recovers from large scale membership changes, such as large groups of nodes joining or leaving the Tapestry overlay. In addition, the basic Tapestry interface contains the following operations:

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 new in Tapestry 2.0?
Tapestry Version 2.0 contains the following new functionality:

The Tapestry 1.0 release included the following:


Ben Y. Zhao

July 2, 2003