I am trying to implement a realtime chat application using PHP . Is it possible to do it without using a persistent data storage like database or file . Basically what I need is
You need to use some kind of storage as a buffer. It IS plausable not to use file or db (which also uses a file). You can try using php's shared memory functions, but I don't know any working solution so you'll have to do it from scratch.
in short answer, you can't.
the current HTTP/HTML implementation doesn't support the pushstate
so the algorithm of your chat app should follow :
so the receivers always have to make a new request and check if a new message has been sent. (AJAX Call or something similar ) so always there are a delay between the sent event and the receive event.
take a look for : http://today.java.net/article/2010/03/31/html5-server-push-technologies-part-1