SoftwareEngineeringDaily/software-engineering-daily-api

Premium RSS Feed for Subscribers

Closed this issue ยท 8 comments

This has been a request from paid subscribers who do not want to use the mobile app.

Going to take a peek at this, I'm going to use Patreon's RSS model as an example (e.g https://www.patreon.com/rss/patreon?auth=xxxxxxxxxxxxxxxxxx). Curious how the current RSS feed works anyways.

The premium feed would access the S3 bucket containing the ad-free episodes. But that bucket does not impose an index over the episodes.

Jason implemented this and can explain more to you.

Looks like feeds are always returned as JSON so I'm going to work to implement RSS as well, also will look into unique RSS auth tokens - will ping Jason later on some of these.

So from what I can tell, I don't think RSS readers (generally) support pagination very well, so theres a few ways I can see going about implementing the actual serving of the feed:

  1. When a new post is added, generate a new adfree RSS feed file and serve on request

  2. Generate feed from last 10 posts on demand - not ideal due to overhead and limited scope

  3. Iterate over ENTIRE database and generate RSS feed on each request

  4. Pull RSS feed from main website and replace all MP3 links with adfree strings of the files, preferably cached (both ad and adfree feeds)

Thinking about it now, option 4 is probably the most sensible, I just needed to write them out. If anyone has any other ideas would be happy to hear them.

4 is a great solution. The names of the files should all be consistent so I expect it to work.

I think you should just validate the token, query the ad free episodes, then return RSS/XML using a lib as the result.

If you are worried about showing too many posts, you should limit the number of post to the number returned on the main RSS which I think is about 100. I think pulling rss from the main site is going to be slower than the DB query.

Hey so quick update, I'm going to have to put this on hold on my end because between a new job and another project I don't have enough time to implement this right now :( If anyone else wants to take over feel free, I have the code I've done thus far over in my repository.

Understood! Thanks for the update Gabe. Congrats on the new job.