Monday, November 10, 2008

Explaining the Initialization mode in a TDI Loop

Very often with TDI, it's necessary to put a Loop in an Assembly Line, so that the Work Entries from the Feed can be used to perform another query to retrieve some data. An example is with Tivoli Application Depdendency Discovery Manager (TADDM) and obtaining all IP addresses for a ComputerSystem. The IP addresses are attributes of the IpAddress object, which is related to an IpInterface, which is then related to a ComputerSystem object, so in order to retrieve the IP addresses of a Computer System we need to correlate ComputerSystem, IpInterface and IpAddress.

To do that using TDI (avoid the need to process XML files or write Java code), we can use the TADDM Connector, available at: Tivoli OPAL

As the TADDM Connector allows to specify the depth of the query, our first inclination is specify depth=3, which would directly return all attributes from the ComputerSystems and related object in just one shot. This approach is great and simple, but puts a lot of work on TDI (and TADDM server) to retrieve all attributes of depth 3, which can easily turn to be thousands, for each Computer System. For an environment containing about 2500 servers, it took 15 minutes to retrieve the IP addressses and dump them in a very simple Assembly Line.

A second option is to read only the attributes of ComputerSystem (at depth 1), then put a Loop to retrieve the IpInterfaces, linking them to the ComputerSystem and reading at depth 2. The Assembly Line is a little bit more complicated, and the main problem is that the AL takes 36 minutes, instead of the previous version.

The reason for this performance degradation is the fact that TDI is re-initializing the connection to TADDM for every single ComputerSystem. Looking at the Loop, by default TDI uses Initialize and Select/Lookup as the Init Options, which means that the Connector is initialized every time. Changing it to Select / Lookup only leads to a running time of mere 6 minutes!

So take good care of your TDI Loop!

Eddie, so far no JavaScript code!

No comments: