Fossil SCM

Small tweaks to the CAP Theorem doc

wyoung 2020-10-20 10:08 trunk
Commit 67a4c1d3134784dffed4ddae84a3ef55663025f6b886cb3fbdb86dc7bba018bb
1 file changed +15 -6
--- www/cap-theorem.md
+++ www/cap-theorem.md
@@ -25,11 +25,15 @@
2525
time.
2626
2727
You may consider that going back online restores “C”, because upon sync,
2828
you’re now consistent with the repo you cloned from. But, if another
2929
user has gone offline in the meantime, and they’ve made commits to their
30
-disconnected repo, *you* aren’t consistent with *them.*
30
+disconnected repo, *you* aren’t consistent with *them.* Besides which,
31
+if another user commits to the central repo, that doesn’t push the
32
+change down to you automatically: even if all users of a Fossil system
33
+are online at the same instant, and they’re all using autosync, Fossil
34
+doesn’t guarantee consistency across the network.
3135
3236
There’s no getting around the CAP theorem!
3337
3438
[dvcs]: https://en.wikipedia.org/wiki/Distributed_version_control
3539
@@ -41,22 +45,27 @@
4145
4246
It means we get a system that is always consistent (C) and available (A)
4347
as long as there are no partitions (P).
4448
4549
That’s basically [CVS] and [Subversion][svn]: you can only continue
46
-working as long as your connection to the central repo server functions.
50
+working with the repository itself as long as your connection to the central repo server functions.
4751
48
-It’s rather trivial to talk about single-point-of-failure systems as
52
+It’s rather trivial to talk about single-point-of-failure systems like
53
+CVS or Subversion as
4954
CA-mode. Another common example used this way is a classical RDBMS, but
5055
aren’t we here to talk about distributed systems? What’s a good example
5156
of a *distributed* CA-mode system?
5257
5358
A better example is [Kafka], which in its default configuration assumes
5459
it being run on a corporate LAN in a single data center, so network
55
-partitions are exceedingly rare. In its application of CA mode, a
60
+partitions are exceedingly rare. It therefore sacrifices partition
61
+tolerance to get the advantages of CA-mode operation. In its particular application of
62
+this mode, a
5663
message isn’t “committed” until all running brokers have a copy of it,
57
-at which point the message becomes visible to the client(s).
64
+at which point the message becomes visible to the client(s). In that
65
+way, all clients always see the same message store as long as all of the
66
+Kafka servers are up and communicating.
5867
5968
How would that work in Fossil terms?
6069
6170
If there is only one central server and I clone it on my local laptop,
6271
then CA mode means I can only commit if the remote Fossil is available,
@@ -88,11 +97,11 @@
8897
say that commits must go to all of the spares as well as the active
8998
servers, but a loss of one active server requires that one warm spare
9099
come into active state, and all of the clients learn that the spare is
91100
now considered “active.” At this point, you have a CP-mode system, not a
92101
CA-mode system, because it’s now partition-tolerant (P) but it becomes
93
-unavailable, losing “A” when there aren’t enough active servers or warm
102
+unavailable when there aren’t enough active servers or warm
94103
spares to promote to active status.
95104
96105
CP is your classical [BFT] style distributed consensus system, where the
97106
system is available only if the client can contact a *majority* of the
98107
servers. This is a formalization of the warm spare concept above: with
99108
--- www/cap-theorem.md
+++ www/cap-theorem.md
@@ -25,11 +25,15 @@
25 time.
26
27 You may consider that going back online restores “C”, because upon sync,
28 you’re now consistent with the repo you cloned from. But, if another
29 user has gone offline in the meantime, and they’ve made commits to their
30 disconnected repo, *you* aren’t consistent with *them.*
 
 
 
 
31
32 There’s no getting around the CAP theorem!
33
34 [dvcs]: https://en.wikipedia.org/wiki/Distributed_version_control
35
@@ -41,22 +45,27 @@
41
42 It means we get a system that is always consistent (C) and available (A)
43 as long as there are no partitions (P).
44
45 That’s basically [CVS] and [Subversion][svn]: you can only continue
46 working as long as your connection to the central repo server functions.
47
48 It’s rather trivial to talk about single-point-of-failure systems as
 
49 CA-mode. Another common example used this way is a classical RDBMS, but
50 aren’t we here to talk about distributed systems? What’s a good example
51 of a *distributed* CA-mode system?
52
53 A better example is [Kafka], which in its default configuration assumes
54 it being run on a corporate LAN in a single data center, so network
55 partitions are exceedingly rare. In its application of CA mode, a
 
 
56 message isn’t “committed” until all running brokers have a copy of it,
57 at which point the message becomes visible to the client(s).
 
 
58
59 How would that work in Fossil terms?
60
61 If there is only one central server and I clone it on my local laptop,
62 then CA mode means I can only commit if the remote Fossil is available,
@@ -88,11 +97,11 @@
88 say that commits must go to all of the spares as well as the active
89 servers, but a loss of one active server requires that one warm spare
90 come into active state, and all of the clients learn that the spare is
91 now considered “active.” At this point, you have a CP-mode system, not a
92 CA-mode system, because it’s now partition-tolerant (P) but it becomes
93 unavailable, losing “A” when there aren’t enough active servers or warm
94 spares to promote to active status.
95
96 CP is your classical [BFT] style distributed consensus system, where the
97 system is available only if the client can contact a *majority* of the
98 servers. This is a formalization of the warm spare concept above: with
99
--- www/cap-theorem.md
+++ www/cap-theorem.md
@@ -25,11 +25,15 @@
25 time.
26
27 You may consider that going back online restores “C”, because upon sync,
28 you’re now consistent with the repo you cloned from. But, if another
29 user has gone offline in the meantime, and they’ve made commits to their
30 disconnected repo, *you* aren’t consistent with *them.* Besides which,
31 if another user commits to the central repo, that doesn’t push the
32 change down to you automatically: even if all users of a Fossil system
33 are online at the same instant, and they’re all using autosync, Fossil
34 doesn’t guarantee consistency across the network.
35
36 There’s no getting around the CAP theorem!
37
38 [dvcs]: https://en.wikipedia.org/wiki/Distributed_version_control
39
@@ -41,22 +45,27 @@
45
46 It means we get a system that is always consistent (C) and available (A)
47 as long as there are no partitions (P).
48
49 That’s basically [CVS] and [Subversion][svn]: you can only continue
50 working with the repository itself as long as your connection to the central repo server functions.
51
52 It’s rather trivial to talk about single-point-of-failure systems like
53 CVS or Subversion as
54 CA-mode. Another common example used this way is a classical RDBMS, but
55 aren’t we here to talk about distributed systems? What’s a good example
56 of a *distributed* CA-mode system?
57
58 A better example is [Kafka], which in its default configuration assumes
59 it being run on a corporate LAN in a single data center, so network
60 partitions are exceedingly rare. It therefore sacrifices partition
61 tolerance to get the advantages of CA-mode operation. In its particular application of
62 this mode, a
63 message isn’t “committed” until all running brokers have a copy of it,
64 at which point the message becomes visible to the client(s). In that
65 way, all clients always see the same message store as long as all of the
66 Kafka servers are up and communicating.
67
68 How would that work in Fossil terms?
69
70 If there is only one central server and I clone it on my local laptop,
71 then CA mode means I can only commit if the remote Fossil is available,
@@ -88,11 +97,11 @@
97 say that commits must go to all of the spares as well as the active
98 servers, but a loss of one active server requires that one warm spare
99 come into active state, and all of the clients learn that the spare is
100 now considered “active.” At this point, you have a CP-mode system, not a
101 CA-mode system, because it’s now partition-tolerant (P) but it becomes
102 unavailable when there aren’t enough active servers or warm
103 spares to promote to active status.
104
105 CP is your classical [BFT] style distributed consensus system, where the
106 system is available only if the client can contact a *majority* of the
107 servers. This is a formalization of the warm spare concept above: with
108

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button