cs 150 – computing: from ada to the web

36
CS 150 – Computing: From Ada to the Web Communication and Networking

Upload: kyla-gordon

Post on 02-Jan-2016

18 views

Category:

Documents


0 download

DESCRIPTION

CS 150 – Computing: From Ada to the Web. Communication and Networking. What is communication?. Communication is a process that allows people/things/etc to exchange information True communication requires feedback Communication without feedback is broadcasting. Communication has…. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 150 – Computing: From Ada to the Web

CS 150 – Computing: From Ada to the Web

Communication and Networking

Page 2: CS 150 – Computing: From Ada to the Web

What is communication?

• Communication is a process that allows people/things/etc to exchange information

• True communication requires feedback• Communication without feedback is

broadcasting

Page 3: CS 150 – Computing: From Ada to the Web

Communication has…

• Content (what type of things are communicated)

• Source/Sender (by whom)• Form/Format• Channel (through which medium)• Destination/Receiver/Target (to whom)• Purpose

Page 4: CS 150 – Computing: From Ada to the Web

How have we studied communication?

• Language – describing languages through grammars

• Fine Arts – communicating feeling / thought / impression

• Instruction – lecture, office hours, TAs

Page 5: CS 150 – Computing: From Ada to the Web

Spaceship Earth

• Content – what sort of things do we communicate?– What did prehistoric people want to

communicate?

• Who was the source? Who were the recipients?

• What was the format?

Page 6: CS 150 – Computing: From Ada to the Web

Spaceship Earth

• How did content evolve?– Ancient Egypt– Phoenicians– Greeks

• How did the format evolve?• How did the senders / receivers change?

Page 7: CS 150 – Computing: From Ada to the Web

Spaceship Earth

• The First Major Network

• The Roman road system

• “All roads lead to Rome.”

Page 8: CS 150 – Computing: From Ada to the Web

A slightly more modern example

• April 1860 – October 1861• Missouri to California– 10 days– 10-15 miles per horse, ~100 miles per rider

• 400 horses total

Page 9: CS 150 – Computing: From Ada to the Web

What is a network?

• An interconnected group of objects or other networks

• What does it mean for CBS, NBC, and ABC to be networks?

• What is “social networking?” How does this relate to Facebook, etc?

Page 10: CS 150 – Computing: From Ada to the Web

How do we measure networks?

• LatencyTime from sending a bit until it arrives seconds (or seconds per geographic distance)

• Bandwidth How much information can you transmit per time unitbits per second

Page 11: CS 150 – Computing: From Ada to the Web

What’s latency?

• How long does it take for something to get from here to there

• What’s the average latency of a postcard from Virginia to North Carolina?

• What about the latency from Norway to Virginia?

• Why does latency matter?

Page 12: CS 150 – Computing: From Ada to the Web

What’s bandwidth?

• How much stuff can you send “through the tubes”

• Think about it in terms of moving:– Your car can carry less stuff than…– A U-Haul truck, which carries less stuff than…– A tractor-trailer (maximum bandwidth?)

Page 13: CS 150 – Computing: From Ada to the Web

How do we improve?

• Latency– Fewer “stops”– Shorter path– Faster mode of transportation

• Bandwidth– Bigger “tubes”– Fit more stuff in a smaller space

Page 14: CS 150 – Computing: From Ada to the Web

“It’s the network…”

• The Internet

Page 15: CS 150 – Computing: From Ada to the Web

How do you think of the Internet?

Page 16: CS 150 – Computing: From Ada to the Web

How Internet people think

Page 17: CS 150 – Computing: From Ada to the Web

What exactly is the Internet?• “worldwide, publicly accessible series of

interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP)”

• a "network of networks" that consists of millions of smaller domestic, academic, business, and government networks, which together carry various information and services, such as electronic mail, online chat, file transfer, and the interlinked web pages and other resources of the World Wide Web (WWW) - Wikipedia

Page 18: CS 150 – Computing: From Ada to the Web

The Internet vs. USPS

• Addressing – how do you know the sender and receiver?– IP addresses– 192.168.0.1– 127.0.0.1

Page 19: CS 150 – Computing: From Ada to the Web

The Internet vs. USPS

• Addressing– I don’t suppose you know the IP address for

Google, do you?– ICANN – Internet Corporation for Assigned Names

and Numbers– Domain Name System (DNS) servers do the

lookups for us!• How do you do an “address change” or “forwarding

address?”

Page 20: CS 150 – Computing: From Ada to the Web

The Internet vs. USPS

Page 21: CS 150 – Computing: From Ada to the Web

So.. What’s the World Wide Web?

• The World Wide Web (commonly shortened to the Web) is a system of interlinked hypertext documents accessed via the Internet.

• With a Web browser, a user views Web pages that may contain text, images, videos, and other multimedia and navigates between them using hyperlinks.

• The World Wide Web was created in 1989 by Sir Tim Berners-Lee.

Page 22: CS 150 – Computing: From Ada to the Web

The Internet ≠ WWW!

• The Internet is the network– It defines how information travels– It is defined by specific protocols that decide how

information goes from one point to another

• The WWW is a service– WWW traffic is only a portion of the traffic that

flows on the Internet!

Page 23: CS 150 – Computing: From Ada to the Web

Name other Internet services

• What else do you use the Internet for?

Page 24: CS 150 – Computing: From Ada to the Web

How the Internet works

Page 25: CS 150 – Computing: From Ada to the Web

How the Internet works

• Let’s compare with a traditional phone system– Circuit Switching– Ever see those old shows that have phone

operators where they physically move the cable?

• The Internet works differently– Packet Switching– Step-by-step movement through the system

Page 26: CS 150 – Computing: From Ada to the Web

Circuit Switching

• Reserve a whole path through the network for the whole message transmission

• Once you start a transmission, know you will have use of the network until it is finished.

Page 27: CS 150 – Computing: From Ada to the Web

Packet Switching

• Use one link at a time• Interleave messages – send whenever the

next link is free.

Page 28: CS 150 – Computing: From Ada to the Web

Making Packets

• What are packets?• What information can be found in a packet?

Page 29: CS 150 – Computing: From Ada to the Web

Sending packets on their way

• After the program makes a packet, it sends it out over the current open connection

• Where does it go from there?• Routers and packet routing• ACK and SYN– “Hello! Are you there?”• “Yes! I’m here!”

– “Here comes some data!”

Page 30: CS 150 – Computing: From Ada to the Web

One more time…

Page 31: CS 150 – Computing: From Ada to the Web

Not everyone gets an IP

• What happens when we run out of IP addresses?– NAT routing– IPv4 vs IPv6

• Port forwarding

Page 32: CS 150 – Computing: From Ada to the Web

The World Wide Web

• Tim Berners-Lee, CERN (Switzerland)• First web server and client, 1990

• Established a common language for sharing information on computers

• Lots of previous attempts (Gopher, WAIS, Archie, Xanadu, etc.)

Page 33: CS 150 – Computing: From Ada to the Web

World Wide Web Success

• World Wide Web succeeded because it was simple!– Didn’t attempt to maintain links, just a common

way to name things – Uniform Resource Locators (URL)

http://www.cs.virginia.edu/~sherriff/index.phpService Hostname File Path

HyperText Transfer Protocol

Page 34: CS 150 – Computing: From Ada to the Web

HyperText Transfer Protocol

Client (Browser)

GET /cs150/index.html HTTP/1.0

<html><head>…

Contentsof file

Server

HTML HyperText Markup Language

Page 35: CS 150 – Computing: From Ada to the Web

HTML: HyperText Markup Language

• Language for controlling presentation of web pages

• Uses formatting tags – Enclosed between < and >

• Not a universal programming languageProof: no way to make an infinite loop

Page 36: CS 150 – Computing: From Ada to the Web

HTML Grammar ExcerptDocument ::= <html> Header Body </html>Header ::= <head> HeadElements </head>HeadElements ::= HeadElement HeadElementsHeadElements ::=HeadElement ::= <title> Element </title>

Body ::= <body> Elements </body>Elements ::= Element ElementsElements ::=Element ::= <p> Element </p>                             Make Element a paragraph.Element ::= <center> Element </center>                             Center Element horizontally on the page.Element ::= <b> Element </b> Display Element in bold.Element ::= Text What is a HTML interpreter?