M
M
mynewvk2014-04-03 19:55:56
CodeIgniter
mynewvk, 2014-04-03 19:55:56

How to organize news feed algorithm in php?

I have a user base. There is a subscription to the user.
I want the user who subscribed to a certain user to be able to receive all the information from this user, i.e. "%user% updated status", "%user% changed avatar" and so on. Prompt idea and what tables are necessary in a .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Arutyunov, 2014-04-03
@mynewvk

Users, Subscriptions (who subscribed to whom), Actions (who did what).
Next, for the desired user, we get a list of his subscriptions, by subscriptions we get a list of all actions, sorted, for example, by date.
Accordingly, when changing the status, we also need to write "action" in the action table so that this status change appears in the subscribers' feed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question