scalable termination detection for distributed actor
play

Scalable Termination Detection for Distributed Actor Systems Dan - PowerPoint PPT Presentation

Scalable Termination Detection for Distributed Actor Systems Dan Plyukhin and Gul Agha UIUC Actor Model Actors are lightweight, stateful, async processes. Used to build low-latency distributed systems (e.g. Riak, Discord, CouchDB). Most popular


  1. Detecting Terminated Actors Q: How do you fjnd an actor’s potential inverse acquaintances ? With contact tracing! Q: How do you know if an actor has undelivered messages ? With message counts! Q: How do you know the snapshots are consistent ? Magic!

  2. Part III: Contact Tracing

  3. Contact Tracing - Actors must use reference objects ( refobs ) instead of ordinary references - Refobs are denoted ( x : A ⊸ B), where x is a globally unique token - Can only be used by the owner A to send messages to the target B - Must be deactivated when no longer needed - Actor gets a refob when it spawns a child - If A has ( x : A ⊸ B) and ( y : A ⊸ C) then A can create ( z : C ⊸ B)

  4. Contact Tracing Actors must use reference objects ( refobs ) instead of ordinary references ○ Refobs are denoted ( x : A ⊸ B), where x is a globally unique token ○ Can only be used by the owner A to send messages to the target B ○ Must be deactivated when no longer needed ○ Actor gets a refob when it spawns a child ○ If A has ( x : A ⊸ B) and ( y : A ⊸ C) then A can create ( z : C ⊸ B) ○ y A C x B

  5. Idle Busy Reference ... m Message Knowledge ... A

  6. Idle Busy Active( x : A ⊸ B ) Reference ... m Message Knowledge ... A x B Created( x : A ⊸ B )

  7. Idle Busy Active( x ) Reference ... m Message Knowledge ... A x B Created( x )

  8. Idle Busy Active( x ) Active( y ) Reference Created( y ) ... m Message y Knowledge ... A C x B Created( x )

  9. Idle Busy Active( x ) Active( y ) Reference Created( y ) ... m Message y Knowledge ... A C x B Created( x )

  10. Idle Active( x ) Active( y ) Busy CreatedUsing( x , z ) Reference Created( y ) ... m Message y Knowledge ... A C msg ( z : C ⊸ B) x B Created( x )

  11. Idle Active( x ) Active( y ) Busy CreatedUsing( x , z ) Created( y ) Reference ... Active( z ) m Message y Knowledge ... A C x z B Created( x )

  12. Idle Active( x ) Active( y ) Busy CreatedUsing( x , z ) Created( y ) Reference ... Active( z ) m Message y Knowledge ... A C x z info ( z : C ⊸ B) B Created( x )

  13. Idle Active( x ) Busy Active( y ) Created( y ) Reference Active( z ) ... m Message y Knowledge ... A C x info ( z : C ⊸ B) release ( z : C ⊸ B) B Created( x )

  14. Case 1: info message arrives fjrst

  15. Idle Active( x ) Busy Active( y ) Reference ... Created( y ) m Message y Knowledge ... A C x info ( z : C ⊸ B) release ( z : C ⊸ B) B Created( x )

  16. Idle Active( x ) Busy Active( y ) Reference ... Created( y ) m Message y Knowledge ... A C x release ( z : C ⊸ B) Created( x ) B Created( z )

  17. Idle Active( x ) Busy Active( y ) Reference ... Created( y ) m Message y Knowledge ... A C x Created( x ) B Created( z )

  18. Case 2: release message arrives fjrst

  19. Idle Active( x ) Busy Active( y ) Reference ... Created( y ) m Message y Knowledge ... A C x info ( z : C ⊸ B) release ( z : C ⊸ B) B Created( x )

  20. Idle Active( x ) Busy Active( y ) Reference ... Created( y ) m Message y Knowledge ... A C x info ( z : C ⊸ B) Created( x ) B Released( z )

  21. Idle Active( x ) Busy Active( y ) Reference ... Created( y ) m Message y Knowledge ... A C x Created( x ) B Released( z )

  22. Part IV: Message Counts

  23. Idle Busy Reference m Message Knowledge ... msg ( x : A ⊸ B) A B

  24. Idle Busy Reference m Message Active( x ) Knowledge ... ... x A B

  25. Idle Busy Reference m Message Active( x ) Sent( x , 1 ) Knowledge ... ... x A B msg ( x , “hi”)

  26. Idle Busy Reference m Message Active( x ) ... Received( x , 1 ) Sent( x , 1 ) Knowledge ... ... ... x A B

  27. Idle Busy Reference m Message Active( x ) ... Received( x , 1 ) Sent( x , 2 ) Knowledge ... ... ... x A B info ( x , y )

  28. Idle Busy Reference m Message Active( x ) ... Received( x , 2 ) Sent( x , 2 ) Knowledge ... ... ... x A B

  29. Idle Busy Reference m Message Active( x ) ... Received( x , 2 ) Sent( x , 2 ) Knowledge ... ... ... x A B

  30. Idle Busy Reference m Message Active( x ) ... Received( x , 2 ) Sent( x , 2 ) Knowledge ... ... ... A B release ( x )

  31. Idle Busy Reference m Message ... Received( x , 2 ) Knowledge ... ... ... A B release ( x )

  32. Idle Busy Reference m Message ... Received( x , 2 ) Knowledge ... ... ... A B

  33. Idle Busy Reference m Message Knowledge ... ... ... A B

  34. Part V: Termination Detection

  35. “Appear to be terminated”?

  36. “Appear to be terminated”? An actor is terminated if it is blocked… and its potential inverse acquaintances are blocked… and their potential inverse acquaintances are blocked… and so on.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend