Parser 2011/Real-time collaboration/Project

Project scope
Preliminary description:

We don't want to see as much of the Etherpad or HackPad site, we basically just want an unadorned iframe, with chat and indications of who has edited what.

Must have
 * shows who is editing with you (and it should be difficult to spoof a MediaWiki user. Does this mean OpenID? I don't know)
 * shows edits from all
 * chat window
 * allows save to the wiki

Nice to have
 * maybe accept some generic editing commands from WikiEditor so templates etc can be inserted, i.e. has an API like "insert this text at the insertion point".

Longer term
 * import history of the entire page from MediaWiki into Etherpad so changes can be viewed by slider. These would be more coarse-grained than Etherpad's edit history, of course.

User Stories
These are some initial user stories (and technical requirements) for the project. Longer term ideas, like scrolling through history, are not outlined here.

While we expect to do a prototype of this project by forking Etherpad (or adding authentication features), the project is not necessarily bound to that server. It may ultimately be better to use other concurrency servers such as OpenCoWeb

Base case - no regression from current experience

 * User can create or edit page & save it, as plain wikitext, as normal
 * Fixed-width font (for wikitext)
 * Styling is not available or hidden
 * Edit window appears similarly to the WikiEditor
 * WikiEditor commands work normally
 * Extensions to WikiEditor work normally
 * Conflict resolution works normally

Concurrent editing

 * Users who choose to edit the same page while other users are editing may an existing concurrent editing session, or start their own
 * In a concurrent session, users work in a shared space where they can see theirs and each others' changes with high responsiveness.
 * This implies an Operational Transformations-style algorithm for communicating changes.
 * Undo is shared (the same actions are undone for all connected users)
 * Interface that is specific to the concurrent editor (for instance, toggling user annotations, hiding and showing chat) are minimized or eliminated
 * Ideally, such interface should migrate to the enclosing WikiEditor, and should not be trapped inside an iframe.

Saving

 * Any user at any time may choose to save the session to MediaWiki as a standard revision.
 * The page revision will be logged as the work of that user.
 * The summary log message for a saved page defaults to showing the usernames of other collaborators from that session.
 * This is marked in some way that will be easy for a bot to understand, in the future.
 * It may be desirable to insert the collaborators into the summary message with a script.

Persistence of content

 * Each article on the wiki may have any number of sessions hosted by the concurrent server.
 * When a user begins editing,
 * If no one else is editing, they begin with the content of the page as MediaWiki at the latest revision, as they would today.
 * If they are joining an editing session, they begin with the most recent version of the text as stored in the session.

Garbage collection

 * At this time, we do not anticipate maintaining a presence on the server for each article on the wiki.
 * So, editing sessions which appear to be abandoned will be removed from the server.
 * A session which has no users in it is abandoned.
 * It may be necessary to mark some sessions as abandoned if the users have excessive (>24 hours) idle time.

Presence

 * For all users in the session, the displayed username matches what MediaWiki would log if that user had edited the page.
 * This may be an IP.
 * Users are marked in a distinctive way (color, icon)
 * Users' edits are marked in the text in a distinctive way (color, icon, name?)
 * User can see the presence of other users watching
 * Edits by each user are distinctive in some way to that user

Chat

 * User can see other users' messages in a chat window
 * User can enter messages to other users in a chat window

Hostable by Wikimedia

 * Concurrent editing master server can be hosted in Wikimedia cluster
 * OS: Ubuntu Linux
 * These servers can obtain and verify Wikimedia cookies
 * This allows them to show accurate metadata about the user, like Username
 * App deployment will conform to Wikimedia standards.
 * With reasonable adaptations
 * Ancillary services such as databases will conform to Wikimedia standards or practices, including documentation.

Licensing requirements

 * It will be possible to add the concurrent server (likely a fork of Etherpad) to a MediaWiki distribution under its existing license.
 * Any Open Source Institute approved license is likely to suffice.
 * The Wikimedia Foundation and any other party will be able to use the code in source and compiled form, encumbered by no other obligations other than those specified in the license for MediaWiki.