Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Thorny design problem

by Codon (Friar)
on Sep 08, 2005 at 19:50 UTC ( #490301=note: print w/replies, xml ) Need Help??

in reply to Thorny design problem

This is difficult issue. It sounds as if you are going to have a handful of data collection schemes for your 100 data sources. This, combined with the desire to create a single, unified output format leads me to think Heirarchical. You will have some significant overlap in how you access the raw data per data source. All static web sites would have a url that you access. All FTP sites would have a remote server, login, password, and file path. All RDBMS will have similar credentials. In all cases, you will want to do the following:
  • fetch_raw_data
  • parse_raw_data
  • write_pased_data
  • This would make me go with something akin to:

    DataCollector DataCollector::Mechanized DataCollector::Mechanized::WalMart DataCollector::Mechanized::GeneralElectric DataCollector::RDBMS DataCollector::RDBMS::ExxonMobil DataCollector::FTP DataCollector::FTP::GeneralMotors DataCollector::Scrape DataCollector::Scrape::FordMotorCompany DataCollector::Scrape::CiscoSystemsInc . . . etc.

    Your driver program would then, unfortunately, need to know all of the DataCollector leaf classes or devise a method to dynamically load and run them. But for each of these classes, you could call the above mentioned methods. Those methods would make private method calls on down until you get to the ugly details in the individual implementation classes. These implementation classes would only need to know where it's going for data and how to pull the real data from raw data source. Up one level would be how to talk to the data source type, based on information in the implementation classes. Up in the top level is the detail of how to write out the data.

    I hope this makes sense, isn't too vague, etc. Good luck.

    Ivan Heffner
    Sr. Software Engineer, DAS Lead, Inc.

    Log In?

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://490301]
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (4)
    As of 2017-08-21 05:49 GMT
    Find Nodes?
      Voting Booth?
      Who is your favorite scientist and why?

      Results (317 votes). Check out past polls.