I want to implement an application on my website where once the users are connected, they share a text editor. If one user enters anything on the text editor available on his screen, the same text appears on the second user’s screen at the same coordinates.
Same thing goes for the other user. Also there would be pointer shaped images on both user’s screens to represent mouse pointers. When user A moves his mouse pointer, the image on user B’s screen should be moved according to the movement of user A’s mouse and similarly, when user B moves his mouse, the image on user A’s screen should be moved accordingly.
The problem is I am using database to store the coordinates of each user. And this approach results in the a lot of lag and delay. What should I use in place of the database?? Please Help !