performance - Smart real-time with socket.io -


i'm developing php website , has posts+comments system. have socket.io server have real-time communication through comments posts (just facebook). fine now, except send comment connected users. , i'm thinking when i'll have 10.000 users , 1 comments on post, sends comment 10.000 users , maybe connection crash pretty way.

i think have keep posts user viewing. maybe in php, when show posts, keep in database id , expire after period, hour. in case, when comments on post, users seeing post , send comment them. there cleaner way accomplish that?

socket.io has concepts of rooms

you create different room each post , have clients subscribe relevants rooms (posts).


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -