Best practice for counting streams
Im building podcast app and I've question what is the best solution for counting streams? in postgres database should I just save array of people who streamed?
that comes in my mind as solution and is there any better way?
(also that content must has analytics, dashboard and etc)
5 Replies
anyone?
you should store it in base 3
what is base 3?
I would store the watched podcast on the user. Then if a user streams a podcast check if they did before by accessing their history and if not increment a streams counter on the podcast object. Probably not the best solution but it reduces database queries compared to your solution
I would save the history with an array of podcast ids on the user
this is one of those times where denormalizing your db is reasonable