54
www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager [email protected]

Embed Size (px)

Citation preview

Page 1: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

www.novell.com

Custom DirXML™ Driver DevelopmentCustom DirXML™ Driver Development

Richard MathesonDirXML Driver Development ManagerManager [email protected]

Page 2: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Vision…one NetA world where networks of all types—corporate and public, intranets, extranets, and the Internet—work together as one Net and securely connect employees, customers, suppliers, and partners across organizational boundaries.

MissionTo solve complex business and technical challenges with Net business solutions that enable people, processes, and systems to work together and our customers to profit from the opportunities of a networked world.

Page 3: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

one Net business solutions modelN

et

Serv

ices

Soft

ware

CoreServices

Platform

OperatingSystems

Networking Networking & Storage& Storage

Networking Networking & Storage& Storage

AccessAccessSecuritySecurityAccessAccess

SecuritySecurityApplication Application ProvisioningProvisioningApplication Application ProvisioningProvisioning

User User ProvisioningProvisioning

User User ProvisioningProvisioning CollaborationCollaborationCollaborationCollaboration

NetWareNetWareNetWareNetWare WindowsWindowsWindowsWindows SolarisSolarisSolarisSolaris LinuxLinuxLinuxLinux AIXAIXAIXAIX …………

eDirectoryeDirectoryeDirectoryeDirectory

Inte

gra

tion

Inte

gra

tion

Serv

ices

Serv

ices

Inte

gra

tion

Inte

gra

tion

Serv

ices

Serv

ices

Resou

rce

Resou

rce

Man

ag

em

en

tM

an

ag

em

en

tR

esou

rce

Resou

rce

Man

ag

em

en

tM

an

ag

em

en

t

Sto

rag

eS

tora

ge

Man

ag

em

en

tM

an

ag

em

en

tS

tora

ge

Sto

rag

eM

an

ag

em

en

tM

an

ag

em

en

t

File

File

File

File

Pri

nt

Pri

nt

Pri

nt

Pri

nt

Web

Access

Web

Access

Web

Access

Web

Access

Con

ten

tC

on

ten

t D

elivery

Delivery

Con

ten

tC

on

ten

t D

elivery

Delivery

Port

al S

erv

ices

Port

al S

erv

ices

Port

al S

erv

ices

Port

al S

erv

ices

Messag

ing

Messag

ing

Messag

ing

Messag

ing

…………

ProductGroups

EmployeesEmployees EmployeesEmployeesSuppliersSuppliersSuppliersSuppliers CustomersCustomersCustomersCustomers

One Net Business StrategyOne Net Business StrategyOne Net Business StrategyOne Net Business Strategy

Pro

fessio

nal S

erv

ices

Solutions

Practices

Rapid Rapid Technology Technology

RationalizationRationalization

Rapid Rapid Technology Technology

RationalizationRationalizationBPM forBPM for

Local GovtLocal GovtBPM forBPM for

Local GovtLocal GovtActiveActive

InformationInformationPortalsPortals

ActiveActiveInformationInformation

PortalsPortals…………

Secure Secure Partner Partner PortalPortal

Secure Secure Partner Partner PortalPortal

Identity Identity ProvisioningProvisioning

for PeopleSoftfor PeopleSoft

Identity Identity ProvisioningProvisioning

for PeopleSoftfor PeopleSoft

Page 4: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Session Roadmap

• DirXML™ Overview• DirXML Architecture• DirXML Driver Overview• Driver Design Considerations• DirXML Driver Architecture• Demonstration• Resources• Conclusion

Page 5: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

What is DirXML?

• Data-sharing service Provides bi-directional data flow between

eDirectory and enterprise applications Administrator determines the data to be shared

• Matches Existing Business Processes Runs on all Novell eDirectory™ supported platforms

(NetWare, Win2K, NT, Solaris, Linux, AIX) Requires no changes to existing applications Transforms data into the format required by the

target application.

Page 6: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Bringing the Directoryto the Application

• General method for directory enabling applications

The applications don’t have to change

• Sharing data through the directory Transform data to/from the

application’s native format Common data is stored in the

directory

Page 7: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Islands of Isolated Data

HR ERP

DEN

Dir.E-Mail

OSDB

Page 8: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Sharing Data through the Directory

HR ERP

DEN

Dir.Mail

OSDB

Novell eDirectoryNovell eDirectory™

with with DirXMLDirXML

Page 9: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Architecture

NovelleDirectory

DirXML

DirXMLEngine

DirXML DriverShim

Novell eDirectory

Server

Application

Subscriber Channel

Publisher Channel

Rules & Stylesheets

Rules & Stylesheets

Page 10: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Architecture- The Remote Loader

NovelleDirectory

DirXML

DirXMLEngine

Novell eDirectory

Server

Application

DirXML DriverShim

Remote LoaderShim

Rem

ote

Lo

ader

Service

Subscriber Channel

Publisher Channel

Rules & Stylesheets

Rules & Stylesheets

Page 11: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Components of DirXML

• DirXML engine eDirectory interface Join engine

• DirXML Driver Shim XML interface Application’s native interface

• Subscriber and publisher channels Filters manage flow in both directions Policies may be applied differently to each

channel

Page 12: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Engine

• eDirectory interface Supports loading of multiple drivers Guaranteed delivery of eDirectory events eDirectory event loop-back detection

• Join engine Handles data transformations Rules processor XSLT processor

Page 13: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Driver Shim

• XML interface Issue and receive XML documents Document Object Model (DOM)

• Application’s native interface Applications don’t have to change Can be either remoted via the remote loader or

can use the application’s own remote capability (if any)

Page 14: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Publisher and Subscriber Channels

• Publisher channel Propagates events from the application to

eDirectory

• Subscriber channel Propagates events from eDirectory to the

application

• Filters Manage the flow of data on both channels A list of desired classes and their attributes Determines the authoritative source(s) of data

Page 15: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Overview

• What is a DirXML driver? Data pipe

• DirXML engine to target application• Operates on passed data• In general, doesn’t make synchronization decisions

Standard objects/methods• DriverShim• Subscriber• Publisher

Page 16: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Overview

• Driver communication and threads Two channels of communication

• Subscriber=NDS->App• Publisher=App->NDS

Two threads• Subscriber thread

– Initializes DriverShim– Initializes subscriber– Waits in engine for events

• Publisher thread– Initializes publisher– Polls application for changes

Page 17: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Overview

• Driver lifecycle Modes of operation

• Schema query– Driver started explicitly to determine app schema– No synchronization possible

• Normal synchronization– Once driver is started for synchronization the getSchema

method won’t be called

Page 18: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Lifecycle—Normal Sync

• Subscriber thread Driver constructed Init called getSubscriptionShim getPublicationShim Subscriber init The DirXML engine calls

subscriber’s execute method to request the drivers identity.

The DirXML engine calls subscriber’s execute method zero or more times

Engine calls shutdown

• Publisher thread Publisher init Publisher start

Publisher sends updates to eDirectory

Publisher thread returns on notice

Page 19: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Lifecycle—getSchema

• Subscriber thread Driver constructed getSchema called

with all initialization parameters

Driver is destroyed

• Publisher thread Not used

Page 20: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Design Considerations

• Research

• Target application information

• Approaches to building a driver

Page 21: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Design Considerations

• Research XML

• Parsing– DOM or SAX

XSLT DirXML architecture NDS.DTD Rules and stylesheets

Page 22: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Researching the Target Application

• Is it standards-based? LDAP, JDBC

• Or proprietary Notes, Exchange

• Schema Fixed or extensible

Page 23: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Researching the Target Application

• Data synchronization and application behavior

In general, drivers are just data pipes• Don’t make decisions about data, just route it

Supporting an application may require more thanjust moving data• Creation of system entities

– Mailbox creation, for instance

• Establishment of credentials on new system

Page 24: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Researching the Target Application

• Access methods Standards-based protocol Proprietary API Is it remotable? Reading and writing information Discovering changes in the application space

• Authentication issues• Associations

What value uniquely identifies objects in the application space?

Page 25: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Approaches to Building a Driver

• Am I building for a specific case or for general reuse?

Custom behaviors modeled in code or XSLT?

• Become an expert in the target application Understanding of application data Understanding of application behavior based on

data Understanding of user expectations

• Mining changes from the application is the hardest part of driver development

Page 26: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Application Native Format

• An NDS object is passed as XDS (XML representation of NDS object)

• The driver must have application native format data to submit to the application

Schema mapping translates namespace XSLT can transform XDS to another format Driver can implement data translation for APIs

Page 27: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Application Integration Points

• How can I get at the application data? Protocol

• Is the protocol standard?• Is it remotable?

Application Programming Interface (API)• Driver will be application-specific• Can I get change events?

Flat-file import/export mechanism• Unable to properly manage associations or queries

Page 28: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Platform and Language Choice

• What language should I use? What language best supports my application’s

integration points? Java has better DOM support

• Where can my driver run? Drivers execute as part of Dhost What APIs will I need local to Dhost?

• Can restrict platform choice• Use Remote Loader to solve deployment issues.

Can the driver securely bind remotely to the application?

Page 29: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Architecture

• Driver responsibilities

• Deployment responsibilities

• Required driver interfaces

• Rules and stylesheets

Page 30: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Architecture

NovelleDirectory

DirXML

DirXMLEngine

DirXML DriverShim

Novell eDirectory

Server

Application

Subscriber Channel

Publisher Channel

Rules & Stylesheets

Rules & Stylesheets

Page 31: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Driver Responsibilities

• Initialization and shutdown• Read application schema for DirXML engine• Translate XML from NDS (XDS) to app format• Identify changes in target application• Translate application native format into XDS• Process queries against application• Submit queries against eDirectory• Provide foreign key for driver associations

Page 32: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Requirements for ‘Production’ Drivers

• Effective change event detection Publish only changed attributes, if possible

• Guaranteed delivery Can’t drop events for the Publisher channel

• Loopback detection Prevents driver-caused changes from causing

unnecessary replication traffic or erroneous data

• Prefiltering publisher data Prevents unnecessary traffic by only processing

changes interesting to the driver

Page 33: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

‘Production’ Drivers - cont.

• Support for multiple running instances Publish only changed attributes, if possible

• Support Remote Loader Shouldn’t require code changes. Just validate

the functionality.

• Driver identity query In DirXML 1.1 the engine queries each driver for

its identity and activation levels

Page 34: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

‘Production’ Drivers - cont.

• Support multiple events/commands in a single XML document

Engine doesn’t send more than one. Additional events added by XSLT Generate a <status> line in the output

document for each event based on event-id.

• Don’t ‘batch’ events in a single XML doc on the publisher channel

Prevents driver-caused changes from causing unnecessary replication traffic

Page 35: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Deployment Responsibilities

• Data requirements Schema mapping Filtering objects and attributes Authoritative Source Required data Data translation Additional functionality

Page 36: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Deployment Responsibilities - cont.

• Driver selection Where is the data? What protocols or transports are supported? What application features are needed? Remote?

Page 37: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Required Driver Interfaces

Interface Name Purpose Java Name C++ Name DriverShim General driver initialization and

shutdown com.novell.nds.dirxml.driver.DriverShim

DriverShim in NativeInterface.h

SubscriptionShim - Translates XML from NDS into application native format

- Reads application schema for DirXML

com.novell.nds.dirxml.driver.SubscriptionShim

SubscriptionShim in NativeInterface.h

PublicationShim Translate application native format data into XML for NDS

com.novell.nds.dirxml.driver.PublicationShim

PublicationShim in NativeInterface.h

XmlQueryProcessor Processes XML docs representing queries against the application

com.novell.nds.dirxml.driver.XmlQueryProcessor

XmlQueryProcessor in NativeInterface.h

Page 38: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DriverShim Interface

• The DriverShim interface consists of five methods in Java and six methods in C++

DriverShim init—Performs channel-independent initialization

DriverShim getSubscriptionShim—Returns a reference (Java) orpointer (C++) to the object implementing the SubscriptionShim interface

Driver getPublicationShim—Returns a reference (Java) or pointer (C++)to the object implementing the PublicationShim interface

DriverShim shutdown—Notifies the driver to disconnect from theapplication, cleanup, and otherwise shutdown

DriverShim getSchema—Called to obtain a representation of theapplication schema

Page 39: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

SubscriptionShim Interface

• The SubscriptionShim interface consists of two methods

SubscriptionShim init—Performs subscriber channel specific initialization

SubscriptionShim execute—Accepts commands from the DirXML engine and executes those commands on the application• Execute method is inherited from the

XmlCommandProcessor interface

Page 40: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

PublicationShim Interface

• The PublicationShim interface consists of two methods

PublicationShim init—Performs publisher channel specific initialization

PublicationShim start—Monitors the application and publishes application changes to the DirXML engine

Page 41: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

XmlQueryProcessor Interface

• The XmlQueryProcessor interface is required because it is a parameter to XMLCOMMANDPROCESSOR.EXECUTE

• Used by the DirXML interface to querypublisher when additional data is requiredto complete an operation

Page 42: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Support Code

• Tracer class Provides ability to output information to DSTrace

• Output can be controlled based on DriverTraceLevel

• DriverState support Driver can save state information between

invocations Done by adding an <input-params> tag to a

return doc or a published document Can set parameters for driver, subscriber, or

publisher state

Page 43: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Rules

• XML rules Schema mapping rule translates namespaces

Create rule declares required attributes

Matching rule declares how to identify matching objects

Placement rule determines hierarchical placement

Page 44: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Rules and Stylesheets

• XSL rules Event transformation defines how to map one

event to another based on XSLT logic

• Using XSL to override XML rules Create, match and placement rules can be

implemented as XSL• Create DirXML rule object• Paste XSL into object editor• Add the rule as a attribute of the subscriber or

publisher

Page 45: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

demonstratiodemonstratio

Page 46: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Sessions at BrainShare 2002Developer Track

• DCB125—Novell DirXML Introduction Lab

• DCB230—DeveloperNet University: DirXML Driver Installation.

• DCB330—DeveloperNet University: Developing DirXML Drivers

• DL303—Novell DirXML Commands, Events and Transforms

Page 47: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Sessions at BrainShare 2002IS&T Track

• IO118—Introduction to Novell DirXML

• IO119—DirXML Competitive Comparisons

Page 48: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Sessions at BrainShare 2002Deployment Track

• TUT235—Understanding Novell DirXML Technology

• TUT236—Configuring DirXML Drivers for JDBC, iPlanet and Delimited Text

• TUT237—Configuring DirXML Drivers for eDir, AD and NT

• TUT238—Configuring DirXML Messaging Drivers

• TUT239—Configuring DirXML Drivers for ERP Systems

• TUT335—Designing and Managing DirXML Deployments

• TUT362—Creating a Meta Directory with DirXML

Page 49: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Training & Education

• Directory & Database Integration Using DirXML (Course 992)

Import Drivers Implementation Strategies

• ATT - Advanced DirXML Troubleshooting Techniques Customization XML, XDS Rules, and XSLT

Additional information at http://www.novell.com/education/train_product/dirxml.html

Page 50: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Training & Education at BrainShare

• Study and preview Directory and Database Integration Using DirXML (Course 992) at The Learning Zone

• Purchase DirXML self-study materials at the Bookstore

• ATT - Advanced DirXML course in Provo March 25-28

Page 51: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Links

• For the latest information on DirXML and drivers

www.novell.com/products/edirectory/dirxml/

• For course schedules and registration information

www.novell.com/education/train_product/

Page 52: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

DirXML Links

• For the DirXML Developer’s Kit on the NDK developer.novell.com/ndk/dirxml.htm

• For DeveloperNet®’s online driver development course

developer.novell.com/servlet/devnet/education/tutorials/dirxml2/01.htm

For XML information www.w3c.org

For XSLT information we recommend XSLT Programmer’s Reference, by Michael Kay

Page 53: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com

Conclusion

• DirXML provides the platform for data sharing and synchronization

• DirXML drivers provide the plumbing for an application to participate with the directory

• With DirXML, Novell is delivering on the promise of one Net

Page 54: Www.novell.com Custom DirXML™ Driver Development Richard Matheson DirXML Driver Development Manager Manager rmatheson@novell.com