Figure 7: Distribution of logical value (1000 msgs/sec).
for timestamping and therefore it is viable for arbi-
trary distributed architecture. According to the bench-
marks presented in (Kulkarni et al., 2014), deployed
in WAN, even in the presence of straggler nodes and
high event rate, the logical part, c, of HLC was no
higher than 1000 (though only at the struggle node).
In addition, HLC is backward compatible with TT
and LC. When ε is infinity, CSP behaves more like
an LC used for causality tracking in asynchronous
distributed systems. When ε is small, CSP behaves
more similar to Google TT. In the manner of Google
Spanner, we have leveraged the stack of distributed
protocols/algorithms to keep clock offset at any node
within advertised bounds. In turn it ensures another
level of CSP resiliency to different types of errors.
A snapshot read with our implementation is simi-
lar to TT-based Spanner. For a snapshot read of data
items x and y at absolute time t, the client executes the
reads at nodes i, j that are hosting x and y and that are
sufficiently up to date (updated to at least t − ε). Let
t
x
(respectively t
y
) denote the timestamp of the latest
update to x (resp. y) before t −ε at i (resp. j). Reading
the values of x at t
x
and y at t
y
gives a consistent snap-
shot because at time t the values of x and y are still
the same as those at t
x
and t
y
by definition of t
x
and
t
y
. However, if say x has another update with times-
tamp t
0
x
within the uncertainty interval of t
x
then we
use HLC comparison to order those two to identify
the latest version to return from i.
CSP can provide a slightly relaxed version of
the external-consistency guarantee in TT-based im-
plementation of Spanner. In case, when a transaction
T 1 commits (in absolute time) before another transac-
tion T 2 starts, it is still possible to have an overlap be-
tween the uncertainty intervals of T 1 and T 2. In case
T 1 and T 2 are causally-related then CSP will still give
the same guarantee as TT because T 2’s assigned HLC
timestamp will be bigger than T 1’s. Otherwise, CSP
will give a slightly relaxed guarantee and will only en-
sure that T 2’s assigned HLC commit timestamp will
not be smaller than T 1’s.
In nearby future, our main objective is to bring
general-purpose transactional protocol with CSP at its
core to Open-Source.
REFERENCES
(2014). Internet growth statistics. http://www.
internetworldstats.com/emarketing.htm. Ac-
cessed: 2015-03-30.
Allen, S. (2015). The future of leap seconds. http://www.
ucolick.org/
˜
sla/leapsecs/onlinebib.html.
Accessed: 2015-02-20.
Corbett, J. C., Dean, J., and Epstein, M. (2013). Spanner:
Googles globally distributed database. ACM Transac-
tions on Computer Systems, 31.
Cristian, F. and Fetzer, C. (1994). Probabilistic internal
clock synchronization. In Reliable Distributed Sys-
tems, 1994. Proceedings., 13th Symposium on, pages
22–31.
David Bermbach, J. K. (2013). Consistency in distributed
storage systems: An overview of models, metrics and
measurement approaches. In Proceedings of the Inter-
national Conference on Networked Systems (NETYS).
Fidge, C. (1988). Timestamps in message-passing sys-
tems that preserve the partial ordering. In Proceedings
of the 11th Australian Computer Science Conference
02/1988, pages 10:56–66.
Gilbert, S. (2012). Perspectives on the cap theorem. Com-
puter, 45:30–36.
Iwanicki, K., van Steen, M., and Voulgaris, S. (2006).
Gossip-based clock synchronization for large decen-
tralized systems. In Self-Managed Networks, Systems,
and Services. Second IEEE International Workshop,
SelfMan 2006, Dublin, Ireland, June 16, 2006. Pro-
ceedings, volume 3996, pages 28–42.
Kulkarni, S. S., Demirbas, M., Madeppa, D., Avva, B., and
Leone, M. (2014). Logical physical clocks and consis-
tent snapshots in globally distributed databases. In The
18th International Conference on Principles of Dis-
tributed Systems.
Lakshman, A. and Malik, P. (2010). Cassandra: a decen-
tralized structured storage system. ACM SIGOPS Op-
erating Systems Review, 44:35–40.
Lamport, L. (1978). Time, clocks, and the ordering of
events in a distributed system. Communications of the
ACM, 21:558–565.
Marzullo, K. and Owicki, S. (1983). Maintaining the time
in a distributed system. In PODC ’83 Proceedings of
the second annual ACM symposium on Principles of
distributed computing, pages 295–305.
Mills, D. L. (1995). Improved algorithms for synchronizing
computer network clocks. IEEE/ACM Transactions
on Networking (TON), 3:245–254.
Moon, S., Skelly, P., and Towsley, D. (1999). Estima-
tion and removal of clock skew from network delay
measurements. In INFOCOM ’99. Eighteenth Annual
Joint Conference of the IEEE Computer and Commu-
nications Societies. Proceedings. IEEE, volume 1.
Vogels, W. (2009). Eventually consistent. Communications
of the ACM - Rural engineering development, 52:40–
44.
Fifth International Symposium on Business Modeling and Software Design
252