Skip to content

Advanced Follow/Following System #4

@Parmendra-Panwar

Description

@Parmendra-Panwar

Build a scalable social graph that handles complex relationship queries (e.g., mutual friends).

Technical Implementation: Use a Self-Referential Join table in a relational database or, for better performance, a Graph Database (Neo4j). Create indexes on follower_id and following_id. Implement a Fan-out strategy for activities: when a user posts a trip, use a background worker (like BullMQ or Celery) to push that update to the feeds of all their followers.
What is Not Accepted: Counting followers using SELECT COUNT(*) on every request; you must use Counter Caching. Circular dependencies or "ghost" follows from deleted accounts. O(N) lookups for mutual connections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions