Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

keep checking xml feed

Options
  • 23-06-2009 9:23am
    #1
    Registered Users Posts: 8,070 ✭✭✭


    Gonna be receiving some xml data via https which will automatically update,
    need to check it constantly.

    What technology* would you guys suggest ?

    *programming language+methods


Comments

  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    I'd say the best way to do it is have the OS run an automated script - so crontab for UNIX or scheduled tasks for Windows. That can trigger a HTTP request to a certain page that will draw down the feed or run a script that does the same. What OS or technology you use for this is really your preference.


  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    Question's a bit vague to be answered usefully. Depending on the nature of the XML data, an RSS reader might do it.

    Re languages, you could do this in any language really. If it was me, I'd do it in C#, because I like the language and its supporting framework, and it's where my expertise lies at present. Someone could just as well do it in Java, Python, C++, Javascript, Perl, etc etc once you have libraries to parse XML and make HTTP requests, which pretty much all of those do. If you've programmed before, use whatever language you're most experienced with (within reason; COBOL or x86 asm may not be best placed). If you haven't programmed before, pick an easier beginner project, and then learn any one of Java, C#, C++ or something like PHP/Python.

    Re methods, not much to it, depending again on what exactly you're trying to do. A loop (with a reasonable delay) that runs away and periodically makes HTTP requests, then passes the results off to your XML parser/storage/whatever is all there is to it really.

    For instance, for making HTTP requests in C#, this should help;
    http://www.csharp-station.com/HowTo/HttpWebFetch.aspx
    seems to be Java equivalent;
    http://www.aviransplace.com/2008/01/08/make-http-post-or-get-request-from-java/
    HTTPS should be pretty similar, depending on certs and such, Google should turn up what you need.

    As ever, build it up a bit at a time - start by making a HTTP request maybe, then HTTPS, then figure out how to parse the XML you get back, then make it run regularly and automatically, then make it handle most errors, quit when it's meant to, etc.


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    thanks guys,
    its gotta be server sided, cant afford to have program shutdown locally

    i think unix server - cron with php would do the job.
    algorithm wise
    read-store in database- another script for flagging and execution from db.


  • Registered Users Posts: 2,781 ✭✭✭amen


    how about a system service that runs constantly and polls for xml every x seconds? when it gets some data it could then process it and go back to checking every x seconds?


Advertisement