Jump to content

php Chat MySQL Bad Practice


KnowSkill

Recommended Posts

Yes, pretty much any real-time chat system is going to use TCP sockets. With a TCP connection, a client connects to a server and the connection remains open, or, "persistent". Data is more-or-less only sent one way or the other when something happens, like when a chat message is sent. If you do not use a persistent connection, and instead rely on polling, then you have to request data at continuous intervals even if there is no data to give. In such a system the messages will not be in real time, either, and will only be received when the client asks for them.

 

Now, if there is not going to be a web component then there is no point using WebSockets. You're better off just using straight up TCP protocol if you don't need web chat. And I wouldn't use PHP either, it's not really good at that. Java or NodeJS would be better choices.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.