logoalt Hacker News

jareklupinski • today at 12:26 PM • 1 reply • view on HN

i could see how after 10k users, the logarithmically? growing time/resource pressure of checking more users against every list, without properly distributing the data / sharding, starts to creep in


Replies

eterm • today at 12:48 PM

Perhaps I'm not understanding the Matrix model, is there no central broker that is holding user contact relations and fanning out and directing statuses / messages?

Because, otherwise, even if you went crazy and did the most naive implementation:

    Storing for every User
    User -> List <User Contacts>
And the reverse: User -> List<Users who have you as contact>

And even then if you go full quadratic and have literally everyone have everyone else as a contact, and store and update the online status for each pair, and do that for each direction, you still shouldn't have scaling issues at 50k users, as that just isn't that much data?

By 500k Users you might be starting to feel it with a naive approach, but 50k? It shouldn't be a bottleneck unless status updates are causing cascade effects into other systems.

And that's just an analysis of the most naive design I could think of!

➕ show 1 reply