Creating collaborative whiteboard drawing application

Posted by Steven Sproat on Stack Overflow See other posts from Stack Overflow or by Steven Sproat
Published on 2010-05-22T18:56:09Z Indexed on 2010/05/22 19:00 UTC
Read the original article Hit count: 214

Filed under:
|
|
|
|

I have my own drawing program in place, with a variety of "drawing tools" such as Pen, Eraser, Rectangle, Circle, Select, Text etc.

It's made with Python and wxPython. Each tool mentioned above is a class, which all have polymorphic methods, such as left_down(), mouse_motion(), hit_test() etc. The program manages a list of all drawn shapes -- when a user has drawn a shape, it's added to the list. This is used to manage undo/redo operations too.

So, I have a decent codebase that I can hook collaborative drawing into. Each shape could be changed to know its owner -- the user who drew it, and to only allow delete/move/rescale operations to be performed on shapes owned by one person.

I'm just wondering the best way to develop this. One person in the "session" will have to act as the server, I have no money to offer free central servers. Somehow users will need a way to connect to servers, meaning some kind of "discover servers" browser...or something. How do I broadcast changes made to the application? Drawing in realtime and broadcasting a message on each mouse motion event would be costly in terms of performance and things get worse the more users there are at a given time.

Any ideas are welcome, I'm not too sure where to begin with developing this (or even how to test it)

© Stack Overflow or respective owner

Related posts about python

Related posts about wxpython