1 netprog 2002 network terminology motivation, terminology, layered systems (and other random stuff)

29
1 Netprog 2002 Network Terminology Netprog 2002 Network Terminology Motivation, Motivation, Terminology, Layered Terminology, Layered systems systems (and other random (and other random stuff) stuff)

Post on 15-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

1Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Motivation, Terminology, Motivation, Terminology, Layered systems Layered systems

(and other random stuff)(and other random stuff)

Page 2: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

2Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

History and MotivationHistory and Motivation

First stored-program computer: 1949 ARPANet 56Kbps: 1970 TCP/IP: 1972 IBM Personal Computer: 1981 Local Area Networks: 1982 World-Wide Web: 1989 Java: 1995

Page 3: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

3Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

History and MotivationHistory and Motivation

Early computers were highly centralized.– Single point of failure– User has to “go to” the computer.

Proliferation of low cost computers made it possible to get past these 2 primary disadvantages (with a network).

Page 4: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

4Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

MotivationMotivation

Sharing of resources is more efficient Price/Performance Use each piece of equipment for what it

is best at Centralize administration Computers as communication tools

Page 5: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

5Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Rates of GrowthRates of Growth Moore’s Law

– “Number of transistors in chips doubles every 18 months”.

Every 10 years, processors are 100 times more powerful.

Gilder’s Law– “Bandwidth grows at least three times faster than

computer power”. Assuming bandwidth doubles every 12 months;

every 10 years, it is 1000 times better.

Page 6: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

6Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Computer Networks are now Computer Networks are now everywhereeverywhere

PCs <-> Mainframes

Automated Tellers

Embedded Systems

Communications Systems

The Internet

Page 7: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

7Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Networked Computers - Networked Computers - Traditional UsesTraditional Uses

Communication (email) File exchange, disk sharing Sharing peripherals (printers, tape

drives) Remote execution

Page 8: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

8Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

New(er) Uses for Networked New(er) Uses for Networked ComputersComputers

Entertainment, distributed games– MP3s!

Commerce– Automation of business processes

Collaborative computing– Homework Submission

Worldwide Computing

Page 9: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

9Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Wide variety of types of Wide variety of types of networks networks

circuit switched– telephone system

packet switched:– The Internet (TCP/IP)

Page 10: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

10Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Network ModelsNetwork Models

Using a formal model allows us to deal with various aspects of Networks abstractly.

We will look at a popular model (OSI reference model).

The OSI reference model is a layered model.

Page 11: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

11Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

LayeringLayering

Divide a task into pieces and then solve each piece independently (or nearly so).

Establishing a well defined interface between layers makes porting easier.

Major Advantages: Code Reuse Extensibility

Page 12: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

12Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Layering Example: Federal Layering Example: Federal ExpressExpress

Letter in envelope, address on outside FedX guy adds addressing information,

barcode. Local office drives to airport and

delivers to hub. Sent via airplane to nearest city. Delivered to right office Delivered to right person

Page 13: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

13Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Letter

FedX LayersFedX LayersLetter Addressed

Envelope

Addressed Envelope

Page 14: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

14Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Layered Software SystemsLayered Software Systems

Network software

Operating systems

Windowing systems

Page 15: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

15Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Unix is a Layered SystemUnix is a Layered System

Applications

Libraries

System Calls

Kernel

Page 16: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

16Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

OSI Reference ModelOSI Reference Model

The International Standards Organization (ISO) proposal for the standardization of the various protocols used in computer networks (specifically those networks used to connect open systems) is called the Open Systems Interconnection Reference Model (1984), or simply the OSI model.

Page 17: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

17Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

OSI Model OSI Model

Although the OSI model is a just a model (not a specification), it is generally regarded as the most complete model (as well it should be - nearly all of the popular network protocol suites in use today were developed before the OSI model was defined).

Page 18: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

18Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

OSI <-> Network SoftwareOSI <-> Network Software

Although this course is about network programming (and not about networking in general), an understanding of a complete network model is essential.

We will look at the OSI Reference Model in detail.

Page 19: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

19Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

OSI 7 Layer Model:OSI 7 Layer Model:

7 Application

6 Presentation

5 Session

4 Transport

3 Network

2 Data-Link

1 Physical

High level protocols

Low level protocols

Page 20: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

20Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Simplified Network ModelSimplified Network Model

Process

Transport

Network

Data Link

Process

Transport

Network

Data Link

Interface Protocols

Peer-to-peerProtocols

Page 21: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

21Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

What’s a Protocol?What’s a Protocol?

An agreed upon convention for communication.– both endpoints need to understand the

protocol. Protocols must be formally defined and

unambiguous! We will study lots of existing protocols

and perhaps develop a few of our own.

Page 22: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

22Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Interface andInterface andPeer-to-peerPeer-to-peer

ProtocolsProtocols

Interface protocols describe the communication between layers on the same endpoint.

Peer-to-peer protocols describe communication between peers at the same layer.

Process

Transport

Network

Data Link

Process

Transport

Network

Data Link

Interface Protocols

Peer-to-peerProtocols

Page 23: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

23Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Thought ExerciseThought Exercise

Come up with an example of a layered system.

Describe the interface and peer-to-peer protocols for your example.

Page 24: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

24Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Programs & ProcessesPrograms & Processes

A program is an executable file. A process or task is an instance of a

program that is being executed. A thread is a light-weight process. A single program can generate multiple

processes or contain multiple threads.

Page 25: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

25Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Client - ServerClient - Server

A server is a process - not a machine !

A server waits for a request from a client.

A client is a process that sends a request to an existing server and (usually) waits for a reply.

Page 26: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

26Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Client - Server ExamplesClient - Server Examples

Server returns the time-of-day.

Server returns a document.

Server prints a file for client.

Server does a disk read or write.

Server records a transaction.

Page 27: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

27Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

ServersServers

Servers are generally more complex (more interesting).

2 Basic types of servers: Iterative - server handles one client at a

time. Concurrent - server handles many clients

at a time. We will study the differences later.

Page 28: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

28Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Peer-to-peer ComputingPeer-to-peer Computing

Clients are also servers, a.k.a. servents.

Decentralized control.

E.g., Gnutella, Freenet.

Page 29: 1 Netprog 2002 Network Terminology Motivation, Terminology, Layered systems (and other random stuff)

29Netprog 2002 Network TerminologyNetprog 2002 Network Terminology

Java and MultithreadingJava and Multithreading

In Java, it is possible to create multithreaded programs.

The java.lang package contains a Thread class.

The java.lang.Object class contains internal locks for thread synchronization.