hi all,
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.

Recommended Answers

All 3 Replies

use socket.io

There are good thanks, But ,
It does not seems good when i will trying to add a social script (i mean wall,status,photos) in chats background or a profile.

Any more alternative?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.