There are a number of complex problems to solve such a project. I recently developed a multi-user canvas-based drawing application using PHP and MySQL for the backend. Some of the most important ideas:
JS does not have the ability to poll mouse coordinates with the resolution that you really need for an ideal drawing application. For an easy, fun sketch, you can get away from it. However, emulating Photoshop quality is not possible. This question mainly leads to the faces of sketch lines. You can see this a bit in the example you are attached to, but it is too obvious if you do not use your own line drawing functions and use personalized stamp forms instead.
Loading the state of a user's canvas is possible using the Jan Jongboom method, but this is not without problems. Consider this scenario: user1 and user2 connect to the application at the same time and are welcomed with a blank canvas. user1 draws a big red, filled circle, and then user2 draws a big blue, filled triangle. From an external observer, user1 first gained their form, and user2 took second place. In a fairly likely scenario, suppose that the drawing user2 completed by uploading to user1 to user1 due to network latency. Your server will incorrectly save the state of user1 on top of user2 . This is a fairly simplified version of the problem, but it is a serious problem, because the system is scalable and several people draw at the same time. People will draw each other, and the state of the canvas will be different for each local user.
Another issue to consider is that loading canvas data after each action does not scale with the resolution of the canvas at all. If you are developing something that should work at full-screen resolution, downloading (for example) a 1680x1050 image after each action is definitely inefficient. Instead, you should look at conveying the information needed to re-create user actions. This is a much better approach (i.e. draw a blue circle with a radius of 9px in [4,6]). It is also better suited for organizing a database.
One of the options that I had been entertaining for a while was that PHP updated the server-side image on the canvas, on which everyone was drawing. As the updates are received by the server, PHP will load the same resources that are used locally by users and will perform the same actions with the drawings. Then, when the new user connected, they simply grabbed the last image on the server side and processed any additional updates locally to catch up with everyone else. Unfortunately, this did not scale at all, since all the image functions in PHP are processor-based, and when you work with things like changing the brush size, rotation, transparency and spacing, it is just too long for the update to cost.
In addition to the quality of the line, the biggest problem you will encounter is the synchronization of all users. For your purposes, this may not be a problem at all, but if you are aiming to implement multi-user Photoshop in a browser, this is a pretty large ticket element.
If you have other questions about this or specific ideas / approaches, feel free to ask.