Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Consuming Atom feeds: how does it work?

Tags:

rss

atom-feed

I'm sorry if the title is too generic, but I've been browsing the Internet for one hour and I couldn't find any architectural explanation. I'm totally new both to RSS and Atom protocols, as far as I have understood until now is:

  • A server publishes documents
  • Clients subscribe to this server
  • Clients are notified when the server publishes new documents
  • Clients consume the documents

It seems like a queueing mechanism (like JMS). What is not clear to me is:

  • "Clients are notified" is just another way of saying "clients must poll the server to check if there are new messages"?
  • How does a client know that a message has already been read and that is no longer 'new'? Is this check in charge to the client or to the server?

Can anyone address me to some documentation about that? I've been googling for a while but every search sends me to sites that explain how to use libraries for parsing etc....

Thanx

like image 533
Diego Pascotto Avatar asked Nov 27 '14 16:11

Diego Pascotto


2 Answers

I think these answer your questions:

  • How large RSS reader works (netvibes, Google reader...)
  • How RSS and ATOM inform client about updates? long polling or polling or something else?
  • RSS 2.0 Specification
  • https://en.wikipedia.org/wiki/PubSubHubbub

How does a client know that a message has already been read and that is no longer 'new'?

I think that is specific to the implementation, but for example you could save guids of each fetched <item> and then flag them read as the user reads the items.

like image 177
janih Avatar answered Oct 01 '22 02:10

janih


I think Janih's answer below is good and you should check all these links. For more specific details to you questions:

Clients are notified" is just another way of saying "clients must poll the server to check if there are new messages?

Yes... and no. Yes, polling is the default and yes it's cumbersome. Protocols like PubSubHubbub will help. RSS Feed API services like Superfeedr (which I built!) will do it on your behalf and send you notifications using a webhooks (so you don't have to poll at all!)

like image 20
Julien Genestoux Avatar answered Oct 01 '22 02:10

Julien Genestoux