I have a web app where I want to show to users recent activity happening across the app. For instance , if a user uploads a document, and another creates new blogpost - I want this info to be available to both of them on their dashboards like "User a uploaded document.pdf", "User B created blogpost X".
I'm wondering what would be a good way to implement this. I'm thinking that I could create a table for this with some properties related to the info i want to share.
So when a user uploads a document or makes a post, each time I also create a table to store this info. Then when user goes to the dashboard all tables are put into a list, and shown in the view.
The problems I see is that making two calls to save to the db can be problematic for me in some places.
The second problem would be how to display the activity log efficiently, because the list of logtables would be huge over time. It might not be effective. I could maybe remove items from the list if the total number is a certain amount.
Any tips on how to do this? I know alot of websites uses loginfo to display, but I have no experience in making such a feature