The Internet and how data travels
The Internet
- The Internet is a huge network of computers that are joined together.
- No single computer is in charge. Many computers share the work.
- When you open a web page, your data travels across many of these computers.
インターネット
- インターネットは、互いに接続された膨大な数のコンピュータによるネットワークです。
- 単一のコンピュータが管理しているわけではありません。多数のコンピュータが作業を分担しています。
- ウェブページを開くと、データはこの多数のコンピュータ间を移動します。
Data is split into packets
- Big data does not travel in one piece.
- It is cut into small pieces called packets.
- Each packet carries a bit of the data, plus an address (where it goes) and a number (its order).
データはパケットに分割される
- 大きなデータは一式で移動しません。
- 小さな断片に切り分けられ、これらはパケットと呼ばれます。
- 各パケットには、データの一部分、宛先(どこへ送るか)、および番号(順序)が含まれています。
Your message: "HELLO FRIEND"
Split into packets:
[1] "HELL" to: 203.0.113.7
[2] "O FR" to: 203.0.113.7
[3] "IEND" to: 203.0.113.7
Routing: many paths
- Routing means choosing a path for each packet through the network.
- Packets pass through many computers called routers on the way.
- Different packets can take different paths to the same place.
ルーティング:多様な経路
- ルーティングとは、ネットワークを通過する各パケットに対して経路を選択することです。
- パケットは、ルーターと呼ばれる多数のコンピューターを経由します。
- 異なるパケットが、同じ目的地へ向かうために異なる経路を選ぶことがあります。
[You] --- router A --- router B --- [Website]
\ /
--- router C --- router D -
Packet 1 may go A -> B.
Packet 2 may go C -> D.
Both still arrive.
Redundancy and fault tolerance
- Redundancy means there is more than one path between two points.
- Because of this the Internet has fault tolerance: it keeps working even if one link fails.
- If router B breaks, packets just use another route, like C -> D.
冗長性と耐故障性
- 冗長性とは、2つの点の間に複数の経路があることを意味します。
- このため、インターネットには耐故障性があります。リンクの一つが故障しても、システムは動作を続けます。
- ルーターBに障害が発生した場合でも、パケットはC -> Dのような別の経路を使用します。
[You] --- router A --- (router B BROKEN)
\
--- router C --- router D --- [Website]
The path through B fails.
Packets still arrive through C -> D.
TCP/IP: the rules
- Computers must agree on rules so they can talk. We call a set of rules a protocol.
- IP (Internet Protocol) gives every computer an address and helps send each packet.
- TCP (Transmission Control Protocol) checks that all packets arrive and puts them back in order.
TCP/IP:ルール
- コンピューターが通信するためには、互いにルールに同意する必要があります。これらのルールのセットをプロトコルと呼びます。
- IP(Internet Protocol)は各コンピューターにアドレスを与え、パケットの送信をサポートします。
- TCP(Transmission Control Protocol)は、すべてのパケットが正常に到着したかを確認し、それらを順序通りに再構成します。
Packets arrive (maybe out of order):
[3] "IEND" [1] "HELL" [2] "O FR"
TCP reorders them by number:
[1] "HELL" + [2] "O FR" + [3] "IEND"
= "HELLO FRIEND"
HTTP: the web
- The web (World Wide Web) is the pages and links you open in a browser.
- The web uses a protocol called HTTP (HyperText Transfer Protocol).
- Your browser sends an HTTP request ("please give me this page"); the server sends an HTTP response (the page).
HTTP:Web
- Web(World Wide Web)とは、ブラウザで開くページやリンクのことです。
- WebはHTTP(HyperText Transfer Protocol)というプロトコルを使用しています。
- ブラウザはHTTPのリクエスト(「このページをください」)を送信し、サーバーはHTTPのレスポンス(ページそのもの)を返信します。
Why this design is strong
- No single point controls everything, so there is no single point to break the whole Internet.
- Many paths + packets = the network can route around problems.
- Shared rules (TCP/IP, HTTP) let very different computers work together.
この設計が強力な理由
- すべてを管理する単一の中心がなく、そのためインターネット全体を停止させる単一の故障ポイントも存在しません。
- 多数の経路とパケットにより、ネットワークは問題の所在を回避して路由できます。
- TCP/IPやHTTPといった共有されたルールにより、非常に異なる種類のコンピューターが協調して動作できます。
Key words
- Packet: a small piece of data with an address and an order number.
- Routing: choosing a path for packets through routers.
- Redundancy / fault tolerance: many paths, so one failure does not stop the network.
- TCP/IP: rules to send packets and reassemble them in order.
- HTTP: the rules the web uses to request and send pages.
重要用語
- パケット: アドレスと順序番号を持つ小さなデータ単位です。
- ルーティング: パケットをルーター経由で送るための経路選択です。
- 冗長性 / 耐故障性: 多数の経路があるため、一つの故障がネットワーク全体の停止を引き起こしません。
- TCP/IP: パケットを送信し、順序通りに再組み立てするためのルールです。
- HTTP: Webがページのリクエストと送信に使用するルールです。
Common mistakes
- Data is split into packets that travel separately and are reassembled.
- The Internet and the World Wide Web are not the same thing.
よくあるミス
- データはパケットに分割され、個別に移動した後で再結合されます。
- インターネットとWorld Wide Webは別物です。
Now you try
- These tasks model how data really travels: split it, reassemble it, and route around a failure.
- Press Check answer to test your code.
あなたも試してみよう
- これらのタスクは、実際のデータの移動様式をモデル化しています:分割、再結合、および故障の回避 routing です。
- 回答を確認 を押してコードを試してください。
Data travels in packets
The Internet splits data into packets that are routed and reassembled.
TCP puts packets back in order by their number. packets is a list of [order, text] pairs that arrived shuffled. Write reassemble(packets) that sorts them by order and returns the joined text. Example: reassemble([[2, "O FR"], [1, "HELL"], [3, "IEND"]]) is "HELLO FRIEND".
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。
Big data is cut into fixed-size packets. Write split(text, size) that returns a list of [order, chunk] pairs (order starts at 1), each chunk at most size characters. Example: split("HELLO FRIEND", 4) is [[1, "HELL"], [2, "O FR"], [3, "IEND"]].
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。
Redundancy gives more than one path, so the network can route around a failure. paths is a list of routes (each a list of router names). A route works only if it avoids the broken router. Write working_routes(paths, broken) returning the routes that do not contain broken.
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。