240 likes | 390 Views
Funded in part by DARPA-PCES and the NSF CSR-SMA. Replicators: Transformations to Address Model Scalability. Jeff Gray, Yuehua Lin, Jing Zhang , Steve Nordstrom, Aniruddha Gokhale, Sandeep Neema , and Swapna Gokhale.
E N D
Funded in part by DARPA-PCES and the NSF CSR-SMA. Replicators: Transformations to Address Model Scalability Jeff Gray, Yuehua Lin, Jing Zhang, Steve Nordstrom, Aniruddha Gokhale, Sandeep Neema, and Swapna Gokhale CIS Dept. – UAB, ISIS - Vanderbilt University, CS Dept. – U. Conn.
Desiderata for Model Replication mic.omg.org Automated Approaches forScaling Models Case Studies Overview of Presentation Background andChallenges Criteria for Scalability Alternative Approaches ExampleReplicators
Metamodel DEFINE Model Meta-Level Translation INTERPRET Interpreter void CComponent::InvokeEx(CBuilder &buil der,CBuilderObject *focus, CBui lderObjectList &selected, long param) { CString DMSRoot = ""; DMSRoot = SelectFolder("Please Select DMS Root Folder:"); if (DMSRoot != "") { DMSRulePath = DMSRoot + RULESPATH + "Rules\\"; MSRuleApplierPath = DMSRoot + RULESPATH + "RuleApplier\\"; AfxMessageBox("DMSRulePath = " + DMSRulePath , MB_OK); CString OEPRoot = ""; OEPRoot = SelectFolder("Please Selec Model Interpreters Models Metamodel Definition Model Interpretation Background: Model Integrated Computing (MIC) Metamodeling Interface Application Domain Application Evolution Environment Evolution App 1 App 2 App 3 Modeling Environment Model Builder The Generic Modeling Environment (GME) adopts the MIC approach and provides a plug-in mechanism for extension.
Ability to evolve models • The size of system models will continue to grow • We have created models containing several thousand modeling elements • Others have reported similarly (Johann/Egyed – ASE 2004) • A key benefit of modeling • Ability to explore various design alternatives (i.e., “knobs”) • E.g., understanding tradeoff between battery consumption and memory size of an embedded device • E.g., scaling a model to 800 nodes to examine performance implications; reduce to 500 nodes with same analysis… • Reducing complexities of the modeling activity • Limit the amount of mouse clicking and typing required within a modeling tool to describe a change • Improves productivity and reduces potential manual errors A general metric for determining the effectiveness of a modeling toolsuite comprises the degree of effort required to make a correct change to a set of models.
Multiple Levels of Hierarchy Replicated Structures Context Sensitive Previous Challenge:Crosscutting Constraints in Real-Time/Embedded Models Crosscutting Constraints Crosscutting in Models • Base models become constrained to capture a particular design • Concerns that are related to some global property are dispersed across the model A B F c d e B B c d e c d e Changeability??? Solution first presented in Comm. ACM 2001 (AOP Issue) and AOSD book chapter
Defines Defines Aspect Weaving Source Model Target Model Defines CopyAtom strategy CopyAtom ECL Transformation Specifications C-SAW: Model Transformation Engine MetaModel M M ECL Interpreter o o d d e e l l i i n n g g A A P P ECL Parser I I s s • Implemented as a GME plug-in to assist in the rapid adaptation and evolution of models by weaving crosscutting changes into models.
New Challenge:Replicating a Base Model to Address Scalability Issues Model Scalability • Base models must be replicated to explore alternative designs • Model elements need to be replicated, in addition to all required connections Three UAV Model Single UAV Model
Contribution and definition • Core contribution: This paper makes a contribution to model scalability by describing a model transformation approach that enables automated replication to assist in rapidly evolving a model. • Definition: replicator – a model transformation that expands the number of elements from a base model and makes the correct connections among those elements
Set of design alternatives Analysis tools: Cadena, Vest, Matlab RTE… Key Characteristics for a Replication Approach (C1) • Retains the benefits of modeling (obvious!?) • Enabling analyses that are too difficult at the implementation level • Navigating through design alternatives
Key Characteristics for a Replication Approach (C2) • General across multiple languages • Not fixed to one specific DSML T1 T2 Replication Approach T3
Key Characteristics for a Replication Approach (C3) • Flexible to support user extension of the replication parameters Replication Approach c(p) c(p)
Approach 1: Intermediate stage of model compilation Observations • The result of replication not within the direct purview of modeler • Violates C1! • Each translator is specific to a particular DSML • Violates C2 • Scalability rules often hardcoded into translator • Violates C3
Approach 2:Domain-specific Replication Plug-in Observations • The result of replication available for further refinement and analysis • C1 achieved • Each plug-in is specific to a particular DSML • Violates C2 • Plug-in may provide several knobs to configure a replication strategy; usually not a “language” but a wizard with checkboxes • Weak C3 Plug-in
Approach 3:Replication with a model transformation engine • A scaled model may be the source model for further refinement • Model compiler could be a code generator, or interface to analysis tools • Preserves all three of the desired properties
Example applications • Event QoS Aspect Language • Specify properties of event-based communication within a DRE (e.g., mission-computing avionics) • System Integration Modeling Language • Specify properties of high-performance physics experiments • UAV QoS Language (not described here) • Specify properties of video QoS in an Unmanned Aerial Vehicle • Future: A language to address performance issues among distributed systems using network patterns
Event QoS Aspect Language (EQAL) • Assists in specification of publish-subscriber event service configuration for large-scale DRE systems • Publishers generate events to be transmitted • Subscribers receive events via hook operations • Event channels accept events from publishers, and deliver events to subscribers • Replication requirements • Add 5 CORBA_Gateways to each original site • Repeatedly replicate one site instance to add 5 more extra sites, each with 5 additional CORBA_Gateways • Create all required connections among replicated models
Scale Up strategy traverseSites(n, i, m, j : integer) { declare id_str : string; if (i <= n) then id_str := intToString(i); rootFolder().findModel("NewGateway_Federation").findModel("Site " + id_str).addGateWay_r(m, j); traverseSites(n, i+1, m, j); endif; } //recursively add CORBA_Gateways to each existing site strategy addGateWay_r(m, j: integer) { if (j<=m) then addGateWay(j); addGateWay_r(m, j+1); endif; } //add one CORBA_Gateway and connect it to Event_Channel strategy addGateWay(j: integer) { declare id_str : string; declare ec, site_gw : object; id_str := intToString(j); addAtom("CORBA_Gateway", "CORBA_Gateway" + id_str); //create one CORBA_Gateway ec := findModel("Event_Channel"); site_gw := findAtom("CORBA_Gateway" + id_str); addConnection("LocalGateway_EC", site_gw, ec); } Scaling the Event QoS Aspect Language
System Integration Modeling Language (SIML) • Assists in specification of configuration of large-scale fault tolerant data processing systems • Used to model several thousand processing nodes for high-performance physics applications at Fermi Accelerator Lab • A system model may be composed of independent regions • Each region may be composed of local process groups • Each local process group may contain primitive application models • Each system, region, and local process group must have a manager that is responsible for mitigating failures in its area • Replication requirements • Replication of local process group nodes • Replication of entire region models and their contents • Generation of communication connections between regional managers and newly created local managers • Generation of additional communication connections between the system manager and new regional manager processes
Scale Up aspect Start() { scaleUpNode("L2L3Node", 5); scaleUpRegion("Region", 8); } strategy scaleUpNode(node_name : string; max : integer) { rootFolder().findFolder("System").findModel("Region").addNode(node_name,max,1); } strategy addNode(node_name, max, idx : integer) { declare node, new_node, input_port, node_input_port : object; if (idx<=max) then node := rootFolder().findFolder("System").findModel(node_name); new_node := addInstance("Component", node_name, node); input_port := findAtom("fromITCH"); node_input_port := new_node.findAtom("fromITCH"); addConnection("Interaction", input_port, node_input_port); addNode(node_name, max, idx+1); endif; } strategy scaleUpRegion(reg_name : string; max : integer) { rootFolder().findFolder("System").findModel("System").addRegion(reg_name,max,1); } strategy addRegion(region_name, max, idx : integer) { declare region, new_region, out_port, region_in_port, router, new_router : object; if (idx<=max) then region := rootFolder().findFolder("System").findModel(region_name); new_region := addInstance("Component", region_name, region); out_port := findModel("TheSource").findAtom("eventData"); region_in_port := new_region.findAtom("fromITCH"); addConnection("Interaction", out_port, region_in_port); router := findAtom("Router"); new_router := copyAtom(router, "Router"); addConnection("Router2Component", new_router, new_region); addRegion(region_name, max, idx+1); endif; } Scaling the System Integration Modeling Language
Discussion • Physical limits of manual replication • SIML models have been scaled by-hand to 32 and 64 nodes • After 64 nodes, the manual process deteriorated taking several days with multiple errors • Benefits of automated replication • Replication is parameterized and can be evolved rapidly • Using a model transformation, SIML models have been scaled up to 2500 nodes • The time to create the model transformation by a user unfamiliar with the domain: < 1.5 hours
Conclusion • Related work • Much related work in model transformation and supporting tools • We believe the general idea is applicable to other MT tools • Not able to locate any literature on the general scalability issue as it applies to automated transformation (any ideas?) • Future work • Transformations may be reused often and influence the correctness of the modeling process • Improved capabilities to test and debug within C-SAW are currently under investigation • Layer a DSML on top of a performance analysis solver; DSML will abstract various networking design patterns (e.g., reactor pattern); base models will be scaled using replicators to explore performance implications
Conclusion • Benefits of replicators as model transformations • Domain independence • Initial evidence that productivity (in terms of design exploration) is improved, as well as correctness of the resulting model • Primary limitation of automated approach • Without the addition of screen layout information in the model transformation, the resulting view may be cluttered or unreadable
For More Information… Replicators and Two-Level Aspect Weaving http://www.cis.uab.edu/Research/C-SAW/Contains papers, downloads, video demos Generic Modeling Environment http://www.isis.vanderbilt.edu/Projects/gme