18
Internet Communication Models

Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Embed Size (px)

Citation preview

Page 1: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Internet Communication Models

Page 2: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Two Communication Paradigms:Stream vs. Message

Stream Message

Connection-oriented Connectionless

1-1 communication 1-1, 1-many, many-many

Sequence of bytes Sequence of messages

Arbitrary length transfer Limited to 64K bytes

Widely used Multimedia applications

Based on TCP (Guaranteed) Built on UDP (Not Guaranteed)

Page 3: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Message (Connectionless) Transport In the Internet

• The message service does not make any guarantees. A packet may be– Lost– Duplicated– Delayed– Delivered out-of-order

• A programmer who chooses the message service must ensure that the application operates correctly, even if packets are lost or reordered.

Page 4: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Why using message service?

• Fine application-level control over what data is sent, and when

• No connection establishment– Get straight to the point

• No connection state– A server can support more active clients

simultaneously• Small packet header overhead

Page 5: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Some ExamplesApplication TCP or UDP?

E-mail TCP

Remote terminal access TCP

Web TCP

File transfer TCP

Remote file server Typically UDP

Streaming multimedia UDP, TCP

Internet telephony UDP, TCPName translation Typically UDP

TCP today: • >95% Internet traffic• ~75% on-demand and live streaming

Page 6: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Stream (Connection-Oriented) Communication

• Usually, a machine, or a server, is out there waiting for connection calls.– Port is open.

Webbrowser

Web server

Page 7: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Client-Server

Server Software Client Software

Starts first Starts second

No need to know clients (can have access limits)

Must know which server to visit

Passively waits for clients Actively initiates contact

Available most of time Terminated after work

Page 8: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Why Client/Server Structure?• Specialization:

– Clients: user interface and data presentation.– Servers: managing data and providing services.

• Web servers, email server, database server• Type of clients does not matter.

• Sharing:– Many clients can be supported by few servers.

• Google.com – Not just one server, but multiple servers.

Page 9: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Server-Class Machine vs. Server Service• Server-class computers

– Powerful hardware• Speed, bandwidth, storage capacity, etc.

• Server software– Usually hosted in server computers– But can also be run in less-powerful machines

• Windows 7 have several server software running: Remote desktop• Mobile Phone

– Windows PCs v.s. Unix/Linux machines• Windows: clear distinction between client and server

– Few server services in client PCs (Windows 7, XP, etc.)– Windows Server does not have a strong support for client

applications.• Unix/Linux: a machine is both server and client.

– Has both client and server software.

Page 10: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

IP-Ready Devices• Clients and servers do not have to be PC-like devices.

• IP Cameras– Cameras have a web server built in and can have their own IPs.– Can be directly accessed through the Internet.

• http://www.videovalvonta.fi/control/userimage.html

• IP-Enabled home automation– IP-enabled appliance– Smart TV

Page 11: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Peer-To-Peer

• Motivation: Client/Server model create a central bottleneck between the Internet and the server

Page 12: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Peer-To-Peer

• Idea: no dedicated server machine is necessary.– Client machines communicate with each others.

Page 13: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Music Swap: C/S Model

server

Machine A1. I want “Grenade by Bruno Mars”

2. Here it is.

Page 14: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Music Swap: P2P Model

I want “Grenade by Bruno Mars”.My address is …

I want “Grenade by Bruno Mars”.My address is …

Someone wants “Grenade by Bruno Mars”.The address is … Someone wants “Grenade by Bruno Mars”.

The address is …

I have it.

Page 15: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Distinctions

• Client-server– Asymmetric relationship

• Client make requests, and a server simply replies.

– Dedicated servers with server software• Peer-to-peer

– Symmetric relationship• A machine is a server and a client.

– Server software on client machines

Page 16: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Social Consequences

• Intellectual property– Servers can be easily targeted.

• Napster (previous life) failed.

– How about machines in P2P?• MPAA and RIAA against college students• Lawsuits against software developers, website that

index pirated contents, …• Pressures on service providers

– Comcast

Page 17: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

Ch. 3.13 – 3.23

• Concepts related to network programming– Not a concern of midterms.

Page 18: Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage Connection-orientedConnectionless 1-1 communication1-1, 1-many,

After Class

• Read Ch. 4 – Internet applications