Store/Record all emitting data from socket.io and playback

Lets take an example of Canvas Drawing. Source: http://wesbos.com/html5-canvas-websockets-nodejs/

How can emitting data from socket.io be stored or recorded so that it can be played again? For e.g. an artist sketches a drawing on above canvas, it should be recorded so that learners could see it again and again.

Is any library or module available which could help storing this data? Is it better to save this data in files like xml or it should be stored in a database like Redis? To play this data, it has to be stored with time info.

UPDATE 1
Found a perfect example.
http://draw.2x.io/replay.html#/history/flodge/9236932481660473952/play
It seems (from tweets) that above site uses redis and mongodb.

Answering my own question, I am not sure if it is correct approach.

From example below. It uses animate button to replay recorded session.
http://code.google.com/p/html-5-canvas-whiteboard/

It looks like it is possible to store complete recording as an object within browser memory.
Same object will be built on server (in memory itself).
Once recording session is complete it can be stored in database.

During playback, object from database can be retrieved in single request.