IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  lookup table or hash table - Best approach

    Posted Fri January 30, 2009 10:20 PM

    Hi All,

       I have a name value pair list of 40,000 items. I pass in a name and get its corresponding value. The issue is:
    
    What is the best approach to go with (lookup table/hash table/DB table) or is there a better way ?
    

    My approach as of now is to have a config file, load it into memory when package loads. Convert it to a string table and pass it as input to lookup service. Any help would be appreciated.

    Thank you
    Dave


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: lookup table or hash table - Best approach

    Posted Mon February 02, 2009 07:56 PM

    For best performance, i’d think a hashMap/hashTable will be the choice, if the name/value pairs are not too big.
    Just write a few lines of java code for definition and getting method.
    You just initiallize it at loading and create get service to retrieve the value by name. At lease you don’t need to loop it through every time.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: lookup table or hash table - Best approach

    Posted Tue February 03, 2009 07:52 AM

    Take a look at memory requirements of your current approach: i believe webMethods IData structures use up a significant multiple (2x, 5x, 10x?) of the memory required by ‘bare’ Java data structures - though the WM string table implementation may be particularly efficient.

    My natural tendency with this number of records is to take the DB table approach, especially if the data changes a fair bit.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: lookup table or hash table - Best approach

    Posted Fri February 06, 2009 12:27 PM

    It all depends on your needs. What’s more important to you? Speed? Memory footprint?

    If you’re already using JDBC adapters elsewhere in your project, it seems like a no-brainer to use a DB table. Since the data is pretty static, enable cacheing for the service.

    If you want to roll your own Java service, have your class initialise a static TreeMap (or hashmap if your objects aren’t Comparable), and make a getter method that reads from it.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: lookup table or hash table - Best approach

    Posted Tue February 10, 2009 01:00 PM

    Hello, do not use lookupTable service. The implementation uses a 2-D String array which is not efficient (of course java string operations sucks). Its better to go for DB table as the data volume is more. Or else a hashmap will do good.

    Cheers
    Guna


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: lookup table or hash table - Best approach

    Posted Tue February 10, 2009 06:55 PM

    I am interested to hear from the Veterans - RMG, reamon… ?


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods