I am working on Social networking application with at least 0.2M users. On the application user can share anything from third parties as well as user can upload own media as post. There are different types of privacy
- user privacy
- user can be public
- user can be private Any content shared or uploaded by the user will be in a box, and box also has different types of privacy
- public box (Everyone can see the content of this box if you are public)
- friend only box (Only your followers can see the content of this box)
- private (Only you can see the content of this box)
Now the problem is that I have large data set. So when a user change his/her account privacy from public to private or private to public I have to update all the data according to privacy. Also, user can change the privacy of the box too. So I need to update the user all shared posts of this box accordingly. But most of the time I failed to update due to framework and also technologies that I am using Technologies that I am using
- Lumen (PHP) microservice architecture
- MySQL
- Elasticsearch (For retrieval with joins)
- Redis & Memcached
- Postgres
When user shares anything on the platform the shared data is stored in the database and also data inserted in elasticsearch so all the data retrieved from elasticsearch with PHP client.
Now I want to define the architecture like Instagram that whenever user change account privacy or box privacy I have to change the content according to both privacies.
I read different types of articles but didn't get any close idea for this. Kindly suggest any helpful article or idea to me.