There is a whole section on multiplayer in the FAQ section.
If you are looking for realtime though AJAX may not be your best bet. The socket.io would probably be better.
FAQ section
Go down to the section on Multiplayer/Networking there are some good posts there.