The Internet and how data travels · Internet dan cara data bergerak
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.
Internet
- Internet adalah jaringan komputer raksasa yang saling terhubung.
- Tidak ada komputer tunggal yang memimpin. Banyak komputer berbagi pekerjaan.
- Saat Anda membuka halaman web, data Anda melintasi banyak komputer ini.
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).
Data dibagi menjadi paket
- Data besar tidak travels dalam satu kesatuan.
- Data tersebut dipotong menjadi potongan-potongan kecil yang disebut paket.
- Setiap paket membawa sebagian data, beserta alamat (tujuannya) dan nomor (urutannya).
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.
Rute: banyak jalur
- Routing berarti memilih jalur untuk setiap paket melalui jaringan.
- Paket melewati banyak komputer yang disebut router di sepanjang perjalanannya.
- Paket yang berbeda dapat mengambil jalur yang berbeda menuju tujuan yang sama.
[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.
Redundansi dan toleransi kesalahan
- Redundansi berarti terdapat lebih dari satu jalur antara dua titik.
- Karena hal ini, Internet memiliki toleransi kesalahan: tetap berfungsi meskipun satu tautan rusak.
- Jika router B rusak, paket hanya menggunakan jalur lain, seperti 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: aturan-aturan
- Komputer harus sepakat pada aturan agar bisa berkomunikasi. Kita menyebut sekumpulan aturan sebagai protokol.
- IP (Internet Protocol) memberikan setiap komputer alamat dan membantu mengirim setiap paket.
- TCP (Transmission Control Protocol) memeriksa bahwa semua paket tiba dan menyusunnya kembali secara berurutan.
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) adalah halaman-halaman dan tautan yang Anda buka di browser.
- Web menggunakan protokol yang disebut HTTP (HyperText Transfer Protocol).
- Browser Anda mengirimkan permintaan 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.
Mengapa desain ini kuat
- Tidak ada satu titik yang mengontrol semuanya, sehingga tidak ada satu titik kegagalan yang dapat merusak seluruh Internet.
- Banyak jalur + paket = jaringan dapat mengalihkan masalah.
- Aturan bersama (TCP/IP, HTTP) memungkinkan komputer yang sangat berbeda untuk bekerja sama.
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.
Kata-kata kunci
- Paket: sekeping data kecil dengan alamat dan nomor urutan.
- Perutean: memilih jalur bagi paket melalui router.
- Redundansi / toleransi kesalahan: banyak jalur, sehingga satu kegagalan tidak menghentikan jaringan.
- TCP/IP: aturan untuk mengirim paket dan menyusunnya kembali sesuai urutan.
- HTTP: aturan yang digunakan web untuk meminta dan mengirimkan halaman.
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.
Kesalahan umum
- Data dibagi menjadi paket yang berjalan secara terpisah dan disusun kembali.
- Internet dan World Wide Web bukanlah hal yang sama.
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.
Sekarang Anda coba
- Tugas-tugas ini mencontohkan bagaimana data benar-benar bergerak: membaginya, menyusunnya kembali, dan mengalihkan jalur saat terjadi kegagalan.
- Tekan Periksa jawaban untuk menguji kode Anda.
Data travels in packets · Data bergerak dalam paket
The Internet splits data into packets that are routed and reassembled. · Internet memecah data menjadi paket yang diarahkan dan dirakit kembali.
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". · TCP menyusun ulang paket berdasarkan nomor mereka. packets adalah daftar pasangan [order, text] yang tiba secara acak. Tulis reassemble(packets) yang mengurutkannya berdasarkan order dan mengembalikan teks yang digabung. Contoh: reassemble([[2, "O FR"], [1, "HELL"], [3, "IEND"]]) adalah "HELLO FRIEND".
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.
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"]]. · Big data dipotong menjadi paket berukuran tetap. Tulis split(text, size) yang mengembalikan daftar pasangan [order, chunk] (urutan dimulai dari 1), setiap potongan maksimal size karakter. Contoh: split("HELLO FRIEND", 4) adalah [[1, "HELL"], [2, "O FR"], [3, "IEND"]].
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.
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. · Redundansi menyediakan lebih dari satu jalur, sehingga jaringan dapat memutar ulang jika terjadi kegagalan. paths adalah daftar rute (masing-masing berupa daftar nama router). Rute berfungsi hanya jika menghindari router broken. Tulis working_routes(paths, broken) yang mengembalikan rute-rute yang tidak mengandung broken.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.