Majid Al-RaimiIntroductionمقدمة

COE 558Lecture 01المحاضرة 01

Introductionمقدمة

From a lamp you control in a browser to the edge-to-cloud continuum: systems thinking, the TCP/IP stack, sockets, web architecture, the physics of latency, and where each task of a service should run.من مصباح تتحكم فيه عبر المتصفح إلى سلسلة الحافة إلى السحابة (E2C continuum): التفكير المنظومي، وحزمة TCP/IP، والمقابس (sockets)، ومعمارية الويب، وفيزياء زمن الاستجابة (latency)، وأين يجب أن تُنفَّذ كل مهمة من مهام الخدمة.

Partsالأجزاء
10
Conceptsالمفاهيم
45
Slidesالشرائح
77
Readingمدة القراءة
270 min270 دقيقة
Understoodما فهمته
0/45 conceptsمفاهيم
Read the full guideاقرأ الشرح الكاملEvery part on one long page: 10 parts, 45 concepts, about 270 min.كل الأجزاء في صفحة واحدة طويلة: 10 أجزاء، و45 مفهومًا، في نحو 270 دقيقة.

AOverviewنظرة عامة

This lecture is the foundation every later topic in the course stands on. It starts with something small, switching a lamp on from a browser, and ends with a question that drives real engineering work: where on the edge-to-cloud continuum should each part of an application run so that it answers in time?

هذه المحاضرة هي الأساس الذي يقوم عليه كل موضوع لاحق في المقرر. تبدأ بشيء بسيط، وهو تشغيل مصباح من المتصفح، وتنتهي بسؤال يقود عملًا هندسيًا حقيقيًا: أين يجب أن يعمل كل جزء من التطبيق على امتداد edge-to-cloud continuum (الامتداد من الطرف إلى السحابة) حتى يستجيب في الوقت المطلوب؟

As a PhD student you need it for three things. The exams test whether you can name layers, sockets and tiers precisely and compute latency and response time without hesitation. The research project, worth 35% of the grade, asks you to design and justify a system, and that justification is exactly the reasoning taught here. Beyond the course, any edge or cloud system you build or review is judged by the same test: does its response time stay within the budget, RT ≤ τ?

بصفتك طالب دكتوراه تحتاج هذه المحاضرة لثلاثة أمور. الامتحانات تختبر قدرتك على تسمية الطبقات (layers) والمقابس (sockets) والمستويات (tiers) بدقة، وحساب زمن التأخير (latency) وزمن الاستجابة (response time) دون تردد. والمشروع البحثي، الذي يمثل 35% من الدرجة، يطلب منك تصميم نظام وتبرير هذا التصميم، وهذا التبرير هو بالضبط طريقة التفكير التي تُدرَّس هنا. وخارج المقرر، يُحكم على أي نظام edge أو cloud تبنيه أو تراجعه بالاختبار نفسه: هل يبقى زمن استجابته ضمن الميزانية، RT ≤ τ؟

From a lamp in a browser to the edge-to-cloud continuumمن مصباح في المتصفح إلى الامتداد من الطرف إلى السحابة (edge-to-cloud continuum)

The path has five stops. You model the lamp as a system of client, server and device. You place its conversations on the TCP/IP stack and the sockets beneath HTTP. You measure what distance costs, since a signal cannot beat the speed of light. Finally you spread the server layer across device, edge, fog and cloud and check each mapping against its latency budget.

للمسار خمس محطات. تنمذج المصباح كنظام مكوّن من عميل (client) وخادم (server) وجهاز (device). ثم تضع محادثاته على مكدس TCP/IP وعلى الـ sockets التي تعمل تحت HTTP. ثم تقيس كلفة المسافة، لأن الإشارة لا يمكن أن تسبق سرعة الضوء. وأخيرًا توزّع طبقة الخادم على الجهاز (device) والطرف (edge) والضباب (fog) والسحابة (cloud)، وتتحقق من كل توزيع مقابل ميزانية زمن التأخير الخاصة به.

Success looks likeعلامات النجاح

  • Decompose a system with the four design questions into components, relationships and layers, and draw it.فكّك أي نظام باستخدام أسئلة التصميم الأربعة إلى مكوّنات (components) وعلاقات (relationships) وطبقات (layers)، وارسمه.
  • Tell the Internet from the Web and place any application protocol on the correct layer of the TCP/IP stack.ميّز بين الإنترنت (Internet) والويب (Web)، وضع أي بروتوكول تطبيقات في الطبقة الصحيحة من مكدس TCP/IP.
  • Trace one HTTPS request through the socket calls on both the client and the server.تتبّع طلب HTTPS واحدًا عبر استدعاءات الـ socket على جهة العميل وجهة الخادم معًا.
  • Compute the round-trip latency lower bound from a geodesic distance and explain why a measured RTT is larger.احسب الحد الأدنى لزمن التأخير ذهابًا وإيابًا (round-trip latency lower bound) من المسافة الجيوديسية (geodesic distance)، واشرح لماذا يكون الـ RTT المقاس أكبر منه.
  • Compare device, edge, fog and cloud on latency, capacity, privacy and reach for a given workload.قارن بين device وedge وfog وcloud من حيث زمن التأخير والسعة والخصوصية ونطاق الوصول لحمل عمل معيّن.
  • Map the tasks of an application onto the continuum and test the mapping with RT = L1 + PT + L2 ≤ τ.وزّع مهام التطبيق على هذا الامتداد، واختبر التوزيع بالمعادلة RT = L1 + PT + L2 ≤ τ.

How to study this lectureكيف تذاكر هذه المحاضرة

  1. Choose your route. Read the full guide in one sitting for the big picture, or work through one part at a time when you want depth.اختر طريقتك. اقرأ الدليل الكامل في جلسة واحدة لترى الصورة الكبيرة، أو ادرس جزءًا واحدًا في كل مرة عندما تريد التعمق.
  2. Answer every recall prompt in your head, or on paper, before you reveal it. The effort of retrieving is what makes the idea stick.أجب عن كل سؤال استرجاع (recall prompt) في ذهنك أو على الورق قبل أن تكشف الإجابة. جهد الاسترجاع نفسه هو ما يثبّت الفكرة.
  3. Take each quiz and read the explanation even when you are right.حلّ كل اختبار قصير (quiz) واقرأ الشرح حتى عندما تكون إجابتك صحيحة.
  4. Mark a concept as understood only when you could explain it to a classmate without looking. Unmarked concepts show you where to return.لا تضع علامة "مفهوم" على أي فكرة إلا إذا كنت تستطيع شرحها لزميل دون أن تنظر. المفاهيم غير المعلّمة تريك أين يجب أن تعود.
  5. Keep the glossary open for terms, and use the reference sheet for formulas, numbers and comparisons when you review or solve problems.أبقِ المسرد (glossary) مفتوحًا للمصطلحات، واستخدم ورقة المرجع (reference sheet) للمعادلات والأرقام والمقارنات عند المراجعة أو حل المسائل.
  6. Come back after a few days and retry the recall prompts and quizzes cold. Spaced practice builds the long-term memory an exam needs.عد بعد بضعة أيام وأعد أسئلة الاسترجاع والاختبارات القصيرة من الذاكرة دون تحضير. التمرين المتباعد (spaced practice) يبني الذاكرة طويلة المدى التي يحتاجها الامتحان.

Sourcesالمصادر

BThe 10 partsالأجزاء الـ10

  1. 01Course map and syllabusخريطة المقرر والخطة الدراسيةWhat the course covers, how it is graded, and how to plan the research project from week one.ما يغطيه المقرر، وكيف يُقيَّم، وكيف تخطط للمشروع البحثي من الأسبوع الأول.3 concepts3 مفاهيمSlides 1-7الشرائح 1-718 min18 دقيقة
    1. 1.1The lecture is a chain that ends in a placement decisionالمحاضرة سلسلة تنتهي بقرار أين يعمل كل جزء
    2. 1.2Course scope: foundations first, then building and operating cloudsنطاق المقرر: الأساسيات أولًا، ثم بناء السحابات وتشغيلها
    3. 1.3The grade is a research pipeline you plan from week oneالدرجة خط بحثي متتابع تخطط له من الأسبوع الأول
  2. 02Designing systems with mental modelsتصميم الأنظمة بالنماذج الذهنيةAd-hoc versus structured design, and the four questions that turn a lamp in a browser into a system: system, components, relationships, layers.التصميم العشوائي (ad-hoc) مقابل التصميم المنظم، والأسئلة الأربعة التي تحوّل مصباحًا يُدار من المتصفح إلى نظام: النظام، والمكونات، والعلاقات، والطبقات.6 concepts6 مفاهيمSlides 8-21الشرائح 8-2136 min36 دقيقة
    1. 2.1Design starts with a mental model, not a partالتصميم يبدأ بنموذج ذهني، لا بقطعة
    2. 2.2A system is components that interact: client, server, deviceالنظام مكونات تتفاعل: العميل والخادم والجهاز
    3. 2.3A relationship is a protocol plus an interfaceالعلاقة هي بروتوكول مع واجهة
    4. 2.4Interactions as request and reply, and the energy they reportالتفاعلات كطلب ورد، والطاقة التي تُبلغ عنها
    5. 2.5Mapping interactions to HTTP: safe GET, idempotent PUTربط التفاعلات بـ HTTP: طلب GET آمن وطلب PUT متساوي الأثر
    6. 2.6Server component versus server layer: cloud, fog or edgeمكون الخادم مقابل طبقة الخادم: سحابة أو ضباب أو حافة
  3. 03The Internet and the TCP/IP stackالإنترنت وحزمة TCP/IPWhy connectivity is split into five layers, what each layer sends and addresses, and where each layer lives inside a computer.لماذا تُقسَّم مشكلة الاتصال إلى خمس طبقات، وماذا ترسل كل طبقة وكيف تعنون، وأين تقع كل طبقة داخل الحاسوب.5 concepts5 مفاهيمSlides 22-29الشرائح 22-2930 min30 دقيقة
    1. 3.1Connectivity is built from five cooperating layersالاتصالية تُبنى من خمس طبقات متعاونة
    2. 3.2Encapsulation: every payload is the PDU of the layer aboveالتغليف (Encapsulation): كل حمولة هي PDU الطبقة التي فوقها
    3. 3.3Three scopes, three addresses, and what changes at each hopثلاثة نطاقات، ثلاثة عناوين، وما الذي يتغير عند كل قفزة
    4. 3.4Sockets, connections and the 5-tupleالـ Sockets والاتصالات والـ 5-tuple
    5. 3.5Where the stack lives inside one computerأين تعيش الحزمة داخل حاسوب واحد
  4. 04The Web and network applicationsالويب وتطبيقات الشبكةThe Web as one network application, decentralized versus distributed designs, the two-dimensional design space, and the request-response loop.الويب بوصفه تطبيق شبكة واحدًا، والتصاميم اللامركزية مقابل الموزعة، وفضاء التصميم ثنائي الأبعاد، وحلقة الطلب والاستجابة (request-response).5 concepts5 مفاهيمSlides 30-39الشرائح 30-3930 min30 دقيقة
    1. 4.1The Internet is infrastructure, the Web is one application on itالإنترنت بنية تحتية، والويب تطبيق واحد يعمل فوقها
    2. 4.2Decentralized versus distributed: two different questionsاللامركزي مقابل الموزّع: سؤالان مختلفان
    3. 4.3Placing server components: layers, resources and criteriaوضع مكوّنات الخادم: الطبقات والموارد والمعايير
    4. 4.4Front-end, back-end and sockets: logical talk, physical bytesالواجهة الأمامية والخلفية والـ sockets: حديث منطقي وبايتات فعلية
    5. 4.5The request-response loop and what every response costsحلقة الطلب والاستجابة وما تكلّفه كل استجابة
  5. 05Sockets and web app architectureالمقابس (Sockets) ومعمارية تطبيقات الويبThe socket API between your program and the transport layer, TCP versus UDP sockets, and the frontend and backend of a web application.واجهة Socket API بين برنامجك وطبقة النقل، ومقابس TCP مقابل مقابس UDP، والواجهة الأمامية (frontend) والخلفية (backend) لتطبيق الويب.4 concepts4 مفاهيمSlides 40-45الشرائح 40-4524 min24 دقيقة
    1. 5.1Sockets: the door between an application and the networkالـ Sockets: الباب بين التطبيق والشبكة
    2. 5.2Stream or datagram: choosing TCP or UDP by what loss costsStream أم datagram: اختيار TCP أو UDP بحسب كلفة الفقد
    3. 5.3Web apps: the browser as client, the backend as server plus databaseتطبيقات الويب: المتصفح عميلًا، والـ backend خادمًا زائد قاعدة بيانات
    4. 5.4Backend routes: how one HTTP request becomes a responseالـ routes في الـ backend: كيف يصبح طلب HTTP واحد استجابة
  6. 06Why layering: the continuum ideaلماذا الطبقات: فكرة السلسلة المتصلة (continuum)What a continuum is, and how networks and the memory hierarchy already use layers to trade distance and speed.ما معنى السلسلة المتصلة (continuum)، وكيف تستخدم الشبكات وتسلسل الذاكرة الهرمي الطبقات أصلًا للموازنة بين المسافة والسرعة.4 concepts4 مفاهيمSlides 46-50الشرائح 46-5024 min24 دقيقة
    1. 6.1A continuum of places between client and serverسلسلة متصلة من المواقع بين العميل والخادم
    2. 6.2Networks already layer the path: switching and routing tiersالشبكات تقسّم المسار إلى طبقات أصلًا: مستويات التبديل switching والتوجيه routing
    3. 6.3The memory hierarchy: nearness for urgent data, justified by localityهرمية الذاكرة: القرب للبيانات العاجلة، ومبرّره مبدأ الـ locality
    4. 6.4Bandwidth, latency, and why cache is to RAM as edge is to cloudالـ bandwidth والـ latency، ولماذا الـ cache بالنسبة إلى الـ RAM مثل الـ edge بالنسبة إلى الـ cloud
  7. 07The physics of latencyفيزياء زمن الاستجابة (Latency)Latency to the cloud, the speed-of-light lower bound, geodesic distance, real measurements from Dammam, and the four delays that add up.زمن الاستجابة إلى السحابة، والحد الأدنى الذي تفرضه سرعة الضوء، والمسافة الجيوديسية، وقياسات حقيقية من الدمام، والتأخيرات الأربعة التي تتراكم معًا.4 concepts4 مفاهيمSlides 51-55الشرائح 51-5524 min24 دقيقة
    1. 7.1Latency and the floor physics sets under itزمن الانتقال والحد الأدنى الذي تفرضه الفيزياء
    2. 7.2Measuring distance on a curved Earthقياس المسافة على أرض منحنية
    3. 7.3Why real round trips cost three times the boundلماذا تكلّف رحلات الذهاب والإياب الحقيقية ثلاثة أضعاف الحد الأدنى
    4. 7.4Where the time goes: the four packet delaysأين يذهب الوقت: التأخيرات الأربعة للحزمة
  8. 08Edge, fog and cloudالحافة والضباب والسحابة (Edge, Fog, Cloud)The layers of the E2C continuum from mist to regional cloud, their latency, resources and typical roles.طبقات سلسلة E2C من الضباب الخفيف (mist) إلى السحابة الإقليمية، وزمن استجابتها، ومواردها، وأدوارها المعتادة.4 concepts4 مفاهيمSlides 56-60الشرائح 56-6024 min24 دقيقة
    1. 8.1The server is a place on a line, not one boxالخادم موقع على خط، لا صندوق واحد
    2. 8.2Three layers, seven stages: naming the continuumثلاث طبقات وسبع مراحل: تسمية السلسلة المتصلة
    3. 8.3The core trade: resources grow outward, and so does latencyالمقايضة الأساسية: الموارد تزداد للخارج، وكذلك زمن الاستجابة
    4. 8.4Placing work: the closest layer that can carry itتوزيع العمل: أقرب طبقة قادرة على حمله
  9. 09Mapping tasks and response timeتوزيع المهام وزمن الاستجابةFour ways to place an object-detection pipeline on the continuum, how response time is computed, and why faster servers are not enough.أربع طرق لوضع خط معالجة لاكتشاف الأجسام (object detection) على السلسلة، وكيف يُحسب زمن الاستجابة (response time)، ولماذا لا تكفي الخوادم الأسرع وحدها.6 concepts6 مفاهيمSlides 61-71الشرائح 61-7136 min36 دقيقة
    1. 9.1A mapping places each task, and the user waits for the whole tripالتعيين يحدد مكان كل مهمة، والمستخدم ينتظر الرحلة كاملة
    2. 9.2All in the cloud: why a faster server barely helps a distant clientكل شيء في السحابة: لماذا لا يفيد الخادم الأسرع العميل البعيد إلا قليلًا
    3. 9.3All on the device: no network, but the device paysكل شيء على الجهاز: لا شبكة، لكن الجهاز يدفع الثمن
    4. 9.4All at the edge: proximity bought with reach and scaleكل شيء على الحافة: القرب مقابل التغطية وقابلية التوسع
    5. 9.5Splitting the pipeline: a shared fog behind many edgesتقسيم خط المعالجة: ضباب مشترك خلف عدة عقد حافة
    6. 9.6In practice: edge plus cloud, chosen task by taskفي الواقع: الحافة مع السحابة، والاختيار مهمة بمهمة
  10. 10Latency budget, exercises and summaryميزانية زمن الاستجابة والتمارين والخلاصةDesigning against a response-time threshold, three design exercises (smart glasses, AR, VR), and the lecture in one page.التصميم وفق عتبة محددة لزمن الاستجابة، وثلاثة تمارين تصميم (النظارات الذكية، والواقع المعزز AR، والواقع الافتراضي VR)، والمحاضرة كلها في صفحة واحدة.4 concepts4 مفاهيمSlides 72-77الشرائح 72-7724 min24 دقيقة
    1. 10.1The latency budget: response time must fit inside τميزانية التأخير: يجب أن يتسع زمن الاستجابة داخل τ
    2. 10.2A four-step design method, worked on smart glassesطريقة تصميم من أربع خطوات، مطبّقة على النظارات الذكية
    3. 10.3One app, many deadlines: AR and VR under motion-to-photonتطبيق واحد ومهل كثيرة: AR وVR تحت قيد motion-to-photon
    4. 10.4The split follows τ: the server becomes the continuumالتقسيم يتبع τ: الخادم يصبح المتصل

CGlossary and referenceالمصطلحات والمرجع