php - WebSockets vs. Server endpoints for getting simple information -


i making app involves chatting other users , being able view person's profile. using websockets chat functionality, able send , receive new messages.

when user go page view person's profile, should data gotten through websockets server, or should have endpoint on server pass user id , give user's information? way, websockets server chatting, , keep each bit of functionality organized it's own part, instead of putting on websockets server. however, don't know if using websockets information faster typical http request.

i know both of these work, wondering of these 2 preferable. thanks!


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -