skip to main content
research-article

Providing streaming joins as a service at Facebook

Published: 01 August 2018 Publication History

Abstract

Stream processing applications reduce the latency of batch data pipelines and enable engineers to quickly identify production issues. Many times, a service can log data to distinct streams, even if they relate to the same real-world event (e.g., a search on Facebook's search bar). Furthermore, the logging of related events can appear on the server side with different delay, causing one stream to be significantly behind the other in terms of logged event times for a given log entry. To be able to stitch this information together with low latency, we need to be able to join two different streams where each stream may have its own characteristics regarding the degree in which its data is out-of-order. Doing so in a streaming fashion is challenging as a join operator consumes lots of memory, especially with significant data volumes. This paper describes an end-to-end streaming join service that addresses the challenges above through a streaming join operator that uses an adaptive stream synchronization algorithm that is able to handle the different distributions we observe in real-world streams regarding their event times. This synchronization scheme paces the parsing of new data and reduces overall operator memory footprint while still providing high accuracy. We have integrated this into a streaming SQL system and have successfully reduced the latency of several batch pipelines using this approach.

References

[1]
Introducing AthenaX, Uber Engineerings Open Source Streaming Analytics Platform. https://eng.uber.com/athenax/, 2017.
[2]
Amazon Kinesis Data Analytics. https://docs.aws.amazon.com/kinesisanalytics/latest/dev, 2018.
[3]
Apache Calcite. https://calcite.apache.org/, 2018.
[4]
Introducing Stream-Stream Joins in Apache Spark 2.3. https://databricks.com/blog/2018/03/13/introducing-stream-stream-joins-in-apache-spark-2-3.html, 2018.
[5]
Presto. https://prestodb.io/, 2018.
[6]
RocksDB. https://github.com/facebook/rocksdb/, 2018.
[7]
Zstd. http://facebook.github.io/zstd/, 2018.
[8]
L. Abraham, J. Allen, O. Barykin, V. Borkar, B. Chopra, C. Gerea, D. Merl, J. Metzler, D. Reiss, S. Subramanian, J. L. Wiener, and O. Zed. Scuba: Diving into data at Facebook. PVLDB, 6(11):1057--1067, 2013.
[9]
T. Akidau, A. Balikov, K. Bekiroğlu, S. Chernyak, J. Haberman, R. Lax, S. McVeety, D. Mills, P. Nordstrom, and S. Whittle. MillWheel: Fault-tolerant stream processing at internet scale. PVLDB, 6(11):1033--1044, 2013.
[10]
T. Akidau, R. Bradshaw, C. Chambers, S. Chernyak, R. J. Fernández-Moctezuma, R. Lax, S. McVeety, D. Mills, F. Perry, E. Schmidt, and S. Whittle. The dataflow model: A practical approach to balancing correctness, latency, and cost in massive-scale, unbounded, out-of-order data processing. PVLDB, 8(12):1792--1803, 2015.
[11]
R. Ananthanarayanan, V. Basker, S. Das, A. Gupta, H. Jiang, T. Qiu, A. Reznichenko, D. Ryabkov, M. Singh, and S. Venkataraman. Photon: Fault-tolerant and scalable joining of continuous data streams. In SIGMOD, 2013.
[12]
M. Armbrust, T. Das, J. Torres, B. Yavuz, S. Zhu, R. Xin, A. Ghodsi, I. Stoica, and M. Zaharia. Structured Streaming: A Declarative API for Real-Time Applications in Apache Spark. In SIGMOD, 2018.
[13]
S. Babu, U. Srivastava, and J. Widom. Exploiting k-constraints to reduce memory overhead in continuous queries over data streams. ACM Trans. Database Syst., 29(3):545--580, Sept. 2004.
[14]
P. Carbone, S. Ewen, G. Fóra, S. Haridi, S. Richter, and K. Tzoumas. State management in Apache Flink: Consistent stateful distributed stream processing. PVLDB, 10(12):1718--1729, 2017.
[15]
G. J. Chen, J. L. Wiener, S. Iyer, A. Jaiswal, R. Lei, N. Simha, W. Wang, K. Wilfong, T. Williamson, and S. Yilmaz. Realtime data processing at Facebook. SIGMOD, 2016.
[16]
A. Das, J. Gehrke, and M. Riedewald. Approximate join processing over data streams. SIGMOD, 2003.
[17]
J. Dean and S. Ghemawat. MapReduce: Simplified data processing on large clusters. In OSDI, 2004.
[18]
L. Ding and E. A. Rundensteiner. Evaluating window joins over punctuated streams. CIKM, 2004.
[19]
B. Gedik, K.-L. Wu, P. S. Yu, and L. Liu. Adaptive load shedding for windowed stream joins. CIKM, 2005.
[20]
B. Gedik, P. S. Yu, and R. R. Bordawekar. Executing stream joins on the Cell processor. VLDB, 2007.
[21]
G. Graefe. Volcano - an extensible and parallel query evaluation system. IEEE Trans. on Knowl. and Data Eng., 6(1):120--135, Feb. 1994.
[22]
M. Hirzel, H. Andrade, B. Gedik, G. Jacques-Silva, R. Khandekar, V. Kumar, M. Mendell, H. Nasgaard, S. Schneider, R. Soulé, and K.-L. Wu. IBM Streams Processing Language: Analyzing big data in motion. IBM Journal of Research and Development, 57(3/4):7, 2013.
[23]
G. Jacques-Silva, F. Zheng, D. Debrunner, K.-L. Wu, V. Dogaru, E. Johnson, M. Spicer, and A. E. Sariyüce. Consistent regions: Guaranteed tuple processing in IBM Streams. PVLDB, 9(13):1341--1352, 2016.
[24]
J. Kang, J. F. Naughton, and S. D. Viglas. Evaluating window joins over unbounded streams. In ICDE, 2003.
[25]
T. Karnagel, D. Habich, B. Schlegel, and W. Lehner. The HELLS-join: A heterogeneous stream join for extremely large windows. DaMoN, 2013.
[26]
P. A. Larson and J. Zhou. Efficient maintenance of materialized outer-join views. In ICDE, pages 56--65, April 2007.
[27]
Q. Lin, B. C. Ooi, Z. Wang, and C. Yu. Scalable distributed stream join processing. SIGMOD, 2015.
[28]
A. Narayanan. Tupperware: Containerized deployment at Facebook. In DockerCon, 2014.
[29]
S. A. Noghabi, K. Paramasivam, Y. Pan, N. Ramesh, J. Bringhurst, I. Gupta, and R. H. Campbell. Samza: Stateful scalable stream processing at Linked In. PVLDB, 10(12):1634--1645, 2017.
[30]
C. Tang, T. Kooburat, P. Venkatachalam, A. Chander, Z. Wen, A. Narayanan, P. Dowell, and R. Karl. Holistic configuration management at Facebook. In SOSP, 2015.
[31]
J. Teubner and R. Mueller. How soccer players would do stream joins. SIGMOD, 2011.
[32]
A. Thusoo, J. S. Sarma, N. Jain, Z. Shao, P. Chakka, N. Zhang, S. Anthony, H. Liu, and R. Murthy. Hive -a petabyte scale data warehouse using hadoop. In ICDE, 2010.
[33]
S. Venkataraman, A. Panda, K. Ousterhout, M. Armbrust, A. Ghodsi, M. J. Franklin, B. Recht, and I. Stoica. Drizzle: Fast and adaptable stream processing at scale. In SOSP, 2017.
[34]
A. Wilschut and P. Apers. Dataflow query execution in a parallel main-memory environment. In PDIS, 1991.
[35]
J. Wu, K. L. Tan, and Y. Zhou. Window-oblivious join: A data-driven memory management scheme for stream join. In SSDBM, 2007.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the VLDB Endowment
Proceedings of the VLDB Endowment  Volume 11, Issue 12
August 2018
426 pages
ISSN:2150-8097
Issue’s Table of Contents

Publisher

VLDB Endowment

Publication History

Published: 01 August 2018
Published in PVLDB Volume 11, Issue 12

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)2
Reflects downloads up to 06 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media