experimenting with 'reserved uids'

This commit is contained in:
Kevin Jahns
2014-08-07 21:52:50 +02:00
parent efc4e502cf
commit 9e1d9e568f
77 changed files with 509 additions and 1482 deletions

View File

@@ -342,7 +342,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -142,7 +142,7 @@ only one will AddName operation will be executed.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -157,7 +157,7 @@ This result can be sent to other clients.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -118,7 +118,7 @@ of the Engine is empty.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -72,6 +72,11 @@
</a>
</span>
<span class='desc'>
<p>ops = [] for o in ops_json ops.push @parseOperation o
for o in ops @HB.addOperation o
for o in ops if not o.execute()
@unprocessed_ops.push o
@tryUnprocessed()</p>
</span>
</li>
<li>
@@ -125,7 +130,16 @@
<b>applyOp</b><span>(op_json)</span>
<br>
</p>
<div class='docstring'>
<p>ops = []
for o in ops_json ops.push @parseOperation o
for o in ops @HB.addOperation o
for o in ops if not o.execute()
@unprocessed_ops.push o
@tryUnprocessed()</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='tryUnprocessed-dynamic'>
@@ -139,7 +153,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -57,6 +57,18 @@
Get the user id with wich the History Buffer was initialized.
</span>
</li>
<li>
<span class='signature'>
<a href='#getReservedUniqueIdentifier-dynamic'>
#
(void)
<b>getReservedUniqueIdentifier</b><span>()</span>
</a>
</span>
<span class='desc'>
There is only one reserved unique identifier (uid), so use it wisely.
</span>
</li>
<li>
<span class='signature'>
<a href='#getOperationCounter-dynamic'>
@@ -159,6 +171,22 @@
<p>Get the user id with wich the History Buffer was initialized.</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='getReservedUniqueIdentifier-dynamic'>
#
(void)
<b>getReservedUniqueIdentifier</b><span>()</span>
<br>
</p>
<div class='docstring'>
<p>There is only one reserved unique identifier (uid), so use it wisely.
I propose to use it in your Framework, to create something like a root element.
An operation with this identifier is not propagated to other clients.
This is why everybode must create the same operation with this uid.</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
@@ -228,7 +256,7 @@ other operations (it wont executed)</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -93,7 +93,7 @@
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>(uid, content = &quot;&quot;, prev, next, origin)</span>
<b>constructor</b><span>(uid, content, prev, next, origin)</span>
<br>
</p>
<div class='tags'>
@@ -156,7 +156,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -256,7 +256,7 @@ TODO (Unused)</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -168,7 +168,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -286,7 +286,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -121,7 +121,7 @@ console.log(w.newProperty == &quot;Awesome&quot;) # true!</code></pre>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -250,7 +250,7 @@ JsonYatta was initialized (Depending on the HistoryBuffer implementation).</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -208,7 +208,7 @@ Doesn&#39;t return left-right delimiter.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -99,7 +99,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -284,7 +284,7 @@ an easy way to refer to these operations via an uid or object reference.</p><p>F
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -189,7 +189,7 @@ Each Replaceable holds a value that is now replaceable.</p><p>The Word-type has
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -191,7 +191,7 @@ This result can be send to other clients.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -219,7 +219,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -53,7 +53,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -173,7 +173,7 @@ This result can be send to other clients.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -239,7 +239,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -126,7 +126,7 @@
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>(uid, initial_content, beginning, end, prev, next, origin)</span>
<b>constructor</b><span>(uid, beginning, end, prev, next, origin)</span>
<br>
</p>
<div class='tags'>
@@ -142,14 +142,6 @@
&mdash;
<span class='desc'>A unique identifier. If uid is undefined, a new uid will be created. </span>
</li>
<li>
<span class='name'>initial_content</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
</li>
</ul>
</div>
</div>
@@ -241,7 +233,7 @@ to provide replace functionality.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -38,7 +38,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -34,11 +34,35 @@
</p>
</nav>
<div id='filecontents'>
<h1 id="-yatta-yatta-svg-raw-true-"><a href="./Yatta.svg?raw=true">Yatta!</a></h1><p>A Collaboration Framework for arbitrary data structures that is <em>not</em> based on Operational Transformation.</p><h1 id="license">License</h1><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT license</a>.</p>
<h1 id="-yatta-extras-imgs-yatta_logo-png-raw-true-"><img src="./extras/imgs/Yatta_logo.png?raw=true" alt="Yatta!"></h1><p>A real-time web framework that manages concurrency control for arbitrary data structures and is <em>not</em> based on Operational Transformation.
Yatta! provides similar functionality as <a href="https://github.com/share/ShareJS">ShareJs</a> and <a href="https://github.com/opencoweb/coweb">OpenCoweb</a>
but does not require you to understand how the internals work. The predefined data structures provide a simple API to access your shared data structures.</p><p>Predefined data structures:</p><ul>
<li>Text</li>
<li>Json - <a href="./examples/IwcJson.md">example</a></li>
<li>XML (coming soon)</li>
</ul><p>Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.</p><p>Currently supported communication protocols:</p><ul>
<li><a href="http://dbis.rwth-aachen.de/gadgets/iwc/resources/iwc.manual.pdf">IWC</a> - Inter-widget Communication</li>
</ul>
<h1 id="about">About</h1><p>Find out more about the concurrent editing problem here
<a href="http://opencoweb.org/ocwdocs/intro/openg.html">Cooperation, Concurrency, Conflicts, and Convergence</a> and here
<a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational Transformation (OT)</a></p><p>My Bachelor Thesis project aim was to develop a P2P OT Framework that enables collaboration on XML documents and supports
<a href="http://www3.ntu.edu.sg/home/czsun/projects/otfaq/#intentionPreservation">Intention Preservation</a>.
After some time I realized that OT has significant drawbacks in P2P environments.</p><p>With my gained experiences I came up with a new approach. I named it Yata - Yet Another Transformation Approach.
It enables concurrent editing with the following space and time properties:</p><ul>
<li>Time complexity: O(S), whereby S is the number of operations that are inserted concurrently at the same position. This means that my approach does not transform against operations that happen on other positions.</li>
<li>Space complexity = O(|Document|), whereby |Document| is the size of the shared document. Depending on the used data structure, Yata may needs 4*|Document| of space.</li>
</ul><p>This means that my approach beats all OT time complexities. Furthermore, it is possible to make a very strict definition of Intention Preservation, and I was able to
show that it is never violated.</p><p>Another advantage of my approach is that propagated messages are very small.
Background: In real-time P2P OT algorithms you have to send a state-vector with every message that defines the state of the History Buffer
on which the operation was created. This is not necessary in Yata.</p><p>One downside is that the History Buffer holds at least as many operations as there are characters in the document.
In contrast, an OT algorithm can have an empty History Buffer while the document size is very big.</p><p>So, how did I come up with the name for the implementation (Yatta! is not Yata)?
<img src="./extras/imgs/YATTA.png" alt="YATTA!">
Yatta! means &quot;I did it!&quot; in Japanese. You scream it when you accomplish something (for proper application I refer to the Yatta-man in <a href="http://heroeswiki.com/Yatta!">Heroes</a>).
There is also this awesome video on the Internet that will change your life <a href="https://www.youtube.com/watch?v=kL5DDSglM_s">Yatta</a>.</p><h1 id="status">Status</h1><p>Yatta! is still in an early development phase.</p><h1 id="support">Support</h1><p>Please report any issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!</p><h1 id="license">License</h1><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p>
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -103,7 +103,7 @@ window.onload = init
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -43,7 +43,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -84,7 +84,7 @@
</div>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -58,7 +58,7 @@
</dl>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -68,7 +68,7 @@
</dl>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -60,7 +60,7 @@
</dl>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -58,7 +58,7 @@
</dl>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
August 05, 14 20:37:47 by
August 07, 14 21:48:38 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

File diff suppressed because one or more lines are too long

View File

@@ -301,14 +301,6 @@
(lib&#47;Connectors&#47;IwcConnector.coffee)
</small>
</li>
<li>
<a href='class/Word.html#deleteText-dynamic' target='main' title='deleteText'>
#deleteText
</a>
<small>
(Word)
</small>
</li>
<li>
<a href='class/TextYatta.html#deleteText-dynamic' target='main' title='deleteText'>
#deleteText
@@ -317,6 +309,14 @@
(TextYatta)
</small>
</li>
<li>
<a href='class/Word.html#deleteText-dynamic' target='main' title='deleteText'>
#deleteText
</a>
<small>
(Word)
</small>
</li>
<li>
<a href='class/Operation.html#execute-dynamic' target='main' title='execute'>
#execute
@@ -326,11 +326,11 @@
</small>
</li>
<li>
<a href='class/Delimiter.html#execute-dynamic' target='main' title='execute'>
<a href='class/AddName.html#execute-dynamic' target='main' title='execute'>
#execute
</a>
<small>
(Delimiter)
(AddName)
</small>
</li>
<li>
@@ -350,11 +350,11 @@
</small>
</li>
<li>
<a href='class/AddName.html#execute-dynamic' target='main' title='execute'>
<a href='class/Delimiter.html#execute-dynamic' target='main' title='execute'>
#execute
</a>
<small>
(AddName)
(Delimiter)
</small>
</li>
<li>
@@ -510,11 +510,11 @@
</small>
</li>
<li>
<a href='class/JsonYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
#getRootElement
<a href='class/HistoryBuffer.html#getReservedUniqueIdentifier-dynamic' target='main' title='getReservedUniqueIdentifier'>
#getReservedUniqueIdentifier
</a>
<small>
(JsonYatta)
(HistoryBuffer)
</small>
</li>
<li>
@@ -525,6 +525,14 @@
(IwcConnector)
</small>
</li>
<li>
<a href='class/JsonYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
#getRootElement
</a>
<small>
(JsonYatta)
</small>
</li>
<li>
<a href='class/TestConnector.html#getRootElement-dynamic' target='main' title='getRootElement'>
#getRootElement
@@ -550,11 +558,11 @@
</small>
</li>
<li>
<a href='class/TextYatta.html#getUserId-dynamic' target='main' title='getUserId'>
<a href='class/JsonYatta.html#getUserId-dynamic' target='main' title='getUserId'>
#getUserId
</a>
<small>
(TextYatta)
(JsonYatta)
</small>
</li>
<li>
@@ -566,11 +574,11 @@
</small>
</li>
<li>
<a href='class/JsonYatta.html#getUserId-dynamic' target='main' title='getUserId'>
<a href='class/TextYatta.html#getUserId-dynamic' target='main' title='getUserId'>
#getUserId
</a>
<small>
(JsonYatta)
(TextYatta)
</small>
</li>
<li>
@@ -661,14 +669,6 @@
(Operation)
</small>
</li>
<li>
<a href='class/TestConnector.html#send-dynamic' target='main' title='send'>
#send
</a>
<small>
(TestConnector)
</small>
</li>
<li>
<a href='class/IwcConnector.html#send-dynamic' target='main' title='send'>
#send
@@ -677,6 +677,14 @@
(IwcConnector)
</small>
</li>
<li>
<a href='class/TestConnector.html#send-dynamic' target='main' title='send'>
#send
</a>
<small>
(TestConnector)
</small>
</li>
<li>
<a href='class/IwcConnector.html#sendIwcIntent-dynamic' target='main' title='sendIwcIntent'>
#sendIwcIntent
@@ -765,6 +773,22 @@
(TextInsert)
</small>
</li>
<li>
<a href='class/JsonType.html#val-dynamic' target='main' title='val'>
#val
</a>
<small>
(JsonType)
</small>
</li>
<li>
<a href='class/TextYatta.html#val-dynamic' target='main' title='val'>
#val
</a>
<small>
(TextYatta)
</small>
</li>
<li>
<a href='class/Replaceable.html#val-dynamic' target='main' title='val'>
#val
@@ -781,22 +805,6 @@
(MapManager)
</small>
</li>
<li>
<a href='class/TextYatta.html#val-dynamic' target='main' title='val'>
#val
</a>
<small>
(TextYatta)
</small>
</li>
<li>
<a href='class/JsonType.html#val-dynamic' target='main' title='val'>
#val
</a>
<small>
(JsonType)
</small>
</li>
<li>
<a href='class/JsonYatta.html#val-dynamic' target='main' title='val'>
#val