Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Supreme integration solutions with IBM Directory Integrator

Data transformed and 'N Synch

Rob Cutlip, Software and Solutions Architect, IBM, Software Group
Rob Cutlip is a software and solutions architect with the IBM Software Group. This summer he served as a technical mentor for an ExtremeBlue project in Research Triangle Park, North Carolina.
Neeraj Joshi (neeraj_10@hotmail.com), Extreme Blue Technical Intern, IBM, Software Group
Neeraj Joshi is a former intern with the IBM Extreme Blue program. He was a software engineer on "Blue Biz," a project addressing Service Level Management issues. He is currently completing his Master's degree in Computer Science at North Carolina State University. You can contact him at neeraj_10@hotmail.com.

Summary:  In this article, the authors describe how IBM Directory Integrator provides a powerful and flexible environment for data transformation and synchronization. They use a step-by-step example to show how IBM Directory Integrator lets customers integrate their e-business operation, including data, applications, and business processes.

Date:  01 Oct 2002
Level:  Introductory

Activity:  951 views
Comments:  

Introduction

IBM Directory Integrator had its technological beginnings addressing the synchronization problem with directories.

Directories such as IBM Directory Integrator Server or the Domino address book -- which has evolved into a general purpose directory -- contain information about people and resources that has been optimized for search and retrieval. To link the directories together, centralized meta directory solutions are often used. These solutions use centralized administrative functions that often lead to an unwieldy, hard-to-manage environment.

Directory Integrator supports LDAPv3, Java Naming and Directory Interface (JNDI), and product-specific connectors to access a wide variety of commercially available directories. It provides a powerful approach to the problem of corporate directory synchronization.

Data synchronization is one of the most perplexing and omnipresent problems with developing integrated e-business solutions. Within large, distributed, and often complex systems, customer data is in several locations and might be maintained by different software packages. For example, within an e-commerce solution, customer data might be within the e-commerce system itself, an associated customer relationship management (CRM ) system, and a supply chaining management (SCM) system. Many approaches to solving this problem have been proposed over the years, but they require complex, difficult-to-maintain programming.

The IBM Business Integration initiative (see Resources for a link) addresses these issues with several products, such as WebSphere Business Integrator, which can bring about integration at a business process level. You don't have to worry about the particulars of the underlying data store, which might not even reside within your environment. Development is done at the business process level, with a business process interacting with one or more other business processes.

In this article we explore how Directory Integrator provides basic data integration for a project. We show Directory Integrator's very simple way to encapsulate a wide range of protocols, formats, APIs, and scripting languages by using connectors.

Note: Directory Integrator will run on many platforms, including Windows, Linux, Solaris, HP-UX, AIX, and Macintosh X. Directory Integrator provides a Java virtual machine that conforms to the Java 2 specification. We ran the examples in this article on Windows 2000.


IBM Directory Integrator

The Directory Integrator development paradigm manifests itself in AssemblyLines. An AssemblyLine, shown in Figure 1 below, describes the origin, transformation, and destination of data. Integration elements, including data sources, events, data flows, and attribute mapping with transformation, are used to create the assemblies, or chains.


Figure 1. Directory Integrator AssemblyLine
Directory Integrator AssemblyLine

In the figure, the data enters the AssemblyLine from the left and ends its journey at a data store in the upper right. Based on the configuration of individual event handlers, connectors, event parsers, data parsers, hooks and business rules, an AssemblyLine executes the prescribed data flows.

Directory Integrator integration elements

Data sources represent a wide variety of systems and repositories, including DB2 and IBM Secureway directory, and files such as XML, SOAP documents, and e-mail.

Events are usually associated with how data sources will interact. When a data flow is triggered by a conditional change, events are invoked.

Data flows represent a "unique" message being passed from one data source to another.

Attribute mapping and transformation involve determining which fields and attributes are to be passed by the data flow to the data source, and their representation of this information.

An event handler detects a predefined event and applies an [event+condition--> action] paradigm. At that point, an event parser may provide interpretation and transformation functions to the data flow. Connectors along the AssemblyLine execution flow provide access to a number of devices, systems, applications and platforms. Directory Integrator delivers many connectors, each designed for well known data sources such as DB2 and LDAP.

Also available for deployment along the AssemblyLine are parsers and hooks. Parsers facilitate the interpretation and translation of information byte stream data into structured "information objects." Hooks provide the ability to execute actions under specific conditions or at specific points along the AssemblyLine. With additional Java code or by using scripting languages such as JavaScript, Perl and VBScript additional business rules and real-time event handling can be added.

As shown in the following sections, the Directory Integrator architecture allows for development by accretion. Intermediate steps can be immediately tested and debugged. Additional logic can be added quickly to the assembly to create the next revision.


Our integrated solution environment

Each summer IBM runs Extreme Blue, a high-energy college intern program (see Resources for more information). Last summer our Extreme Blue project, codenamed "bluebiz," built a prototype service-level management (SLM) system for service providers. Figure 2 shows a sample SLM architecture.


Figure 2. Meta-catalog SLM architecture example
Meta-catalog example

Transforming and synchronizing with Directory Integrator

An SLM solution is comprised of many functions, including metering, monitoring, and billing. Data related to these activities would usually reside in disparate data stores such as databases, comma separated values (CSV) files, XML, and so on. You can use Directory Integrator to provide a clean, simple solution to address data synchronization issues within this environment.

Let's look at a simple example from our project that shows how Directory Integrator can be used. Within our SLM solution there are service providers and service consumers. The service providers provide "service offerings" that are agreements to provide services at a given QOS. A service consumer subscribes to service offerings, which might be as simple as a credit card validation service. Once the agreement is in place, the SLM system monitors the actual service delivered and compares it with the agreed upon terms. If there is a violation, a suitable action is taken to remedy the problem, and if needed the requisite remediation occurs at billing time.

We'll assume that service offering, metering, and billing related data is stored in DB2 tables: sladb (slaid,slaname,guarantee), metdb(slaid,custid,value), and billdb(custid,slaid,charge) respectively. Customer-related data is in a CSV file (custid,custname,slaid). The consolidated output is expected to be an XML file.

Note: To run this example, you must have both IBM DB2 Universal Database and Directory Integrator installed.

Step 1: Setting up the environment

  • Install the version of Directory Integrator for your platform, and configure per the instructions.
  • Install DB2 and run the db2scripts.bat file provided. It will create the sample database.
  • Bring up the Directory Integrator administration window.

Step 2: Creating a new configuration and assembly line

  • By default an rs.cfg is opened. Click File>New and create a new configuration file named metamergetut.cfg.
  • Create a new AssemblyLine by clicking Add as shown in Figure 3 below.
    Figure 3. Adding an AssemblyLine
    Adding an AssemblyLine

Step 3: Creating CSV input connector

  • Click Add to add a new input connector for the customer data, which is a CSV file. The add connector dialog box, in Figure 4 below, has three input fields:
    • Name: Enter CSVInput.
    • Connector: Select MetaMerge.FileSystem.
    • Connector Mode: Select Iterator, because we are going to iterate over each entry in the CSV file.

    Figure 4. Adding a connector
    Adding a connector
  • Click OK, then Configure. A new dialog box pops up that lets you configure the settings of the connector we just added.
    Figure 5. Configuring a connector
    Configuring a connector
  • As shown in Figure 5, select the File path to point to inputcsv.csv.
  • Select Input as the mode.
  • Select Metamerge.CSV in the Content Parser because we are dealing with a CSV file. Next click Attributes.
    Figure 6. Setting the connector attributes
    Setting the connector attributes
  • Click on Connect then Next, and a table showing the contents of the CSV file is displayed, as in Figure 6 above. The first column shows the name of the attribute, the second the data type that Directory Integrator uses to interpret the data, and third is the value. Click Close and return to the main screen. Now we have set up the input connector to iterate over the contents of the CSV file.
  • Click on Attribute Map, which displays the list of attributes that were obtained by reading the CSV file. Select all the attributes. These now become the working attributes, which can be used internally by the Directory Integrator assembly, as you'll soon see.

Step 4: Configure connectors connecting the billing, metering and service offering tables so we can lookup on them using the data obtained by iterating over the CSV file.

  • Click Add to add a new connector for the service offering table (sladb). Enter a name for the connector, then select MetaMerge.JDBC as the connector and select Lookup as the mode. Click OK.
  • Click Configure and enter the details, as shown in Figure 7 below. Be sure you enter the appropriate user name and passwords.
    Figure 7. Configuring the database connector
    Configuring the database connector
  • Click Attributes, then Connect, and then Next. A table similar to the previous one shows the contents of the table. Click Close.
  • Click Link Criterion, which lets you do lookups on the table based on some working attributes you already may have -- in our case, the custid and slaid attributes we obtained from the CSV file.
    Figure 8. Setting up the Lookup
    Setting up the Lookup
  • As shown above in Figure 8, select SLAID as the Connector Attribute, equals as the Operand, and $slaid as the Value. Click OK.
  • Click on the Attribute Map tab, select SLAName and Guarantee, then click OK. Now you have set up a connector to lookup into the sladb based on the values of custid and slaid obtained from the CSV connector. Repeat these steps for the metering table and billing table.

Step 5: Configuring the XML output connector

  • Now that you've gotten data from all your sources, you need to consolidate and output it in an XML file. Click Add to add a new connector. As shown in Figure 9, set the Name, select MetaMerge.filesystem as the Connector, and Addonly as the Mode.
    Figure 9. Creating the output connector
    Creating the output connector
  • Click Configure. Set the file path to the directory/filename.xml where the file is to be generated. Select Output as the mode and MetaMerge.XML as the content parser. Click OK.
  • Click Attribute Map and choose Select. Select custname, value, slaname, charge and guarantee. Click OK.

Step 6: Run the Assembly

  • Now you're set to run your assembly. The CSV input connector will iterate over the contents of the CSV file. For each iteration the Sladblookup, billdblookup and metdblookup connectors will carry out a lookup based on the slaid and/or custid obtained from the input connector. The results of the lookup will then be put in the output XML connector, which will then write it to the file. Click on Run. The assembly will execute and the XML file will be generated, as shown in Figure 10.

Figure 10. Generated output
Generated output

Summary

This article described the basics of using an AssemblyLine and connectors to map and transform data from a CSV file into a relational database system. We've only scratched the surface of what is possible. IBM Directory Integrator provides a powerful and flexible environment for data transformation and synchronization.



Download

NameSizeDownload method
i-directint.zip HTTP

Information about download methods


Resources

About the authors

Rob Cutlip is a software and solutions architect with the IBM Software Group. This summer he served as a technical mentor for an ExtremeBlue project in Research Triangle Park, North Carolina.

Neeraj Joshi is a former intern with the IBM Extreme Blue program. He was a software engineer on "Blue Biz," a project addressing Service Level Management issues. He is currently completing his Master's degree in Computer Science at North Carolina State University. You can contact him at neeraj_10@hotmail.com.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Sample IT projects
ArticleID=10221
ArticleTitle=Supreme integration solutions with IBM Directory Integrator
publish-date=10012002
author1-email=cutlip@us.ibm.com
author1-email-cc=
author2-email=neeraj_10@hotmail.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).