educative.io

UserNewsFeed table efficiency question

If dedicated servers are pre-generating news feed and writing into UserNewsFeed table, disk space would be wasted if not all results were queried since only 100 photos are fetched. If we delete the rows in the UserNewsFeed table to only keep say last 150-200 entries then the server may not know the last time the user queried for the feed unless the timestamp is recorded to maintain the entries. This would be a bottleneck since the last user request time would have to be written into some column.

If we don’t record the query time and the user has a news feed entry on the client, which he/she later clicks to load the photo and that entry was deleted from the UserNewsFeed table causing an error. This is assuming that all data for the feed entry was not sent to client (only minimal subset was sent e.g. title) in the initial response and only requested when user clicks on the feed entry on the UI. If all the data was already sent at the time of the initial request, then the client could use a lot more memory or on disk cache (if locally cached) than it should have.

1 Like

Hi Salil Pitkar,

This is Anum from Educative. Thank you for reaching out to us. We are happy to hear from you! We are looking into this issue. We will get back to you soon.
If you have any further queries, please let us know.

Best Regards,
Anum Hassan | Developer Advocate