Applications of XML in Conjunction with DDS for the ... › news › meetings › workshops ›...
Transcript of Applications of XML in Conjunction with DDS for the ... › news › meetings › workshops ›...
Applications of XML in Conjunction with DDS for the Development of Distributed Real-Time Software
Streamlining the development Streamlining the development process to reduce lifeprocess to reduce life--cycle cost cycle cost
and enhance productivityand enhance productivity
[email protected]@lmco.com
Dan SchneiderDan [email protected]@lmco.com
John RusnakJohn Rusnak
Copyright © 2007 Lockheed Martin Corporation
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 22
OverviewOverviewBackground InformationBackground Information–– Who we areWho we are–– What we doWhat we do–– System OverviewSystem Overview
The VisionThe Vision–– Goals for a better systemGoals for a better system–– Development for a distributed environmentDevelopment for a distributed environment
The SolutionThe Solution–– Marrying XML and DDSMarrying XML and DDS–– Observed benefitsObserved benefits
SummarySummary
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 33
Who We AreWho We Are
Aerospace software developers Aerospace software developers Working simulations and test beds for Working simulations and test beds for many yearsmany years–– Scalable distributed systemsScalable distributed systems
Reflective memory architectureReflective memory architectureProprietary data transport softwareProprietary data transport software
–– RealReal--time and nontime and non--realreal--timetime–– Highly algorithmicHighly algorithmic–– Highly ModularHighly Modular
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 44
What we doWhat we doSimulations of space hardware Simulations of space hardware components and environments for:components and environments for:–– Qualification of critical spaceQualification of critical space--flight softwareflight software–– Operational testing and training against Operational testing and training against
critical softwarecritical softwareExpected to adhere to a rigorous process Expected to adhere to a rigorous process –– RequirementsRequirements–– CodeCode–– Peer reviews Peer reviews –– TestTest
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 55
Where we came fromWhere we came from
Legacy systemLegacy system–– Heavy maintenance effortHeavy maintenance effort–– Tedious development process (specifically at Tedious development process (specifically at
I/F)I/F)–– Proprietary software (data transport)Proprietary software (data transport)
Not easily scalableNot easily scalableLimited capabilities (no Limited capabilities (no QoSQoS))
Needed a better wayNeeded a better way–– Inspired by DDSInspired by DDS
Model B
Action 1Action 1
Action 2Action 2
Command 1Command 1
Simulation OverviewSimulation Overview
User Developed CodeSim Kernel Code
Legend:
SimulationKernel
Event DispatcherEvent Dispatcher
Data Transport Layer(DDS)
Data Transport Layer(DDS)
Model A
Action 1Action 1Event
Test Manager
CommandRouter
ModelNam e : String
Build()Initialize()Finalize()
TopicNam e : String
Topic 1
Action 1
sub scrib es
Model A
11 11 Topic 2pub lishes
Topic 3Action 21
1
1
1sub scrib es
pub lishes
Event Scheduler Eventdispatches
ActionNam e : String
execute()
1..*1..*
Simplified System UML DiagramSimplified System UML DiagramKernel
Model developed code
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 88
The VisionThe Vision
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 99
Goals Goals –– DevelopmentDevelopmentIndependent development of the core kernel and modelsIndependent development of the core kernel and models–– Abstraction layer for modelsAbstraction layer for models–– Clear distinction in rolesClear distinction in roles
Reduce/eliminate code coupling between modelsReduce/eliminate code coupling between models–– Seek true modularitySeek true modularity–– Adaptability of model algorithms to multiple simulation Adaptability of model algorithms to multiple simulation
environments (environments (OpNetOpNet, , SimulinkSimulink, …), …)Automate code generation where possibleAutomate code generation where possible–– Allow developer to focus on algorithm and not I/F codeAllow developer to focus on algorithm and not I/F code
Flexibility in distribution/execution of modelsFlexibility in distribution/execution of models–– RunRun--time configurable model set time configurable model set –– RunRun--time configurable execution parameterstime configurable execution parameters
Seek COTS based on open standards where possibleSeek COTS based on open standards where possible–– Prevent lockPrevent lock--in to specific toolsetin to specific toolset–– Easier integrationEasier integration
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 1010
Goals Goals –– Maintenance/ProcessMaintenance/ProcessLight Maintenance EffortLight Maintenance Effort–– Model code only loosely coupled to an API, if at allModel code only loosely coupled to an API, if at all–– Reduce repetitive/tedious codeReduce repetitive/tedious code–– Allow kernel changes without impact on developed model codeAllow kernel changes without impact on developed model code–– Allow migration between multiple systems/platformsAllow migration between multiple systems/platforms
Reduction in Manual ProcessesReduction in Manual Processes–– Automate model integrationAutomate model integration
Automatically ensure consistent interface definitionsAutomatically ensure consistent interface definitionsDynamic memoryDynamic memory--map constructionmap construction
–– Generate documentation from single specificationGenerate documentation from single specificationGuarantee code and documentation consistencyGuarantee code and documentation consistencyValidate documentationValidate documentation
Define a single authoritative sourceDefine a single authoritative source–– Resist having to extract data from specifically formatted Resist having to extract data from specifically formatted
comments in code (documentation, . . . )comments in code (documentation, . . . )
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 1111
The SolutionThe Solution
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 1212
The Solution, Part I : DDSThe Solution, Part I : DDSOpen standard for distributed data Open standard for distributed data communicationscommunications–– Prevents being locked into specific tools/vendorsPrevents being locked into specific tools/vendors–– Clean, simple yet powerful frameworkClean, simple yet powerful framework–– Ideal for realIdeal for real--time applicationstime applications–– PeerPeer--toto--peer with low overhead (peer with low overhead (vsvs. CORBA). CORBA)
ScalableScalablePublish/SubscribePublish/Subscribe–– Coupling of models through message definitionsCoupling of models through message definitions–– No coupling through codeNo coupling through code–– QoS QoS constraints capabilityconstraints capability
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 1313
The Solution, Part II: XMLThe Solution, Part II: XMLOpen, industry accepted standardOpen, industry accepted standardIdeal for specifying data formats and interface Ideal for specifying data formats and interface specificationsspecificationsWidely supportedWidely supported–– Programming languages (C, C++, Java, Programming languages (C, C++, Java, AdaAda, . . . ), . . . )–– Tools Tools –– TextText--based (human readable)based (human readable)
Easily transformed Easily transformed –– Via simple, yet powerful, scripting language (XSLT)Via simple, yet powerful, scripting language (XSLT)
Supports ValidationSupports Validation–– SchemaSchema--basedbased
dependencies
XML Specification ElementsXML Specification ElementsDDS Interface Specification
Types
Topics
XML D
ocuments
Model Behavior Specification
Actions(periodic)
Commands(asynchronous)
InitializationData
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 1515
Types, Topics, XML and DDSTypes, Topics, XML and DDSUserUser--specified XML type definitionsspecified XML type definitions–– Basic type (float, integer, Basic type (float, integer, booleanboolean, …), …)–– Scalar, arraysScalar, arrays–– Encapsulates units, value constraintsEncapsulates units, value constraints–– Requires good type management Requires good type management
Topic definitions built up from basic type definitionsTopic definitions built up from basic type definitions–– DDS provided inspiration for concept of TopicsDDS provided inspiration for concept of Topics–– BitBit--mapped topics can be specified (i.e., specified at bitmapped topics can be specified (i.e., specified at bit--level)level)
Packed messages, e.g. 1553, handled easilyPacked messages, e.g. 1553, handled easily
Able to autoAble to auto--generate interface codegenerate interface code–– Type and message format (topic) definitionsType and message format (topic) definitions–– SW to handle publication/subscription to TopicsSW to handle publication/subscription to Topics–– Model skeletonsModel skeletons
Model Class SignatureModel Class Signature–– Commands and Actions Commands and Actions map tomap to OperationsOperations–– Initialization data can be automatically mapped to Initialization data can be automatically mapped to
attributesattributes–– Implementation to be provided by user Implementation to be provided by user
Autogenerated Autogenerated Model SkeletonModel SkeletonInterface Specification
Types
Topics
XML D
ocuments
Model Behavior Specification
Actions
Commands
InitializationData --attr1attr1
--attr2attr2
ModelModel
XSLT+Initialize (init data)+Initialize (init data)+Action (inputs, outputs)+Action (inputs, outputs)+Command (inputs)+Command (inputs)
XSLT
Fully Automated Fully Automated GluewareGluewareInterface SpecificationInterface Specification
Types
Topics
XML D
ocuments
Model Behavior Specification
Actions
Commands
InitializationData
+Initialize (init data)+Initialize (init data)+Action (inputs, outputs)+Action (inputs, outputs)+Command (inputs)+Command (inputs)
--attr1attr1--attr2attr2
ModelModel
Glueware
GluewareGlueware code is ready to compilecode is ready to compile–– Handles Pub/Sub (DDS, …)Handles Pub/Sub (DDS, …)–– Maps kernel actions to operationsMaps kernel actions to operations
in model skeletonin model skeleton–– Bridges Kernel API and Model InterfaceBridges Kernel API and Model Interface–– Glues model to support dataGlues model to support data
Sim Kernel
Dynamically Loaded Library
Autogenerated Autogenerated Support DataSupport DataInterface SpecificationInterface Specification
Types
Topics
XML D
ocuments
Model Behavior SpecificationModel Behavior Specification
Actions
Commands
InitializationData
Initialization Database Schema(Flat Files, SQL,
etc.)
Initialization Database Schema(Flat Files, SQL,
etc.)
Command Database
Command Database
XSLT
XSLT
Ingestion byTest Manager
Ingestion byTest Manager
Developer doesn’t have to worry about underlying database implementation or any database API calls
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 1919
Reverse of typical development Reverse of typical development processprocess
Developers specify model interface in XMLDevelopers specify model interface in XMLAutoAuto--coders map usercoders map user--defined model API to defined model API to simulation kernelsimulation kernelDevelopers have no need toDevelopers have no need tolearn underlying simulationlearn underlying simulationkernel APIkernel API–– Focus on developingFocus on developing
model algorithmsmodel algorithmsAPI
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 2020
Notional Sequence DiagramNotional Sequence DiagramOperator : <Actor
Nam e>Operator : <Actor
Nam e>
: Sim ulation Kernel : Sim ulation Kernel action1 : Actionaction1 : Action m odel1 : Model1_Wrapper
m odel1 : Model1_Wrapper
m odel1 : API_ Indep endent_Model
m odel1 : API_ Indep endent_Model
Data TransportData Transport
execute( )
read(inputs )
update()
action1()
write(outputs )
build()
run()
elaborate()
regis ter_actions(action1, ...)
User Developed Code
Dynamically Loadable Module
Derived Products
Interface SpecificationInterface Specification
Types
Topics
XM
L Docum
ents
Model Behavior SpecificationModel Behavior Specification
Actions
Commands
InitializationData
DocumentationDocumentationBibliography Acronym Reference
Consistency achieved between code comments, design diagrams and formal documents
Docbook
CodeCommentsXSLT
XSLT
HTML, RTF, PDF, …
UML Diagrams
(XMI)
XSLT
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 2222
Benefits (1)Benefits (1)Reduced maintenance effort:Reduced maintenance effort:–– Less code to maintain by handLess code to maintain by hand–– Hand maintained code fully deHand maintained code fully de--coupled from kernel APIcoupled from kernel API
Glueware Glueware code is now autocode is now auto--generatedgeneratedEasily accommodate kernel changes by updating the Easily accommodate kernel changes by updating the XSLTs XSLTs (and (and NOT userNOT user--developed model code)developed model code)
Adaptability:Adaptability:–– Models can be adapted to new engines Models can be adapted to new engines
OpNetOpNet, , SimulinkSimulink, . . . , . . .
–– Highly modularized systemHighly modularized systemSimplifies testingSimplifies testingModule distribution is database definedModule distribution is database defined
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 2323
Benefits (2)Benefits (2)Lower development/integration costs:Lower development/integration costs:–– Significantly reduced model development time Significantly reduced model development time –– XML validation reduces integration debug timeXML validation reduces integration debug time–– Single source for interfaces simplifies integrationSingle source for interfaces simplifies integration–– Reviews can focus on critical code Reviews can focus on critical code –– algorithmsalgorithms
Consistency:Consistency:–– High level model architecture made consistentHigh level model architecture made consistent–– Documentation / Code consistencyDocumentation / Code consistency–– Opens door to Opens door to browsable browsable documentation and documentation and
codecode
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 2424
Benefits Benefits -- TestingTestingUse schemaUse schema--based XML test scriptbased XML test scriptFront end to the sim kernel parses the Front end to the sim kernel parses the XML test scriptsXML test scripts–– Set inputs and check assertionsSet inputs and check assertions–– Configures data recordingConfigures data recording–– Reports run status on completionReports run status on completionModularity simplifies executionModularity simplifies execution–– no surrogate or specific unit test codeno surrogate or specific unit test code–– test modules one by one test modules one by one in their actual in their actual
operating environmentoperating environment
July 11, 2007July 11, 2007 Lockheed Martin Lockheed Martin -- OMG Real Time and Embedded Systems WorkshopOMG Real Time and Embedded Systems Workshop 2525
SummarySummaryFollowing the DRY principle results in Following the DRY principle results in better consistency, less work and easier better consistency, less work and easier troubleshootingtroubleshootingSynergy between XML and DDS can be Synergy between XML and DDS can be used to create a simple yet robust used to create a simple yet robust architecture with reduced development, architecture with reduced development, integration and maintenance timeintegration and maintenance time–– Modularity can make coding, testing, and Modularity can make coding, testing, and
distribution easierdistribution easier–– Using open standards is a way to prevent Using open standards is a way to prevent
vendor lockvendor lock--inin