4. The SERVER and the CLIENT
Bob’s PC
(client)
Big computer(s)
(server)
Network
Alice’s Mac
Traffic control
Big computer (client)
(router)
Big computer (server)
(server)
Joe’s iPhone
(client)
This is a NETWORK
“NET” for short
Sunday, September 23, 2012
11. Clients and Servers use a common
“language” to talk to each other
The Internet Protocol (IP)
Sunday, September 23, 2012
12. Servers and Clients need
a unique identifier
to address each other
This ID has to be unique
in the whole WORLD
Sunday, September 23, 2012
13. The IP address
something like
192.54.43.89
( from 0.0.0.0 to 255.255.255.255 )
Sunday, September 23, 2012
14. The SERVER and the CLIENT
Bob’s PC
(client) 3
9.3
8.34 5.1 45.8
.8
8 5.45
Big computer(s)
(server)
Network
Alice’s Mac
Traffic control
Big computer (client)
(router)
Big computer (server) 3.1 .134
99.3
(server)
5.1 8.34
65.4
28.4
45 . 88.1
Joe’s iPhone
(client)8.1
This is a NETWORK 45. 5.11
“NET” for short
Sunday, September 23, 2012
15. Those addresses are
a finite resource
( 4,294,967,296 )
Sunday, September 23, 2012
16. Last week, Europe
officially ran out of IP
addresses
(ooops...)
Sunday, September 23, 2012
18. The new hot thing is
IP Version 6
Slow and painful adoption
Sunday, September 23, 2012
19. IPV6, the big promise:
we will never have the
shortage problem again
128
(2 addresses )
Sunday, September 23, 2012
20. Numbers?
192.19492.1011.234
290.929.492.92992 3
923.23902.202.203.3
NOT FUNNY!
Numbers are for computers,
not for humans
Sunday, September 23, 2012
21. Luckly, we (the clients) can
address servers by their
“human name”
Sunday, September 23, 2012
22. The URL
Uniquely identifies a resource out there
A resource can be any of this things:
An image
A web page
A pdf document
A javascript file
A zip archive
...
Sunday, September 23, 2012
24. http://www.example.com/index.html
Protocol “human” server name Resource
(How?) (Where?) (What?)
( See? No numbers! )
Sunday, September 23, 2012
25. When you say
“I’ll give you the link of that web page”
what you actually mean is
“I’ll give you the URL of that web page”
Sunday, September 23, 2012
26. http://www.example.com/index.html
resolved as...
187.78.32.45
http://187.78.32.45/index.html
is valid as well
Sunday, September 23, 2012
27. DNS
(Domain Name System)
Translates server names to IP addresses
(and viceversa)
It’s a server itself, and for obvious
reasons can be addressed only by its
IP address
Sunday, September 23, 2012
28. “I need a kitten”
www.google.com?
DNS YOU 1
192.16.45.32!
192.16.45.32
DNS
YOU 2
SEARCH.HTML
“cute cats”
DNS YOU 3
cute cats pages
Sunday, September 23, 2012
29. About DNS...
Google offers its own, free for all:
8.8.8.8 or 8.8.4.4
If you mistype a server name
you MUST receive a “Server not found” error.
If not, then your Internet Provider is tricking you
(so, use the Google DNS servers)
Sunday, September 23, 2012
30. Internet is all about
SERVICES
(provided by... servers)
Sunday, September 23, 2012
31. A service is something you use to...
read a web page
upload a file
receive an email
send an email
watch a video
chat with a friend
Sunday, September 23, 2012
32. In order to use the service,
you need to TALK to a server
using a well understood
LANGUAGE
Sunday, September 23, 2012
34. The protocol stack
Application Protocol
Internet Protocol
Electricity
Sunday, September 23, 2012
35. We define the service by
the application protocol it uses
read a web page, via HTTP or HTTPS
upload a file, via FTP
receive an email, via POP3 or IMAP
send an email, via SMTP
watch a video, via RTMP
chat with a friend, via XMPP
Sunday, September 23, 2012
36. Internet protocols specification
must be OPEN
(hey, it’s MY data!)
Don’t trust CLOSED protocols
(Skype, anyone?)
Sunday, September 23, 2012
37. One more thing....
A protocol is SECURE
when no one can
eavesdrop on it
Sunday, September 23, 2012
38. In the vast majority of the cases,
a protocol message leaves and enters
your computer in CLEAR PLAIN TEXT
Someone just need to listen
to the conversation
(and you don’t need to have hacking skillz)
Sunday, September 23, 2012
40. HTTP (not secure)
My
Username: CLAUDIO Me
Home banking
Password: s3cret (client)
server
HTTPS (secure)
My
kwer2u589erwtwrtj Me
Home banking
w09r0wemf09fwq’e9 (client)
server
Sunday, September 23, 2012
41. A message is safe from eavesdropping
only if it’s encrypted
Thus, the protocol must use
some sort of encryption
Sunday, September 23, 2012
42. HTTP is bad, HTTPS is good
SMTP is bad, SMTP + TLS is good
FTP is bad, SFTP is good
Sunday, September 23, 2012
43. “I read this on the internet”
Sunday, September 23, 2012
44. Let’s focus on the web,
the realm of the
HTTP protocol
Sunday, September 23, 2012
45. Internet (as a network
of computers)
is relatively old
~ early 80s
Sunday, September 23, 2012
46. The WEB (as a collection of
interlinked documents)
is relatively new
Sunday, September 23, 2012
48. Sir Tim Berners-Lee
March 1989, the proposal
Christmas 1990, a client and server
exchanged a hypertext
for the first time
Sunday, September 23, 2012
50. “I’ve more than 30 years experience on the web”
Sunday, September 23, 2012
51. Tim Berners-Lee created two “tools”
which are the foundation blocks
of the whole web:
the HTTP protocol
(to exchange documents)
+
the HTML language
(to write documents)
Sunday, September 23, 2012
52. You browse the web
using a web browser (*)
* Capt. Obvious
Sunday, September 23, 2012
54. URL, remember?
http://www.example.com/index.html
When you “go” or “open” to a web site
you instruct the browser to load an URL
(the resource it points to)
Most common resource types:
HTML files and images
Sunday, September 23, 2012
55. If you specify only www.wikipedia.org
as you url the browser will add “http://” for
you and the server will add “index.html” for you
Sunday, September 23, 2012
56. Visiting a web page: 3 steps process
1. Enter the desired URL
2. Download the resource
3. Do something with the resource
(i.e.: display it)
Sunday, September 23, 2012
57. 1. Entering the URL Browser
This is the URL
Sunday, September 23, 2012
58. 2. Download the resource
DNS, remember?
web20.it?
DNS
84.8.54.56!
psc.html?
84.8.54.56
“Hello, my name is...”
Sunday, September 23, 2012
59. 3. Display the resource
psc.html?
84.8.54.56
“Hello, my name is...”
Sunday, September 23, 2012
60. Other resources (i.e.: images) can
be “embedded” inside a document
Their URL is not manually entered
but you can find it inside the
html document
Sunday, September 23, 2012
61. For any resource
the browser needs
to get to the server
(and to the DNS too)
Sunday, September 23, 2012
62. If a page contains 50 images,
the browser needs at least 51
server round trips
(plus the DNS’s).
Number and dimension of resources
account for the web site performances
Sunday, September 23, 2012
66. Admittedly this is not the
web site we are familiar with
nowadays
Sunday, September 23, 2012
67. HTML - per se - has very poor
graphic capabilities
And this is OK, because
HTML is only for
structuring documents
Sunday, September 23, 2012
68. CSS to the rescue
“CSS” is just another language
create just for presentational
purposes (a “style sheet” language)
Wide adoption started in 1998
Sunday, September 23, 2012
71. Who is in charge of creating
those “languages”?
The W3C
World Wide Web Consortium
(those are the “good guys”)
Sunday, September 23, 2012
72. Current “stable” version of HTML is 4.01
(but everyone is using HTML5)
Current “stable” version of CSS is 2.1
(but everyone is using CSS3)
Sunday, September 23, 2012
73. “CSS 3, which was started in 1998, is
still under development as of 2012”
Sunday, September 23, 2012
74. 1. HTML define the structure of the document
2. CSS defines how the document appears
3.
Sunday, September 23, 2012
75. We are talking about the behavior
of web pages
A web page needs to be enhanced
in ways that HTML can’t do
A web page “reacts” to user input
in a lot of different ways
Sunday, September 23, 2012
76. Pop-ups
Data validation without reloading the page
Widgets
Infinite scolling
“One page application” like GMail
Crazy “mobile” stuff
Sunday, September 23, 2012
77. 1. HTML define the structure of the document
2. CSS defines how the document appears
3. JavaScript manages the behavior of the doc
Sunday, September 23, 2012
78. JavaScript is a real programming language
It has had its “dark age” (up to 2004)
Now it’s so vastly used that one can
make a professional career knowing
that language only
Sunday, September 23, 2012
79. DNS
server
ISP
You Router
Firewall Proxy
Web
Server
DB File
Server Server
Sunday, September 23, 2012
83. You don’t buy a server to have a remote space
You rent some remote space (in “the cloud”)
You don’t need to care anymore.
Sunday, September 23, 2012
84. Think about “the cloud” as one infinitely
big computer, open for everyone to use
(paying)
Sunday, September 23, 2012
85. Many sort of “clouds”, with different levels of “opacity”
If you’re directly involved on creating the
infrastructure of your start-up, you
need fine control over the cloud resources
(I’m thinking about Amazon EC2)
If you just want to safely backup
and be able to access your data
from anywhere, you don’t want
to mess with arcane configuration options
(I’m thinking about iCloud)
Sunday, September 23, 2012
86. SaaS is an example of “Cloud” usage
(Software as a Service)
You use a web site for your
personal accounting needs
You pay for using the
application once a year
Evolution of the ~90s ASPs
Sunday, September 23, 2012
87. Cloud computing aims to solve most
of the hardest problems on internet
based applications:
scaling and reliability
Sunday, September 23, 2012
88. Scaling means:
We cannot keep adding hardware!
We need to optimize what we already have!
Reliability means:
No single point of failure!
If our datacenter in USA is flooded,
we switch to the datacenter in Germany
The user is not affected
Sunday, September 23, 2012
89. At the end:
YOUR data is always safe
YOU pay only for what to you use
Sunday, September 23, 2012