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

14th Aug 2020, 5:01 PM
Maaz Masood
Maaz Masood - avatar
6 Antworten
+ 3
Use web socket
14th Aug 2020, 5:05 PM
Gordon
Gordon - avatar
+ 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
14th Aug 2020, 5:38 PM
Taste
Taste - avatar
0
@Gordon Appreciated <3
14th Aug 2020, 5:09 PM
Maaz Masood
Maaz Masood - avatar
0
or long polling request
14th Aug 2020, 5:09 PM
Taste
Taste - avatar
0
@Taste would you please give me a little concept
14th Aug 2020, 5:26 PM
Maaz Masood
Maaz Masood - avatar
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. """.
15th Aug 2020, 9:34 AM
Ore
Ore - avatar