24
Grapevine CS-4513, D-Term 2007 1 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

  • View
    233

  • Download
    1

Embed Size (px)

Citation preview

Page 1: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 1

Introduction to theGrapevine Distributed System

CS-4513Distributed Computing Systems

Page 2: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 2

Grapevine

• A distributed system for e-mail and other distributed activities

• Implemented at Xerox PARC in ~1978-80• Deployed throughout company• Productized in Xerox 8000 series office systems

• Predates most Internet mail systems• Embodies many principles of distributed

computing systems

• …

Page 3: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 3

Grapevine (references)

• …

• Birrell, et. al., “Grapevine: An Exercise in Distributed Computing,” Communications of ACM, vol. 25, #4, April 1982, pp 260-274. (pdf)

• Schroeder, et. al., “Experience with Grapevine: The Growth of a Distributed System,” ACM Transactions on Computer Systems, vol. 2, #1, Feb 1984, pp 3-23. (pdf)

Page 4: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 4

Goals

• Delivery mechanism for large, dispersed e-mail system

• Previous e-mail system were time-sharing based

• (now) Familiar model• Senders• Recipients• Distribution lists• Buffered delivery• Independent clients (e-mail agents)

Page 5: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 5

Design Goals

• No assumptions about …• Message content

• Client correctness

• Message delivery guarantee• If accepted, message would be delivered to

recipient’s inbox

• or … returned with error

• Failure of server unavailability of service

• Decentralized administration

Page 6: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 6

Key Components

• Registration Data Base• Distributed

• Replicated

• Recursively implemented

• Message Delivery System• Transports, buffers, delivers

• Expands distribution lists

• Distributed

• Replicated

Page 7: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 7

Issues Exposed by Grapevine

• Reliable Transport and Storage

• Synchronizing and Ordering of Operations

• Fault-tolerance

• Consistency and Replication

• Security and Authentication

• …

Page 8: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 8

Registration Database

• {RName, value} pairs• Two types of entry

• Individual

• Group

• Group entry• value = list of RNames — i.e., the group members

• May be distribution list, resource list, access control list, etc.

• Individual entry• value = [authenticator, ordered inbox list, contact site, …]

• May be human users, servers, etc.

Page 9: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 9

Organization

• Registry• Subset of the registration database entries

• Organizational, geographic, or other convenient partition

• RName – two-part name Name.R• R is a registry

• Name is a unique name within that particular registry

• (Easily expandable to three part names or more)

Page 10: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 10

Functions Provided by Grapevine Service

Delivery services:–

• Accept message:• [sender, password, recipients, message-body] ok

• Message polling:• [individual] {empty, non-empty}

• Retrieve messages:• [name, password] sequence of messages ok

• …

Page 11: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 11

Functions Provided by Grapevine Service (continued)

Registry services:–• Authenticate:

• [individual, password] {authentic, bogus}

• Membership:• [name, group] {member, non-member}

• Resource location:• [group] members

• [individual] contact site

• [individual] ordered list of inbox sites

• …

Page 12: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 12

Grapevine Server

• Contains both Registration and Message servers• Independent of each other

• Communicate only by internet protocols

• Registration server• Contains replicas of one or more Registries

• Can accept change request for any of its registries

• Propagates changes to other replicas of Registry

• Message server• Accepts any message for delivery

• Stores inboxes for some individuals

• (Individuals typically have more than one inbox)

Page 13: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 13

Grapevine “User Package”

• Library code for Grapevine client programs• E-mail clients

• Other kinds of distributed applications

• Handles all naming and addressing issues• Clients never need to know name or address of any

Grapevine server

• Servers optimized based on “User Package”

Page 14: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 14

Grapevine Operation

• User P.Q sends message to user X.Y• User X.Y wants authenticated access to server E

Page 15: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 15

Message Delivery

• Find Message service• Present [sender, password, recipients] to service

• Authenticates sender

• Validates recipients

• (Assume valid if recipient registry not available)

• Construct envelope (aka property list)• Sender Name, Return-to, recipient list, postmark

– Postmark = [server internet addr, server time stamp]

• Accept message-body• Store envelope & message body in reliable storage

• Acknowledge receipt of message

Page 16: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 16

Message Delivery (continued)

Transport system

• Recursively enumerate groups in destination list• Find inbox server contact for each recipient• Sort by server, transmit one copy to each server with list of

recipient names• Duplicate elimination done at receiving server

– E.g., an individual a member of more than one group

• Queue if all servers down or inaccessible

• Receiving client polls all its inboxes– Downloads from each– Message deleted from inbox only after receipt is acknowledged

Page 17: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 17

Replication in Message Delivery

• Any server can accept a message for delivery

• Individuals typically have more than one inbox

• However,– Crashes can delay messages in transit.

Page 18: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 18

Registration Database

• gv registry• Replicated in all registration servers

• Groups in gv • Names of registries• Members are RNames of registration servers holding

replicas of the group registry

• I.e.,• reg is a Registry iff there is a group reg.gv• Server holds a replica of reg iff its name is in reg.gv

Page 19: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 19

Registration Database (continued)

• gv.gv is a group in gv registry• Its members are RNames of all registration servers

• Adding a registration server adding a member to gv.gv

• Adding a new registry r adding a new group entry r.gv to gv registry

• Members of r.gv are a subset of gv.gv

Page 20: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 20

Registration Database (continued)

• Used to locate resources– Service is a group in the database

• Members are RNames of servers

– Servers are individuals in the database• Contact site is internet address of server

• To find foo.bar1. Contact local Grapevine server, ask for bar.gv2. Enumerate members, contact one of them, and ask

for foo.bar

Page 21: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 21

Finding the first Grapevine Server

• Ask another name service (e.g., DNS) for GrapevineRServer

• Returns a list of addresses

• List changes very infrequently

or

• Broadcast to well-known socket on LAN• Local Grapevine servers listen on socket

• Usually quicker

Page 22: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 22

Summary

• Names in Grapevine• People

• Services

• Servers

• Anything else you want them to be

• Registry maps names to …• Groups (i.e., a list of other names)

• Individuals (something with an address and/or other properties)

Page 23: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 23

Summary (continued)

• Highly replicated• Registries exist in multiple servers• Individuals have more than one mailbox• Mail can be delivered to anywhere for any recipient• Registry used to manage itself!

• Distributed System issues to be addressed• Synchronizing and Ordering of Operations• Fault-tolerance• Consistency and Replication• Security and Authentication

Page 24: GrapevineCS-4513, D-Term 20071 Introduction to the Grapevine Distributed System CS-4513 Distributed Computing Systems

GrapevineCS-4513, D-Term 2007 24

Break

Next Topic