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.
תגובה לפערים ועמידות לשגיאות
- תגובה לפערים מתארת מצב שבו ישנם יותר ממסלול אחד בין שתי נקודות.
- בשל כך, לאינטרנט יש עמידות לשגיאות: הוא ממשיך לפעול גם אם קישור אחד נכשל.
- אם נתב 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 (פרוטוקול האינטרנט) מספק לכל מחשב כתובת ועוזר לשלוח כל חבילה.
- TCP (פרוטוקול בקרת ההעברה) בוודא שהחבילות הגיעו כולן ומחזיר אותן לסדר.
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: הרשת
- הרשת (World Wide Web) היא הדפים והקישורים שפותחים בדפדפן.
- הרשת משתמשת בפרוטוקול הנקרא HTTP (העברת טקסט היפרטקסט).
- הדפדפן שלך שולח בקשת 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: הכללים שהרשת משתמשת בהם לבקשה ושלוחת דפים.
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.
כעת תנסו בעצמכם
- משימות אלו מדמות כיצד נתונים עוברים באמת: חלוקה, הרכבה מחדש, והימנעות מכשל.
- לחץ על בדוק תשובה כדי לבדוק את הקוד שלך.
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". · TCP משלב חבילות מחדש לפי מספריהן. packets היא רשימת [order, text] זוגות שהגיעו מעורבת. כתוב reassemble(packets) שמסדר אותם לפי order ומחזיר את הטקסט המאוחד. דוגמה: reassemble([[2, "O FR"], [1, "HELL"], [3, "IEND"]]) הוא "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"]]. · נתוני ענק מפוצלים לחבילות בגודל קבוע. כתוב split(text, size) שמחזיר רשימת [order, chunk] זוגות (הסדר מתחיל ב-1), כאשר כל חתיכה מכילה עד size תווים. דוגמה: split("HELLO FRIEND", 4) הוא [[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. · חוזרות מספקות יותר ממסלול אחד, כך שהרשת יכולה לעבור סביב תקלה. paths היא רשימת מסלולים (כל אחד רשימת שמות נתבים). מסלול עובד רק אם הוא נמנע מהנתב broken. כתוב working_routes(paths, broken) שמחזיר את המסלולים שאינם מכילים broken.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.