Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage...
-
Upload
eleanore-harrison -
Category
Documents
-
view
231 -
download
0
Transcript of Internet Communication Models. Two Communication Paradigms: Stream vs. Message StreamMessage...
Internet Communication Models
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)
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.
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
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
Stream (Connection-Oriented) Communication
• Usually, a machine, or a server, is out there waiting for connection calls.– Port is open.
Webbrowser
Web server
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
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.
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.
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
Peer-To-Peer
• Motivation: Client/Server model create a central bottleneck between the Internet and the server
Peer-To-Peer
• Idea: no dedicated server machine is necessary.– Client machines communicate with each others.
Music Swap: C/S Model
server
Machine A1. I want “Grenade by Bruno Mars”
2. Here it is.
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.
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
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
Ch. 3.13 – 3.23
• Concepts related to network programming– Not a concern of midterms.
After Class
• Read Ch. 4 – Internet applications