shadow the case for determinism on the edge
play

Shadow: The Case for Determinism on the Edge Matthew Furlong , - PowerPoint PPT Presentation

Slide Title Shadow: The Case for Determinism on the Edge Matthew Furlong , Andrew Quinn, and Jason Flinn Concerns for the Edge Edge Concern Effect Problem Concerns for the Edge Edge Concern Effect Problem Provisioning More jitter


  1. Slide Title Shadow: The Case for Determinism on the Edge Matthew Furlong , Andrew Quinn, and Jason Flinn

  2. Concerns for the Edge Edge Concern Effect Problem

  3. Concerns for the Edge Edge Concern Effect Problem Provisioning More jitter

  4. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter

  5. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability High tail latency! [1] Lee, H., Flinn, J., And Tonshal, B. Raven: Improving interactive latency for the connected car.

  6. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility variability

  7. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility • Low-latency connections are lost variability

  8. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility • Low-latency connections are lost variability Reliability More faults

  9. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility • Low-latency connections are lost variability • Numerous providers Reliability More faults

  10. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility • Low-latency connections are lost variability • Numerous providers Reliability More faults • Distributed

  11. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility • Low-latency connections are lost variability • Numerous providers Reliability More faults • Distributed More data sources Privacy concerns

  12. Concerns for the Edge Edge Concern Effect Problem • Limited edge resources Provisioning More jitter • Mobile network variability Performance Mobility • Low-latency connections are lost variability • Numerous providers Reliability More faults • Distributed More data sources Privacy concerns • More IoT devices = more sensitive user data

  13. Moving From the Cloud to Edge • Applications are typically latency-sensitive or require high bandwidth

  14. Moving From the Cloud to Edge • Applications are typically latency-sensitive or require high bandwidth AR App AR App AR App AR App OpenCV OpenCV OpenCV OpenCV Torch Torch Torch Torch Edge

  15. Outline • Motivation • Determinism to the rescue • Shadow: Deterministic containers • Evaluation

  16. Determinism to the Rescue • A deterministic execution of an application provides the necessary support for edge systems Deterministic Non-Deterministic 0 0/1 0 0/1 1 1 S0 S1 S0 S1 1 S2 0/1

  17. Determinism to the Rescue • Determinism allows applications to be replicated across multiple servers

  18. Determinism to the Rescue • Determinism allows applications to be replicated across multiple servers • Determinism enables migration with minimal downtime

  19. Migration Server inputs: a Low-latency connection Server 1 Responses:

  20. Migration Server inputs: a Better connection discovered Server 1 Responses:

  21. Migration Server inputs: a Initiate migration! Server 1 Responses:

  22. Migration Server inputs: a b Server inputs: a Checkpoint Application b Server 1 ? Responses:

  23. Migration Server inputs: a b b Server inputs: a Transfer Checkpoint Multicast client input b b Server 1 2 Responses:

  24. Migration Server inputs: a c b c b Server inputs: a Transfer Checkpoint Multicast client input c c Server 1 2 3 Responses:

  25. Migration Server inputs: a c d b c d b Server inputs: a Restore Application Multicast client input d d Server 1 2 3 4 Responses:

  26. Migration e Server inputs: a c d b c d b Server inputs: a e Multicast client input e e Server 1 2 3 4 5 Responses:

  27. Migration e Server inputs: a c d f b c d f b Server inputs: a e Multicast client input f f Server 1 6 2 3 4 5 Responses:

  28. Migration e Server inputs: a c d f b c d f b Server inputs: a e Migration complete! g 1 6 Client inputs: 2 3 4 5

  29. Determinism to the Rescue Edge Concern Problem Solution • Limited edge resources Provisioning Determinism • Mobile network variability Mobility • Low-latency connections are lost Determinism • Numerous providers Reliability Determinism • Distributed More data sources • More IoT devices = more sensitive user data Determinism

  30. Determinism to the Rescue Edge Concern Problem Solution • Limited edge resources Provisioning Determinism • Mobile network variability Challenge: Applications are inherently non- Mobility • Low-latency connections are lost Determinism deterministic! • Numerous providers Reliability Determinism • Distributed More data sources • More IoT devices = more sensitive user data Determinism

  31. Determinism to the Rescue • Non-determinism in applications • Randomness • Time • Multi-threading • Network communication • Inter-process communication (IPC)

  32. Determinism to the Rescue • Non-determinism in applications • Randomness • Time • Multi-threading • Network communication • Inter-process communication (IPC) • Challenge: How can we make non-deterministic applications behave deterministically??

  33. Outline • Motivation • Determinism to the rescue • Shadow: Deterministic containers • Evaluation

  34. Shadow • Goal: Eliminate sources of non-determinism

  35. Shadow • Goal: Eliminate sources of non-determinism • Minimize application modifications

  36. Shadow • Goal: Eliminate sources of non-determinism • Minimize application modifications • Maintain similar performance to non-deterministic executions

  37. Deterministic Containers • Shadow removes non-determinism from applications deployed within containers • Multi-threading • OS Events • Client inputs • External Sources of Non-Determinism

  38. Deterministic Thread Scheduler • Shadow uses a deterministic thread scheduler based on weak determinism 1 [1] Olseweski, M., Ansel, J., And Amarsinghe, S. Kendo: Efficient deterministic multithreading in software.

  39. Deterministic Thread Scheduler • Shadow uses a deterministic thread scheduler based on weak determinism 1 • Weak determinism globally orders all synchronization operations [1] Olseweski, M., Ansel, J., And Amarsinghe, S. Kendo: Efficient deterministic multithreading in software.

  40. Deterministic Containers • Shadow removes non-determinism from applications deployed within containers • Multi-threading • OS Events • Client inputs • External Sources of Non-Determinism

  41. Operating System Events • System Calls • getrandom() • gettimeofday() • getpid() • …

  42. Deterministic Containers • Shadow removes non-determinism from applications deployed within containers • Multi-threading • OS Events • Client inputs • External Sources of Non-Determinism

  43. Client Inputs • Determinism is only useful if replicas receive the same sequence of inputs

  44. Client Inputs • Determinism is only useful if replicas receive the same sequence of inputs Client multicasts inputs

  45. Client Inputs • Determinism is only useful if replicas receive the same sequence of inputs Inputs are delivered in epochs to each server

  46. External Sources • Determinism is only useful if replicas receive the same sequence of inputs A B

  47. External Sources • Determinism is only useful if replicas receive the same sequence of inputs A B 3rd party service responses are not identical

  48. External Sources • Determinism is only useful if replicas receive the same sequence of inputs

  49. External Sources • Determinism is only useful if replicas receive the same sequence of inputs a Forward a request from client

  50. External Sources • Determinism is only useful if replicas receive the same sequence of inputs a a A

  51. External Sources • Determinism is only useful if replicas receive the same sequence of inputs a Client caches a response A A

  52. External Sources • Determinism is only useful if replicas receive the same sequence of inputs a A

  53. External Sources • Determinism is only useful if replicas receive the same sequence of inputs a A A

  54. External Sources • Determinism is only useful if replicas receive the same sequence of inputs 3rd party services can produce non- deterministic results and still work with a Shadow! A A

  55. Determinism Summary Application Non-Determinisim Solution Limitations Multi-threading Weak determinism No data races Time skew OS Events Deterministic syscalls No IPC or kernel devices Client Inputs Use client as primary None External Sources Use client as primary None

Recommend


More recommend