There is a web site which implements the server part(php) via ajax requests. All pages are on the same domain, the user is determined everywhere via session cookies, the latest event number stored in the same place.
This website was fastened add that support connection to one of the pages backend, reconnect to the page after it has loaded(10 seconds), everything works as it should.
The problem is that if at run time some add query to call another query, it will be processed only after returning the result from a longpoll'.
On vk.com let's say all works fine during the add requests without problems depart even other, not waiting to the end of each other. Tell me, please, how you can achieve exactly the same result?