Majid Al-RaimiLatency budget, exercises and summaryميزانية زمن الاستجابة والتمارين والخلاصة

COE 558Lecture 01المحاضرة 01Part 10الجزء 10

Latency 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)، والمحاضرة كلها في صفحة واحدة.

Conceptsالمفاهيم
4
Slidesالشرائح
72-77
Readingمدة القراءة
24 min24 دقيقة
Understoodما فهمته
0/4 conceptsمفاهيم

Why this part mattersلماذا يهمّ هذا الجزء

Parts 7 to 9 gave you the physics of latency, the layers of the continuum, and ways to map a pipeline onto them. One ingredient was still missing: a deadline. Without a deadline, “edge or cloud?” is a matter of taste. With one, it becomes an inequality you can check with a calculator.

This part names that deadline τ, shows where defensible values of τ come from, and then turns it into a design method you can reuse on any system. You will practise the method on three workloads that sit at the heart of edge computing research: smart glasses, warehouse augmented reality and virtual reality (Chen et al. 2017, RFC 9699). The part ends by folding the whole lecture into one loop: split the service into tasks, give each a deadline, place it, and check response time against the deadline. For the exam you will compute response times and pick feasible mappings. For the research project, any edge system you propose should state τ per task, justify it from a published source, and report measured response time at a percentile.

أعطتك الأجزاء من 7 إلى 9 فيزياء التأخير، وطبقات المتصل، وطرقًا لتوزيع خط المعالجة (pipeline) عليها. لكن عنصرًا واحدًا كان لا يزال ناقصًا: المهلة الزمنية (deadline). من دون مهلة يصبح سؤال “الحافة أم السحابة؟” مسألة ذوق. ومع وجودها يتحول إلى متباينة تستطيع التحقق منها بآلة حاسبة.

يسمّي هذا الجزء تلك المهلة τ، ويبيّن من أين تأتي قيم τ التي يمكن الدفاع عنها، ثم يحوّلها إلى طريقة تصميم تعيد استخدامها على أي نظام. ستتدرب على الطريقة في ثلاثة أحمال عمل تقع في صميم أبحاث الحوسبة الطرفية: النظارات الذكية، والواقع المعزز في المستودعات، والواقع الافتراضي (Chen et al. 2017، وRFC 9699). وينتهي الجزء بطيّ المحاضرة كلها في حلقة واحدة: قسّم الخدمة إلى مهام، وأعطِ كل مهمة مهلة، وضعها في طبقة، ثم قارن زمن الاستجابة بالمهلة. في الاختبار ستحسب أزمنة الاستجابة وتختار التوزيعات الممكنة. وفي مشروع البحث، ينبغي لأي نظام حافة تقترحه أن يذكر τ لكل مهمة، ويبرّرها من مصدر منشور، ويعرض زمن الاستجابة المقاس عند مئين (percentile).

By the end you canفي نهاية هذا الجزء ستستطيع

  1. Explain the latency budget [0, τ] and decide whether a mapping is feasible by checking RT ≤ τ, counting latency out, processing time and latency back.تشرح ميزانية التأخير [0, τ] وتحكم على جدوى أي توزيع بالتحقق من RT ≤ τ، مع احتساب زمن الذهاب ووقت المعالجة وزمن العودة.
  2. Justify τ from published human and physical limits (XR, conversation, web, wearable assistance) and check it at a percentile, not the mean.تبرّر قيمة τ من الحدود البشرية والفيزيائية المنشورة (الواقع الممتد XR، والمحادثة، والويب، والمساعدة عبر الأجهزة القابلة للارتداء) وتتحقق منها عند مئين (percentile) لا عند المتوسط.
  3. Apply the four-step method (tasks, τ per task, placement, RT and trade-offs) and defend a smart-glasses placement with battery, privacy and reach arguments.تطبّق الطريقة ذات الخطوات الأربع (المهام، ثم τ لكل مهمة، ثم التوزيع، ثم RT والمفاضلات) وتدافع عن توزيع مهام النظارات الذكية بحجج البطارية والخصوصية والانتشار.
  4. Explain why one AR or VR app needs several layers, and why motion-to-photon forces tracking and reprojection onto the device.تشرح لماذا يحتاج تطبيق AR أو VR واحد إلى عدة طبقات، ولماذا يفرض زمن motion-to-photon أن يجري التتبع وإعادة الإسقاط (reprojection) على الجهاز نفسه.
  5. State the lecture as one design loop, where τ decides the edge and cloud split, and connect it to virtualization, containers and cloud service models.تلخّص المحاضرة في حلقة تصميم واحدة تحدد فيها τ التقسيم بين الحافة والسحابة، وتربطها بالمحاكاة الافتراضية والحاويات ونماذج الخدمة السحابية.

Picture a video call. When you speak, your voice should reach the other person quickly enough that the two of you do not talk over each other. The ITU-T telephony standard G.114 puts a number on “quickly enough”: if one-way delay stays below 150 ms, most applications experience essentially transparent interactivity, and 400 ms should not be exceeded for general network planning. So for one direction of that call, you have about 150 ms to spend, and every hop, queue and processing step you place in the path takes some of it.

تخيّل مكالمة فيديو. عندما تتكلم، يجب أن يصل صوتك إلى الطرف الآخر بسرعة كافية كي لا يقاطع أحدكما الآخر. يضع معيار الاتصالات الهاتفية ITU-T G.114 رقمًا لعبارة “بسرعة كافية”: إذا بقي التأخير في اتجاه واحد أقل من 150 ms فإن معظم التطبيقات تحظى بتفاعل شفاف عمليًا، ولا ينبغي تجاوز 400 ms في التخطيط العام للشبكات. إذن في اتجاه واحد من تلك المكالمة لديك نحو 150 ms لتنفقها، وكل قفزة (hop) وكل طابور انتظار وكل خطوة معالجة تضعها في المسار تأخذ جزءًا منها.

That allowance is the Latency budget. Its upper limit is written τ (tau): the maximum acceptable end-to-end Response time (RT) of a service. The budget is the interval [0,τ][0, \tau], and a design is inside it when RT≤τRT \le \tau. Notice who sets τ. It is not the network, and it is not the hardware you happen to own. It comes from the user and the application: human perception for a chat or a game, physics for a headset that must keep up with your head. The network and the servers only decide how much of the budget you spend.

هذا المقدار المسموح به هو latency budget (ميزانية التأخير). ويُكتب حدّه الأعلى τ (تاو): أقصى response time (زمن استجابة) مقبول للخدمة من الطرف إلى الطرف. الميزانية هي الفترة [0,τ][0, \tau]، ويكون التصميم داخلها عندما RT≤τRT \le \tau. لاحظ من يحدد τ. ليست الشبكة، وليست الأجهزة التي تصادف أنك تملكها. إنها تأتي من المستخدم والتطبيق: الإدراك البشري في حالة المحادثة أو اللعبة، والفيزياء في حالة نظارة رأس يجب أن تواكب حركة رأسك. أما الشبكة والخوادم فتحدد فقط مقدار ما تنفقه من الميزانية.

What counts against the budgetما الذي يُخصم من الميزانية

It is tempting to compare τ with the Latency to a layer: the client reaches the edge with small latency, the fog with medium latency and the cloud with large latency. But latency is only part of the bill. Recall from part 9 that response time is the trip out, plus the Processing time (PT) at the server, plus the trip back:

من المغري مقارنة τ بـlatency (التأخير) إلى طبقة ما: يصل العميل إلى الحافة بتأخير صغير، وإلى الضباب بتأخير متوسط، وإلى السحابة بتأخير كبير. لكن التأخير ليس إلا جزءًا من الفاتورة. تذكّر من الجزء 9 أن زمن الاستجابة هو رحلة الذهاب، زائد processing time (وقت المعالجة) على الخادم، زائد رحلة العودة:

RT=L↑+PT+L↓≤τRT = L_{\uparrow} + PT + L_{\downarrow} \le \tau
Latency budget condition: out, processing, back, compared with τشرط ميزانية زمن الانتقال: الذهاب ثم المعالجة ثم العودة، مقارنةً بـ τ

A per-layer latency figure is one-way, so never compare a single arrow directly with τ. When a pipeline splits its tasks across several layers, every hop between them joins the sum as well, together with every task’s processing time. The gauge below makes the consequence visible: the same request, three placements, one deadline.

رقم التأخير الخاص بكل طبقة هو في اتجاه واحد، لذلك لا تقارن سهمًا واحدًا مباشرة مع τ أبدًا. وعندما يوزّع خط المعالجة مهامه على عدة طبقات، تدخل كل قفزة بينها في المجموع أيضًا، مع وقت معالجة كل مهمة. يجعل المقياس أدناه النتيجة مرئية: الطلب نفسه، وثلاثة توزيعات، ومهلة واحدة.

Three mappings of the same request against τ = 100 ms. Only the edge finishes before the τ line; fog and cloud run past it.ثلاثة توزيعات للطلب نفسه مقابل τ = 100 ms. الحافة وحدها تنتهي قبل خط τ، بينما يتجاوزه الضباب والسحابة.

Worked exampleمثال محلول

Is the fog mapping within τ = 100 ms? (illustrative numbers)هل توزيع الضباب داخل τ = 100 ms؟ (أرقام توضيحية)

  1. Write the budgetاكتب الميزانية

    The service must answer within τ = 100 ms.
    يجب أن تجيب الخدمة خلال τ = 100 ms.
  2. Sum the fog mappingاجمع توزيع الضباب

    One-way latency to the fog is 20 ms and processing takes 70 ms. So RT = 20 + 70 + 20 = 110 ms. That is over budget by 10 ms.
    التأخير في اتجاه واحد إلى الضباب 20 ms والمعالجة تستغرق 70 ms. إذن RT = 20 + 70 + 20 = 110 ms. وهذا يتجاوز الميزانية بمقدار 10 ms.
  3. Try the edgeجرّب الحافة

    One-way latency to the edge is 5 ms. If the edge server can still process in 70 ms, RT = 5 + 70 + 5 = 80 ms, which fits. In practice edge servers are smaller, so check that PT does not grow enough to undo the saving.
    التأخير في اتجاه واحد إلى الحافة 5 ms. فإذا استطاع خادم الحافة أن يعالج أيضًا في 70 ms، يكون RT = 5 + 70 + 5 = 80 ms، وهذا يناسب الميزانية. لكن خوادم الحافة في الواقع أصغر، فتحقّق من أن PT لا يزداد بما يكفي لإلغاء هذا التوفير.
  4. Resultالنتيجة

    Fog fails (110 > 100). Edge passes (80 ≤ 100). Always write the sum and the inequality.
    الضباب يفشل (110 > 100). والحافة تنجح (80 ≤ 100). اكتب دائمًا المجموع والمتباينة.

The last step of that example hides the real tension of this whole part. Moving closer shrinks the latency terms, but closer sites are smaller, so the processing term can grow. Neither “always edge” nor “always cloud” is a rule; the inequality decides. The simulator lets you feel that tension. Its three tasks are an image resize, object detection and drawing boxes, and the presets map them to different layers. Set τ to 100 ms and find the one preset that stays in budget.

الخطوة الأخيرة في ذلك المثال تخفي التوتر الحقيقي في هذا الجزء كله. الاقتراب يقلّص حدود التأخير، لكن المواقع الأقرب أصغر، لذلك قد يكبر حد المعالجة. لا “الحافة دائمًا” ولا “السحابة دائمًا” قاعدة؛ المتباينة هي التي تحسم. يتيح لك المحاكي أن تشعر بهذا التوتر. مهامه الثلاث هي تغيير حجم صورة، واكتشاف الكائنات (object detection)، ورسم المربعات، والإعدادات المسبقة (presets) توزّعها على طبقات مختلفة. اضبط τ على 100 ms وابحث عن الإعداد المسبق الوحيد الذي يبقى داخل الميزانية.

SimulatorمحاكيMap a pipeline onto the continuumوزّع خط معالجة على السلسلة المتصلة (continuum)
  1. T1Image resizeتصغير الصورةPT 8 ms
  2. T2Object detectionاكتشاف الأجسامPT 40 ms
  3. T3Draw boxesرسم المربعاتPT 8 ms
150 ms
Networkالشبكة40ms
Response timeزمن الاستجابة96ms
Within budgetضمن الميزانية RT ≤ 150 ms
τ
networkالشبكة 40 ms · 42%processingالمعالجة 56 ms · 58%

Formulaالمعادلة

RT = Σ one-way hops + Σ PT

RT = (5 + 15 + 15 + 5) + (8 + 40 + 8) = 96 ms

Client→Edge 5 · Edge→Fog 15 · Fog→Edge 15 · Edge→Client 5

Each hop costs the difference between the one-way latencies of the two layers: Device 0, Edge 5, Fog 20, Cloud 70 ms from the client.تكلفة كل قفزة (hop) هي الفرق بين زمني الانتقال أحادي الاتجاه للطبقتين: الجهاز (Device) 0، والحافة (Edge) 5، والضباب (Fog) 20، والسحابة (Cloud) 70 ms من العميل.

Recall

At τ = 100 ms, which simulator preset passes, and why do “all edge” and “all cloud” fail?عند τ = 100 ms، أي إعداد مسبق في المحاكي ينجح، ولماذا يفشل “الكل على الحافة” و“الكل على السحابة”؟

Only mapping 4 (edge, fog, edge) passes, at about 96 ms. All edge has almost no network cost but object detection runs slowly on the small edge server (120 ms), so RT is about 146 ms. All cloud processes fast but pays 70 ms each way, about 159 ms in total. The winner balances latency and processing time. Stretch: build a custom mapping by hand. All fog reaches about 88 ms, because the fog’s stronger processor outweighs its extra latency.
ينجح التوزيع 4 وحده (حافة، ضباب، حافة)، بنحو 96 ms. “الكل على الحافة” تكلفته الشبكية شبه معدومة، لكن اكتشاف الكائنات يعمل ببطء على خادم الحافة الصغير (120 ms)، فيصبح RT نحو 146 ms. و“الكل على السحابة” يعالج بسرعة لكنه يدفع 70 ms في كل اتجاه، أي نحو 159 ms إجمالًا. الفائز يوازن بين التأخير ووقت المعالجة. تحدٍّ إضافي: ابنِ توزيعًا مخصصًا بيدك. “الكل على الضباب” يصل إلى نحو 88 ms، لأن معالج الضباب الأقوى يعوّض تأخيره الإضافي ويزيد.

Where real values of τ come fromمن أين تأتي القيم الحقيقية لـ τ

Because τ belongs to the user, you should never invent it. Studies of human perception and device physics give defensible numbers, and they span four orders of magnitude: a headset that must track your head has a couple of tens of milliseconds, a conversation has about a hundred and fifty, a recognition assistant has most of a second, and a user waiting for a report keeps attention for about ten seconds. The table collects the values this course relies on, roughly from the strictest to the most relaxed. You will use every row in the design exercises that follow.

لأن τ ملك للمستخدم، لا ينبغي لك أن تخترعها أبدًا. دراسات الإدراك البشري وفيزياء الأجهزة تعطي أرقامًا يمكن الدفاع عنها، وهي تمتد عبر أربع مراتب عشرية: نظارة الرأس التي يجب أن تتتبع رأسك لديها بضع عشرات من الملّي ثانية، والمحادثة لديها نحو مئة وخمسين، ومساعد التعرف لديه معظم الثانية، والمستخدم الذي ينتظر تقريرًا يبقى منتبهًا نحو عشر ثوانٍ. يجمع الجدول القيم التي يعتمد عليها هذا المقرر، مرتبة تقريبًا من الأشد صرامة إلى الأكثر تساهلًا. وستستخدم كل صف منها في تمارين التصميم التالية.

InteractionالتفاعلττSourceالمصدر
VR / XR motion-to-photonزمن motion-to-photon في VR / XR≤ 20 ms (7 to 15 ms preferred)≤ 20 ms (ويُفضَّل 7 إلى 15 ms)RFC 9699RFC 9699
VR motion-to-photon consensusالإجماع على motion-to-photon في VR< 15 to 20 ms< 15 إلى 20 msElbamby et al.Elbamby et al.
Response feels instantaneousالاستجابة تبدو فورية0.1 s0.1 sNielsenNielsen
One-way conversational delayتأخير المحادثة في اتجاه واحد< 150 ms preferred, 400 ms ceiling< 150 ms مفضّل، و400 ms سقف أعلىITU-T G.114ITU-T G.114
Web interaction rated good (INP)تفاعل ويب مصنّف جيدًا (INP)≤ 200 ms at p75≤ 200 ms عند p75web.devweb.dev
Wearable face recognitionالتعرف على الوجوه في الأجهزة القابلة للارتداء370 to 1000 ms370 إلى 1000 msChen et al. 2017Chen et al. 2017
Step-by-step instruction (Lego, Draw, Sandwich)الإرشاد خطوة بخطوة (Lego وDraw وSandwich)600 ms tight, 2.7 s loose600 ms حد صارم، و2.7 s حد متساهلChen et al. 2017Chen et al. 2017
Flow of thought stays unbrokenتدفق التفكير يبقى متصلًا1 s1 sNielsenNielsen
User keeps attention on the taskالمستخدم يبقى منتبهًا للمهمة10 s10 sNielsenNielsen
Published latency budgetsميزانيات التأخير المنشورة

One more rule turns these numbers into a real test. A budget is a promise about the experience of users, and users remember the slow requests, not the average one. So published budgets are stated at a percentile.

قاعدة أخرى تحوّل هذه الأرقام إلى اختبار حقيقي. الميزانية وعد بشأن تجربة المستخدمين، والمستخدمون يتذكرون الطلبات البطيئة لا الطلب المتوسط. لذلك تُذكر الميزانيات المنشورة عند مئين (percentile).

Quick checkاختبار سريع

A service has τ = 120 ms. One-way latency to the fog is 25 ms and processing takes 75 ms. Is the fog mapping within budget?خدمة لها τ = 120 ms. التأخير في اتجاه واحد إلى الضباب 25 ms والمعالجة تستغرق 75 ms. هل توزيع الضباب داخل الميزانية؟

Quick checkاختبار سريع

Which published figure is the standard reference for acceptable one-way conversational delay?أي رقم منشور هو المرجع المعياري لتأخير المحادثة المقبول في اتجاه واحد؟

Knowing the inequality is not the same as designing a system. Real services are not one request and one server; they are pipelines of tasks with different needs. Design questions of this kind have no single right answer, but they do have a right method, and it is the same four steps every time: list the tasks, set τ per task, place each task on a layer, then check Response time (RT) and the trade-offs.

معرفة المتباينة ليست مثل تصميم نظام. الخدمات الحقيقية ليست طلبًا واحدًا وخادمًا واحدًا؛ إنها خطوط معالجة من مهام ذات احتياجات مختلفة. أسئلة التصميم من هذا النوع ليس لها إجابة صحيحة واحدة، لكن لها طريقة صحيحة، وهي الخطوات الأربع نفسها في كل مرة: اسرد المهام، وحدّد τ لكل مهمة، وضع كل مهمة على طبقة، ثم تحقّق من response time ومن المفاضلات.

Smart glasses are a good first case because every constraint pulls hard. The device is small, runs on a tiny battery and sits on your face, so it cannot get hot. Yet the job, recognizing the faces and objects in front of you, is heavy vision computing. Before reading on, take a minute and list the tasks a face-recognition assistant on glasses would need. That effort is what makes the model answer stick.

النظارات الذكية حالة أولى جيدة لأن كل قيد فيها يشدّ بقوة. الجهاز صغير، ويعمل ببطارية ضئيلة، ويستقر على وجهك، فلا يحتمل أن يسخن. ومع ذلك فالمهمة، أي التعرف على الوجوه والأشياء التي أمامك، حوسبة بصرية ثقيلة. قبل أن تكمل القراءة، خذ دقيقة واسرد المهام التي يحتاجها مساعد للتعرف على الوجوه على النظارة. هذا الجهد هو ما يجعل الإجابة النموذجية ترسخ في ذهنك.

Worked exampleمثال محلول

Architecting smart glasses on the E2C continuumتصميم معمارية النظارات الذكية على متصل E2C

  1. 1. List the tasks1. اسرد المهام

    The Service pipeline is: capture a camera frame, compress or downscale it, detect and recognize nearby faces or objects, generate guidance text, render the overlay on the display, store history and photos, and retrain the recognition models.
    خط المعالجة (pipeline) هو: التقاط إطار من الكاميرا، وضغطه أو تصغير دقته، واكتشاف الوجوه أو الأشياء القريبة والتعرف عليها، وتوليد نص إرشادي، ورسم الطبقة المضافة (overlay) على الشاشة، وتخزين السجل والصور، وإعادة تدريب نماذج التعرف.
  2. 2. Set τ per task2. حدّد τ لكل مهمة

    The overlay must follow head motion, so it lives in a display loop of tens of milliseconds (RFC 9699 gives 20 ms for XR). Chen et al. derive 370 to 1000 ms for face recognition from how long people take to recognize a familiar face, and 600 ms tight to 2.7 s loose for step-by-step assembly guidance on Google Glass from a user study. Storage and training have no interactive deadline.
    يجب أن تتبع الطبقة المضافة حركة الرأس، لذلك تعيش في حلقة عرض مدتها عشرات الملّي ثانية (يعطي RFC 9699 قيمة 20 ms لـ XR). ويستنتج Chen et al. مهلة من 370 إلى 1000 ms للتعرف على الوجوه من الوقت الذي يحتاجه الناس للتعرف على وجه مألوف، ومن 600 ms كحد صارم إلى 2.7 s كحد متساهل لإرشادات التجميع خطوة بخطوة على Google Glass من دراسة على المستخدمين. أما التخزين والتدريب فليس لهما مهلة تفاعلية.
  3. 3. Place each task3. ضع كل مهمة في مكانها

    This is a Mapping. Capture, compression and overlay rendering stay on the glasses, the Mist layer. Detection, recognition and guidance use Offloading to a nearby Edge server (a cloudlet). Storage, analytics and model training go to the Cloud.
    هذا mapping (توزيع). يبقى الالتقاط والضغط ورسم الطبقة المضافة على النظارة، أي طبقة mist. ويستخدم الاكتشاف والتعرف والإرشاد offloading (نقل المعالجة) إلى خادم edge قريب (cloudlet). ويذهب التخزين والتحليلات وتدريب النماذج إلى cloud.
  4. 4. Check RT and trade-offs4. تحقّق من RT والمفاضلات

    In Chen et al.’s Figure 17, face recognition with Glass on a WiFi cloudlet reached 435 ms at the 90th percentile. That meets the loose bound (1000 ms) but misses the tight bound (370 ms), and even the phone on the cloudlet (410 ms) misses it. With a phone client, the cloud gave 615 ms against 410 ms on the cloudlet, and the paper notes that cloud offload almost always adds 100 to 200 ms compared with a cloudlet.
    في الشكل 17 من ورقة Chen et al.، بلغ التعرف على الوجوه باستخدام Glass مع cloudlet عبر WiFi زمن 435 ms عند المئين 90. هذا يحقق الحد المتساهل (1000 ms) لكنه يخفق في الحد الصارم (370 ms)، بل حتى الهاتف مع cloudlet (410 ms) يخفق فيه. ومع عميل هاتفي، أعطت السحابة 615 ms مقابل 410 ms على cloudlet، وتلاحظ الورقة أن نقل المعالجة إلى السحابة يضيف دائمًا تقريبًا 100 إلى 200 ms مقارنة بـ cloudlet.
  5. Resultالنتيجة

    Device for capture and display, edge for recognition, cloud for storage and training.
    الجهاز للالتقاط والعرض، والحافة للتعرف، والسحابة للتخزين والتدريب.
Relay: the glasses send a frame to the cloudlet and get a label back; only history travels on to the cloud.تتابع: ترسل النظارة إطارًا إلى الـ cloudlet وتستقبل تسمية في المقابل، والسجل وحده يكمل طريقه إلى السحابة.

Step 4 is worth a second look, because it shows the method working honestly. The cloudlet design does not magically hit every bound: it meets the loose face-recognition deadline and misses the tight one. That is a real, measured result at the tail, and it is exactly the kind of statement a good design report makes. The cloud alternative misses by more, so the edge is the better placement, not a perfect one.

الخطوة 4 تستحق نظرة ثانية، لأنها تُظهر الطريقة وهي تعمل بأمانة. تصميم الـ cloudlet لا يحقق كل حد بطريقة سحرية: إنه يحقق المهلة المتساهلة للتعرف على الوجوه ويخفق في الصارمة. هذه نتيجة حقيقية مقاسة عند الذيل (tail)، وهي بالضبط نوع العبارة التي يكتبها تقرير التصميم الجيد. بديل السحابة يخفق بفارق أكبر، لذلك فالحافة هي التوزيع الأفضل، لا التوزيع المثالي.

The trade-offs behind the placementالمفاضلات وراء هذا التوزيع

Latency is not the only reason for this split. Shi et al., summarizing Ha et al.’s cloudlet study for wearable cognitive assistance, report that offloading can cut energy use by 30 to 40%, which matters on a device with a battery the size of a stick of gum. They also argue that processing at the edge protects privacy better than uploading raw data to the cloud, and faces are among the most sensitive data there is.

التأخير ليس السبب الوحيد لهذا التقسيم. فـ Shi et al.، في تلخيصهم لدراسة Ha et al. عن الـ cloudlet للمساعدة المعرفية القابلة للارتداء، يذكرون أن نقل المعالجة قد يخفض استهلاك الطاقة بنسبة 30 إلى 40%، وهذا مهم في جهاز ببطارية بحجم قطعة علكة. ويرون أيضًا أن المعالجة على الحافة تحمي الخصوصية أفضل من رفع البيانات الخام إلى السحابة، والوجوه من أكثر البيانات حساسية على الإطلاق.

The price is dependence. The glasses now need a working wireless link and an edge site near wherever the wearer walks. Edge sites are few and expensive, so scalability and reach are limited. The cloud has global reach and elastic capacity, but it misses the tight end of the budget. That is exactly why the design keeps both, and why every placement you propose should name what it gains and what it gives up.

الثمن هو الاعتماد. فالنظارة تحتاج الآن إلى اتصال لاسلكي يعمل وإلى موقع حافة قريب أينما مشى مرتديها. مواقع الحافة قليلة ومكلفة، لذلك تكون قابلية التوسع والانتشار محدودة. السحابة لها انتشار عالمي وسعة مرنة، لكنها تخفق في الطرف الصارم من الميزانية. ولهذا بالضبط يحتفظ التصميم بالاثنين، ولهذا ينبغي لكل توزيع تقترحه أن يذكر ما يكسبه وما يتنازل عنه.

TaskالمهمةττLayerالطبقةReasonالسبب
Capture and downscale camera frameالتقاط إطار الكاميرا وتصغير دقتهEvery frameكل إطارMist (glasses)Mist (النظارة)Raw video is heavy; shrink it before it touches the radioالفيديو الخام ثقيل، فقلّصه قبل أن يصل إلى الراديو
Render the overlay on the displayرسم الطبقة المضافة على الشاشة≈ 20 ms display loop≈ 20 ms حلقة العرضMist (glasses)Mist (النظارة)Must follow head motion; no network trip fitsيجب أن تتبع حركة الرأس، ولا تتسع لأي رحلة عبر الشبكة
Detect and recognize faces or objectsاكتشاف الوجوه أو الأشياء والتعرف عليها370 to 1000 ms370 إلى 1000 msEdge (cloudlet)الحافة (cloudlet)Too heavy for the glasses, too slow via the cloudأثقل من أن تتحمله النظارة، وأبطأ من اللازم عبر السحابة
Generate guidance textتوليد نص الإرشاد600 ms to 2.7 s600 ms إلى 2.7 sEdge (cloudlet)الحافة (cloudlet)Needs the recognition result, which already lives thereيحتاج إلى نتيجة التعرف، الموجودة هناك أصلًا
Store history and photosتخزين السجل والصورSeconds or moreثوانٍ أو أكثرCloudالسحابةDurable, cheap, reachable from any deviceتخزين دائم ورخيص ويمكن الوصول إليه من أي جهاز
Retrain recognition modelsإعادة تدريب نماذج التعرفHoursساعاتCloudالسحابةNeeds large datasets and GPU poolsيحتاج إلى مجموعات بيانات كبيرة ومجمّعات GPU
Model answer for smart glassesالإجابة النموذجية للنظارات الذكية

Recall

Without looking: list the tasks of a smart-glasses face-recognition pipeline and place each on the continuum.من دون النظر: اسرد مهام خط معالجة التعرف على الوجوه في النظارات الذكية وضع كل مهمة على المتصل.

Capture, compression and overlay rendering on the glasses (mist). Detection and recognition on an edge cloudlet, with τ of 370 to 1000 ms. Storage and model training in the cloud. Justification: the cloud added 100 to 200 ms over a cloudlet in Chen et al., and cloudlet offloading cut energy use by 30 to 40% in Ha et al., as summarized by Shi et al.
الالتقاط والضغط ورسم الطبقة المضافة على النظارة (mist). والاكتشاف والتعرف على cloudlet طرفي، مع τ من 370 إلى 1000 ms. والتخزين وتدريب النماذج في السحابة. التبرير: أضافت السحابة 100 إلى 200 ms مقارنة بالـ cloudlet في Chen et al.، وخفض نقل المعالجة إلى الـ cloudlet استهلاك الطاقة بنسبة 30 إلى 40% في Ha et al.، كما لخّصه Shi et al.

Quick checkاختبار سريع

Moving face recognition from the smart glasses to a nearby edge server mainly trades what?نقل التعرف على الوجوه من النظارات الذكية إلى خادم حافة قريب يقايض أساسًا بين ماذا وماذا؟

Picture a warehouse worker holding a tablet. Overlays mark the next shelves to pick from, a ring counts progress, and a green arrow on the floor says the target is 12 m ahead. It looks like one app. For design purposes it is at least six tasks with deadlines that range from milliseconds to hours. That is the central idea of this concept: τ belongs to a task, not to an app, and a single app routinely needs every layer of the continuum at once.

تخيّل عاملًا في مستودع يحمل جهازًا لوحيًا. طبقات مضافة تحدد الرفوف التالية التي يلتقط منها، وحلقة تعدّ التقدم، وسهم أخضر على الأرض يقول إن الهدف على بعد 12 m أمامه. يبدو تطبيقًا واحدًا. لكنه لأغراض التصميم ست مهام على الأقل، بمهل تتراوح من الملّي ثانية إلى الساعات. هذه هي الفكرة المركزية في هذا المفهوم: τ تخص المهمة لا التطبيق، وكثيرًا ما يحتاج تطبيق واحد إلى كل طبقات المتصل في الوقت نفسه.

Motion-to-photon: the tightest budget in the courseMotion-to-photon: أضيق ميزانية في المقرر

Both augmented and virtual reality are governed by one deadline, so it pays to understand it before designing either. When you move your head, or the tablet, the image must move with you. The time from the movement to the matching light leaving the display is motion-to-photon (MTP) latency. If it is too long, your eyes and your inner ear disagree. Elbamby et al. explain that high MTP sends conflicting signals to the vestibulo-ocular reflex, which can cause motion sickness. In AR the failure is also visible: a virtual label that lags behind a real shelf is noticed at once, because the real world is the reference.

الواقع المعزز والواقع الافتراضي كلاهما محكوم بمهلة واحدة، لذلك يفيدك أن تفهمها قبل تصميم أي منهما. عندما تحرك رأسك، أو الجهاز اللوحي، يجب أن تتحرك الصورة معك. الزمن من الحركة إلى خروج الضوء المطابق من الشاشة هو تأخير motion-to-photon (MTP). إذا طال، تختلف عيناك مع أذنك الداخلية. يشرح Elbamby et al. أن ارتفاع MTP يرسل إشارات متعارضة إلى المنعكس الدهليزي العيني (vestibulo-ocular reflex)، وهذا قد يسبب دوار الحركة. وفي AR يكون الفشل مرئيًا أيضًا: التسمية الافتراضية التي تتأخر عن رف حقيقي تُلاحظ فورًا، لأن العالم الحقيقي هو المرجع.

The research community broadly agrees on the ceiling. Elbamby et al. report a broad consensus that MTP must stay below 15 to 20 ms. RFC 9699 uses 20 ms at most for XR as a whole, and shows how little of it is left for computing once the display has taken its share:

يتفق المجتمع البحثي إلى حد كبير على السقف. يذكر Elbamby et al. وجود إجماع واسع على أن MTP يجب أن يبقى أقل من 15 إلى 20 ms. ويستخدم RFC 9699 حدًا أقصاه 20 ms لـ XR ككل، ويبيّن كم يتبقى منه للحوسبة بعد أن تأخذ الشاشة نصيبها:

12-13⏟display+7-8⏟sensing, rendering, RTT≤20 ms\underbrace{12\text{-}13}_{\text{display}} + \underbrace{7\text{-}8}_{\text{sensing, rendering, RTT}} \le 20\ \text{ms}
RFC 9699 motion-to-photon splitتقسيم motion-to-photon في RFC 9699

Estimates of the split vary. Elbamby et al. put display delay at about 10 to 15 ms, expected to fall to 5 ms, which leaves 14 ms for computing and communication. Either way, only a few milliseconds remain for any network trip, and a trip to a distant cloud does not fit even once.

تتفاوت تقديرات هذا التقسيم. يضع Elbamby et al. تأخير الشاشة عند نحو 10 إلى 15 ms، مع توقع انخفاضه إلى 5 ms، وهذا يترك 14 ms للحوسبة والاتصال. وفي الحالتين لا يتبقى إلا بضع ملّي ثوانٍ لأي رحلة عبر الشبكة، ورحلة إلى سحابة بعيدة لا تتسع حتى مرة واحدة.

One frame on a stopwatch: display takes most of the 20 ms; a remote round trip would need a second lap.إطار واحد على ساعة إيقاف: الشاشة تأخذ معظم الـ 20 ms، ورحلة ذهاب وعودة إلى خادم بعيد ستحتاج دورة ثانية.

The standard escape is reprojection, also called time warp: the device takes the last rendered frame and shifts it to match the newest head pose just before display. Reprojection is cheap, so it can run locally inside the MTP budget, and it means a heavy frame rendered elsewhere can arrive a little late without the image lagging behind your head. This one technique is what lets the heavy work leave the device at all.

المخرج المعتاد هو إعادة الإسقاط (reprojection)، وتسمى أيضًا time warp: يأخذ الجهاز آخر إطار مرسوم ويزيحه ليطابق أحدث وضعية للرأس قبيل العرض مباشرة. إعادة الإسقاط رخيصة، لذلك يمكن أن تعمل محليًا داخل ميزانية MTP، وهي تعني أن إطارًا ثقيلًا رُسم في مكان آخر يمكن أن يصل متأخرًا قليلًا من دون أن تتأخر الصورة عن رأسك. هذه التقنية الواحدة هي ما يسمح للعمل الثقيل بمغادرة الجهاز أصلًا.

Warehouse AR: six tasks, four layersالواقع المعزز في المستودع: ست مهام، أربع طبقات

Worked exampleمثال محلول

Architecting warehouse AR pickingتصميم معمارية الالتقاط بالواقع المعزز في المستودع

  1. 1. List the tasks1. اسرد المهام

    Camera and motion-sensor (IMU) pose tracking; anchoring overlays to shelves and drawing arrows; recognizing shelf labels and items; looking up the pick list and inventory for this warehouse; optimizing routes across all pickers; fleet-wide analytics and demand forecasting.
    تتبع الوضعية (pose tracking) بالكاميرا ومستشعر الحركة (IMU)؛ وتثبيت الطبقات المضافة على الرفوف ورسم الأسهم؛ والتعرف على ملصقات الرفوف والأصناف؛ والبحث في قائمة الالتقاط والمخزون لهذا المستودع؛ وتحسين المسارات لجميع العاملين؛ والتحليلات على مستوى الأسطول كله والتنبؤ بالطلب.
  2. 2. Set τ per task2. حدّد τ لكل مهمة

    Tracking and anchoring share the 20 ms MTP budget, of which only 7 to 8 ms remain for sensor processing, rendering and the Round-trip time (RTT) to the edge. Recognition can take a few hundred milliseconds: Nielsen’s 1 s keeps the flow of thought, and 0.1 s feels instant. Inventory lookups should finish within a second, routing within seconds, and analytics can take hours.
    يتقاسم التتبع والتثبيت ميزانية MTP البالغة 20 ms، ولا يتبقى منها إلا 7 إلى 8 ms لمعالجة المستشعرات والرسم وRTT إلى الحافة. ويمكن أن يستغرق التعرف بضع مئات من الملّي ثانية: حد Nielsen البالغ 1 s يحافظ على تدفق التفكير، و0.1 s يبدو فوريًا. وينبغي أن تنتهي عمليات البحث في المخزون خلال ثانية، والتوجيه خلال ثوانٍ، ويمكن أن تستغرق التحليلات ساعات.
  3. 3. Place each task3. ضع كل مهمة في مكانها

    Tracking and reprojection run on the device. Heavy rendering and recognition are offloaded to an Edge server in the building. The inventory database and route optimizer run on a Fog node, the warehouse server shared by every picker. Analytics across all warehouses run in the Cloud.
    يعمل التتبع وإعادة الإسقاط على الجهاز. ويُنقل الرسم الثقيل والتعرف إلى خادم edge داخل المبنى. وتعمل قاعدة بيانات المخزون ومحسّن المسارات على عقدة fog، أي خادم المستودع المشترك بين جميع العاملين. وتعمل التحليلات عبر كل المستودعات في cloud.
  4. 4. Check RT and trade-offs4. تحقّق من RT والمفاضلات

    RFC 9699 is blunt: running these rendering tasks in the cloud is not feasible, because end-to-end delays must be within a few milliseconds. The same RFC names heat and battery drain as reasons to offload at all. The fog node keeps shared state close and scales to the whole site, while the cloud gives reach across sites.
    RFC 9699 صريح: تشغيل مهام الرسم هذه في السحابة غير ممكن، لأن التأخير من الطرف إلى الطرف يجب أن يكون في حدود بضع ملّي ثوانٍ. ويذكر الـ RFC نفسه الحرارة واستنزاف البطارية سببين لـ offload (نقل المعالجة) من الأساس. عقدة الضباب تبقي الحالة المشتركة قريبة وتتوسع لتخدم الموقع كله، بينما تعطي السحابة انتشارًا عبر المواقع.
  5. Resultالنتيجة

    One app, four layers: the deadline of each task picks its layer, not the name of the app.
    تطبيق واحد، أربع طبقات: مهلة كل مهمة هي التي تختار طبقتها، لا اسم التطبيق.
TaskالمهمةττLayerالطبقةReasonالسبب
Camera and IMU pose trackingتتبع الوضعية بالكاميرا ومستشعر IMU≤ 20 ms motion to photon≤ 20 ms من الحركة إلى الضوءDeviceالجهازOnly 7 to 8 ms remain after the displayلا يتبقى إلا 7 إلى 8 ms بعد الشاشة
Anchor overlays, render arrowsتثبيت الطبقات المضافة ورسم الأسهمWithin the same 20 msضمن الـ 20 ms نفسهاDevice, heavy parts on in-building edgeالجهاز، والأجزاء الثقيلة على حافة داخل المبنىOffloading cuts heat and battery drainنقل المعالجة يقلل الحرارة واستنزاف البطارية
Recognize shelf labels and itemsالتعرف على ملصقات الرفوف والأصنافa few hundred msبضع مئات من msEdgeالحافةHeavy vision work, still interactiveعمل بصري ثقيل، لكنه لا يزال تفاعليًا
Pick list and inventory lookupالبحث في قائمة الالتقاط والمخزون< 1 s< 1 sFog (warehouse server)الضباب (خادم المستودع)Shared by every picker on siteمشترك بين كل العاملين في الموقع
Route optimization across pickersتحسين المسارات لجميع العاملينSecondsثوانٍFogالضبابNeeds site-wide state, not per-frame speedيحتاج إلى حالة على مستوى الموقع، لا إلى سرعة لكل إطار
Fleet analytics and demand forecastingتحليلات الأسطول والتنبؤ بالطلبHoursساعاتCloudالسحابةCross-warehouse data, big computeبيانات عبر المستودعات وحوسبة ضخمة
Model answer for warehouse ARالإجابة النموذجية للواقع المعزز في المستودع

Notice the new role of the fog layer. Nothing in the smart-glasses design was shared between users, but a warehouse is a team. The pick list and the route optimizer serve every picker in the building, their deadline is around a second rather than a frame, and keeping them on site avoids sending every lookup to the cloud. Shared site state is the natural job of fog.

لاحظ الدور الجديد لطبقة الضباب. لم يكن شيء في تصميم النظارات الذكية مشتركًا بين المستخدمين، لكن المستودع فريق. قائمة الالتقاط ومحسّن المسارات يخدمان كل العاملين في المبنى، ومهلتهما نحو ثانية لا إطار واحد، وإبقاؤهما في الموقع يتجنب إرسال كل عملية بحث إلى السحابة. الحالة المشتركة على مستوى الموقع هي الوظيفة الطبيعية للضباب.

Recall

In the warehouse AR app, which task belongs on a fog node, and why?في تطبيق AR للمستودع، أي مهمة مكانها عقدة ضباب، ولماذا؟

The shared inventory and route-optimization service. Every picker in the building needs it, its τ is around a second rather than 20 ms, and keeping it on site avoids sending every lookup to the cloud. Cloud analytics still aggregate data across warehouses.
خدمة المخزون المشترك وتحسين المسارات. كل عامل في المبنى يحتاجها، وτ الخاصة بها نحو ثانية لا 20 ms، وإبقاؤها في الموقع يتجنب إرسال كل عملية بحث إلى السحابة. وتبقى تحليلات السحابة تجمع البيانات عبر المستودعات.

Quick checkاختبار سريع

In the warehouse AR app, which task has the tightest latency budget?في تطبيق AR للمستودع، أي مهمة لها أضيق ميزانية تأخير؟

Interactive VR: every pixel under the deadlineالواقع الافتراضي التفاعلي: كل بكسل تحت المهلة

Virtual reality shares the same budget, but raises the stakes: in AR only the overlay depends on MTP, while in VR every pixel you see does. The same four steps apply, and the same pattern appears, with a GPU-hungry rendering task pulled between a light headset and a distant data center.

يتشارك الواقع الافتراضي الميزانية نفسها، لكنه يرفع الرهان: في AR تعتمد الطبقة المضافة وحدها على MTP، أما في VR فكل بكسل تراه يعتمد عليه. تنطبق الخطوات الأربع نفسها، ويظهر النمط نفسه، مع مهمة رسم شرهة لـ GPU تتجاذبها نظارة رأس خفيفة ومركز بيانات بعيد.

Worked exampleمثال محلول

Architecting interactive VRتصميم معمارية الواقع الافتراضي التفاعلي

  1. 1. List the tasks1. اسرد المهام

    Head tracking, reprojection, frame rendering, encoding and streaming frames, physics and multiplayer state, the content library, and user profiles.
    تتبع الرأس، وإعادة الإسقاط، ورسم الإطارات، وترميز الإطارات وبثها، والفيزياء وحالة اللعب الجماعي، ومكتبة المحتوى، وملفات المستخدمين.
  2. 2. Set τ per task2. حدّد τ لكل مهمة

    Tracking through display: MTP under 15 to 20 ms. Multiplayer state: tens of milliseconds up to about 150 ms, borrowing G.114’s conversational figure as an analogy for social presence (an analogy, not a VR standard). Content downloads: seconds.
    من التتبع إلى العرض: MTP أقل من 15 إلى 20 ms. حالة اللعب الجماعي: من عشرات الملّي ثانية إلى نحو 150 ms، باستعارة رقم المحادثة في G.114 كتشبيه للحضور الاجتماعي (تشبيه، لا معيار خاص بـ VR). تنزيل المحتوى: ثوانٍ.
  3. 3. Place each task3. ضع كل مهمة في مكانها

    Tracking and reprojection on the headset. Full-quality rendering on an Edge GPU, which is what the lecturer means by “the edge manages frame rendering”. Session state on Fog or the nearest cloud region. The content library and large datasets in the Cloud.
    التتبع وإعادة الإسقاط على نظارة الرأس. والرسم بالجودة الكاملة على GPU في edge، وهذا ما يقصده المحاضر بعبارة “the edge manages frame rendering” (الحافة تتولى رسم الإطارات). وحالة الجلسة على fog أو أقرب منطقة سحابية. ومكتبة المحتوى ومجموعات البيانات الكبيرة في cloud.
  4. 4. Check RT and trade-offs4. تحقّق من RT والمفاضلات

    Elbamby et al. report that online VR computing can take up to 100 ms and the communication delay from the network edge to a server can reach 40 ms. Even ideal 4G loopback latency is 25 ms, already above 20 ms before any rendering. Remote cloud servers suit only low-resolution, non-interactive VR where the whole 360° video can be streamed ahead.
    يذكر Elbamby et al. أن حوسبة VR عبر الإنترنت قد تستغرق حتى 100 ms، وأن تأخير الاتصال من حافة الشبكة إلى الخادم قد يصل إلى 40 ms. وحتى تأخير الحلقة الراجعة المثالي في 4G يبلغ 25 ms، أي أعلى من 20 ms قبل أي رسم. خوادم السحابة البعيدة لا تناسب إلا VR منخفض الدقة وغير تفاعلي، يمكن فيه بث فيديو 360° كاملًا مسبقًا.
  5. Resultالنتيجة

    Headset protects the frame deadline, edge supplies GPU power, cloud supplies content.
    نظارة الرأس تحمي مهلة الإطار، والحافة توفّر قدرة GPU، والسحابة توفّر المحتوى.
TaskالمهمةττLayerالطبقةReasonالسبب
Head trackingتتبع الرأس< 15 to 20 ms MTP< 15 إلى 20 ms MTPHeadsetنظارة الرأسStarts the motion-to-photon clockيبدأ ساعة motion-to-photon
Reprojection (time warp)إعادة الإسقاط (time warp)Inside the MTP budgetداخل ميزانية MTPHeadsetنظارة الرأسFixes the pose even when a remote frame is lateيصحح الوضعية حتى عندما يتأخر إطار بعيد
Full-quality frame renderingرسم الإطارات بالجودة الكاملةPer frameلكل إطارEdge GPUGPU على الحافةToo heavy for a light headset, too far for the cloudأثقل من أن تتحمله نظارة خفيفة، وأبعد من اللازم في السحابة
Physics and multiplayer stateالفيزياء وحالة اللعب الجماعيtens of ms up to ≈ 150 msمن عشرات ms إلى ≈ 150 msFog or nearest regionالضباب أو أقرب منطقةShared by all players in a sessionمشتركة بين كل اللاعبين في الجلسة
Content library and assetsمكتبة المحتوى والأصولSecondsثوانٍCloudالسحابةLarge, rarely changing, globalكبيرة ونادرة التغيّر وعالمية
User profilesملفات المستخدمينSecondsثوانٍCloudالسحابةDurable records, no frame deadlineسجلات دائمة بلا مهلة إطار
Model answer for interactive VRالإجابة النموذجية للواقع الافتراضي التفاعلي

The trade-offs are sharp. An edge GPU per site is expensive, so each site serves a limited number of users. The alternative, a headset tethered by cable to a local PC, meets the budget but gives up mobility. In Latency budget terms, every design is judged the same way: does the per-frame Response time (RT) fit inside MTP, measured at the tail rather than the average?

المفاضلات حادة. وجود GPU طرفي في كل موقع مكلف، لذلك يخدم كل موقع عددًا محدودًا من المستخدمين. والبديل، نظارة رأس موصولة بكابل إلى حاسوب محلي، يحقق الميزانية لكنه يتنازل عن حرية التنقل. وبلغة latency budget، يُحكم على كل تصميم بالطريقة نفسها: هل يتسع response time لكل إطار داخل MTP، مقاسًا عند الذيل لا المتوسط؟

Recall

Why can a VR headset not send every frame to a distant cloud for rendering?لماذا لا تستطيع نظارة VR إرسال كل إطار إلى سحابة بعيدة لرسمه؟

Motion-to-photon must stay under about 15 to 20 ms. RFC 9699 leaves only 7 to 8 ms after the display, while Elbamby et al. report up to 40 ms of edge-to-server communication delay and 25 ms for ideal 4G loopback. So per-frame work stays on the headset or a nearby edge GPU with local reprojection, and the cloud serves content and datasets.
يجب أن يبقى motion-to-photon أقل من نحو 15 إلى 20 ms. لا يترك RFC 9699 إلا 7 إلى 8 ms بعد الشاشة، بينما يذكر Elbamby et al. تأخير اتصال يصل إلى 40 ms من الحافة إلى الخادم، و25 ms للحلقة الراجعة المثالية في 4G. لذلك يبقى العمل الخاص بكل إطار على النظارة أو على GPU طرفي قريب مع إعادة إسقاط محلية، وتخدم السحابة المحتوى ومجموعات البيانات.

Quick checkاختبار سريع

A VR headset must keep motion-to-photon latency within about 20 ms. Where should head-pose reprojection run?يجب أن تُبقي نظارة VR تأخير motion-to-photon في حدود 20 ms تقريبًا. أين ينبغي أن تعمل إعادة الإسقاط لوضعية الرأس؟

Put the three designs side by side and one pattern falls out. The lecturer’s reference answers below are a compact version of the tables you built above. If you placed recognition, sensor interaction and rendering at the edge and storage and analytics in the cloud, you have the same architecture.

ضع التصاميم الثلاثة جنبًا إلى جنب وسيظهر نمط واحد. الإجابات المرجعية للمحاضر أدناه نسخة مختصرة من الجداول التي بنيتها أعلاه. إذا وضعت التعرف والتفاعل مع المستشعرات والرسم على الحافة، والتخزين والتحليلات في السحابة، فلديك المعمارية نفسها.

ApplicationالتطبيقEdge roleدور الحافةCloud roleدور السحابةDriving ττ المحدِّدة
Smart glasses (AR)النظارات الذكية (AR)Recognize nearby objects or facesالتعرف على الأشياء أو الوجوه القريبةStorage and complex computationالتخزين والحوسبة المعقدة370 to 1000 ms per recognition370 إلى 1000 ms لكل عملية تعرف
Industrial ARAR الصناعيReal-time interaction with sensorsالتفاعل اللحظي مع المستشعراتLarge datasets and analyticsمجموعات البيانات الكبيرة والتحليلات≤ 20 ms MTP, < 1 s lookups≤ 20 ms MTP، و< 1 s لعمليات البحث
VR headsetsنظارات VRFrame rendering for smooth visualsرسم الإطارات لصورة سلسةProcessing large datasetsمعالجة مجموعات البيانات الكبيرة< 15 to 20 ms MTP< 15 إلى 20 ms MTP
Lecturer’s reference mappings, with the τ that drives each splitالتوزيعات المرجعية للمحاضر، مع τ التي تحدد كل تقسيم

Every app keeps the Cloud, and every app adds the Edge. What decides the Mapping of a task is a single comparison: is its deadline shorter than the cloud round trip plus the processing it needs? Recognizing a face, reacting to a sensor and drawing the next frame all have deadlines the cloud cannot meet. Storing photos, crunching datasets and training models have none, and they want exactly what the cloud is good at: scale, durability and reach.

كل تطبيق يحتفظ بـ cloud، وكل تطبيق يضيف edge. ما يحدد mapping (توزيع) المهمة هو مقارنة واحدة: هل مهلتها أقصر من رحلة الذهاب والعودة إلى السحابة زائد المعالجة التي تحتاجها؟ التعرف على وجه، والاستجابة لمستشعر، ورسم الإطار التالي، كلها لها مهل لا تستطيع السحابة الوفاء بها. أما تخزين الصور ومعالجة مجموعات البيانات وتدريب النماذج فليس لها مهل، وهي تريد بالضبط ما تجيده السحابة: الحجم والمتانة والانتشار.

Latency is the strongest force in that split, but not the only one. Satyanarayanan’s SEC 2017 keynote gives three reasons to use the edge, and all three appeared in the exercises. Latency, in both mean and tail, drives rendering and recognition. Bandwidth, both peak and average, explains why glasses and AR tablets should not stream raw video to a distant data center. Privacy, which he calls an exposure firewall for the IoT, explains keeping faces on a nearby server.

التأخير أقوى قوة في هذا التقسيم، لكنه ليس الوحيد. تعطي كلمة Satyanarayanan الرئيسية في SEC 2017 ثلاثة أسباب لاستخدام الحافة، وقد ظهرت الثلاثة كلها في التمارين. التأخير، بمتوسطه وذيله، يحرّك قرار الرسم والتعرف. وعرض النطاق (bandwidth)، في ذروته ومتوسطه، يفسّر لماذا لا ينبغي للنظارات وأجهزة AR اللوحية أن تبث فيديو خامًا إلى مركز بيانات بعيد. والخصوصية، التي يسميها جدار حماية من الانكشاف (exposure firewall) لإنترنت الأشياء، تفسّر إبقاء الوجوه على خادم قريب.

The whole lecture in one pictureالمحاضرة كلها في صورة واحدة

That pattern is the lecture’s conclusion in miniature. Before, you architected an application on a single Server layer: pick a machine, deploy the backend, done. Now, because data, IoT devices and machine learning produce and consume so much close to the user, the server is spread across the Edge-to-cloud (E2C) continuum.

هذا النمط هو خلاصة المحاضرة في صورة مصغّرة. في السابق كنت تصمم معمارية التطبيق على server layer (طبقة خادم) واحدة: اختر جهازًا، وانشر الخلفية، وانتهى الأمر. أما الآن، فلأن البيانات وأجهزة إنترنت الأشياء وتعلم الآلة تنتج وتستهلك الكثير قرب المستخدم، صار الخادم موزعًا على E2C continuum.

Before, one server layer. After, the same service spread across device, edge, fog and cloud, and checked against τ.قبل: طبقة خادم واحدة. بعد: الخدمة نفسها موزعة على الجهاز والحافة والضباب والسحابة، ومقارنة مع τ.

That changes the unit of design. You no longer place a server; you place each task of each service Service pipeline. And a placement needs a criterion. The lecture chooses response time, written as a function of Latency and Processing time (PT). Its concrete form generalizes the budget condition from the start of this part to a pipeline that crosses several layers:

هذا يغيّر وحدة التصميم. لم تعد تضع خادمًا؛ بل تضع كل مهمة من كل pipeline (خط معالجة) لخدمة. والتوزيع يحتاج إلى معيار. تختار المحاضرة زمن الاستجابة، مكتوبًا كدالة في latency وprocessing time. وصيغته الملموسة تعمّم شرط الميزانية من بداية هذا الجزء على خط معالجة يعبر عدة طبقات:

RT=f(Latency,PT)=∑hopsLh+∑iPTiRT = f(\text{Latency}, PT) = \sum_{\text{hops}} L_h + \sum_{i} PT_i
Summary formula: every network hop plus every task's processing time. With one layer it reduces to L1 + L2 + PTالصيغة الملخِّصة: كل قفزة شبكية مضافًا إليها زمن معالجة كل مهمة. ومع طبقة واحدة تختزل إلى L1 + L2 + PT

Response time is the right criterion because it is what users actually experience, and because it keeps both levers in view. A faster server only shrinks the processing terms; placement is what shrinks the latency terms. Every argument in this part, from the fog example that missed by 10 ms to the headset that cannot afford one 4G round trip, was an argument about which lever was available.

زمن الاستجابة هو المعيار الصحيح لأنه ما يعيشه المستخدمون فعلًا، ولأنه يبقي الرافعتين كلتيهما في الصورة. الخادم الأسرع يقلّص حدود المعالجة فقط؛ والتوزيع هو ما يقلّص حدود التأخير. كل حجة في هذا الجزء، من مثال الضباب الذي أخفق بفارق 10 ms إلى نظارة الرأس التي لا تحتمل رحلة ذهاب وعودة واحدة عبر 4G، كانت حجة حول أي رافعة كانت متاحة.

The design loopحلقة التصميم

  1. Break the service into a pipeline of tasks.قسّم الخدمة إلى خط معالجة من المهام.
  2. Set τ for each task from a published source.حدّد τ لكل مهمة من مصدر منشور.
  3. Choose a Mapping of tasks to Device, Edge, Fog and Cloud.اختر mapping (توزيعًا) للمهام على device وedge وfog وcloud.
  4. Compute RT from latency and processing time, at a percentile.احسب RT من التأخير ووقت المعالجة، عند مئين (percentile).
  5. Check RT ≤ τ and weigh battery, privacy, cost and reach. If it fails, remap and repeat.تحقّق من RT ≤ τ ووازن البطارية والخصوصية والتكلفة والانتشار. إذا فشل، أعد التوزيع وكرّر.

Recall

State the lecture summary in one sentence, including the design criterion.اذكر خلاصة المحاضرة في جملة واحدة، متضمنة معيار التصميم.

The server is no longer one layer: each pipeline task is mapped to a layer of the E2C continuum, and mappings are judged by response time, RT = f(latency, PT), against τ.
لم يعد الخادم طبقة واحدة: كل مهمة في خط المعالجة توزَّع على طبقة من متصل E2C، ويُحكم على التوزيعات بزمن الاستجابة، RT = f(latency, PT)، مقابل τ.

Recall

Write the latency budget condition and name each term.اكتب شرط ميزانية التأخير وسمِّ كل حد فيه.

RT ≤ τ, with RT = latency to the server + processing time + latency back. τ is the maximum acceptable end-to-end response time, set by the application and its users, not by the network.
RT ≤ τ، حيث RT = latency to the server + processing time + latency back (التأخير إلى الخادم زائد وقت المعالجة زائد تأخير العودة). τ هي أقصى زمن استجابة مقبول من الطرف إلى الطرف، ويحددها التطبيق ومستخدموه، لا الشبكة.

Quick checkاختبار سريع

According to the lecture summary, what is mapped to a layer of the E2C continuum?وفقًا لخلاصة المحاضرة، ما الذي يوزَّع على طبقة من طبقات متصل E2C؟

Where the course goes nextإلى أين يتجه المقرر بعد ذلك

Placing a task on a layer is still abstract. In practice it means running that task inside a virtual machine or a container on that layer. Satyanarayanan’s keynote notes that cloudlets can run lighter-weight containers such as Docker inside VMs, which is exactly what the virtualization and container lectures build.

وضع مهمة على طبقة لا يزال أمرًا مجردًا. عمليًا يعني تشغيل تلك المهمة داخل آلة افتراضية (VM) أو حاوية (container) على تلك الطبقة. تشير كلمة Satyanarayanan الرئيسية إلى أن الـ cloudlet يمكنها تشغيل حاويات أخف وزنًا مثل Docker داخل الآلات الافتراضية، وهذا بالضبط ما تبنيه محاضرات المحاكاة الافتراضية والحاويات.

Renting those layers means choosing a cloud model. NIST SP 800-145 defines the service models (SaaS, PaaS, IaaS) and the deployment models (private, community, public, hybrid). Those definitions are the subject of the cloud models lecture, and they decide who operates each layer in your mapping.

استئجار تلك الطبقات يعني اختيار نموذج سحابي. تعرّف وثيقة NIST SP 800-145 نماذج الخدمة (SaaS وPaaS وIaaS) ونماذج النشر (خاصة، ومجتمعية، وعامة، وهجينة). هذه التعريفات موضوع محاضرة النماذج السحابية، وهي التي تحدد من يشغّل كل طبقة في توزيعك.

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • τ is the maximum acceptable end-to-end response time. A mapping is feasible only if RT ≤ τ, where RT counts latency out, processing time and latency back.τ هو أقصى زمن استجابة مقبول من الطرف إلى الطرف. يكون التوزيع ممكنًا فقط إذا كان RT ≤ τ، حيث يشمل RT زمن الذهاب ووقت المعالجة وزمن العودة.
  • τ comes from people and physics: about 20 ms for XR motion-to-photon, 150 ms one-way for conversation, 200 ms for web interactions, 370 to 1000 ms for face recognition.تأتي τ من البشر والفيزياء: نحو 20 ms لزمن motion-to-photon في XR، و150 ms في اتجاه واحد للمحادثة، و200 ms لتفاعلات الويب، ومن 370 إلى 1000 ms للتعرف على الوجوه.
  • Check budgets at a percentile (p75, p90), not at the mean. Users feel the slow requests.تحقّق من الميزانيات عند مئين (p75 أو p90) لا عند المتوسط. فالمستخدمون يشعرون بالطلبات البطيئة.
  • Set τ per task, not per app. One AR app mixes 20 ms tracking with analytics that can take hours.حدّد τ لكل مهمة لا لكل تطبيق. فتطبيق AR واحد يجمع تتبعًا بمهلة 20 ms مع تحليلات قد تستغرق ساعات.
  • Tight-deadline tasks go to the device or edge. Shared site state goes to fog. Storage, training and analytics go to the cloud.المهام ذات المهل الضيقة تذهب إلى الجهاز أو الحافة. والحالة المشتركة على مستوى الموقع تذهب إلى الضباب (fog). والتخزين والتدريب والتحليلات تذهب إلى السحابة.
  • Offloading to the edge saves battery and keeps raw data private, but adds network dependence and needs edge sites where users are.نقل المعالجة (offloading) إلى الحافة يوفّر البطارية ويبقي البيانات الخام خاصة، لكنه يضيف اعتمادًا على الشبكة ويتطلب مواقع حافة قريبة من أماكن وجود المستخدمين.
  • Summary: the server now spans the E2C continuum. Each pipeline task is mapped individually, and response time is the guiding criterion.الخلاصة: الخادم صار ممتدًا على متصل E2C. تُوزَّع كل مهمة من مهام خط المعالجة (pipeline) على حدة، وزمن الاستجابة هو المعيار الموجِّه.

Sourcesالمصادر