A Guide to make messenger using php mysql and ajax /? | Sololearn: Learn to code for FREE!

0

A Guide to make messenger using php mysql and ajax /?

Hi everyone, Today i wanna know about how can i make a messenger which is efficient for low speed networks. I have created a messenger which include many ajax requests which makes the website very slow....It isn't working well on low speed networks..So is anyone is here to help me. Currently I am using laravel frame work.. Thanks in advance <3

8/14/2020 5:01:25 PM

Maaz Masood

6 Answers

New Answer

+3

Use web socket

+1

normal request like using ajax the server will immidiately send back a result. wether the resource are available or not. in long polling, server would hold on to the request as long as possible, and will only response if there are resource to send back. here is an analogy, you wait for a chef cooking. in normal request you'll keep asking the chef even if the dish isnt ready, like an impatient customer in long polling, the chef would not answer until the food is ready in your case the food is the chat still, i will recommend to invest into websocket as its more modern solution some framework that i use rely on websocket, and only use long polling as a fallback for unsupported browser

0

@Gordon Appreciated <3

0

or long polling request

0

@Taste would you please give me a little concept

0

Try Ratchet. According to their site """ Ratchet is a loosely coupled PHP library providing developers with tools to create real time, bi-directional applications between clients and servers over WebSockets. This is not your Grandfather's Internet. """.