XML parsing and scheduling

It’d be interesting and useful for me to have your input on this:

Currently I have a basic rails app that does nothing particularly
special.

I want to be able to upload an XML file to a directory and schedule my
application to parse this XML file to a database every ~15 minutes.

My questions are this: What is the best (or your preferred) method of
parsing XML and what is the best (or your preferred) method of
scheduling tasks (perhaps with cron on Unix systems like the one my
application is hosted on)?

I’ve been considering Nokogiri for parsing the XML and using Whenever to
schedule the parsing but I’d appreciate and value your input.

I’m not familiar with Nokogiri or Whenever so this job is a lot bigger
to me than it may seem to some of you that’re more experienced with them
so please bare that in mind when giving me your opinion.

This is the first step - once I’ve got the data being regularly updated,
I need to output the contents of my database with dynamic graphics such
as charts but I’ll cross this bridge when I come to it.

Thank you.

On 21 April 2011 10:00, Pale H. [email protected] wrote:

It’d be interesting and useful for me to have your input on this:

Currently I have a basic rails app that does nothing particularly
special.

I want to be able to upload an XML file to a directory and schedule my
application to parse this XML file to a database every ~15 minutes.

What is the point of scheduling the parse every 15 minutes, would it
not be better to do it just when the file is uploaded, triggered by
the upload rather than a timer?

Colin

Colin L. wrote in post #994277:

I want to be able to upload an XML file to a directory and schedule my
application to parse this XML file to a database every ~15 minutes.

What is the point of scheduling the parse every 15 minutes, would it
not be better to do it just when the file is uploaded, triggered by
the upload rather than a timer?

Colin

Yes, that would be better.

Pale H. wrote in post #994278:

Colin L. wrote in post #994277:

I want to be able to upload an XML file to a directory and schedule my
application to parse this XML file to a database every ~15 minutes.

What is the point of scheduling the parse every 15 minutes, would it
not be better to do it just when the file is uploaded, triggered by
the upload rather than a timer?

Colin

My needs have now altered slightly - instead of the file being parsed
into the database, I now need to read an XML file after an automated
upload and then output the values of the XML file in a chart.

This is something I’ve not done before and would really appreciate your
help with.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs