Top Banner
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes
41

INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

INF 123 SW ARCH, DIST SYS & INTEROP

LECTURE 3

Prof. Crista Lopes

Page 2: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Objectives

Distributed Systems recap Computer networks history competency OSI model competency TCP competency

Page 3: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Recap

Page 4: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Definition: Architecture

“Set of principal design decisions” “Design decision” implies design options Not all design decisions are architectural in

nature “principal” depends on

Goals Perspectives

Design decisions may change over time Architecture may change over time

Two fundamental points Every system has an architecture Every system has at least one architect

Page 5: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

“Architecture” in software systems Software architecture: set of principal design decisions

regarding the software itself System architecture: set of principal design decisions

regarding the system’s concepts and operation Deployment architecture: set of principal design

decisions regarding the mapping between software and hardware

Testing architecture: set of principal design decisions regarding the testing procedures and tools

Usability architecture: set of principal design decisions regarding the user experience

Page 6: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Usability Architecture:The VW operators perspective

Simulator(OpenSim.exe)

Configuration

(OpenSim.ini)ROBUSTServices

(OpenSim.Server.exe)

Configuration

(OpenSim.Server.ini)

Client(Hippo,

etc.)

Client(Hippo,

etc.)…

DB

Page 7: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Deployment Architecture(s)

Simulator

DBStandalone

Simulator

DBROBUSTServices

Grid

Simulator Simulator Simulator

Simulator

DB

Serverless Grid

Simulator Simulator Simulator

Page 8: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

System Architecture

AssetService

Authentication

Service

AvatarService

VoiceService

Gatekeeper

Service

GridService

Grid UserService

InventoryService

LoginService

PresenceService

User AccountsService

User AgentsService

Physics Engine

Script Engine

Scene Manageme

nt

ClientProtocol

Stack

ClientProtocolStacks

ModuleLoader

HTTPHandlers

… …

Service Infrastructure

Simulator

C# HTTP

Server

LibOMV

ODE

log4net

MonoAddins

MySql

SQLite

OpenJPEG

External Dependencies

DB

Service Connectors

Page 9: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Software Architecture

Framework

Framework.Servers

Framework.Servers.HttpServe

r

Region.Framework

Region.Framewor

k.Scenes

Region.Framework.Interfaces

Region.CoreModul

es

Region.Physics.Manager

Region.Physics.

ODE…

Services.Interfaces

S S S…

UML diagram would do fine too

Page 10: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Main Points

Many architectures, not just one! Main focus of this course:

Well-known system architectures Secondary focus:

“Good” software architectures

Page 11: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Lecture 3

Page 12: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Distributed System

“Collection of interacting components hosted on different computers that are connected through a computer network”

Component1

Component n

Hardware

Network OS

Host 3

Component1

Component n

Hardware

Network OS

Host 2

Component1

Component n

Hardware

Network OS

Host 1

Network

Page 13: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Examples

Email FTP Web SETI @ Home MMOs …

Page 14: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Non-Distributed Systems

Notepad Tetris … …

No interaction with other components on the network

These days they are rare…

Page 15: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Consequences of distribution

(Unavoidable) Network latency Vulnerability

(Happens) Resource contention Heterogeneity

All this makes things more complicated but a lot more powerful

Page 16: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Computer Networks

The problem, c. 1958: How to exchange data between the

computer at UCLA to the computer in Berkeley

The problem, c. 1968: How to exchange data between a computer

at UCLA and the 10 others computers out there

The problem, c. 1978: How to exchange data between all the

computers that were popping up everywhere

Page 17: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Early Computer Comms

Acoustic modems Point2Point (<3 acousticmodems) Circuit

switchingnetworks

Page 18: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

ARPANET

Precursor of the Internet First packet-switching network First successful operation in 1969, 4

nodes

Page 19: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.
Page 20: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

htt

p:/

/ww

w.o

pte

.org

/maps/

The Internet, c. 2005

Page 21: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

The Origins of the Internet

Heterogeneous computers Decentralized control Many interested players

Page 22: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

OSI Model

“Open Systems Interconnect”, c.1977 An architecture for engineering the

nodes of large-scale computer networks, including the Internet Layered architecture

Emerged from experiences with ARPANET

Page 23: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

OSI ModelIm

age c

ourt

esy

of

The A

bdus

Sala

m

Inte

rnati

onal C

entr

e f

or

Theore

tica

l Ph

ysi

cs

Page 24: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Physical Layer

This layer conveys the bit stream - electrical impulse, light or radio signal -- through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier, including defining cables, cards and physical aspects.

Page 25: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Data Link Layer

At this layer, data packets are encoded and decoded into bits. It furnishes transmission protocol knowledge and management and handles errors in the physical layer, flow control and frame synchronizationThe data link layer is divided into two sub layers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. The MAC sub layer controls how a computer on the network gains access to the data and permission to transmit it. The LLC layer controls frame synchronization, flow control and error checking.

Page 26: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Network Layer

This layer provides switching and routing technologies, creating logical paths, known as virtual circuits, for transmitting data from node to node. Routing and forwarding are functions of this layer, as well as addressing, internetworking, error handling, congestion control and packet sequencing.

Page 27: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Transport Layer

This layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control. It ensures complete data transfer.

Page 28: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Session Layer

This layer establishes, manages and terminates connections between applications. The session layer sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It deals with session and connection coordination.

Page 29: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Presentation Layer

This layer provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa. The presentation layer works to transform data into the form that the application layer can accept. This layer formats and encrypts data to be sent across a network, providing freedom from compatibility problems. It is sometimes called the syntax layer.

Page 30: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Application Layer

This layer supports application and end-user processes. Communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified. Everything at this layer is application-specific. This layer provides application services for file transfers, e-mail, and other network software services. Telnet and FTP are examples.

Page 31: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

The shape

Data size

Page 32: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

OSI Model in Action

Your laptop

DBH wirelessrouter

UCI routers Google routers

Google server

Page 33: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

In reality

Boundaries are fuzzy

Page 34: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Another shape of the Internet

Network LayerTransport Layer

Diversity

Diversity

Page 35: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

This course

Page 36: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Transport Layer

Two dominant protocols Transmission Control Protocol (TCP) User Datagram Protocol (UDP)

Page 37: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

TCP

Conceived c. 1974, Vint Cerf & Bob Kahn Connection-oriented Guarantees delivery of a data stream

sent from one host to another without duplication or losing data. Reliability over performance Not particularly suitable for real-time

applications such as Voice over IP or RT gaming

Protocol upon which the Web (HTTP) operates

Page 38: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

TCP Header

Page 39: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

Ports vs. IP Addresses

Component1

Component n

Hardware

Network OS

Host 3

Component1

Component n

Hardware

Network OS

Host 2

Component1

Component n

Hardware

Network OS

Host 1

Network

Ports

IP Addresses

Page 40: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

TCP main idea

Large data

Component1

Hardware

Network OS

Host 1

Componenta

Hardware

Network OS

Host 2

Page 41: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 3 Prof. Crista Lopes.

TCP main idea

Large data

Host 1 Host 2

ListenConnect Packet 1

Ack1

If packets don’t get ack’ed within a period of time, Host 1 resends them