Consuming Atom feeds: how does it work?

1.8k views Asked by At

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

2

There are 2 answers

0
Julien Genestoux On

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!)

0
janih On

I think these answer your questions:

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.