March 3-7, 2008                                 Marseille, France A Layered Architecture for the Model-driven Development ...
Overview Motivations Definition of SimArch  • Layers, Service Interfaces and Data Interfaces Example implementation of ...
Motivations The development of distributed simulators generally  requires more effort and know-how compared to  centraliz...
SimArch A layered architecture to enable the model-  driven development of distributed simulators:  • transparent deploym...
SimArch Main Characteristics Based on the process interaction paradigm Composed of four layers Based on the definition ...
Process Interaction Paradigm     ev2                                Key            E2      ev1                            ...
Simulation Model Layer       Layer 4                          Simulation Components                                       ...
SimArch Service Interfaces                (layers 12)                        «interface»                     Layer2ToLaye...
SimArch Service Interfaces                                             (layers 23)                            «interface»...
SimArch Data Interfaces (1/2)                         «interface»                             Link      +getInputPorts() :...
SimArch Data Interfaces (2/2)                  «interface»                                                                ...
SimArch implementation status Layer 1  • DDESoverHLA library: provides a DES    abstraction on top of HLA Layer 2  • Sim...
jEQNA Domain-Specific Language    for the simulation ofExtended Queueing Networks           SIMUTools08      13
Domain Specific Language (DSL) Programming language Domain-specificity Increased expressiveness (decreased  generality)...
jEQN: a DSL for EQNs Based on:  • Domain analysis of EQN models  • Declarative approach (specify what to simulate    rath...
jEQN Simulation Components Derived from EQN domain analysis 6 groups:  •   user sources  •   waiting systems  •   servic...
jEQN Parameters Design guidelines:  • Decouple jEQN simulation components from    the parameters that do not affect the  ...
Example candidate parameters• For user source components:    termination condition    interarrival time    user generat...
Categories of Parameters1. Parameters used to take decisions  • routing policy, enqueueing policy2. Parameters that provid...
Category-1 parameters• Organized around four variables:   T: the decision data   I: the input data   S: the state data ...
Category-1 parameters                                                                                                 «int...
Category-3 parameters                                                «interface»                                          ...
Model-driven Development of   Distributed Simulators     Example Application            SIMUTools08      23
The Catenet System                 Host A                LAN1 (token ring)                          WAN                   ...
EQN Model                                                (high-level)                                                     ...
EQN Model                                                  (LAN1 details)                           Msg                   ...
Model-driven Development (1/3) Direct mapping between EQN model entities and SimArch/jEQN SimArch statements: environmen...
Model-driven Development (2/3) EQN model entities and jEQN components:      Service Center  jEQN Service Center      W...
Model-driven Development (3/3)   Extra jEQN components for the routing    information (implicitly included in the EQN    ...
Example Derivation ofSimulator Code from the Model (1/2)               SIMUTools08           30
Example Derivation ofSimulator Code from the Model (2/2)                                    jRand                         ...
Local Simulator Development1. Instantiate a Layer 2 implementation  (Execution Container)2. Declare and define jEQN compon...
From Local to Distributed1. Partition the model2. Configure Layer1 components (e.g.  FederationManager, with, e.g., number...
Model PartitioningSubmodel 0                    Host A                   LAN1 (token ring)                                ...
Coding the distributed simulator1. Instantiation of a distributed implementation of Layer 2,   which in turns requires Lay...
Simulators deployment         US - Georgia                                                                  Italy         ...
Simulator Validation Local simulator                    SIMUTools08   37
Simulator Validation Distributed simulator                    End-to-end delay [s]   Time [s]    100     90     80     70...
Conclusions SimArch eases the development of  distributed simulators by introducing a set  of layered abstract simulation...
Upcoming SlideShare
Loading in …5
×

A Layered Architecture for the Model-driven Development of Distributed Simulators

728 views
648 views

Published on

Conference presentation, SIMUTOOLS 2008, Nice, France.

Please visit https://sites.google.com/site/simulationarchitecture/
for further information

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
728
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

A Layered Architecture for the Model-driven Development of Distributed Simulators

  1. 1. March 3-7, 2008 Marseille, France A Layered Architecture for the Model-driven Development of Distributed Simulators Daniele Gianni* Andrea D’Ambrogio# Giuseppe Iazeolla#(*) Dept. of Electrical & Electronic Eng. (#) Dept. of Computer Science Imperial College London University of Roma “Tor Vergata” London (UK) Roma (Italy)
  2. 2. Overview Motivations Definition of SimArch • Layers, Service Interfaces and Data Interfaces Example implementation of a SimArch-based simulation language • jEQN Application to the model-driven development of a distributed simulator SIMUTools08 2
  3. 3. Motivations The development of distributed simulators generally requires more effort and know-how compared to centralized (local) simulators Only reusability and interoperability aspects have been addressed by distributed simulation approaches Adaptability aspects (how to switch from local to distributed simulation) have not been addressed The proposed layered architecture exploits model-driven development to allow the simulation developer to abstract from the execution environment and to deal only with the definition of the hi-level simulation model SIMUTools08 3
  4. 4. SimArch A layered architecture to enable the model- driven development of distributed simulators: • transparent deployment of simulation components in either a local or a distributed environment • transparent introduction/modification of the layers’ implementation to meet additional/specific requirements • definition of custom (domain-specific) simulation languages on top of the layered architecture SIMUTools08 4
  5. 5. SimArch Main Characteristics Based on the process interaction paradigm Composed of four layers Based on the definition of: • Service interfaces • Data interfaces • Factory interfaces for component instantiation SIMUTools08 5
  6. 6. Process Interaction Paradigm ev2 Key E2 ev1 EntityE1 Input Port ev3 Output Port E3 Link/Event ev ev4 SIMUTools08 6
  7. 7. Simulation Model Layer Layer 4 Simulation Components Layer 3 Layer Discrete Event Simulation Service Layer Layer 2SimArch Distributed Discrete Event Simulation Layer Layer 1 Layers Distributed Computing Infrastructure Layer 0 CORBA DIS Grid WS HLA General Purpose Simulation Oriented SIMUTools08 7
  8. 8. SimArch Service Interfaces (layers 12) «interface» Layer2ToLayer1 +initDistributedSimulationInfrastructure() +postProcessingDistributedSimulationInfrastructure() +sendEvent(in event : Event) +waitNextDistributedEvent() +waitNextDistributedEventBeforeTime(in time : Time) «interface» Layer1ToLayer2 +scheduleEvent(in event : Event) +scheduleSimulationEndEvent(in time : Time) SIMUTools08 8
  9. 9. SimArch Service Interfaces (layers 23) «interface» «interface» Layer3ToLayer2 Layer2ToLayer3 +getUserInterface() : Layer3toLayer2UserInterface +body() +getDeveloperInterface() : Layer3ToLayer2DeveloperInterface +getId() : Integer +getEntityName() : Name +printStatistics() +setEventReceived() +setReceivedEvent(in event : Event) +setId(in id : Integer) +setSystemName(in name : Name) «interface» «interface» Layer3toLayer2UserInterface Layer3ToLayer2DeveloperInterface+registerEntity(in entity : GeneralEntity) +getClock() : Time+start() +waitNextEvent() +hold(in time : Time) +holdUnlessIncomingEvent(in time : Time) : Boolean +send(in entity : Entity, in delay : Time, in tag : Enum, in data : Object) +send(in port : OutputPort, in delay : Time, in tag : Enum, in data : Object) +send(in recipient : Name, in delay : Time, in tag : Enum, in data : Object) SIMUTools08 9
  10. 10. SimArch Data Interfaces (1/2) «interface» Link +getInputPorts() : List of InputPort +getOutputPorts() : List of OutputPort +isAllowedToSendThroughThisLink() : Boolean «interface» GeneralEntity +getEntityId() : Integer +getEntityName() : Name «interface» +getFullName() : Name Port +getSystemName() : Name +isLocal() : Boolean +getOwner() : GeneralEntity +getLink() : Link«interface» «interface» «interface» «interface»InputPort OutputPort ComponentLevelEntity RemoteEntity SIMUTools08 10
  11. 11. SimArch Data Interfaces (2/2) «interface» «interface» Comparable Event +getData() : Object +getRecipient() : GeneralEntity «interface» +getRecipientName() : Name Time +getSender() : GeneralEntity+decreaseBy() +getSenderName() : Name+decreasedBy(in time : Time) : Time +getTag() : Enum+getValue() : Double +getTime() : Time+increaseBy(in time : Time)+increasedBy(in time : Time) : Time+isEqualTo(in time : Time) : Boolean «interface»+isGreaterOrEqualThan(in time : Time) : Boolean Name+isGreaterThan(in time : Time) : Boolean +getValue() : String+isLesserOrEqualThan(in time : Time) : Boolean +setValue(in name : String)+isLesserThan(in time : Time) : Boolean+setValue(in time : Double) SIMUTools08 11
  12. 12. SimArch implementation status Layer 1 • DDESoverHLA library: provides a DES abstraction on top of HLA Layer 2 • SimJ library: provides generic simulation components Layer 3 • jEQN library: provides the primitives for defining EQN simulation models SIMUTools08 12
  13. 13. jEQNA Domain-Specific Language for the simulation ofExtended Queueing Networks SIMUTools08 13
  14. 14. Domain Specific Language (DSL) Programming language Domain-specificity Increased expressiveness (decreased generality) Ease-of-use Reduced domain and programming expertise Verificability and transformability Declarative Enabler of reuse SIMUTools08 14
  15. 15. jEQN: a DSL for EQNs Based on: • Domain analysis of EQN models • Declarative approach (specify what to simulate rather then how to simulate) Used to: • Reduce the semantic gap between the model specification and the corresponding simulation program Composed of: • Simulation services defined by SimArch • Set of EQN simulation components • Set of parameters for the components SIMUTools08 15
  16. 16. jEQN Simulation Components Derived from EQN domain analysis 6 groups: • user sources • waiting systems • service centers • routers • special nodes • support components SIMUTools08 16
  17. 17. jEQN Parameters Design guidelines: • Decouple jEQN simulation components from the parameters that do not affect the simulation logic • Flexible parameter structure to allow the incorporation of additional parameter types SIMUTools08 17
  18. 18. Example candidate parameters• For user source components:  termination condition  interarrival time  user generation• For waiting system components:  preemptive waiting systems  preemption policy  queue structure  service request generator  enqueueing and dequeuing policy SIMUTools08 18
  19. 19. Categories of Parameters1. Parameters used to take decisions • routing policy, enqueueing policy2. Parameters that provide sequence of values • interarrival times, service request times (incorporating jRand)3. Parameters that provide storage support • queues SIMUTools08 19
  20. 20. Category-1 parameters• Organized around four variables:  T: the decision data  I: the input data  S: the state data  D: the type of decision• According to the use of such variables, for example:  StateOnlyDecisionPolicy  InputOnlyDecisionPolicy SIMUTools08 20
  21. 21. Category-1 parameters «interface» Policy «interface» «interface» InputPolicy StatePolicy<S> +getDecision() : D +getState() : S +setState(in s : S) «interface» ImplicitInputPolicy<I> «interface» «interface» ExplicitInputPolicy<T extends DecisionData, InputAndStatePolicy +getImplicitInput() : I D> StateOnlyDependentPolicy<S, D> +setImplicitInput(in i : I) +getDecisionFor(in t : T) : D -state : S +getDecision() : D «interface» ImplicitAndExplicitInputDependentPolicy<I, ExplicitInputOnlyDependentPolicy<T,D>ImplicitButNotExplicitPolicy<I,D> T,D>+getDecisionFor() : D -implicitInput : I ImplicitButNotExplicitInputDependentPolicy< I,D> ImplicitAndExplicitInputAndStateDependentPolicy< -implicitInput : I I,S,T,D> +getDecision() : D -state : S +getImplicitInput() : I +setImplicitInput(in i : I) ImplicitButNotExplicitInputAndStateDependentPolicy< I,S,D> -state : S +getState() : S +setState(in s : S) SIMUTools08 21
  22. 22. Category-3 parameters «interface» UserQueue MaskBasePolicy<?,?,?,UserQueue> +getNumberOfUserEnqueued() : Integer * -userWithdrawer +insert(in u : User) 1 1 +extract() : User 1 1 1FiniteUserQueue InfiniteUserQueue MultiUserQueue 1 -queueAssigner 1 1 -decisionDataFactory 1 -queue 1 -enqueueingPolicy «interface» java.util.List 1 1 1MaskBasePolicy<?,?,UserBasedDecisionData, QueueAssigner Integer> -decisionDataFactory 1 1 1 -dispatchingPolicy UserBasedDecisionDataFactory 1 MaskBasePolicy<?,?,UserBasedDecisionData, UserQueue> SIMUTools08 22
  23. 23. Model-driven Development of Distributed Simulators Example Application SIMUTools08 23
  24. 24. The Catenet System Host A LAN1 (token ring) WAN Host B GW1 GW2 LAN2 (ethernet)catenet SIMUTools08 24
  25. 25. EQN Model (high-level) catenet GET TCP Source LAN1 LLC/ GW1 IP TCP TCP IP(Host A) MAC802.5 Host A X.25 network layers WAN X.25 Host B network layers RELEASE Sink TCP LLC/ IP GW2 MAC802.3 LAN2 IP TCP TCP (Host B) Window Size C Token Pool SIMUTools08 25
  26. 26. EQN Model (LAN1 details) Msg Tok? createMsg allocMsg allocTok getToken setSender transfrm putToken relTok decrfrm routing destrMsg SIMUTools08 26
  27. 27. Model-driven Development (1/3) Direct mapping between EQN model entities and SimArch/jEQN SimArch statements: environment set-up, connections between jEQN components jEQN components: model entities and their parameters SIMUTools08 27
  28. 28. Model-driven Development (2/3) EQN model entities and jEQN components:  Service Center  jEQN Service Center  Waiting System  jEQN Waiting System  Passive Queue (Pool of Tokens, Activate and Release Nodes)  jEQN Special Nodes EQN entity properties and parameters (to be set at instantiation time) of jEQN components:  Enqueueing policy: FIFO  Service Time: Normal Stream  Operation: setSender (for setSender node) SIMUTools08 28
  29. 29. Model-driven Development (3/3) Extra jEQN components for the routing information (implicitly included in the EQN model) Parameterization of jEQN components according to the model properties (service time, enqueueing policy, routing policy, etc.) SIMUTools08 29
  30. 30. Example Derivation ofSimulator Code from the Model (1/2) SIMUTools08 30
  31. 31. Example Derivation ofSimulator Code from the Model (2/2) jRand jEQN Policy Framework SIMUTools08 31
  32. 32. Local Simulator Development1. Instantiate a Layer 2 implementation (Execution Container)2. Declare and define jEQN components according to the previous guidelines3. Connect components4. Activate the execution container SIMUTools08 32
  33. 33. From Local to Distributed1. Partition the model2. Configure Layer1 components (e.g. FederationManager, with, e.g., number of simulators, lookahead, etc.)3. Code each simulator (federate) SIMUTools08 33
  34. 34. Model PartitioningSubmodel 0 Host A LAN1 (token ring) WAN Submodel 2 Host B GW1 Submodel 1 GW2 LAN2 (ethernet) SIMUTools08 34
  35. 35. Coding the distributed simulator1. Instantiation of a distributed implementation of Layer 2, which in turns requires Layer 12. Declaration and definition of jEQN components 1. Local: as in the local simulator 2. Remote: use of SimArch RemoteEntity3. Connection between jEQN components 1. Local-Local: as in the local simulator 2. Local-Remote: similarly to local connection, with a local proxy for the RemoteEntity4. Activation of the execution container SIMUTools08 35
  36. 36. Simulators deployment US - Georgia Italy jEQN Simulator jEQN SimArch Simulator HLA over IIOP CORBA-HLA Client SimArch GATechs CORBA -HLA jEQN Simulator LAN WAN Camerino Client HLA over IIOP SimArch Ascoli CORBA -HLA Client Ge orgia Te ch HLA o ve r IIOP TorVe rgata CORBA RTI Server CORBA-HLA Client Le cce SimArch jEQ N Simulator SimLabKey Federate CORBA-HLA CORBA-HLA CORBA-HLA Client Client Client IIOP protocol Server Pitch protocol over TCP and UDP Executive Federation Manager SimArch SimArch pRTI 1516 jEQ N jEQ N Simulator Simulator Local CORBA + CORBA-HLA SIMUTools08 36
  37. 37. Simulator Validation Local simulator SIMUTools08 37
  38. 38. Simulator Validation Distributed simulator End-to-end delay [s] Time [s] 100 90 80 70 60 C=4 50 C=7 40 C=12 30 20 10 0 0 1 2 3 4 5 lambda [packets/s] SIMUTools08 38
  39. 39. Conclusions SimArch eases the development of distributed simulators by introducing a set of layered abstract simulation services on top of the distributed environment SimArch advantages: • Reduces development effort and time • Does not need specialized distributed simulation skills • Facilitates the introduction of simulation languages as DSLs (e.g., jEQN) SIMUTools08 39

×