Your server as a function

Building server software in a large-scale setting, where systems exhibit a high degree of concurrency and environmental variability, is a challenging task to even the most experienced programmer. Efficiency, safety, and robustness are paramount-goals which have traditionally conflicted with modularity, reusability, and flexibility. We describe three abstractions which combine to present a powerful programming model for building safe, modular, and efficient server software: Composable futures are used to relate concurrent, asynchronous actions; services and filters are specialized functions used for the modular composition of our complex server software. Finally, we discuss our experiences using these abstractions and techniques throughout Twitter's serving infrastructure.

[1]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[2]  Luiz André Barroso,et al.  The tail at scale , 2013, CACM.

[3]  Keshav Pingali,et al.  I-structures: data structures for parallel computing , 1986, Graph Reduction.

[4]  Martin Odersky,et al.  An Overview of the Scala Programming Language , 2004 .

[5]  Dennis Ritchie,et al.  The UNIX system: The evolution of the UNIX time-sharing system , 1979, AT&T Bell Laboratories Technical Journal.

[6]  Sébastien Doeraene,et al.  A new concurrency model for Scala based on a declarative dataflow core , 2013, SCALA@ECOOP.

[7]  David R. Karger,et al.  Consistent hashing and random trees: distributed caching protocols for relieving hot spots on the World Wide Web , 1997, STOC '97.

[8]  Gert Smolka The Oz Programming Model , 1996 .

[9]  Peter Van Roy,et al.  Concepts, Techniques, and Models of Computer Programming , 2004 .

[10]  Jérôme Vouillon,et al.  Lwt: a cooperative thread library , 2008, ML '08.

[11]  David R. Hanson Fast allocation and deallocation of memory based on object lifetimes , 1990, Softw. Pract. Exp..

[12]  Donald Beaver,et al.  Dapper, a Large-Scale Distributed Systems Tracing Infrastructure , 2010 .

[13]  Brad Fitzpatrick,et al.  Distributed caching with memcached , 2004 .

[14]  Robert Griesemer,et al.  Paxos made live: an engineering perspective , 2007, PODC '07.

[15]  G. O'Leary,et al.  A block diagram compiler for a digital signal processing MIMD computer , 1987, ICASSP '87. IEEE International Conference on Acoustics, Speech, and Signal Processing.

[16]  Jimmy J. Lin,et al.  Earlybird: Real-Time Search at Twitter , 2012, 2012 IEEE 28th International Conference on Data Engineering.