24
Tiered Architecture • Technique to organize functionality of a given layer and place this functionality into appropriate servers. • The functional decomposition is as - Presentation Logic : Concerned with user handling - Application Logic: Detailed application –specific processing - Data Logic: persistent storage of application Isha Padhy, Department of CSE 1

System models 2 in distributed system

Embed Size (px)

Citation preview

Page 1: System models 2 in distributed system

Tiered Architecture

• Technique to organize functionality of a given layer and place this functionality into appropriate servers.

• The functional decomposition is as- Presentation Logic : Concerned with user handling- Application Logic: Detailed application –specific

processing- Data Logic: persistent storage of application

Isha Padhy, Department of CSE 1

Page 2: System models 2 in distributed system

2 tier Architecture• Server provides processing and data management; client provides simple graphical

display (thin-client)• At the other extreme, all application processing and some data resides at the client

(fat-client approach)

Isha Padhy, Department of CSE 2

Page 3: System models 2 in distributed system

Two- tier architecture• Advantages:1.Because of tight coupling the application runs faster.2.Low latency in terms of interaction.• Disadvantage:Invoking a part of process from other part across the

process boundary is difficult.• Example- Railway reservation: User is using railway

reservation software, gives input and then sends request to server.

3Isha Padhy, Department of CSE

Page 4: System models 2 in distributed system

3 Tier Architecture

An example of a server acting as client.

-In some applications servers may also need to be clients, leading to a three level architecture. Ex. Web servers that interact with database servers-Presentation logic: UI part of application, allows user to input data.-Application Logic: All business logic is written like data insertion, validation etc-Data Logic: Contains method to interact with database.

Isha Padhy, Department of CSE 4

Page 5: System models 2 in distributed system

De-centralized Architecture• Vertical distribution: Logically different components are

placed on different machines.• Horizontal Distribution/ Peer to peer: All nodes are

independent and work on its share of data set.- Why it was developed?Network and computing resources owned by the users of a service

could also be utilized to support that service.- Two types depending on how to organize the processes in a

n/w.1. Structured2. Unstructured

5Isha Padhy, Department of CSE

Page 6: System models 2 in distributed system

Structured

• N/w constructed using a procedure where processes are organized using distributed hash table(DHT).

• DHT provides a look- up service where (key, value) pairs are stored. Data are assigned a random key from identifier space, nodes are assigned values from the same space.

• Responsibility for mapping from keys to values is distributed among nodes.

• Ex Chord system

6Isha Padhy, Department of CSE

Page 7: System models 2 in distributed system

What is Chord?

• Steps in chord:

1. Find a value:

- Nodes are organized in a ring s.t. data item with key ‘k’ is mapped to node with smallest identifier id~k. This node is called successor of key ‘k’, Succ(k).

- A function is called to lookup for ‘k’ i.e LOOKUP(k) which returns n/w address of succ(k)

2. Node joins a system: process starts with generating a random identifier ‘id’. Node that joins get ‘id’. Node does lookup(id) and gets n/w address of succ(id). Then it inserts itself into ring.

3. Leaving: Node informs its departure to its predecessor and successor and transfers its data to successor of node.

7Isha Padhy, Department of CSE

Page 8: System models 2 in distributed system

8

6

1

2

6

0

4

26

5

1

3

7

2identifiercircle

identifiernode

X key

The Chord algorithm

successor(1) = 1

successor(2) = 3successor(6) = 0

Solves problem of locating a data item in a collection of distributed nodes, considering frequent node arrivals and departures

Isha Padhy, Department of CSE

Page 9: System models 2 in distributed system

9

Node Joins and Departures

6

1

2

0

4

26

5

1

3

7successor(6) = 7

6

1

successor(1) = 3

Isha Padhy, Department of CSE

Page 10: System models 2 in distributed system

Unstructured PTP• Pure P2P: All nodes are of equal ability i.e no nodes have any

infrastructure, ex Gnutella n/w.

• Hybrid P2P: Infrastructure nodes are allowed to exist and are a type of servers, all clients connected to the n/w must connect to one of the servers. ex Napster n/w.

• Centralized P2P: Super-nodes are present in n/w which dynamically service a small subpart of the peer n/w, ex Kazaa n/w.

Requestor node

3

2

1

4

10Isha Padhy, Department of CSE

Page 11: System models 2 in distributed system

Placement of objects and services• Mapping of services to multiple servers: Servers may –1. Partition of set of objects on which service is based2. Replicate copies of them on several hosts• Caching- Cache can be present in client side or proxy servers

that stores the recentlt used data objects• Mobile code- applet code is stored in web server which can be

downloaded to a browser and run.• Mobile agents- Composition of software and data that can

migrate from one system to other.

11Isha Padhy, Department of CSE

Page 12: System models 2 in distributed system

Hybrid Architectures• Edge –Server Systems:- Servers are placed “at the edge” of the network.- Purpose is to serve content after filtering and transcoding

functions to data.

12Isha Padhy, Department of CSE

Page 13: System models 2 in distributed system

Hybrid Arch.

• Collaborative DS

13Isha Padhy, Department of CSE

Page 14: System models 2 in distributed system

Fundamental Model• The purpose is- All relevant assumptions about the DS can be made- With the assumptions what are the possibilities• Aspects to be considered are:- Interaction: Considers the delay time taken by the

message from one process to other.- Failure: Defines and classifies fault so design a system

to tolerate fault.- Security: Analysis of threats to a system is done so that

system resists them.

14Isha Padhy, Department of CSE

Page 15: System models 2 in distributed system

Interaction Model• Two factors affecting interaction of processes in DS are:- Performance of communication channels- -Latency- -Bandwidth- -Jitter : Variation of time within two set of strings

transferred.- Computer clocks and timing events : Two processes

running on different machines have different local time and timestamps. So a global time standard is used.

Time taken by first string of bits to reach destination.

Congestion in networkTime taken by OS services in sending and receiving side.

15Isha Padhy, Department of CSE

Page 16: System models 2 in distributed system

Interaction Model• Two variants of IM- Synchronous DS--Strong assumption of time--Bounds are defined for1. Time to execute each step of a process which has known

lower and upper bounds2. Each message transmitted over a channel is received within

a known bounded time3. Each process has a local clock whose drift rate from real

time has a known bound.- Asynchronous DS:--Makes no assumption of time

16Isha Padhy, Department of CSE

Page 17: System models 2 in distributed system

Failure Model• Defines the way in which failures may occur and

the effects of failures• Types of failures- Failures of processes- Failures of communication channel• Categories of failures- Omission Failures- Arbitrary Failures: - Timing Failures

Process OF

Channel OF

17Isha Padhy, Department of CSE

Page 18: System models 2 in distributed system

Process has crashed i.e halted and will not execute further.

Services execute properly if:1.Processes either execute correctly or stop.2.Follow time- outs i.e. a process allows a fixed

period of time for something to occur.

Process Omission Failures

18Isha Padhy, Department of CSE

Page 19: System models 2 in distributed system

Communication OF

Process p Process q

Communication channel

send

Outgoing message buffer Incoming message buffer

receivem

Failure occurs when a message is not transported from process ‘p’ outgoing buffer to process ‘q’ incoming buffer due to lack of buffer space or n/w transmission error.

19Isha Padhy, Department of CSE

Page 20: System models 2 in distributed system

Arbitrary Failures

• Arbitrarily omits intended processing steps or takes unintended steps.

• Ex , A process may set wrong values in its data items or may return a wrong value in response.

• AF are uncommon in channels.

20Isha Padhy, Department of CSE

Page 21: System models 2 in distributed system

Timing Failures• Synchronous DS:- Failure of clock on process : Process local clock

exceeds the bound on its rate of drift from real time.- Failure of performance on process: Process exceeds

the interval between two steps- Failure of performance on channel: A message’s

transmission takes longer time• Asynchronous DS: Overloaded server may respond

late.

21Isha Padhy, Department of CSE

Page 22: System models 2 in distributed system

Security model

• Security model - Secure processes and channels and protect objects encapsulated against unauthorized access.– Protecting access to objects - Access rights,

authentication of clients– Protecting processes and interactions– Protecting communication channel.

22Isha Padhy, Department of CSE

Page 23: System models 2 in distributed system

Security model

Network

invocation

resultClient

Server

Principal (user) Principal (server)

ObjectAccess rights

Communication channel

Copy of m

Process p Process qm

The enemym’

Protecting objects

Protecting process

23Isha Padhy, Department of CSE

Page 24: System models 2 in distributed system

Protecting channel

• Client and server knows the identity of each other( Authentication Process)

• Secure channel ensures privacy and integrity of data( cryptography process)

• Each message includes a logical timestamp to prevent messages from being reordered.

24Isha Padhy, Department of CSE