160 likes | 287 Vues
This paper explores the concept of semantics-preserving sharing in actor systems, investigating the fundamental principles of interaction equivalence in these decentralized models. We analyze the limitations of traditional sharing methods, addressing race freedom, fault isolation, and location transparency, while demonstrating efficient implementations for state sharing among actors. By leveraging social network data access patterns and state replication, we provide a comprehensive examination of atomicity, isolation, and fairness in shared actor semantics. The findings include an optimized testing tool for validating implementations in the context of pure actors.
E N D
Semantics-preserving Sharing Actors Mohsen Lesani{1,2} Antonio Lain2 University of California, Los Angeles1 HP Labs, Palo Alto2
Semantics • Equivalence to Pure Actors • Implementation • Testing Tool Sharing Actors
Actors [Hewitt][Agha] don’t share state. “Things in the world don't share data.” [Armstrong] • Race-freedom • Fault-isolation • Location-transparency Actors
Limited forms of sharing • Efficiency • Programmability • What are accesses? • Write-Write Multiple-Writers data • Write-Read, Read-Read Single-Writer, Multiple-Readers data (SWMR data) Sharing
SWMR Data • Social Network • Each profile is read by its friend profiles
SWMR Data with Pure Actors • Full Replication • Delegate Actor State State State State State State • Time • Loss of parallelism by serializing access • Time • Update at each replica • Space
Actors + SWMR State Atomicity Isolation Fairness Sharing Actors Semantics State State State2 State2 Updates State Updates State Updates
Are two actor systems equivalent? Interaction Equivalence ≡ Equivalence of the set of possible sequences of inputs and outputs • Equivalence Proof Actor Semantics Sharing Actors Semantics
Sharing Actors Semantics Atomicity Isolation Fairness Translation and Equivalence Actors Semantics • Fairness State State State State Updates Translation State State Updates State State Updates
Translation and Equivalence v+1 v State2,v State State2 State State State State2 State2 v=v? Updates v v+1 Translation State2 State State Updates State State Updates
Sharing Actors Implementation Direct (message-based) implementation of the semantics is inefficient. The optimized implementation benefits from sharing data: State State
Implementation Isolation Fairness Handle Handle Head State Base Object Base Object State
Semantics-preserving Sharing Actors Sharing actors semantics Translation of sharing programs to pure programs and proof of their interaction equivalence. Implementation Conclusion
Questions? Thanks for your attendance
Testing Tool Sharing Actors Semantics ReferenceImplementation • Testing Tool Optimized Implementation
Play and log with the optimized implementation Testing Tool (a2,n1),v1 (a2,n3),v2 Reader Reader Writer Deterministicreplay with the direct implementation of the semantics (a2,n1),v1 (a2,n3),v2 Reader Reader Writer Check equality of configurations