summary refs log tree commit diff
path: root/docs/versioning.rst
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-08-12 16:05:23 +0100
committerMark Haines <mark.haines@matrix.org>2014-08-12 16:39:35 +0100
commitcf45ed1bc0bb23917001b63adaca7fd126c64996 (patch)
tree79ccb12349f7b8f6ce954bf5373c6282bc898fd9 /docs/versioning.rst
parentReference Matrix Home Server (diff)
downloadsynapse-cf45ed1bc0bb23917001b63adaca7fd126c64996.tar.xz
Add .rst suffix to documentation files so that github auto-formats them
Diffstat (limited to 'docs/versioning.rst')
-rw-r--r--docs/versioning.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/versioning.rst b/docs/versioning.rst
new file mode 100644
index 0000000000..2f94bb6ef6
--- /dev/null
+++ b/docs/versioning.rst
@@ -0,0 +1,11 @@
+Versioning is, like, hard for paginating backwards because of the number of Home Servers involved.
+
+The way we solve this is by doing versioning as an acyclic directed graph of PDUs. For pagination purposes, this is done on a per context basis. 
+When we send a PDU we include all PDUs that have been received for that context that hasn't been subsequently listed in a later PDU. The trivial case is a simple list of PDUs, e.g. A <- B <- C. However, if two servers send out a PDU at the same to, both B and C would point at A - a later PDU would then list both B and C.
+
+Problems with opaque version strings:
+    - How do you do clustering without mandating that a cluster can only have one transaction in flight to a given remote home server at a time. 
+      If you have multiple transactions sent at once, then you might drop one transaction, receive anotherwith a version that is later than the dropped transaction and which point ARGH WE LOST A TRANSACTION.
+    - How do you do pagination? A version string defines a point in a stream w.r.t. a single home server, not a point in the context.
+
+We only need to store the ends of the directed graph, we DO NOT need to do the whole one table of nodes and one of edges.