I need to build a RSS feeder in Go and I guess I did not understand some key concepts. To make it clear, I ask that question.
Is there any standard for number of last fetched news in XML file?
Should RSS document needs to be generated when requested? I mean should the client get always the latest news?
Here is the Go part. I will use https://github.com/gorilla/feeds library. It basically generates RSS XML. But it does not provide a publishing way.
You may say that first I should search on the internet and I did. Most of the articles talks about parsing and fetching from a RSS Feeder.
Is there any standard for number of last fetched news in XML file?
No. And it also varies between feeds. This also makes sense since there are some sites which produces lots of new content and others only few.
Should RSS document needs to be generated when requested? I mean should the client get always the latest news?
That's completely up to the server. But in many cases it is likely more efficient if the server creates a static file whenever new news were added instead of dynamically creating the same output again and again for each client. This also makes it easy to provide caching information (i.e. ETag
or similar) and let the client retrieve the full content only if changed.
Should I serve RSS XML document from a REST endpoint? If I do, is it okay for RSS clients?
This does not really matter. The URL for the RSS can be anything you want, but you have to publish it so that RSS readers know where to get the RSS.