What is the optimized way of copying one canvas (one machine) to another canvas (another machine).
I know of the below method, but I think it will create performance issues when the canvas information is sent in very short interval.
canvas.toDataURL("image/png");
I have heard of sending co-ordinates information. Can you guys put some light on it? or if there is any better way then please help me.
My suggestion would be to keep a separate model of the things drawn to the canvas as java script objects (keep a "rect object" for every rect you draw, etc. ). Than have a version attribute or updated flag for each of these "model objects". Keep your "model objects" and the canvas in sync and update the version or set the updated flag whenever you touch a "model object". When you sync, transfer only the updated "model objects". This is basically what people mean when they talk about updating "coordinates".
Of course this depends on how much items you draw, how many get updated and how big your canvas is. At some point it might be more efficient to send the picture. You could also optimize that by cutting the picture into pieces and sending only updated parts, but i guess you would have to decode the result you get from .toDataURL()
on your own.