Social features – friends and followers

Many modern web applications allow users to friend or follow other users and be friended or followed themselves. While this concept may be simple to explain in words, there are numerous implementations and variations, all of which are optimized for their particular use-cases.

In this situation, where we want to implement a newsfeed-like service that displays information from a selected pool of users in an aggregated timeline that is unique for each authenticated user, the following are the three categories of approaches that may be used:

  • Fan-out on Write: Each newsfeed for a user is stored in a separate logical container with the intention of making reads exceedingly simple, fast, and straightforward, at the ...

Get Flask Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.