distributed resources in cyberspace joel crichlow, ph.d

40
Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Upload: carol-harvey

Post on 23-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Distributed Resources in Cyberspace

Joel Crichlow, Ph.D

Page 2: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Management issues

Naming and AddressingSharingAvailability and ReliabilityReplicationPrivacy and Security

Page 3: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Accessing issues

CommunicationConcurrencyTimeFailure

Page 4: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Naming and AddressingIdentify•node/group/user•root-directory/sub-directory/filename

Locate/FindLocation IndependenceMappingName Servers

Page 5: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Name servers Allocate the address translation responsibilities to a name server

Users use symbolic names with which they interact with the client machines

The clients communicate with a name server which does the name to address resolution

Client

Other

server

Name

Server 1

2

3

Page 6: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Domain Name SystemDistributed Name ServiceMulti-level set of domainsPartitioningReplicationCachingIPv4 (32 bits), IPv6 (128 bits)

Page 7: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

DNSIpv4 address Formats

8 bits 8 bits 8 bits 8 bits Class A

0 Network Host Class B

10 Network Host Class C

110 Network Host Class D

1110 Multicast address Class E

11110 Reserved for future use

Page 8: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

DNS A slow but steady transition to IPv6 is taking place IPv6 is not interoperable with IPv4 therefore a transition technology is needed

Tunneling places IPv6 packets within IPv4 packets

The Dual-stack implementation allows both protocols to run in the same network

v6 v6 V4 v6

Page 9: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Sharing

Access ControlSchedulingAllocationSharing Primary Memory

Page 10: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

SharingAccess Control List – ACL

Per resource list

R – Read, W – Write, E – Execute

ACL for Resource 0

Staff RE

System RWE

Student R

Page 11: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

SharingCapability List – CL

R – Read, W – Write, E – Execute

System Class CL Resource 0 CL

Resource0 Capability with RWE Capability with RWE

Resource1 Capability with RE Capability with RE

Resource2 Capability with E Capability with E

Page 12: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

SharingScheduling• Pool of identical resources• Only one resource

Allocation• Local vs remote resources• Mutually exclusive access• Indefinite postponement

HardwareSoftware• Consistency

Page 13: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Sharing Primary MemoryDistributed Shared MemoryShareable Unit• Physical block• Logical block

SynchronizationConsistency

Page 14: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Availability and Reliability

PerformanceService OutcomesHow ReachableLANWAN

Page 15: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Availability and ReliabilityWAN

◦ The number of possible routes through the network between user and resource

◦ The channel capacity through the various communication links

◦ The communication protocols employed

Page 16: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Availability and ReliabilityProcessor and Memory Upgrades

◦Faster Processor◦More Memory◦Caches◦Secondary Memory

Page 17: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Caching

Locality principleCache consistencyCacheable and non-cacheable dataMemcached

Page 18: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Availability and Reliability

Software Design

SERVER

queue

client client client

Page 19: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Availability and ReliabilityDatabases

◦ Partitioning◦ Replication◦ Replicated Dictionary◦ Queries and Sub-queries

Example QueryMake a reservation for Dorothy Swift on a red sports car to be picked up in New York on (date and time given), a small hatch-back to be picked up by Jill Plain in Los Angeles on (date and time given) and a station wagon for Jack Baggage in London on (date and time given).

Page 20: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Availability and Reliability• Find the relevant relations (or objects) quickly.• A replicated dictionary is required.• Once the relations (objects) are located, a decision must be

made quickly on what should be shipped.• The request can be split into three sub-queries.

Page 21: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

ReplicationMaintaining copies of resources at separate nodes in the network can:• Improve the pattern of communication traffic• Help load sharing• Reduce response times• Offer an alternative when a resource becomes

unavailable

Page 22: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Replication How many Copies?

Replicas as members of a Group

Membership Service◦ CreateGroup◦ JoinGroup◦ LeaveGroup◦ A member may leave the group voluntarily or through

failure

Page 23: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Privacy and SecurityProtectionCryptographySecret Key CryptographyPublic Key CryptographyDigital Signatures

Page 24: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

CryptographyBlock diagram of cryptographic message transfer from A to B

Secret Key Distribution

Public Key Authentication

key, plaintext

Encryption algo.

ciphertext

Principal A

ciphertext

Decryption algo.

plaintext

Principal B

key

Page 25: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Digital SignaturesVerification of electronic documentPublic key cryptography provides a simple mechanism for digital signaturesPrincipal A can send a signed message M to principal B with two levels of encryption as follows: EKB{DKA{M}}

Page 26: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

CommunicationRemote Procedure Call (RPC)Remote Method Invocation (RMI)Message Passing• MPI

Sockets and Streams

Page 27: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Remote Procedure Call (RPC)RPC with five modules: • Client, Client-stub, Server, Server-stub and Communications Package

Synchronous

Parameter marshalling

Client

Client

stub

Server

Server

stub Com. package

Com. package

Client Machine Server Machine

Page 28: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Message Passing

a b

Port 1Port2 Kernel

• A sends message to B via Port 2.• B sends message to A via Port 1.• A and B each polls its port to receive

message.

Page 29: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

ConcurrencyCritical SectionsDistributed DeadlockTimestampsTwo-Phase LockReplica Control• Pessimistic• Optimistic

Page 30: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Concurrency Timestamps

◦ Time stamping is a mechanism for enforcing ordered access to shared resources

Two-Phase Lock◦ In the first phase a process must acquire locks on all the

required resources◦ In the second phase the locks are released◦ Centralized Lock Controller

Page 31: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

ConcurrencyReplica ControlPessimistic, OptimisticMajority ConsensusVotingPrimary Node

Page 32: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

TimeLogical Clocks

◦ Happened before◦ Within any sequential process it can be observed that an

event a happened before an event b◦ If event a is the sending of a message from one process

and event b is the receiving of that message by another process then a happened before b

Page 33: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

TimePhysical ClocksUniversal Coordinated Time (UTC)Time ServerCristian’s algorithmThe Berkeley algorithmNetwork Time Protocol (NTP)

Page 34: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

FailureLost MessagesFailed Nodes• Stateless Node• Atomic Update• Available Copies

Partitioning

Page 35: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Lost messagesA message is considered lost by the sender if an outcome associated with the receipt of that message has not materialized.The lost of messages is normally dealt with by setting time-out intervals and re-sending the message some number of times.Sequentially numbering (or timestamping) the messages is a useful technique that can be employed to distinguish messages.

Page 36: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Lost messagesWhat is the allowable range of sequence numbers?For how long can a message get stuck somewhere in the network and then turn up at your ‘doorstep’?How many timestamps of received messages will have to be saved in order to be able to spot the duplicate messages?What if a node crashes and loses its record of numbers?

Page 37: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Failed nodesCrash failure while participating in a ‘resource access’ operationFailed node is a coordinator or leaderStateless nodeAtomic update• Two phase commit

Available copies (AC) protocol• Allows read access to any copy and write access to all

available copies

Page 38: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

FailurePartitioning

broken link

a

c

b

d e

failed

node

e d

c

a b

Page 39: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

FailurePartitioning

◦ Distinguished Partition◦ Quorum or Vote adjustment◦ Dynamic Voting◦ Dynamic Linear◦ Optimistic schemes

Page 40: Distributed Resources in Cyberspace Joel Crichlow, Ph.D

Conclusion We looked at:

Managing Distributed Resources◦ Naming and Addressing◦ Sharing◦ Availability and Reliability◦ Replication◦ Privacy and Security

Accessing Distributed Resources◦ Communication◦ Concurrency◦ Time◦ Failure