diff --git a/Sda2/Ref/Fig/concurrentOptimistic.svg b/Sda2/Ref/Fig/concurrentOptimistic.svg index 5ee93b657360225c040e2182b52fd3b4a696e0a9..b45caf1d98f7f7fd47a416d825483eb93a886dd0 100644 --- a/Sda2/Ref/Fig/concurrentOptimistic.svg +++ b/Sda2/Ref/Fig/concurrentOptimistic.svg @@ -14,8 +14,8 @@ inkscape:version="0.48.4 r9939" version="1.1" id="svg2" - height="550" - width="770"> + height="245.16989" + width="474.46835"> <sodipodi:namedview id="base" pagecolor="#ffffff" @@ -23,9 +23,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.5003711" - inkscape:cx="217.17167" - inkscape:cy="385.69871" + inkscape:zoom="2.3643056" + inkscape:cx="197.49696" + inkscape:cy="141.53026" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="true" @@ -39,55 +39,64 @@ inkscape:snap-global="true" objecttolerance="10000" guidetolerance="10000" - units="mm"> + units="mm" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> <inkscape:grid type="xygrid" id="grid4604" empspacing="5" visible="true" enabled="true" - snapvisiblegridlinesonly="true" /> + snapvisiblegridlinesonly="true" + originx="-36.03125px" + originy="-264.83011px" /> </sodipodi:namedview> <defs id="defs4"> <marker inkscape:stockid="DiamondMend" orient="auto" - refY="0.0" - refX="0.0" + refY="0" + refX="0" id="DiamondMend" style="overflow:visible"> <path id="path4249" - d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z " - style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" - transform="scale(0.4) translate(-6.5,0)" /> + d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 0,-7.0710768 z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" + transform="matrix(0.4,0,0,0.4,-2.6,0)" + inkscape:connector-curvature="0" /> </marker> <marker - style="overflow:visible;" + style="overflow:visible" id="Arrow1Mend" - refX="0.0" - refY="0.0" + refX="0" + refY="0" orient="auto" inkscape:stockid="Arrow1Mend"> <path - transform="scale(0.4) rotate(180) translate(10,0)" - style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;" - d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " - id="path4158" /> + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4158" + inkscape:connector-curvature="0" /> </marker> <marker inkscape:stockid="EmptyTriangleOutL" orient="auto" - refY="0.0" - refX="0.0" + refY="0" + refX="0" id="EmptyTriangleOutL" style="overflow:visible"> <path id="path4309" - d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " - style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt" - transform="scale(0.8) translate(-6,0)" /> + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" + transform="matrix(0.8,0,0,0.8,-4.8,0)" + inkscape:connector-curvature="0" /> </marker> <marker style="overflow:visible" @@ -428,15 +437,16 @@ <marker inkscape:stockid="EmptyTriangleOutLt" orient="auto" - refY="0.0" - refX="0.0" + refY="0" + refX="0" id="EmptyTriangleOutLt" style="overflow:visible"> <path id="path4692" - d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " - style="stroke-width:1.0pt;stroke:#ff0000;fill:#ff0000;fill-rule:evenodd" - transform="scale(0.8) translate(-6,0)" /> + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt" + transform="matrix(0.8,0,0,0.8,-4.8,0)" + inkscape:connector-curvature="0" /> </marker> <marker inkscape:stockid="EmptyTriangleOutLt" @@ -467,43 +477,46 @@ inkscape:connector-curvature="0" /> </marker> <marker - style="overflow:visible;" + style="overflow:visible" id="Arrow1MendK" - refX="0.0" - refY="0.0" + refX="0" + refY="0" orient="auto" inkscape:stockid="Arrow1MendK"> <path - transform="scale(0.4) rotate(180) translate(10,0)" - style="stroke:#ff0000;stroke-width:1.0pt;fill:#ff0000;fill-rule:evenodd" - d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " - id="path5820" /> + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5820" + inkscape:connector-curvature="0" /> </marker> <marker - style="overflow:visible;" + style="overflow:visible" id="Arrow1Mendw" - refX="0.0" - refY="0.0" + refX="0" + refY="0" orient="auto" inkscape:stockid="Arrow1Mendw"> <path - transform="scale(0.4) rotate(180) translate(10,0)" - style="stroke:#ff0000;stroke-width:1.0pt;fill:#ff0000;fill-rule:evenodd" - d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " - id="path6591" /> + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path6591" + inkscape:connector-curvature="0" /> </marker> <marker - style="overflow:visible;" + style="overflow:visible" id="Arrow1Mend6" - refX="0.0" - refY="0.0" + refX="0" + refY="0" orient="auto" inkscape:stockid="Arrow1Mend6"> <path - transform="scale(0.4) rotate(180) translate(10,0)" - style="stroke:#ff0000;stroke-width:1.0pt;fill:#ff0000;fill-rule:evenodd" - d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " - id="path6594" /> + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path6594" + inkscape:connector-curvature="0" /> </marker> <marker style="overflow:visible" @@ -520,17 +533,18 @@ inkscape:connector-curvature="0" /> </marker> <marker - style="overflow:visible;" + style="overflow:visible" id="Arrow1Mend6z" - refX="0.0" - refY="0.0" + refX="0" + refY="0" orient="auto" inkscape:stockid="Arrow1Mend6z"> <path - transform="scale(0.4) rotate(180) translate(10,0)" - style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;fill:#000000" - d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " - id="path6949" /> + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path6949" + inkscape:connector-curvature="0" /> </marker> <marker style="overflow:visible" @@ -588,7 +602,7 @@ </rdf:RDF> </metadata> <g - transform="translate(0,-502.36221)" + transform="translate(-36.03125,-542.36221)" id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1"> @@ -597,8 +611,8 @@ x="330.26273" height="219.77139" width="136.03505" - id="rect6832-2" - style="fill:#f2f2f2;stroke:none;stroke-width:1.22782456999999989;stroke-miterlimit:4;stroke-dasharray:none" /> + id="view50" + style="fill:none;stroke:#000000" /> <rect transform="translate(0,502.36221)" y="40" @@ -606,7 +620,7 @@ height="220" width="90" id="rect6832" - style="fill:#f2f2f2;stroke:none;stroke-width:0.99921262000000000;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:#f2f2f2;stroke:none" /> <text transform="translate(0,308.2677)" sodipodi:linespacing="125%" @@ -619,13 +633,6 @@ x="97.984795" id="tspan3006" sodipodi:role="line" /></text> - <rect - y="527.4649" - x="12.469526" - height="498.53537" - width="738.7934" - id="rect11895" - style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> <text xml:space="preserve" style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" @@ -993,12 +1000,12 @@ <text sodipodi:linespacing="125%" id="text5005" - y="747.36218" - x="385" + y="752.36218" + x="415" style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;font-family:Sans" xml:space="preserve"><tspan - y="747.36218" - x="385" + y="752.36218" + x="415" id="tspan5007" sodipodi:role="line">+1</tspan></text> <g @@ -1294,6 +1301,42 @@ d="m 119.60006,773.96791 375,0" id="path7379" inkscape:connector-curvature="0" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.70866142;stroke-miterlimit:4;stroke-dasharray:none" + id="view10" + width="125" + height="40" + x="8.96875" + y="25.000002" + transform="translate(36.03125,542.36221)" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.70866143999999998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" + id="view20" + width="180" + height="205" + x="-1.03125" + y="1.3574219e-06" + transform="translate(36.03125,542.36221)" + inkscape:label="#view20" /> + <rect + style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-miterlimit:4;stroke-dasharray:none" + id="view30" + width="150" + height="40" + x="98.96875" + y="165" + transform="translate(36.03125,542.36221)"> + <title + id="title4592">Client side change</title> + </rect> + <rect + style="fill:none;stroke:#000000;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" + id="view40" + width="85" + height="175" + x="293.96875" + y="25.000002" + transform="translate(36.03125,542.36221)" /> </g> <script id="sozi-script" @@ -1304,4 +1347,74 @@ <script id="sozi-extras-media-script" ns1:version="14.10-05142318">this.addEventListener("load",function(){var h="http://www.w3.org/2000/svg",l="http://sozi.baierouge.fr",s="http://www.w3.org/1999/xhtml",m=this,o=m.document,q=[],r,e,d,c,p,a,g,f,b;function n(i){i.stopPropagation()}function t(i,j,k){sozi.events.listen("sozi.player.framechange",function(u){var v=sozi.document.frames[u].id;if(v===j){i.play()}else{if(v===k){i.pause()}}})}q.push(o.getElementsByTagNameNS(l,"video"));q.push(o.getElementsByTagNameNS(l,"audio"));r=[];for(c=0;c<q.length;c+=1){for(e=0;e<q[c].length;e+=1){p=q[c][e].parentNode;b=o.createElementNS(s,"source");b.setAttribute("type",q[c][e].getAttributeNS(l,"type"));b.setAttribute("src",q[c][e].getAttributeNS(l,"src"));for(d=0;d<r.length;d+=1){if(r[d].rect===p){break}}if(d===r.length){p.setAttribute("visibility","hidden");f=o.createElementNS(s,q[c][e].localName);f.setAttribute("controls","controls");if(q[c][e].localName==="video"){f.setAttribute("width",p.getAttribute("width"));f.setAttribute("height",p.getAttribute("height"))}f.addEventListener("click",n,false);f.addEventListener("contextmenu",n,false);g=o.createElementNS(s,"html");g.appendChild(f);a=o.createElementNS(h,"foreignObject");a.setAttribute("x",p.getAttribute("x"));a.setAttribute("y",p.getAttribute("y"));a.setAttribute("width",p.getAttribute("width"));a.setAttribute("height",p.getAttribute("height"));a.appendChild(g);p.parentNode.insertBefore(a,p.nextSibling);if(q[c][e].hasAttributeNS(l,"start-frame")){t(f,q[c][e].getAttributeNS(l,"start-frame"),q[c][e].getAttributeNS(l,"stop-frame"))}r.push({rect:q[c][e].parentNode,htmlMedia:f})}r[d].htmlMedia.appendChild(b)}}},false);</script> + <ns1:frame + id="view10" + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="1" + ns1:title="Persistent database object" + ns1:refid="view10" /> + <ns1:frame + ns1:refid="view20" + ns1:title="Copy to client side" + ns1:sequence="2" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" + id="view20" /> + <ns1:frame + id="view30" + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="3" + ns1:title="Modify on client side" + ns1:refid="view30" /> + <ns1:frame + ns1:refid="view40" + ns1:title="Re-read from database" + ns1:sequence="4" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" + id="view40" /> + <ns1:frame + id="view50" + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0" + ns1:transition-duration-ms="1000" + ns1:timeout-ms="5000" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="5" + ns1:title="Commit or abort" + ns1:refid="view50" /> </svg> diff --git a/Sda2/sda2.xml b/Sda2/sda2.xml index 91d223ebfb27fa2ff4eada30d99e70364d9e8b0b..24af4a0d9cb30b7211cfc4e78f0a8ec8b56443a7 100644 --- a/Sda2/sda2.xml +++ b/Sda2/sda2.xml @@ -722,6 +722,16 @@ <section xml:id="accountTransferOptimistic"> <title>Account Transfer using optimistic concurrency control</title> + <figure xml:id="fig_optimisticConcurrencyControl"> + <title>Optimistic concurrency control</title> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/Fig/concurrentOptimistic.svg"/> + </imageobject> + </mediaobject> + </figure> + <para>Considerations:</para> <itemizedlist>