Blame view

lesson-02b.html 10.9 KB
af0d84392   Rémi Emonet   up cm2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
  <!DOCTYPE html>
  <html>
      <head>
          <meta charset="utf-8">
          <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
              
          <title>Computer Networks (2b)</title>
          <meta name="cours-n" content="2">
  
          <meta name="author" content="Rémi Emonet">
          <meta name="venue" content="DWA M1 WI/MLDM">
          <meta name="date" content="2017">
          <meta name="affiliation" content="Université Jean Monnet − Laboratoire Hubert Curien">
   
          <style type="text/css">
          .inlineimages img {display: inline !important; }
          .slide .above {position:absolute; left: 20px; top: 20px; width: 760px; height: 460px; text-align:center;}
      .above {z-index: 100 !important;}
          </style>
  
          <!--
  	<script src="deck.js/extensions/includedeck/load.js"></script>
          <script src="extensions/slides-dev.js"></script>
          -->
          <script src="extensions/deck-packed.js"></script>
          <script src="extensions/slides.js"></script>
          <script>go()</script>
      </head>
  
  <body>
  
  <div class="deck-container">
  
      <div class="deck-loading-splash" style="background: black; color: chartreuse;"><span class="vcenter" style="font-size: 30px; font-family: Arial; ">Please wait, while our marmots are preparing the hot chocolate…</span></div>
  
  <section class="smart">
  
  # @chunk: chunks/title.md
  
  # @chunk: chunks/objectives.md
  
  
  <!-- pre -->
  ## Part 2: Application Layer{overview}
  @SVG: media/stack-index.svg 100px 400px {svg floatright app unapp}
  
  - Application layer
    - high level of abstraction
    - « client » of the host to host network
    - interacts with the transport layer
      // <div class="anim-removeclass slide" data-what=".svg" data-class="unapp"></div>
  - Part 2{slide}
    - application layer and protocols
    - interaction with the transport layer
    - design of protocols
      // by studying existing protocols
    - programming connected application (socket)
      // API
  
  
  <!-- plan -->
  ## Part 2: Application Layer{#plan overview}
  @SVG: media/stack-index.svg 100px 400px {svg floatright app margin-left-minus-100}
  
  - Goal{shaded}
    - protocols: general principles and existing protocols
    - sockets: programming and services from the transport layer
  - Overview
    - Principles of distributed applications {it1}
      // and interactions with the transport layer
    - HTTP and the web {it2}
    - FTP: file transfer {it3}
    - Electronic mail {it4}
    - DNS: name resolution and more {it5}
    - P2P Applications (peer to peer) {it6}
    - Network programming: using sockets {it7}
  # @copy:#plan
  
  
  
  
  
  
  
    
  <!-- distributed applications -->  
  # @copy:#plan: %+class:inred: .it1
  
  # Principles of Distributed Applications {no-print}
  
  ## Examples of Distributed Applications
  - e-mail{col1}
  - social networks{col2}
  - web{col1}
  - P2P file sharing{col2}
  - instant messaging {col1}
  - remote connections {col2}
  - multiplayer games {col1}
  - telephone{col2}
  - video and audio streaming {col1}
  - real time video-conferencing{col2}
  - …{col2}
  
  ## Design of Distributed Applications
  @SVG: media/part2/internet-app-to-app.svg 400px 500px {svg floatright}
  
  - Writing programs
    - executed on different hosts
    - communicating through the network
  - @anim: #mask-core + #mask-border | #stacks | #arrows
  - Network abstraction and separation{slide}
    - the application ignores the numerous details
    - the network core does not execute the application
  - Canonical types of architectures{slide}
    - client-server
    - P2P (peer to peer)
  
  ## Architectures for Distributed Applications
  @SVG: media/part2/internet-client-server-p2p.svg 400px 500px {svg floatright}
  
  - Client-Server{cs}
    - Server
        - always on
        - fixed (IP) address
        - server farms
    - Clients
        - intermittent comm.
        - changing address
        - comm. only <br/> with the server
  - @anim:.svg + #mask-core + #mask-border | #arrowsclientserver + .cs | -#mask-border + -#arrowsclientserver + #mask-border2 | .p2p + #arrowsp2p
  - P2P (peer to peer) {p2p}
    - host = both client and server
    - no central server
    - complicated, dynamic management
    - better scalability
  
  ## Network Abstraction: interprocess comm.
  - Process
    - program running on a host
    - exchanging messages over the network
    - server process{slide}
        - waiting to be contacted
    - client process {slide}
        - contacting a server
    - P2P: client and server at the same time{slide}
  - Inter-process communications(IPC) {slide}
    - alternative to the network
    - works only on a single host
      // api dédiées, mémoire partagée
  
  ## Network Abstraction: socket
  - socket
    - used by a process (application)
    - interface to the rest of the network stack
    - interface to another (remote) process
  - @anim: .svg | #stack1 + #stack2 | #cloudconnect | #process1 + #process2 | %viewbox:#zsocket | #threed1 + #socket1 | #threed2 + #socket2 + %viewbox:#zpage | #cable
  
  @SVG: media/part2/socket.svg 800px 300px {svg}
  
  
  ## Network Abstraction: <br/>process identification
  - Address of an host
    // "network" layer
    - IP address: 32 bits
    - example: 78.109.84.114
    - but: there could be multiple processes on a host
  - Process identifier {slide}
    - address of the host
    - port number
    - example: 80
    - &rArr; 78.109.84.114:80
  
  ## Protocols from the Application Layer
  // what do we have in an application protocol (as in all protocols)
  
  - Types of messages{slide}
    - initialization, request, response, …
  - Syntax and format of messages{slide}
    - structure of messages
    - fields and their size
    - encoding, separators, …
  - Semantic of messages{slide}
    - meaning of the different message types
    - interpretation of the fields
  - Processing rules {slide}
    - how to answer the message?
    - when to answer?
  - Open protocols (HTTP, ...) vs proprietary protocols (Skype){slide}
    // inseparability, standard etc
  
  ## What are the advantages of open protocols? <br/> … and of proprietary protocols?{question no-print}
  
  ## Services from the Transport Layer<br/> (from the application point of view) {libyli}
  @SVG: media/stack-index.svg 100px 400px {svg floatright app margin-left-minus-100}
  
  - Transport integrity
    - guaranteed reception of all bits sent
  - Latency (delay)
    - reception of messages after a small time interval
    - guarantee on a maximum delay
  - Throughput (bandwidth)
    - guarantee on the average data transfer rate
    - guarantee on a (minimal) constant rate
  - Security
    - encryption, privacy protection
    - integrity (non-corruption)
  
  ## How sensitive to these aspects are the following application?{question bottom}
  - Aspects: integrity, latency, throughput, security
  - Applications
    - file transfer, e-mail, web browsing, 
    - real-time audio/video, audio/video streaming,
    - multiplayer games, instant messaging
  
  ## Options for Transport with Internet <img src="media/part2/author-plug.svg" style="display: inline; height:1.5em; margin-left: .5em; margin-bottom: -.5em; margin-top: -10em;"> // not any network?
  - Transport with TCP {col1 slide}
    - connection oriented (stream)
    - transfer integrity
        - from socket to socket
    - flow control{slide}
        - prevent “spam”
    - congestion control{slide}
        - adaptation to network load
    - missing services{slide}
        - guaranteed latency
        - guaranteed rate
        - security
  - UDP {col2 slide}
    - packet oriented (datagram)
    - transport not guaranteed
    - missing services{slide}
        - transfer integrity
        - flow control
        - congestion control
        - guaranteed latency
        - guaranteed rate
        - security
  - <img  src="media/question-cube.jpg" class="floatright" width="100px"/> Question: so, why UDP?{col12 slide}
  
  
  ## Internet Apps and Transfer Protocols
  <div>
    <table class="clean1 centered">
    <tr><th>Application</th><th>Application Protocols</th><th>Transfer Protocols</th></tr>
    <tr><td>e-mail</td>
        <td>SMTP (RFC2821)</td>
        <td>TCP</td></tr>
    <tr><td>Web Browsing</td>
        <td>HTTP (RFC2616)</td>
        <td>TCP</td></tr>
    <tr><td>remote access (terminal)</td>
        <td>Telnet (RFC854)</td>
        <td>TCP</td></tr>
    <tr><td>remote access (terminal)</td>
        <td>SSH (RFC4251)<div class="comment">multiple RFC actually (the others too)</td>
        <td>TCP</td></tr>
    <tr><td>file transfer</td>
        <td>FTP (RFC959)</td>
        <td>TCP</td></tr>
    <tr><td>Streaming</td>
        <td>HTTP, RTP (RFC1889)</td>
        <td>TCP, UDP</td></tr>
    <tr><td>Voice over IP</td>
        <td>SIP, RTP, prop.</td>
        <td>TCP or UDP</td></tr>
    </table>
  </div>
  
  ## Absence of Security in TCP and UDP {libyli}
  - TCP and UDP do not propose encryption 
    - data sent “as is”, including passwords etc
    - possibility for any router to read these
  - TLS (Transport Layer Security)
    - evolution/renaming of SSL (Secure Sockets Layer)
    - systematic encryption before sending through TCP
    - authentication/identification of hosts (with “certificates”)
  - Notes about TLS
    - TLS is an application layer protocol
    - TLS is just a software library
      // with an API close to plain sockets
    - the `ssh` command allows users to create secured tunnels
  
  
  
  </section>
  
  
      <p class="deck-status" data-progress-size=": spe.top(10, 585) ; bottom: slide.top" style="z-index: 0; color: #339; background: #EEE;"> <span class="deck-status-current"></span> / <span class="deck-status-total"></span> − <span class="var-author">will be replaced by the author</span> − <span class="var-title">will be replaced by the title</span></p>
  
      <a data-progress-size=": spe.top(15, 555); height: 45*designRatio; left: slide.right - 70*designRatio; width: 70*designRatio" class="ccby" href="http://en.wikipedia.org/wiki/Creative_Commons_license" title="This work is under CC-BY licence." target="_blank"></a>
  
      <a class="ujm" data-progress-size=": spe.top(15, 525); height: 65*designRatio; left: slide.left; width: 130*designRatio" target="_blank"></a> <!-- shown only if with-ujm is set on the container -->
  
  </div>
  <!-- clicky Cla -->
  <script type="text/javascript">
  var clicky_site_ids = clicky_site_ids || [];
  clicky_site_ids.push(100779706);
  (function() {
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.async = true;
    s.src = '//static.getclicky.com/js';
    ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
  })();
  </script>
  <noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100779706ns.gif" /></p></noscript> 
  
  
  <!-- Histats.com  START  (aync)-->
  <script type="text/javascript">var _Hasync= _Hasync|| [];
  _Hasync.push(['Histats.start', '1,2767123,4,0,0,0,00010000']);
  _Hasync.push(['Histats.fasi', '1']);
  _Hasync.push(['Histats.track_hits', '']);
  (function() {
  var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
  hs.src = ('http://s10.histats.com/js15_as.js');
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
  })();</script>
  <noscript><a href="http://www.histats.com" target="_blank"><img  src="http://sstatic1.histats.com/0.gif?2767123&101" alt="javascript hit counter" border="0"></a></noscript>
  <!-- Histats.com  END  -->
  </body>
  </html>