DEVS Namespace for Interoperable DEVS/SOA Chungman Seo Bernard P. Zeigler Arizona Center for Integrative Modeling and Simulation The University of Arizona Outline Motivation of the study Objectives Background Design of interoperable DEVS simulation environment Implementation of interoperable DEVS simulation environment Track Display Application HLA vs. SOA support for DEVS interoperability Conclusions Future work The Problem DEVS simulators implement the DEVS modeling formalism in diverse programming environments, e.g. DEVSJAVA, ADEVS, CD++, DEVSim++, PythonDEVS This situation The DEVS formalism specifies the same abstract simulator algorithm for any simulator Different simulators implement the same abstract simulator using different codes inhibits interoperating DEVS simulators prevents simulation of heterogeneous models Each simulator can not provide platform-neutral message passing The Need for Interoperability Different platforms specialize in different capabilities, e.g., C++ supports fast execution, but JAVA provides a better platform for web service development Reusability of Models increases through interoperability In our applications at JITC, ADEVS based on C++ is employed for radar track generation while DEVSJAVA is used for track display System of Systems (SoS) requires interoperability to compose new systems from existing systems Interoperability requires well-defined interfaces to use systems in different platforms or languages Web services, HLA, and CORBA provide communication channels between software systems with different platforms DEVS Standardization Supports Higher Level Web-Centric Interoperability Prior Work Mittal and Rico developed DEVS/SOA it employs JAVA serialization to code messages into byte array this restricts interoperation to simulators based on JAVA, e.g. DEVSJAVA, and XDEVS It does not use DEVS namespace Taekyu Kim extended DEVS/SOA to run in real time but did not address interoperability Moath Jarrah developed a Negotiation Model and simulated it on DEVS/SOA but did not implement it in web services Objectives To design and implement interoperable DEVS Simulation environment using SOA and DEVS namespace To manage DEVS namespace for interoperable DEVS Simulation environment To implement neutral message passing between different DEVS simulation environments To show implementation of layered interoperability concept Platforms and languages neutral DEVS simulation environment using SOA Background - DEVS Modeling and Simulation Framework Set theory based system specification formalism Atomic model : lowest level model, contains structural dynamics Coupled model : composed of one or more atomic and / or coupled -> hierarchical construction Basic Parallel DEVS Model: M = <X, Y, S, δint, δext, δcon, λ ta> X : set of input events Y : set of output events S : set of states δint : internal transition function δext :external transition function δcon : confluent function λ : output function ta : time advance function Time base is logical time Background - SOA (ServiceOriented Architecture) An architectural approach to build software application that use services available in a network Language and platform independent => separation of specification and implementation Loosely coupled => message based, synchronous and asynchronous interactions. Over the Internet => No centralized control, use of established protocols, security considerations. Registry Inter-operable => Standards based. Contract Find Register Transport protocol Data Encoding Bind & invoke Service Consumer Service Provider SOA’s Find-bind-execute paradigm WSDL (Web Services Description Language) Service Description and Discovery SOAP (Simple Object Access Protocol), XML Schema Interface Description HTTP/HTTPS UDDI (Universal Description, Discovery and Integration) Security WS-Security, XML-Signature, XML-Encryption, ... Web Service Overall System of Interoperable DEVS Simulator Services with DEVS namespace Register DEVS message types Use DEVS message types DEVS Name Space Schema Schema Use DEVS message types Web service DEVS Simulator Service Common Interface (WSDL) Service Provider 1 OS 1 / Language 1 Common Interface (WSDL) Simulation protocol Simulation protocol Web Server 1 DEVS Simulator Service OS 2 / Language 2 Web Server 2 DEVS Simulator Services Integration/Execution user Web service Service Provider 2 Web-enabled interoperability of DEVS components DEVS namespace Network accessible schema document Storage for types of messages which are used in DEVS models A unique element name in the DEVS namespace Register and extract domain specific schema through a web service Supports re-use, composability, and interoperability <xsd:schema xmlns:ns0="http://devs.service" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://devs.service"> <xsd:element name="EFP"> <xsd:complexType> <xsd:sequence> <xsd:element name="Job" type="ns0:Job"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="Job"> <xsd:sequence> <xsd:element name="id" type="xsd:int"/> <xsd:element name="time" type="xsd:double"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TrackData"> <xsd:sequence> <xsd:element name="xposition" type="xsd:double"/> <xsd:element name="yposition" type="xsd:double"/> <xsd:element name="heading" type="xsd:double"/> </xsd:sequence> </xsd:complexType> <xsd:element name="TrackGenerator"> <xsd:complexType> <xsd:sequence> <xsd:element name="TrackData" type="ns0:TrackData"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> The Structure of DEVS Simulator Service • Web Service displayed to clients • Link between DEVS M&S and WS operations • Convert DEVS message to XML message • Implement DEVS M&S with various Languages ( Java, C++, Python, Matlab) • Manage Networking and SOAP DEVS Web Service operations DEVS Interface DEVS Modeling & Simulation Web Service Middleware (AXIS2 or .Net) The operations of DEVS simulator service DEVS Simulation protocol operations void getSimulator(boolean) void initialize(double) double getTN() void lambda (double) String getOutput() void receiveInput(String,String,String) void deltfcn(double) void addCoupling(String,String,String) void exit() Schema location and Message type operations String getSchemaInfo() String getType(String) String[ ] getInports() String[ ] getOutports() Reporting function operations String getConsole(String) String getResult() DEVS message to XML message DEVS message consists of a port/value pairs Implementation of DEVS message is different in different DEVS implementations DEVSJAVA : employs a message class for DEVS message ADEVS : PortValue class is used for ADEVS message <Message> <content> <port>out</port> <entity> <class>Job</class> <id type=”int”>9</id> <time type=”double”>0.0</time> </entity> </content> <content> . . . </Message> XML message DEVS Message DEVS Message / XML Message Convertor XML Message Web Sevice Middleware XML Message SOAP DEVS M&S DEVS Interface DeSerialize XML to DEVS Serialize DEVS to XML Web Service NetWork Track Display Application Shows interoperability between DEVS models in different implementation languages Consists of a TrackDisplay model and TrackGenerator models The TrackGenerators generate time indexed TrackData behavior The TrackDisplay has a capability of displaying track data in GUI Uses a message type called TrackData consisting of four variables id : int xposition : double yposition : double heading : double Coordinator DEVSJAVA TrackGenerator 1 Model ADEVS TrackGenerator 2 Model Virtual Time Simulation AXIS2 environment Apache web server .Net environment Microsoft web server SOAP messages SOAP messages TrackDisplay for web service using AXIS2 SOAP messages IP Network HLA vs. SOA support for DEVS interoperability DEVSsimHLA Interoperable DEVS/SOA Platform/Language interoperability Support Support Neutral Message passing No Support Middleware interoperability Possible using a HLA bridge Support Linguistic levels of interoperability Support 2 levels (syntactic and semantic) Support all levels (syntactic, semantic, and pragmatic) Conclusions Designed and Implemented an interoperable DEVS Simulator services with DEVS namespace Applied to DEVSJAVA and ADEVS Developed the web service for handling DEVS namespace to provide semantic level interoperability between DEVS simulator services Implemented the platform-neutral message passing on the interoperable DEVS Simulation environment Future Work Design/Implement pragmatic level interoperability Apply interoperable DEVS simulator service to the other DEVS implementations (DEVS python, DEVS Matlab, and so on) Add more functions to the web service for handling the DEVS namespace Extend the platform-neutral message passing to support complex message types Thank you Implement the DEVS namespace Schema 1 Schema 3 Provider Register GUI Schema 2 User Browsing GUI Web Service for DEVS namespace DEVS Namespace Example of Registration /Extraction of DEVS message Domain : EFP Message type : Job Variable : id type : int Variable : time type : double Web Service Operation Web Service Operation Web Service Operation Web Service Operation Registration Extraction DEVS simulator service for DEVSJAVA The Structure of DEVSJAVA message Message Content port Entity Job id time Content XMLObjectMessageHandler DEVSJAVA Modeling & Simulation DEVSJAVA interface between operations and DEVSJAVA simulator DEVSJAVA message to XML message AXIS2 to generate a DEVS simulator service Java based web service on Apache tomcat server XML Document for DEVSJAVA message <Message> <content> <port>out</port> <entity> <class>Job</class> <id type=”int”>9</id> <time type=”double”>0.0</time> </entity> </content> <content> . . . </Message> Simulator classes for virtual time and real time simulations A Atomic class contains DEVS atomic or coupled model using a Digraph2Atomic class A Digraph2Atomic class which pretends to be an atomic model to follow DEVS protocol during simulation of interoperable DEVS simulator services A XMLObjectMessageHandler class to convert DEVSJAVA message to XML message vice versa DEVS Interface DEVS simulator service for ADEVS ADEVS modeling and simulation ADEVS interface between operations and ADEVS simulator ADEVS message converter .Net to generate a DEVS simulator service C++ based web service on Microsoft web server ADEVS Interface simulator string converter of C++ to VC++ vice versa ADEVS message converter ADEVS Interface ADEVS API Modeling API adevs_models.h adevs_digraph.h adevs_simpledigraph.h adevs_wrapper.h Simulation API adevs_simulator.h adevs_sched.h Container API adevs_bag.h adevs_set.h object_pool.h ADEVS Library The Structure of ADEVS message XML Document for ADEVS message Bag PortValue type port value Job Message Converting id time PortValue <Message> <content> <port>1</port> <entity> <class>Job</class> <id type=”int”>9</id> <time type=”double”>0.0</time> </entity> </content> <content> . . </Message>