I wrote http://draw.2x.io , which uses node-canvas (previously node-cairo, which I wrote myself) along with socket.io.
As I developed my application, the client essentially does all the strokes from user input. They, in turn, are processed by canvas abstraction, which supports a subset of the operations and parameters that I myself have defined. If this level accepts any input that paint modules produce, it is also sent via socket.io to the server.
On the server, I have the same kind of node-canvas canvas shell. This, therefore, replicates the user input from the user in memory, which ultimately allows the status image to be sent to new clients. After that, the strokes will be - waiting for the settings / context to be checked by the server application - will be published to other connected clients, which will repeat the same procedure as above.
einaros
source share