Page MenuHomePhorge

PhantomJS for Snapshot creation
Closed, ResolvedPublic8 Story Points

Description

Creating snapshots is necessary to:

  1. Let a client join and quickly get the latest version of the document recreated in their editor
  2. Recover from unforeseen execution errors by rolling back to the last stable snapshot

This must be done using PhantomJS or a similar headless browser by executing the canonical operation timeline on the base document using WebODF. This is almost like the server instance being another peer to the session.

Details

Ticket Type
Task

Event Timeline

vanmeeuwen assigned this task to Adityab.
vanmeeuwen raised the priority of this task from to 60.
vanmeeuwen updated the task description. (Show Details)
vanmeeuwen added a project: Manticore.
vanmeeuwen changed Ticket Type from Task to Task.
vanmeeuwen subscribed.
petersen moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 6 2015, 11:04 AM
Adityab moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 10 2015, 11:05 AM

Things done to achieve this:

  1. Use https://github.com/sgentle/phantomjs-node to create a phantomjs "page" per document-specific collaborative session onto which live operations on the canonical timeline are played.
  2. When a client joins, export the live document state of the phantomjs webodf instance at that point to an ODT snapshot and pass it to the client. Done on Manticore's side, waiting for https://github.com/kogmbh/WebODF/pull/909 to land in WebODF.
  3. When a client requests "replay" of canonical operations so that it can bring it's copy up to the live state, the server responds with information on members and cursor positions at that point (retrieved from the pahntomjs webodf), and any operations that were executed after the joining.

Resource issues to think about:

PhantomJS memory usage