Automated Bridging to Third-Party Packages

Download Report

Transcript Automated Bridging to Third-Party Packages

SMUG 2001
Execution in UML
May 7-9, 2001
Westward Look Resort
Tucson, Arizona
©Kabira Technologies Inc, 2001
Michael M. Lee
V.P of Application Engineering
©Kabira Technologies Inc, 2001
Automated Bridging
<Insert interesting and provocative talk
to
title here before going to SMUG-2001>
Third Party Packages
Michael M. Lee
V.P of Application Engineering
©Kabira Technologies Inc, 2001
Recursive Design 101
Requirements
Implementations
©Kabira Technologies Inc, 2001
Domains of Different Technologies
Java-Based
Plant
Maintenance
Straightforward approach with
homogeneous, OOA domains
But What Happens When
• You need to expose your
system as a service to another
system?
Material
Handling
Process
Operator
Interface
• You need to use a 3rd party
software package (a.k.a.
COTS, legacy software,
realized domain) as a service?
©Kabira Technologies Inc, 2001
Alarm
Handling
Generic
Equipment
Handling
Corba-Based
Equipment
Drivers
Bridging to 3rd Party Packages
• The ability of the client domain to
drive requirements on the service
domain is limited.
Generic
Equipment
Handling
– totally limited if service is fixed
– partially limited if it isn’t fixed
• The implementation mechanisms
can be dictated by the service.
– Corba, Java
– execution paradigms (transactions, multi
versus single threaded, synch/asynch)
©Kabira Technologies Inc, 2001
Corba-Based
Equipment
Drivers
The Question for Code Generation
?
object-oriented
models
3rd Party
Packages
standard
compiler
technology
Model Compiler
Application
Logic
Translation
Translation
Rules
Rules
Model
Translator
Design
Design Patterns
Patterns
Frameworks
Frameworks
Software
Architecture
Design
source code
Source Compiler
and linker
conventional
compiler and
linker
Run Time
Libraries
Model
Code
Architecture Run Time
System Software
Implementation Platform
©Kabira Technologies Inc, 2001
executable
process
Interfaces to 3rd Party Packages
Interfaces to 3rd party packages are typically
defined in one of two basic ways:
• Language based API’s
– Java
– C++
– C
• Specification based API’s
– Corba
– DCOM
©Kabira Technologies Inc, 2001
One Approach
Interface
Definition
model based
interface
Generic
Equipment
Handling
Model Based Wrapper
Native
Client Interface
to Service
Code
Generation
OOA model
Corba-Based
Equipment
Drivers
Model Based Wrapper
Native
Client Interface
to Service
©Kabira Technologies Inc, 2001
Implications
• The client deals directly
with the level of abstraction
presented by the 3rd party
package.
• Good: nothing “between” package
Generic
Equipment
Handling
Model Based Wrapper
Native
Client Interface
to Service
and client
• Bad: may be a conceptual gap
between client and service
Let’s look at some examples...
©Kabira Technologies Inc, 2001
Corba-Based
Equipment
Drivers
Corba Client Adapter (a.k.a. Bridge)
Development
IDL
Code
Generation
Deployment
ObjectSwitch
ObjectSwitch
CORBA Server
Client App Engine
CCA Engine
ORB
Model Based Wrapper
ORB
Interface
Logic
Client “sees” CORBA service
as if it were modeled in OOA
©Kabira Technologies Inc, 2001
The Development Process
Step 1. Create CCA Component by “wrapping” IDL
IDL
CCA Component
CCA
Engine
Design Center
“wrapping”
Client
Application
Engine
Design Center
Engine Component
Built from application
model + CCA component
Application
model
ObjectSwitch
Node
unpack/deploy
Step 2. Use Component + your model to build engine
CCA Component
CORBA
Server
©Kabira Technologies Inc, 2001
Basic Operation
•
Obtain stringified IOR (strIOR)
•
Declare and create object of wrapped type, proxy object
declare componentName::MyModule::MyInterface mi;
create mi values (m_stringifiedIOR:strIOR);
•
If the IDL contained user exceptions, the client can catch them
in try…catch blocks.
Shared Memory
ObjectSwitch
mi
proxy
object
CORBA Server
CCA Engine
ORB
©Kabira Technologies Inc, 2001
Java Client Adapter (a.k.a. Bridge)
Development
Java
client
routines
Code
Generation
Deployment
ObjectSwitch
ObjectSwitch
Client Engine
JCA Engine
Java application
Model Based Wrapper
Java Client
Routines
Java VM
The client “sees” the Java service
as if it were modeled in OOA.
©Kabira Technologies Inc, 2001
Nothing New Here
The Development Process
Step 1 . Create CCA Component by “wrapping” IDL
IDL
CORBA
CORBA
Server
Server
Basic Operation
CCA Component
Design Center
“wrapping”
CCA
Engine
Step 2. Use Component + your model to build engine
Obje ctSwitch
Nod e
unpack/deploy
•
Obtain stringified IOR (strIOR )
•
Declare and create object of wrapped type, proxy object
declare componentName::MyModule::MyInterface mi;
create mi values (m_stringifiedIOR:strIOR);
•
CCA Component
Client
Application
Engine
Design Center
If the IDL contained user exceptions, the client can catch them
in try…catch blocks.
Engine Component
mi
mi
Shared Memory
ObjectSwitch proxy
Built from application
model + CCA component
proxy
object
object
Application
model
©Kabira Technologies Inc, 2001
CORBA Server
CCA Engine
ORB
©Kabira Technologies Inc, 2001
The approach to Java is basically the same as Corba.
©Kabira Technologies Inc, 2001
Another Exchange Standard: XML
• eXtended Markup Language
• Specifies structure and contents for a
“document” (DTD/Schema)
• Does not specify communication protocol as
Corba and Java do.
Service
Actication
HTTP
Service
COVAD
©Kabira Technologies Inc, 2001
XML
Service
XSA Adapter (a.k.a. Bridge)
Development
XML
Schema
Code
Generation
Deployment
Client Engine
ObjectSwitch
ObjectSwitch
XSA Engine
Model Based Wrapper
3rd Party
DOM
Service
import/export
documents of
defined schema
Protocol
Engine
XML
The client “sees” the XML document
as if it were modeled in OOA.
©Kabira Technologies Inc, 2001
XSA Service Component
• Each XML Schema you wrap results in a distinct XSA Service
component
• The XSA Service component contains a hierarchy of entities and
interfaces that facilitate conversion of data between XML and
object attributes
• The key object in the generated object hierarchy is the “root”
object
root entity
- XMLString
exportToXML()
setXMLString()
Design Center
XML Schema
XSA Service component
©Kabira Technologies Inc, 2001
The Development Process
Step 1. Create XSA Component from XML schema
XML
Schema
XSA Service
component
XSA Service Engine
Design Center
“wrapping”
Step 2. Use Component + your model to build engine
XSA Service Component
ObjectSwitch
Node
unpack/deploy
XSA client
Engine
Design Center
XSA client component
Built from Client
model + XSA Service
component
Client
model
©Kabira Technologies Inc, 2001
Sending an XML Document
•
•
•
The client engine creates
the objects it needs for an
XML document from the
entities defined in the XSA
Service Engine and
assigns values as desired.
The Client then calls the
exportToXML() operation in
the root object of the
document.
An XML string of the
document is returned
which is then sent out
using the protocol engine.
Client Engine
ObjectSwitch
ObjectSwitch
XSA Engine
©Kabira Technologies Inc, 2001
Protocol
Engine
XML
Receiving an XML Document
•
•
•
The client engine acquires
an XML document (a
string) using the protocol
engine. A document root
object is created.
The setXMLString() operation
of the root object of the
document is invoked with
the XML document as an
input.
The objects necessary to
contain the information in
the XML document are
created and initialized.
Client Engine
ObjectSwitch
ObjectSwitch
XSA Engine
©Kabira Technologies Inc, 2001
Protocol
Engine
XML
Summary: Bridging to 3rd Party Software
• Wrapped non OOA
functionality in OOA.
• Used code/model
generation technology.
• Exposed an OOA
interface to existing
service functionality.
• Built up the domain
chart as the technology
(RD) dictates.
One Approach
Interface
Definition
model based
interface
Generic
Equipment
Handling
Model Based Wrapper
Native
Client Interface
to Service
Code
Generation
OOA model
Model Based Wrapper
©Kabira Technologies Inc, 2001
Native
Client Interface
to Service
Corba-Based
Equipment
Drivers
Supplementary Slides
©Kabira Technologies Inc, 2001
Extinsible CodeGen Architecture
Built with ObjectSwitch!
DC Server
DC GUI
Client
Model Repository
Import/Export
Corba
ORB
Plug In Service
DC CMD
Client
Model Auditor
Basis for
Extensible
DC Services
Model Compiler
Core
Plug Ins
System Builder
AL Interpreter
Adapter-1
©Kabira Technologies Inc, 2001
...
• Register/List/Search
• Project Mgmt
• Property Mgmt
• Commands/Results
Adapter-N
Adapter
Plug Ins
• Persistence
• Corba
• SNMP
• others...