mercredi 20 décembre 2017

recording multiple user reaction on post on a website?

I am trying to develop a website(you can say another form of facebook), here multiple user who are friend of each other can like a post. So, i am confused about how this scenario is implemented in code? Like a post can be displayed on ui and this is basically a home page jsp, hence a thread for each user who is logged in. Now let multiple user are viewing same post and then they like it say some of them hit like button same time while some in some gap of milliseconds. In such case how will be store the total incremented like count in db and refresh it on ui. Like do we need to use multithreading or synchronization kind of thing for like button logic. Or we need to implement db transaction in application. I am planning to use spring and maven. Anybody who can direct and help?




Aucun commentaire:

Enregistrer un commentaire