User:Dash1291/GSoC status
Appearance
Status updates of my GSoC project on Realtime Collaborative editing on Visual Editor (User:Dash1291/GSoC_2012_Application) go here.
May 7th
[edit]- Wrote some initial code for the collaboration server. Initial modular structure features separate modules for callbacks for Socket.IO events, server's model (includes data model synthesis, and transaction processing) and a front facing server module which binds all the above and may talk to the parser in the further course.
- Trevor suggested that the code should be pushed to a remote branch of VisualEditor's git repo. With some amount of initial code written, I'm eager to push it early this coming week.
May 14th
[edit]- Started pushing some initial code to 'realtimeve' branch of VisualEditor. Initial code is not the working code and mostly includes the modular structure of the collaboration server.
- Started to bind VE modules into a node.js module to be used in the collaboration server, but deferred for later due some codebase changes coming from the 'dmrewrite' branch.
June 12th
[edit]- Finished the modular structure of the server. Server would hold session objects, which would contain a reference to the document and users currently working on the editing session.
- Wrote a node module as a parsoid interface for the server. Using local wiki for testing.
- Finished binding of `ve` modules in a node module which is used in the server. This along with a minimal client adapter helped in testing the session initialization on a new connection.
The server currently uses the parsoid interface to fetch HTML of the page requested by the client and serve it to the client on connection establishment. Next task will be building up more on the client adapter, so as to listen to the Surface events and collect new transactions and pass them to the server.
June 22nd
[edit]- In the previous days, I've mostly done work for handling client-server interaction (session initialization, communicating transactions).
- Session initialization works for multiple clients. A single client is given the publishing right, so that client is the only one which can push transactions to the server. For testing, this client is taken to be the first client that connects to the server. All the other clients that attempt to connect to the server after this client (publishing client), are not able to edit their document but the transactions pushed from the publishing client are broadcasted to all the listening clients(non-publishing) and are applied to their local documents.
- Passing of editing control is not supported yet. I will be working on that in the coming days.
- Attempting to create a minimal client UI so that I can prepare an integrated demo for easy and effective testing.
July 1st
[edit]- Prepared a UI and integrated it with the updated VE sandbox. Collaborative editing can be turned on/off using the interface. On enabling, the client connects to the collaboration server and receives the document and loads into its editor. On disabling, the client falls back to the normal editing mode.
- Integrated the collaboration server to be run along with parsoid service in the same master process but on a different port. The collaboration server is designed in a way that it can parse the wiki pages internally using the parser modules, but can also talk to the external parsoid service over HTTP(and this is the current behavior in practice).
- Started writing server-side unit tests using a Node.js port of QUnit.
The code is in a state of a demo deployment. I'm preparing to either put it up on a labs instance or my personal instance, whatever is easier at the start of the coming week.
August 21
[edit]- A demo was deployed post mid-term evaluation with a bare working version. See http://ashishdubey.info/blog/2012/7/5/realtimeve-first-demo.html
- Tests covered most of the important sections of both server side and client side code.
- Used `nodeunit` module for node.js for server-side testing. Tests cover mostly the I/O events, emulated by using a mock client.
- Used `qunit` for testing client side code, as its already in use by the VE team.
- Restructured the client side code to make it more event based and hence reduced circularity in code, which helped in easy testing and management.
- So far, MW JavaScript interface was used to determine what user is initiating an editing session, but to make things more robust, a way to authenticate users on the collaboration server was needed. In absence of any such way(well, this calls for the need for OAuth, but its not there yet), Roan and Trevor suggested to devise an API module for generating of user tokens by logged in users and validating them by the collaboration server. I implemented the module which is under review. See https://gerrit.wikimedia.org/r/#/c/20013/
- Apart from above, during the long period between the previous status post and this post, there have been other minor fixes in code, especially some that arose after rebasing it to VE/master branch.