Proposal - Automatic and Manual Conflict Resolver

Events happening in the community are now at Drupal community events on www.drupal.org.
bradfordcp@drupal.org's picture

Overview:
This project focuses on handling node conflicts. Currently when a user tries to save a node that has been edited (and saved) before they have submitted, an error appears and the edit is blocked. This module aims to resolve these issues automatically if possible. If not, it will provide tools and an interface to interactively merge the two different versions of the node.

Idea Link:
http://groups.drupal.org/node/20472

Description:
As Chx so aptly put it not allowing a user to save the new node is “not nice.” From a user’s perspective this could be infuriating. Imagine spending 30 minutes extensively updating and correcting a node just to have another user come in and lock you out from saving your changes. Locking the node from being edited while another user is editing also has its disadvantages, should one user begin editing a node and not save for a while, the node would remain locked, thus limiting content contribution possibilities. The solution for these woes?

A conflict resolver, but not just a simple warning that the source content has change with rudimentary merging tools. The goal of this project is to automate as much as possible, by attempting to generate a patch based on the changes and applying it. If the patch can be applied to the current version, apply and merrily continue on our way. If not, go into manual mode and present a diff of the two revisions and an interface / tools to merge the two. As mentioned in the post for the original idea the module should compare all aspects of the node, not just the body. This would, at a minimum, include CCK fields.

Timeline / Basic Roadmap:
April 20th:

  • Determine acceptance and begin work on the project

April 20th - May 23rd:

  • Determine module workflow (generate diagrams concerning program flow and user interface).
  • Research various diff processes (native to host, PHP, other tools).
  • Setup project on d.o and community feedback area on g.d.o.
  • Discuss with mentors and community optimal project direction and tune roadmap to the tasks required
    • Determine time and format mentors would like updates and code reviews / commits

May 23rd - July 6th:

  • Code basic settings area (this will be extended throughout development)
  • Code diff logic (whether this involves some super advanced PHP diff solution or running diff on the server all that happens here)
  • Code patch generation and test applying the patch to the “working node”
  • Code auto resolution using both diff and patch code previously mentioned
  • At this point should the automatic resolution fail we will still supply error that the node content cannot be changed.

July 6th - August 10th:

  • Code Manual conflict resolution
    • Involves displaying the diff to the user in a friendly way
    • Let the user interact with the two versions and store the result
  • Develop D7 Port

Mentors:
Chx
Davidstrauss

Difficulty:
Medium - The interface for comparing and merging all data between the two nodes will be the largest task. Keeping it clean and usable will be top priority.

About Me:
My name is Christopher Bradford and I am a student studying Computer Science. I have been working with Drupal for the past 3 years beginning with the BitTorrent module for SoC 2007. I am experienced in developing modules and themes for the Drupal community and clients in both Drupal 5 and Drupal 6 environments. Last year I was part of SoC with the DocAPI project. I would like to note that while last year’s project did not succeed, I am very confident in my abilities and the outcome of this years proposal. Given a problem, I will tirelessly work to find a solution, leaning not only on my own understanding, but researching in various places and asking others for help. I look forward to this year’s Summer of Code and the projects it produces for the community.

Comments

existing module named "checkout"

rsvelko-gdo's picture

Have a look at the code of http://drupal.org/project/checkout . The idea is there and a few issues too...

You may either use that as a base and contribute to it (preferred) or do a new contrib.


Limited only by imagination.

--
Limited only by imagination - Segments.at.

checkout is locking

chx's picture

which is useful. This is a different approach.

That's a neat module, but it

bradfordcp@drupal.org's picture

That's a neat module, but it is moving away from the goal here. This would be less of a mechanism to prevent people from editing the same node simultaneously and more of a way to allow mass-editing with very few headaches.

~Chris

~Chris

Ya, I know checkout locks -

rsvelko-gdo's picture

Ya, I know checkout locks - but I suspect that your project can learn some things by reading checkout's code.. And maybe by collaborating with the maintainers... After all if they had the time they would have chosen to build a module like yours - a diffing and resolving one... Instead of a locking one - but locking is easier :)

Sorry if everyone knew about checkout and I wasted your time.

I would love it if you merge into checkout's codebase somehow - maybe diffing and resolving would be the default mechanism of saving a node, and the locking remain the not-default selected option in the settings UI of checkout...

--
Limited only by imagination.

--
Limited only by imagination - Segments.at.

I would recommend reading

owen barton's picture

I would recommend reading some of the theory (and code!) for the google-mobwrite toolkit. Although this proposal doesn't plan to do pseudo-synchronous edition (which is probably good, since I think that would be hard for a SoC project) the underlying problems with respect to diff/patch behavior are very similar.

There is an existing proposal at http://groups.drupal.org/node/20046 to do syncronous editing using the mobwrite API (and, I assume using that code for the backend receiver, although there is a shortage of detail). If that gets fleshed out if there would be the possibility of some interoperability between these 2 projects.

A-HA moment with mobwrite!

rsvelko-gdo's picture

I managed to just paste 3 lines of JS - and got all the "edit-title" input ids shared in real time on my site...

Edited by rsvelko to remove clutter.

--
Limited only by imagination - Segments.at.

sth like

rsvelko-gdo's picture

interoperability maybe in the terms of - the real time one works if JS enabled and the other one if disabled ... I mean it would be nice to have just one module (with submodules maybe if the project is too big to maintain ) and this whole thing unites in itself the checkout/diffng/real-time parts ...


Limited only by imagination.

--
Limited only by imagination - Segments.at.

STOP

chx's picture

a) this node is about Christopher's proposal. The generic idea is http://groups.drupal.org/node/20472 . I will discuss with my fellow GSoC admins about the cleaning up of this node. All this talk about mobwrite is irrelevant, you are going backwards woo'd by Google. The CAP principle states that in distributed computing when it comes to consistency (C), availability (A) and partition (P) resilience/tolerance you can have only two of the three. This project picked A and P. mobwrite picked C and A.

You can not scale without P. Simply, that's not the way forward. Surely mobwrite is a fantastic project for collaborative writing. That's not what we want here, however. If the Next Decade talk and Bayou not enough, then check this blog post which appeared just a few days ago on Planet Drizzle: http://www.oddments.org/?p=47

OK

rsvelko-gdo's picture
  1. some CAP insight for novices - http://floatingpoint.tinou.com/2007/01/cap_consistency.html

  2. We just suggest sources of code/algorhytms and ideas - to help with the research - sorry for the offtopic if such.

  3. Cleaned up a bit above. Please - feel free to wipe and summarize the talk till now in 1 post.

And lastly - chx or chris - please give some examples or diagrams (saw them planned) to help distinguish between mobwrite and this project. Pleaaase.

--
Limited only by imagination - Segments.at.

--
Limited only by imagination - Segments.at.

Diagrams...

bradfordcp@drupal.org's picture

I am in the process of generating diagrams to reflect the workflow of the proposed module. While these might answer your request to distinguish between mobwrite and this project, they will be focused on showing how this module will operate. I don't see it as being prudent (not to sound mean), to generate a visual representation of how this module will differ from another. But like a said you might be able to pull that information from the forthcoming workflow diagram.

On a separate note, mobwrite looks neat.

~Chris

~Chris

Summary

rsvelko-gdo's picture

(to be left after the thread cleanup from chx)

Projects that might be relevant somehow:
- http://drupal.org/project/checkout - locking - not resolving - might contain useful code
- google mobwrite - might help with the diff patch algorhytms ( and is an alternaive approach to this one here - with different uses)

(This said comments 1,2,3,4, 6 and 7 may be wiped.)

--
Limited only by imagination - Segments.at.

--
Limited only by imagination - Segments.at.

SoC 2009

Group categories

Admin Tags

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: