I am quite new into web development. And i need some help about a chat application.
I think the is the 2 popular method in a chat application. one is with ajax and other one is socket.
As i think of ajax chat its quite good,
I as far as i know it works in this way, user sends a message. it get store in database,memchached whatever, other user sends ajax requests in 1 secound interval and check if there is any new message, if any then i got showed to user,
In the other hand socket works in this way, user sends a message. Server realize "Oh this message is for that user" And send to the receiver.
It seems like ajax want to get something and socket needs to send..
Now my question is how to make a server which can work in socket , ajax in a same time? so that user can chat whatever technology they want to use.