I am writing a Ruby on Rails(3) application that relies on an xml feed that is updated ~30 seconds. Should I be parsing the xml data on my server with some sort of worker? If this is the case, will the server be able to respond to the client fast enough to stay ‘real-time’. I was thinking that it could be done with javascript but I’m not sure.
Edit:
Each update will be around 70kb and the source of the xml is able to handle a ton of connections.
No, this information is not going to be saved to the database. The user will have read-only access to the xml data.
Would it be possible to directly connect to the xml server with javascript on the clientside?
There are 3 realistic ways to approach this. I’m not a ruby guy, but none of these methods are ruby specific, either.
Summary: Use a COMET type setup if you absolutely need real-time data access and/or your target audience is small enough to handle the load. Otherwise, use periodic AJAX updates.