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: الويب
- الويب (شبكة المعلومات العالمية) هو الصفحات والروابط التي تفتحها في المتصفح.
- يستخدم الويب بروتوكولاً يسمى 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.
أخطاء شائعة
- يتم تقسيم البيانات إلى حزم تسافر بشكل منفصل ثم يتم إعادة تجميعها.
- الإنترنت وشبكة المعلومات العالمية ليسا شيئاً واحداً.
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. · التكرار يوفر أكثر من مسار، sehingga الشبكة يمكنها تحويل المسار حول العطل. paths هي قائمة من المسارات (كل منها قائمة بأسماء الموجهات). يعمل المسار فقط إذا تجنّب broken الموجه. اكتب working_routes(paths, broken) تُرجع المسارات التي لا تحتوي على broken.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.