The design of efficient and reliable distributed applications that operate in large networks, over links with varying capacities and loads, demands new programming abstractions and mechanisms. The conventional static design-time determination of local-remote relationships between components implies that (dynamic) environmental changes are hard if not impossible to address without reengineering. The paper presents a novel programming model that is centered around the concept of "dynamic application layout", which permits the manipulation of component location at runtime. This leads to a clean separation between the programming of the application's logic and the programming of the layout, which can also be performed externally at runtime. The main abstraction vehicle for layout programming is a reflective inter-component reference, which embodies co- and re-location semantics. We describe an extensible set of reference types that drive and constrain the mapping of components to hosts, and show how this model elevates application performance and reliability yet requires minimal changes in programming the application's logic. The model was realized in the FarGo system, whose design and implementation in Java are presented, along with an event based scripting language and corresponding event monitoring service for managing the layout of FarGo applications.
展开▼