I need to create a chat similar to facebook chat.
I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ).
Is this a good approach ?
I need to create a chat similar to facebook chat.
I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ).
Is this a good approach ?
ajax is the best here
what you will need: 1) server view that will return recent messages 2) client-side caller by timer (I prefer jQuery and its timers plugin) and success handler, that will populate the chat window
I'd go with something that involves push/real-time messaging controlled by the server. You'll get proper real-time chat and it will scale a lot better. Take a look at http://www.orbited.org/ which is the way to go, I reckon. It's not core django, but it's Python and will sit well alongside a Django app on your server