Fast Concurrent Data Sketches

Data sketches are approximate succinct summaries of long data streams. They are widely used for processing massive amounts of data and answering statistical queries about it. Existing libraries producing sketches are very fast, but do not allow parallelism for creating sketches using multiple threads or querying them while they are being built. We present a generic approach to parallelising data sketches efficiently and allowing them to be queried in real time, while bounding the error that such parallelism introduces. Utilising relaxed semantics and the notion of strong linearisability we prove our algorithm's correctness and analyse the error it induces in two specific sketches. Our implementation achieves high scalability while keeping the error small. We have contributed one of our concurrent sketches to the open-source data sketches library.

[1]  Graham Cormode,et al.  Data Sketching , 2017, ACM Queue.

[2]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[3]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[4]  Bjarne Stroustrup Foundations of C++ , 2012, ESOP.

[5]  Idit Keidar,et al.  Fast concurrent data sketches , 2020, PPoPP.

[6]  Graham Cormode,et al.  Algorithms for distributed functional monitoring , 2008, SODA '08.

[7]  Peng Liu,et al.  Elastic sketch: adaptive and fast network-wide measurements , 2018, SIGCOMM.

[8]  Graham Cormode,et al.  Mergeable summaries , 2012, PODS '12.

[9]  Jeffrey Scott Vitter,et al.  Random sampling with a reservoir , 1985, TOMS.

[10]  Peter Sanders,et al.  MultiQueues: Simpler, Faster, and Better Relaxed Concurrent Priority Queues , 2014, ArXiv.

[11]  Edith Cohen,et al.  All-Distances Sketches, Revisited: HIP Estimators for Massive Graphs Analysis , 2013, IEEE Transactions on Knowledge and Data Engineering.

[12]  Wojciech M. Golab,et al.  Linearizable implementations do not suffice for randomized distributed computation , 2011, STOC '11.

[13]  Dan Alistarh,et al.  Distributionally Linearizable Data Structures , 2018, SPAA.

[14]  Vatsal Sharan,et al.  Sketching Linear Classifiers over Data Streams , 2017, SIGMOD Conference.

[15]  Nancy A. Lynch,et al.  Distributed Algorithms , 1992, Lecture Notes in Computer Science.

[16]  Alexander Hall,et al.  HyperLogLog in practice: algorithmic engineering of a state of the art cardinality estimation algorithm , 2013, EDBT '13.

[17]  Yehuda Afek,et al.  Quasi-Linearizability: Relaxed Consistency for Improved Concurrency , 2010, OPODIS.

[18]  Seif Haridi,et al.  Distributed Algorithms , 1992, Lecture Notes in Computer Science.

[19]  Hans-Juergen Boehm,et al.  Foundations of the C++ concurrency memory model , 2008, PLDI '08.

[20]  Ana Sokolova,et al.  Quantitative relaxation of concurrent data structures , 2013, POPL.

[21]  Dan Alistarh,et al.  The SprayList: a scalable relaxed priority queue , 2015, PPoPP.

[22]  Luca Trevisan,et al.  Counting Distinct Elements in a Data Stream , 2002, RANDOM.