Assemblages: Modules with Interfaces for Dynamic Linking and Communication Yu David Liu and Scott F. Smith The Johns Hopkins University Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.1
The Main Design Principle Every form of interaction of code with the environment should be supported by explicit, declared interfaces. Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.2
A Typical Module Examples: Functors, Mixins Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.3
� � � Modern Language Interactions Main forms of interaction include Code-code interaction via static linking Code-runtime interaction via dynamic linking Runtime-runtime interaction via distributed messaging Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.4
✁ ✁ ✁ Our Approach: Assemblages A module-centric approach to interfaces for all three Static linking of assemblages—mostly standard stuff Main contributions: – Module-centric view of dynamic extensibility and distributed messaging – Unified treatment of all three, using related notions of interface Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.5
✁ ✁ Code and Runtime Assemblages are code units—modules Assemblage runtimes are loaded assemblages Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.6
Static Linking Illustrated Assemblages with static linkers being linked together: Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.7
Static Linking Illustrated Assemblages with static linkers being linked together: Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.7
Static Linking Illustrated Assemblages with static linkers being linked together: Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.7
Dynamic Linking Gaussian cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.8
Dynamic Linking Gaussian cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.8
Dynamic Linking h1 Gaussian cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.8
✁ ✁ Rebindability of Dynamic Linkers Problem: The need to allow arbitrary code extension vs Fact that only a fixed number of dynamic linkers can be on an assemblage Solution: – Allow multiple simultaneous linkings on a single dynamic linker – Get a different name ("handle") to access each one – Unlinking is implicit via garbage collection when handle is unreachable – Use of handles also avoids an “unlinked” error – if you have a handle, it references a real plugin Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.9
Rebindability illustrated h1 Gaussian cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.10
Rebindability illustrated h1 Gaussian Poisson cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.10
Rebindability illustrated h2 Poisson h1 Gaussian cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.10
Rebindability illustrated h2 Poisson h1 Gaussian Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.10
Rebindability illustrated h2 Poisson h1 Gaussian h3 Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.10
Dynamic Linking Tree h2 Poisson h1 Gaussian h3 Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.11
Dynamic Linking Tree h2 Poisson h1 Gaussian Expt1 h3 Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.11
Dynamic Linking Tree h2 Poisson h1 Gaussian Expt1 h3 Non-Parametric Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.11
Dynamic Linking Tree h2 Poisson h1 Gaussian h4 Expt1 h3 Non-Parametric Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.11
Dynamic Linking Tree h2 Poisson h1 Gaussian h4 Expt1 Expt2 h3 Non-Parametric Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.11
Dynamic Linking Tree h2 Poisson h1 Gaussian h4 Expt1 h3 h5 Expt2 Non-Parametric Non-Parametric cano Sensing Main Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.11
✁ ✁ ✁ Connectors for Messaging Connectors allow different assemblage runtimes to interact Aim is a cleaner notion to replace RMI/RPC – RMI/RPC lacks a declared interface of interaction Connectors in programming languages are not completely new – Previously used in e.g. Cells and ArchJava and Darwin Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.12
✂ ✄ ☎ ✆ ✝ ✞ Distributed Messaging Illustrated cano Sensing Main p Sensor 1 Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.13
✂ ✄ ☎ ✆ ✝ ✞ Distributed Messaging Illustrated cano Sensing Main p Sensor 1 Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.13
✂ ✄ ☎ ✆ ✝ ✞ Distributed Messaging Illustrated hc1 cano Sensing Main p Sensor 1 Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.13
✆ ✆ ✄ ☎ ✞ ✆ ✝ ✞ ✝ ✂ ✝ ✞ Distributed Messaging Illustrated p Sensor 2 hc1 cano Sensing Main p Sensor 1 p Sensor 3 Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.13
✝ ✆ ✄ ☎ ✞ ✆ ✝ ✞ ✝ ✆ ✂ ✞ Distributed Messaging Illustrated hc2 p Sensor 2 hc1 cano Sensing Main p Sensor 1 hc3 p Sensor 3 Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.13
✁ ✁ ✁ ✁ ✁ Data Encapsulation Goal: maintain sanctity of the runtime interfaces Only access internals of a runtime through its interfaces RMI/RPC violate the sanctity of interfaces – Object references can be passed around – No external interface on modules for potential RMI interactions Thus we enforce the following No passing of object references across the network Objects can be copied, but only if their code is already plugged in on the other side Runtime references can be passed Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.14
✖ ✠ ✠✗ ✘ ✙ ✏ ✠ ✌ ✑ ✖ ✠✗ ✘ ✚ ✘ ✤ ☞✌ ✡ ✛ ☞ ✎ ☛ ✜ ✓ ☞ ✢ ✠ ✓✣ ✟ ☞✌ ✓ ☞ ✠ ✡ ✠☛ ✡ ☞✌ ✍✎ ✏ ✑ ✒ ✓ ✍ ✌ ✡ ✕ ☞ ☛ ☞ ✎ ✍✎ ✏ ✑ ✒ ✓ ✔ ✠ ✡ ✒ The Unification kLib y ain Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.15
✖ ☞✌ ✜ ☛ ✎ ☞ ✛ ✡ ✘ ☞ ✠ ✚ ✘ ✠✗ ✟ ✕ ✓ ✢ ✠ ✠ ✌ ✜ ✌ ✒✦ ✥ ✡ ✔ ✠ ✡ ✤ ✑ ✓ ✒ ✓✣ ✌ ✏ ✔ ✑ ✡ ☞ ✌ ✍ ✓ ✒ ✏ ☛ ✍✎ ☞✌ ✡ ✠☛ ✡ ✠ ☞ ☞ ✙ ✡ ✘ ✠✗ ✖ ☞✌ ☞✌ ✕ ✠ ✎ ✔ ✓ ✒ ✑ ✏ ✍✎ ✠ The Unification y kLib kLib y ain Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.15
✬ ✮ ✧ ✻ ✵ ★✶ ✷ ✹ ★ ✷ ✫ ✬ ✩ ✺ ✫ ✪ ✯ ✻ ✲ ✫ ✼ ★ ✲✽ ✱ ✲ ✰ ✾ ✬ ✳ ★ ✩ ★ ✸ ✱❀ ✪ ★ ✩ ★✪ ✩ ✫✬ ✭✮ ✯✰ ✱ ✲ ✭ ✬ ✫ ✩ ✫ ✫ ✷ ✮ ✭✮ ✯ ✰ ✱ ✲ ✳ ★ ✩ ✴ ✫✬ ✬ ✵ ★✶ ✿ The Unification y kLib y ain Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.15
❉ ❃ ❂ ❆ ◗ ❍ ❂■ ❏ ▲ ❂ ❏ ❅❆ ▼ ❑ ❅ ❈ ❄ ◆ ● ❅ ❖ ❂ ●P ❋ ❁ ❏ ❊ ❆ ❂ ❃ ❂❄ ❃ ❅❆ ❇❈ ❉❊ ❋ ● ❇ ❅ ❂■ ❃ ❅ ❄ ❅ ❈ ❇❈ ❉❊ ❋ ● ❍ ● The Unification y ain Assemblages:Modules with InterfacesforDynamic Linking and Communication – p.15
Recommend
More recommend