0

I am developing a sort of social media website. You can see someone's profile, you can rate the profile, you can submit a comment on their profile etc. So a sort of facebook thing.

All my actions are done with AJAX calls. Now I created a PHP websocket server for private chat. Now is my question what do you think about replace all the AJAX calls to calls to the websocket server? So each user action goes via websockets. Is this good or wrong? What about when 5 people clicking on the same profile at the same time, does this have any consequence to the socket server? Is the socket server able to handle all those actions mentioned above at the same time?

Need your thoughts on this, thank you.

Piet
  • 2,188
  • 5
  • 19
  • 30
  • Related answers: [websocket vs rest API for real time data?](http://stackoverflow.com/questions/28613399/websocket-vs-rest-api-for-real-time-data/28618369#28618369) and [Ajax vs Socket.io](http://stackoverflow.com/questions/30319618/ajax-vs-socket-io/30334848#30334848). – jfriend00 Oct 06 '16 at 06:47
  • 1
    Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. - Or too broad – Epodax Oct 06 '16 at 06:47
  • If you choose the right WebSocket server/libraries, then performance will not be an issue - definitely not compared to AJAX calls. – gzost Oct 06 '16 at 10:12
  • 1
    I am still in doubt what to do but thank you all for the the reply's. – Piet Oct 08 '16 at 13:14

0 Answers0