Resource Menu


The Shared Object

Two users sharing a pig as a SVG/XML document.

Figure 1 - The original pig

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!-- Created with Sodipodi ("http://www.sodipodi.com/") --> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1" x="0.00000000" y="0.00000000" width="744.094482" height="1052.36218" id="svg548"> <defs id="defs550" /> <path transform="matrix(1.074121,-0.270842,-0.302968,-1.075925,164.8516,1705.975)" style="font-size:12;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:10;" id="path571" /> <path d="M 282.925 291.907 C 282.925 291.907 282.925 308.374 290.41 255.98 C 297.895 203.586 308.374 218.556 321.847 242.507 C 330.828 267.956 332.325 291.907 333.822 341.307 C 330.828 402.682 285.919 345.798 284.422 344.301 C 282.925 342.804 284.422 296.398 282.925 291.907 z " transform="translate(215.5621,49.39969)" style="font-size:12;fill:#ede2f0;fill-rule:evenodd;stroke:#000000;stroke-width:10;" id="path570" /> <path d="M -13.4726 384.718 C -1.49696 263.465 -23.9513 458.069 -10.4787 347.294 C 2.99392 236.52 20.9574 184.126 38.9209 196.102 C 56.8844 208.077 70.3571 242.507 73.351 278.434 C 76.3449 314.361 -11.9757 381.725 -13.4726 384.718 z " transform="translate(229.0347,47.90265)" style="font-size:12;fill:#ede2f0;fill-rule:evenodd;stroke:#000000;stroke-width:10;" id="path569" /> <ellipse cx="175.144211" cy="252.986053" rx="212.568192" ry="218.556000" transform="matrix(1.000000,0.000000,0.000000,1.089041,226.0409,269.3809)" style="font-size:12;fill:#eabed9;stroke:#000000;stroke-width:8.38467;stroke-linecap:square;" id="path552" /> <ellipse cx="310.619019" cy="311.367462" rx="60.626846" ry="41.914825" transform="matrix(0.830050,0.747115,-0.651464,0.951922,522.0934,-37.46310)" style="font-size:12;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:8.84969;" id="path559" /> <ellipse cx="197.598587" cy="479.026855" rx="160.174606" ry="121.253662" transform="matrix(1.009346,0.000000,0.000000,1.061728,257.1272,124.6172)" style="font-size:12;fill:#eabed9;fill-rule:evenodd;stroke:#000000;stroke-width:9.65992;" id="path553" /> <ellipse cx="135.474792" cy="476.781433" rx="42.663330" ry="42.663330" transform="translate(263.4648,169.1563)" style="font-size:12;fill:#ede3f0;fill-rule:evenodd;stroke:#000000;stroke-width:10;" id="path554" /> <ellipse cx="135.474792" cy="476.781433" rx="42.663330" ry="42.663330" transform="matrix(1.140349,0.000000,0.000000,1.245614,367.2015,37.08264)" style="font-size:12;fill:#ede3f0;fill-rule:evenodd;stroke:#000000;stroke-width:8.39053;" id="path556" /> <ellipse cx="58.381401" cy="282.925232" rx="94.308418" ry="70.357056" transform="matrix(0.747393,-0.742953,0.730127,0.760522,55.92289,261.5735)" style="font-size:12;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:9.48791;" id="path557" /> <ellipse cx="84.578186" cy="308.373535" rx="41.166374" ry="38.920898" transform="translate(244.0043,152.6898)" style="font-size:12;fill-rule:evenodd;stroke-width:1pt;" id="path558" /> <ellipse cx="84.578186" cy="308.373535" rx="41.166374" ry="38.920898" transform="matrix(0.620830,0.518754,-0.367218,0.483684,629.5759,321.9234)" style="font-size:12;fill-rule:evenodd;stroke-width:1pt;" id="path560" /> </svg>


Concurrent Modifications

They work concurrently on their copies.

The First Copy

The first user colorizes pig's eyes in yellow.

Figure 2 - First user update the pig eyes

As the picture is a XML document, this modification relies on the following change to the document. The style attribute of one node has been changed from :

style="font-size:12;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:8.84969;"
to :
style="font-size:12;fill:#ffff6d;fill-rule:evenodd;stroke:#000000;stroke-width:8.84969;"

The Second Copy

At the same time, the second user chooses to add a red mouth.

Figure 3 - Second user add a red mouth

This change performs the addition of the following node to the document :

"M 299.392 752.97 
              C 276.937 711.056 264.962 697.583 294.901 715.546 
              C 324.84 733.51 369.749 758.958 371.246 769.437 
              C 372.743 779.916 299.392 755.964 299.392 752.97 z "
         transform="translate(5.987854,-1.496994)"
         style="font-size:12;fill:#e10008;fill-rule:evenodd;stroke:#000000;stroke-width:10;"
         id="path574" />

The Final pig

Using so6 they synchronize their copies in order to apply modifications done by each other. Consequently, they converge to a new pig with yellow eyes and a red mouth.

Figure 4 - The final pig

The merge can be performed on any XML data, whether it represents graphics, as here, or documents or data. The merge is XML-aware and merges the XML trees intelligently. Complex graphics, data and documents can therefore be merged.




















































Last edited by Root at Aug 28, 2006 11:19 AM - Edit content - View source