[Standards] Best approach for Shared XML editing
joonas.govenius at gmail.com
Thu Sep 11 21:01:35 UTC 2008
On Thu, Sep 11, 2008 at 3:32 PM, Dave Cridland <dave at cridland.net> wrote:
> On Thu Sep 11 19:30:24 2008, Fletcher, Boyd C. CIV US USJFCOM JFL J9935
>> I think the key thing to note is that while at a basic level whiteboarding
>> can be editing an xml document (ie SVG), there are many additional things
>> like page control, cursor control/movement, presentation control, pan/zoom
>> syncing, etc.... that are well beyond xml document editing.
> 100% in agreement here.
>> Its for these types of reasons that we think a custom protocol for
>> whiteboarding is required and
> Beginning to lose me here - I think this could more than likely be done as a
> control protocol either in parallel or layered with an XML exchange
>> that using an approach like sxde is only going to hamper the
>> whiteboard/presentation capabilities in the future.
> Lost me - I dislike SXE, but I think the approach - build a generic XML sync
> protocol, and build whiteboarding on top - is good.
> OTOH, RFC 5261 came out today. And that seems to be reasonably sane looking,
> but capable of everything that SXE can do, too.
> I'd encourage both the TransVerse team and Joonas to go read it.
RFC 5261 looks like a handy diff format but it doesn't solve the core
problem of dealing with simultaneous modifications. The problem with
XPath based approaches in general is that the node the XPath selector
referred to in the sender's copy might not be the same node that it
refers to in the receiver's copy if other modifications have taken
place in the mean while. There are basically three ways to resolve
1) The entire document can only be modified by one person at a time.
This would be rather easy to implement on top of RFC 5261 in the same
way that per-node (or per-record) synchronization in sxe is
implemented, but that is very restricting.
2) Some algorithm could be defined to update the XPath appropriately
and to detect and resolve conflicts with other patches. However, this
is definitely non-trivial because there are simply lots of different
ways in which the document could have changed, in particular if you
allow "move" operations.
3) You can give each node a unique id that can be used to address it
instead of the XPath selector. This is the approach that sxe uses
because it is very simple and flexible. The client simply needs to
maintain an _unordered_ set of records (each describing an XML node)
that can be mapped to a unique XML document based on the contents, not
the order, of those records.
Furthermore, the namespace issues described in RFC 5261 are avoided by
letting the protocol send "records" rather than inline XML.
More information about the Standards