As an example we supply live football results so we have a feed like
By calling this feed the client gets a list of matches that have had
something happen in them (goals, cards, substitutions etc) since the
time they called this feed. By using an optional since parameter they
control the information that they receive.
So an initial call to /feed/updates.xml will return them a list of
something like this
The client then waits a bit (perhaps 5 seconds, perhaps a minute) and
calls the href attribute of the since element
which will return a buch of xml with a new since element which the
We have a feed controller with both an updates method and a match
As far as rails is concerned these are just web pages that have the mime
type of text/xml or application/json
Of course there is more to it than this. We also set cache headers to
protect ourselves from clients that think that they need to poll 2 or 3
times a second. We also detect the client and only send them the data
they want (not all clients are interested in what is happening in the
second division), logging, auditing.
As far was we are concerned these are just web pages. That said 99% of
feeds are read only so they are simply GET requests on the required url.
Once you start accepting data from clients it gets a little more
complicated, but not much more.
This system serves us well. We supply live feed of scores,
cards, substitutions etc to several UK bookmakers so this can get quite
heavily loaded at times.