skip to main content
research-article

Continuous sampling from distributed streams

Published:03 May 2012Publication History
Skip Abstract Section

Abstract

A fundamental problem in data management is to draw and maintain a sample of a large data set, for approximate query answering, selectivity estimation, and query planning. With large, streaming data sets, this problem becomes particularly difficult when the data is shared across multiple distributed sites. The main challenge is to ensure that a sample is drawn uniformly across the union of the data while minimizing the communication needed to run the protocol on the evolving data. At the same time, it is also necessary to make the protocol lightweight, by keeping the space and time costs low for each participant. In this article, we present communication-efficient protocols for continuously maintaining a sample (both with and without replacement) from k distributed streams. These apply to the case when we want a sample from the full streams, and to the sliding window cases of only the W most recent elements, or arrivals within the last w time units. We show that our protocols are optimal (up to logarithmic factors), not just in terms of the communication used, but also the time and space costs for each participant.

References

  1. Arackaparambil, C., Brody, J., and Chakrabarti, A. 2009. Functional monitoring without monotonicity. In Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Babcock, B., Datar, M., and Motwani, R. 2002. Sampling from a moving window over streaming data. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms. 633--634. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Babcock, B. and Olston, C. 2003. Distributed top-k monitoring. In Proceedings of the ACM SIGMOD International Conference on Management of Data. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Braverman, V., Ostrovsky, R., and Zaniolo, C. 2009. Optimal sampling from sliding windows. In Proceedings of the ACM Principles of Database Systems. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Chazelle, B. 2000. The Discrepancy Method. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cormode, G. and Garofalakis, M. 2005. Sketching streams through the net: Distributed approximate query tracking. In Proceedings of the International Conference on Very Large Data Bases. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Cormode, G., Garofalakis, M., Muthukrishnan, S., and Rastogi, R. 2005. Holistic aggregates in a networked world: Distributed tracking of approximate quantiles. In Proceedings of the ACM SIGMOD International Conference on Management of Data. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cormode, G., Muthukrishnan, S., and Yi, K. 2008. Algorithms for distributed, functional monitoring. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cormode, G., Muthukrishnan, S., and Zhuang, W. 2006. What's different: Distributed, continuous monitoring of duplicate resilient aggregates on data streams. In Proceedings of the IEEE International Conference on Data Engineering. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Duffield, N., Lund, C., and Thorup, M. 2003. Estimating flow distributions from sampled flow statistics. In Proceedings of ACM SIGCOMM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Efraimidis, P. S. and Spirakis, P. G. 2006. Weighted random sampling with a reservoir. Inf. Process. Lett. 97, 181--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Frahling, G., Indyk, P., and Sohler, C. 2005. Sampling in dynamic data streams and applications. In Proceedings of the Symposium on Computational Geometry. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Gemulla, R. and Lehner, W. 2008. Sampling time-based sliding windows in bounded space. In Proceedings of the ACM SIGMOD International Conference on Management of Data. 379--392. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Gemulla, R., Lehner, W., and Haas, P. J. 2007. Maintaining Bernoulli samples over evolving multisets. In Proceedings of the ACM Principles of Database Systems. 93--102. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Gemulla, R., Lehner, W., and Haas, P. J. 2008. Maintaining bounded-size sample synopses of evolving datasets. VLDB J. 17, 2, 173--202. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Gibbons, P. 2001. Distinct sampling for highly-accurate answers to distinct values queries and event reports. In Proceedings of the International Conference on Very Large Data Bases. 541--550. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gibbons, P. and Matias, Y. 1998. New sampling-based summary statistics for improving approximate query answers. In Proceedings of the ACM SIGMOD International Conference on Management of Data. 331--342. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Greenwald, M. and Khanna, S. 2001. Space-efficient online computation of quantile summaries. In Proceedings of the ACM SIGMOD International Conference on Management of Data. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Haussler, D. and Welzl, E. 1987. Epsilon-nets and simplex range queries. Disc. Computat. Geom. 2, 127--151.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Huang, L., Nguyen, X., Garofalakis, M., Hellerstein, J., Joseph, A. D., Jordan, M., and Taft, N. 2007. Communication-efficient online detection of network-wide anomalies. In Proceedings of the IEEE INFOCOMM.Google ScholarGoogle Scholar
  21. Keralapura, R., Cormode, G., and Ramamirtham, J. 2006. Communication-efficient distributed monitoring of thresholded counts. In Proceedings of the ACM SIGMOD International Conference on Management of Data. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Knuth, D. E. 1998. The Art of Computer Programming, Vol. 2, Seminumerical Algorithms 2nd Ed. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Manjhi, A., Shkapenyuk, V., Dhamdhere, K., and Olston, C. 2005. Finding (recently) frequent items in distributed data streams. In Proceedings of the IEEE International Conference on Data Engineering. 767--778. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Metwally, A., Agrawal, D., and Abbadi, A. E. 2006. An integrated efficient solution for computing frequent and top-k elements in data streams. ACM Trans. Datab. Syst. 31, 3, 1095--1133. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Muthukrishnan, S. 2003. Data streams: Algorithms and applications. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Muthukrishnan, S. 2009. Stochastic data streams. In Proceedings of the Symposium on Mathematical Foundations of Computer Science. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Olken, F. 1997. Random sampling from databases. Ph.D. thesis, Berkeley.Google ScholarGoogle Scholar
  28. Sharfman, I., Schuster, A., and Keren, D. 2006. A geometric approach to monitoring threshold functions over distributed data streams. In Proceedings of the ACM SIGMOD International Conference on Management of Data. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Sharfman, I., Schuster, A., and Keren, D. 2010. Shape sensitive geometric monitoring. In Proceedings of the Symposium on ACM Principles of Database Systems. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Vapnik, V. N. and Chervonenkis, A. Y. 1971. On the uniform convergence of relative frequencies of events to their probabilities. Theory Prob. Appl. 16, 264--280.Google ScholarGoogle ScholarCross RefCross Ref
  31. Vitter, J. S. 1985. Random sampling with a reservoir. ACM Trans. Math. Softw. 11, 1, 37--57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Yi, K. and Zhang, Q. 2009. Optimal tracking of distributed heavy hitters and quantiles. In Proceedings of the Symposium on ACM Principles of Database Systems. 167--174. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Continuous sampling from distributed streams

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Journal of the ACM
        Journal of the ACM  Volume 59, Issue 2
        April 2012
        175 pages
        ISSN:0004-5411
        EISSN:1557-735X
        DOI:10.1145/2160158
        Issue’s Table of Contents

        Copyright © 2012 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 3 May 2012
        • Accepted: 1 December 2011
        • Revised: 1 June 2011
        • Received: 1 October 2010
        Published in jacm Volume 59, Issue 2

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader