You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for the project!
Yes, feels like JSON is a bit better for such simple thing as news feeds.
I want to share idea I have in mind for a long time, I really like it, but I am even not sure do I have strong enough arguments for it. In such cases usually good to discuss with people who has better knowledge in this area.
I like the idea of immutability in general and I think it can be useful for news feeds as well, at least for optimize caching on CDNs. My use case - I have static web site, most of it is autogenerated from DocBook, but some pages are created manually and I would like to have a feed/blog in it. Now editing Atom XML manually/keeping file size small is a bit painful, and feel like it will be much easier, if for every post I will need just add new file in proper place without touching anything else. Let me show what I mean, files can be structure as:
Client application can keep a pointer to last fetched post like <site_url>/ifeed/2020/02/1.json and do get everything new (just pseudocode for show the idea):
for year in range(last_fetched_year, current_year):
continue if HEAD(site_url + year) returns 404
for month in range(last_fetched_month, current_month):
continue if HEAD(site_url + year + month) returns 404
for day in range(last_fetched_day, current_day_of_month):
continue if HEAD(site_url + year + month + day) returns 404
i = last_post_number if month == last_fetched_month else 1
while (response := GET(site_url + year + month + day + i)) not 404:
save_post(response)
Downside of this approach - a bit bigger amount of HTTP queries, but I think it will not be that big, because if no posts in year/month/day we will know it by one request. But same time all files can be easily cached and have small size. Also, as you don't need to cut feed file, it's easy to keep all history and anybody can load it from any point of time (probably this feature can be implemented with existing feed's, but some effort is needed). And, as mentioned, creating feed is much easier.
What do you think?
The text was updated successfully, but these errors were encountered:
Hi, thank you for the project!
Yes, feels like JSON is a bit better for such simple thing as news feeds.
I want to share idea I have in mind for a long time, I really like it, but I am even not sure do I have strong enough arguments for it. In such cases usually good to discuss with people who has better knowledge in this area.
I like the idea of immutability in general and I think it can be useful for news feeds as well, at least for optimize caching on CDNs. My use case - I have static web site, most of it is autogenerated from DocBook, but some pages are created manually and I would like to have a feed/blog in it. Now editing Atom XML manually/keeping file size small is a bit painful, and feel like it will be much easier, if for every post I will need just add new file in proper place without touching anything else. Let me show what I mean, files can be structure as:
Client application can keep a pointer to last fetched post like
<site_url>/ifeed/2020/02/1.json
and do get everything new (just pseudocode for show the idea):Downside of this approach - a bit bigger amount of HTTP queries, but I think it will not be that big, because if no posts in year/month/day we will know it by one request. But same time all files can be easily cached and have small size. Also, as you don't need to cut feed file, it's easy to keep all history and anybody can load it from any point of time (probably this feature can be implemented with existing feed's, but some effort is needed). And, as mentioned, creating feed is much easier.
What do you think?
The text was updated successfully, but these errors were encountered: