Sunday, 29 July 2012
This week I added option to modify brush and pen of selected element. I also added support for delete operation of the same element on both sides and combination of delete and update. I had a problems with bug which caused weird behaviour when I repeated several times delete and update operations of the same element, but I fixed that already and everything is working fine now as you can see here: http://www.youtube.com/watch?v=0_dta0JjPlI . I still need to implement moving of elements up and down and add some small fixes but whiteboard is almost ready.
Saturday, 21 July 2012
This week I continued to work with synchronization protocol. I still needed to handle operations such as delete and update. Because of the versatility of the client and server class I had to provide only appropriate transformation functions. By adding these operations I could add ability to modify(move, change line width, change colours) and delete elements. The protocol is almost ready for now, but I still have to consider few more situations(such as the same element deleted on both sides).
Sunday, 15 July 2012
This week I continued to work on class handling client side of OT. I was afraid that it will be hard to compute all weird situations, but it turned out to be quite easy. Everything is based on "bridge" of operations. New local operations are added to it's back and all incoming server operations should be transformed against all "bridge" operations, which as result gives new bridge and transformed operation which could be applied on local side. My transformation function is quite easy for now and it is able to compute only insert operations. I will have to extend it to handle also element updates and removes. At the end of the week I combined actual whiteboard with classes handling synchronization and I think it works quite well, both whiteboards are the same after putting little mess on them. Here is screencast presenting this: http://www.youtube.com/watch?v=Ep2YFX39PJk
Sunday, 8 July 2012
This week I worked on server and client side classes handling Operational Transformation algorithm. I will use them to keep whiteboard between clients in sync. Client and server are just roles assigned to clients and there will be no real server. I am using algorithm similar to this used in Google Wave and I am basing on this description: http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation. Server side is quite easy to implement because it takes care only for own operations and operations which are parented somewhere in it's history(it's easy to compute adequate operation to append to the end of history). Because of that it has to store only history of own operations. Client class is more complex. It has to take care of own and has to compute appropriate server operations(which anyway are computed in transformation function during computation of client version operations). So far I have created server with it's unit tests and client which is able to resolve such situation. Next week I will try to expand client class to handle more complicated operations.
Monday, 2 July 2012
My recent work was to handle serialization and parsing of graphics elements so I could send and receive them easily in session class where synchronization protocol will be located. After serialization elements are in svg format(it's already documented and it's enough for my purposes). This work wasn't much time consuming and hasn't taken 2 weeks, but I had exam session previous week so I didn't have much time and this week I already began to work on implementation of Operational Transformation to keep elements in sync. So far I have been focused mainly on thinking about good data structure to store history of OT operations, but I haven't found any yet.