tag:blogger.com,1999:blog-40839714587132208982014-10-03T09:54:23.376+02:00Mateusz Piękos's HomepageMateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-4083971458713220898.post-2027477387819375422012-08-20T14:47:00.000+02:002012-08-20T14:47:07.501+02:00Final end of GSoC 2012Today is firm "pencils down" date, so it's time for summary of work done in last 3 months. I learned a lot during this time and I hope I will be able to work on any GSoC project next year again.<br />As you know this summer I worked on whiteboarding feature of <a href="http://swift.im/" target="_blank">Swift</a> which is XMPP based chat client. UI side wasn't very demanding and I think the hardest part was the synchronization protocol. There is no standard whiteboard protocol approved by XSF, so I needed to create my own. Remko(my mentor) wanted to use Operational Transformation to keep clients in sync. The problem was that descriptions of OT which I found didn't covered everything. I needed to find own universal method to compute relevant operations for different situations. It took me a while to understand everything and implement it, but final whiteboard works quite nice thanks to that algorithm. &nbsp;Whole protocol has been implemented in Swiften library, so it could be easily reused in other clients using this library. At this time only one-to-one sessions are supported, but I will try make it work with MUCs after GSoC. I will also have to finish up my XEP, which so far contains descriptions of 4 situations and general way of computing relevant operations.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com1tag:blogger.com,1999:blog-4083971458713220898.post-40729488554365633782012-08-13T20:38:00.000+02:002012-08-13T20:38:05.710+02:00Suggested pencils down timeLast week I worked a little with XEP describing my protocol and then I focused on changes changes proposed by Remko. I changed texts informing about session status, added button to cancel whiteboard request, added "Opened whiteboards" section to chats tab(which allows to see opened whiteboard chats and bring it up), added handling of sessions where one side goes offline, reorganized a little session handling code, "ifdefed" whiteboard code to include it only if experimental flag is set, finally added eraser icon and modified UI a little. At the end of the week I rebased my branch on master and did some final touches according to Remko's comments. He said that he suspects&nbsp;that whiteboard can be integrated quite soon after GSoC pencils down under experimental.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-45928554291030791172012-08-05T21:45:00.001+02:002012-08-05T21:45:53.749+02:00Final preparationsThis week I implemented last missing functionality which is moving of elements up and down. I modified existing "update" operation so it now has newPos field. I tried to use as few as possible operations because of amount of transformation functions(They has to handle every combination). Besides that I also added some small fixes and started writing the XEP describing protocol which I've created. Its XML format is quite simple so it doesn't need much description, but whole protocol is largely based on on operational transformation algorithm which needs detailed description about how to handle specific situations.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-44364878500056132402012-07-29T16:43:00.001+02:002012-07-29T16:43:21.631+02:00Minor improvementsThis 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&nbsp;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:&nbsp;<a href="http://www.youtube.com/watch?v=0_dta0JjPlI">http://www.youtube.com/watch?v=0_dta0JjPlI</a>&nbsp;. I still need to implement moving of elements up and down and add some small fixes but whiteboard is almost ready.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-64254526244180302102012-07-21T14:48:00.001+02:002012-07-21T14:48:57.928+02:00Supplying transformation functionsThis week I continued to work with&nbsp;synchronization&nbsp;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&nbsp;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).Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-10454116170008158382012-07-15T15:28:00.005+02:002012-07-15T15:28:56.349+02:00Continuation of working with OTThis week I continued to work on class handling client side of OT. I was&nbsp;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:&nbsp;<a href="http://www.youtube.com/watch?v=Ep2YFX39PJk">http://www.youtube.com/watch?v=Ep2YFX39PJk</a>Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-58986466721474383492012-07-08T17:21:00.001+02:002012-07-08T17:21:10.466+02:00Working on Operational TransformationThis 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:&nbsp;<a href="http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation">http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation</a>. 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&nbsp;<a href="http://www.codecommit.com/blog/wp-content/uploads/2010/05/s4uwf-7hjj47gvmzz9lze7q.png" target="_blank">such</a>&nbsp;situation. Next week I will try to expand client class to handle more complicated operations.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com1tag:blogger.com,1999:blog-4083971458713220898.post-16849086802558967602012-07-02T08:53:00.002+02:002012-07-02T08:53:37.132+02:00Finishing serialization of graphics itemsMy recent work was to handle serialization and parsing of graphics elements so I could send and receive them&nbsp;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.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com1tag:blogger.com,1999:blog-4083971458713220898.post-17061061407742736832012-06-17T19:58:00.003+02:002012-06-17T19:58:45.422+02:00Improving session classThis week I still worked on session handling and at the end of the week I started working on serialization/parsing of graphics objects. At the beginning of the week I &nbsp;splitted WhiteboardSession class into IncomingWhiteboardSession and OutgoingWhiteboardSession. I also changed a little a way of responding to initialization IQs. Now IQ result is send no matter if user accepts or not the session. Here is screencast which presents how everything works:&nbsp;<a href="http://www.screencast-o-matic.com/watch/cl1lXDmGj">http://www.screencast-o-matic.com/watch/cl1lXDmGj</a>. Later this week I improved a little initialization from the UI side. Here is new screencast showing these improvements:&nbsp;<a href="http://www.youtube.com/watch?v=LV4CeYp2GOE">http://www.youtube.com/watch?v=LV4CeYp2GOE</a> (I uploaded it to youtube because previous one doesn't work on my computer). As I said before, at the end of the week I worked on serialization and parsing of graphics elements. I created base code to handle this which at now works with a simple line and which I will extend with more elements.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com2tag:blogger.com,1999:blog-4083971458713220898.post-10131677730968849782012-06-11T08:28:00.001+02:002012-06-11T09:06:15.089+02:00Session handling classThis week I worked on class responsible for managing UI and class used to connect UI with the world. After talking with Remko I transformed WhiteboardController into WhiteboardManager because there is no need for typical controller but only for something taking care of WhiteboardWindow instances. Receiving and sending of data&nbsp;in WhiteboardWindows&nbsp;is done &nbsp;through WhiteboardSession. Work on this and session manager classes took me most of the week. It can now send and receive raw data and initialize session with other user. Session initialization from user side looks very similar to initialization of file transfer. On received session request information about it with option to accept or cancel session is added to chat window.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-91448754178975242942012-06-02T20:06:00.001+02:002012-06-02T20:06:32.970+02:00Started implementing prototype into SwiftThis week I created class to handle freehand paths and I added option to move items up and down. After that I started implementing my prototype into swift. I created classes needed to handle new window and &nbsp;then I created simple controller class and added simple payload to swiften. I placed my controller in ChatController, but I did that only for testing purposes. I will think about right place for it later. I wanted to "make something working", so I added serialization function to whiteboard window class(It isn't place for it, but it was easiest way to do serialization). After connecting everything in the controller I was able to send lines and handfree paths.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-17390815413441283632012-05-26T16:06:00.000+02:002012-05-26T16:06:37.811+02:00First week effectsThis week I worked on a whiteboard prototype. It is quite usable now. It offers drawing straight lines, freehand paths, rectangles, circles, polygons and writing text. It also allows to delete items and move them.<br />Here is screenshot of my prototype:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-TA2leu6A3NA/T8DboBQ0zhI/AAAAAAAAAOY/jnQPgdgpDlg/s1600/Screenshot+-+260512+-+12:53:08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="267" src="http://4.bp.blogspot.com/-TA2leu6A3NA/T8DboBQ0zhI/AAAAAAAAAOY/jnQPgdgpDlg/s320/Screenshot+-+260512+-+12:53:08.png" width="320" /></a></div><br /><br />To implement it I use QGraphicsScene with classes inherited from QGraphicsItem which provides almost every functionality I need. I think that I will have to create my own class for handling freehand paths because QPainterPath, which I use now, automatically closes path and fills covered area.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0tag:blogger.com,1999:blog-4083971458713220898.post-91710384960206813322012-05-18T16:40:00.000+02:002012-05-18T16:42:32.861+02:00First postIt's first post on this newly created blog. I thought about creating some kind of homepage some time ago, but I never realized that idea. Recently I have been accepted to Google Summer of Code 2012 and I was encouraged to create a blog. So here it is :). I will use it mainly to post informations about progress with my project, but not only. This summer I will be adding whiteboarding to <a href="http://swift.im/" target="_blank">Swift</a>. I think it is very interesting project and I won't be bored.Mateusz Piękoshttp://www.blogger.com/profile/16562779197868682136noreply@blogger.com0