skip to main content
10.1145/3133850.3133855acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

The serverless trilemma: function composition for serverless computing

Published: 25 October 2017 Publication History

Abstract

The field of serverless computing has recently emerged in support of highly scalable, event-driven applications. A serverless application is a set of stateless functions, along with the events that should trigger their activation. A serverless runtime allocates resources as events arrive, avoiding the need for costly pre-allocated or dedicated hardware.
While an attractive economic proposition, serverless computing currently lags behind the state of the art when it comes to function composition. This paper addresses the challenge of programming a composition of functions, where the composition is itself a serverless function.
We demonstrate that engineering function composition into a serverless application is possible, but requires a careful evaluation of trade-offs. To help in evaluating these trade-offs, we identify three competing constraints: functions should be considered as black boxes; function composition should obey a substitution principle with respect to synchronous invocation; and invocations should not be double-billed.
Furthermore, we argue that, if the serverless runtime is limited to a reactive core, i.e. one that deals only with dispatching functions in response to events, then these constraints form the serverless trilemma. Without specific runtime support, compositions-as-functions must violate at least one of the three constraints.
Finally, we demonstrate an extension to the reactive core of an open-source serverless runtime that enables the sequential composition of functions in a trilemma-satisfying way. We conjecture that this technique could be generalized to support other combinations of functions.

References

[1]
Gul Agha. 1986. An Overview of Actor Languages. In Proceedings of the 1986 SIGPLAN Workshop on Object-oriented Programming (OOPWORK’86). ACM, New York, NY, 58–67.
[2]
Amazon. 2008. S3 Simple Storage Service. (2008). https://aws.amazon.com/ s3/
[3]
Amazon. 2016. AWS Step Functions. (2016). https://aws.amazon.com/ step-functions/
[4]
Cristiana Amza, Alan L Cox, and Willy Zwaenepoel. 2005. A comparative evaluation of transparent scaling techniques for dynamic content servers. In 21st International Conference on Data Engineering (ICDE’05). IEEE, 230– 241.
[5]
J Chris Anderson, Jan Lehnardt, and Noah Slater. 2010. CouchDB: the definitive guide. " O’Reilly Media, Inc.".
[6]
Apache 2016. OpenWhisk. (2016). https://github.com/openwhisk/ openwhisk
[7]
Engineer Bainomugisha, Andoni Lombide Carreton, Tom van Cutsem, Stijn Mostinckx, and Wolfgang de Meuter. 2013. A Survey on Reactive Programming. ACM Comput. Surv. 45, 4, Article 52 (Aug. 2013), 34 pages.
[8]
David Bernstein. 2014. Cloud foundry aims to become the OpenStack of PaaS. IEEE Cloud Computing 2, 1 (2014), 57–60.
[9]
Christopher D. Bienko, Marina Greenstein, Stephen E. Holt, and Richard T. Phillips. 2015. IBM Cloudant: Database as a Service Advanced Topics. IBM Redbooks.
[10]
Eric A. Brewer. 2015. Kubernetes and the Path to Cloud Native. In Proceedings of the Sixth ACM Symposium on Cloud Computing (SoCC ’15). ACM, New York, NY, USA, 167–167.
[11]
Ian Briggs, Matt Day, Eric Eide, Yuankai Guo, and Peter Marheine. 2015. Performance Evaluation of OSv for Server Applications. Technical Report. University of Utah.
[12]
Chris Bunch, Vaibhav Arora, Navraj Chohan, Chandra Krintz, Shashank Hegde, and Ankit Srivastava. 2012. A pluggable autoscaling service for open cloud PaaS systems. In Proceedings of the 2012 IEEE/ACM Fifth International Conference on Utility and Cloud Computing. IEEE Computer Society, 191–194.
[13]
Emmanuel Cecchet, Rahul Singh, Upendra Sharma, and Prashant Shenoy. 2011. Dolly: virtualization-driven database provisioning for the cloud. In ACM SIGPLAN Notices, Vol. 46. ACM, 51–62.
[14]
T. Cross. 2016. AWS Lambda: The Ultimate Guide to Serverless Microservices -Learn Everything You Need to Know about Microservices Without Servers! CreateSpace Independent Publishing Platform.
[15]
Alex Davies. 2012. Async in C# 5.0. " O’Reilly Media, Inc.".
[16]
Opher Etzion and Peter Niblett. 2010. Event Processing in Action. Manning Publications Co., Greenwich, CT.
[17]
Patrick Th. Eugster, Pascal A. Felber, Rachid Guerraoui, and Anne-Marie Kermarrec. 2003. The Many Faces of Publish/Subscribe. ACM Comput. Surv. 35, 2 (June 2003), 114–131.
[18]
Filippo Lorenzo Ferraris, Davide Franceschelli, Mario Pio Gioiosa, Donato Lucia, Danilo Ardagna, Elisabetta Di Nitto, and Tabassum Sharif. 2012. Evaluating the auto scaling performance of Flexiscale and Amazon EC2 clouds. In Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2012 14th International Symposium on. IEEE, 423–429.
[19]
Michael J Fischer, Nancy A Lynch, and Michael S Paterson. 1985. Impossibility of distributed consensus with one faulty process. Journal of the ACM (JACM) 32, 2 (1985), 374–382.
[20]
Pascal Fradet and Stéphane Hong Tuan Ha. 2004. Network fusion. In Asian Symposium on Programming Languages and Systems. Springer, 21–40.
[21]
Google 2016. Cloud Functions. (2016). https://cloud.google.com/functions/
[22]
Philipp Haller and Heather Miller. 2013. RAY: Integrating Rx and Async for direct-style reactive streams. In Workshop on Reactivity, Events and Modularity.
[23]
Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani, Andrea C. Arpaci-Dusseau, and Remzi H. ArpaciDusseau. 2016. Serverless Computation with OpenLambda. In 8th USENIX Workshop on Hot Topics in Cloud Computing, HotCloud 2016, Denver, CO, USA, June 20-21, 2016., Austin Clements and Tyson Condie (Eds.). USENIX Association.
[24]
John L. Hennessy and David A. Patterson. 2011. Computer Architecture, Fifth Edition: A Quantitative Approach (5th ed.). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
[25]
Benjamin Hindman, Andy Konwinski, Matei Zaharia, Ali Ghodsi, Anthony D Joseph, Randy H Katz, Scott Shenker, and Ion Stoica. 2011. Mesos: A Platform for Fine-Grained Resource Sharing in the Data Center. In NSDI, Vol. 11. 22–22.
[26]
IronIO. 2016. Iron Functions. (2016). https://github.com/iron-io/functions
[27]
Mohammad Islam, Angelo K Huang, Mohamed Battisha, Michelle Chiang, Santhosh Srinivasan, Craig Peters, Andreas Neumann, and Alejandro Abdelnur. 2012. Oozie: towards a scalable workflow management system for hadoop. In Proceedings of the 1st ACM SIGMOD Workshop on Scalable Workflow Execution Engines and Technologies. ACM, 4.
[28]
Jörn W. Janneck. 2003. Actors and their Composition. Formal Aspects of Computing 15, 4 (2003), 349–369.
[29]
Neil D Jones, Carsten K Gomard, and Peter Sestoft. 1993. Partial evaluation and automatic program generation.
[30]
Gilles Kahn. 1974. The semantics of a simple language for parallel programming. In Information processing, J. L. Rosenfeld (Ed.). North Holland, Amsterdam, Stockholm, Sweden, 471–475.
[31]
J. Kreps, N. Narkhede, and J. Rao. 2011. Kafka: A distributed messaging system for log processing. In Proceedings of 6th International Workshop on Networking Meets Databases (NetDB), Athens, Greece.
[32]
Sheng Liang, Paul Hudak, and Mark Jones. 1995. Monad transformers and modular interpreters. In Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages. ACM, 333–343.
[33]
Bin Lin, Alexey Zagalsky, Margaret-Anne Storey, and Alexander Serebrenik. 2016. Why Developers Are Slacking Off: Understanding How Software Teams Use Slack. In Proceedings of the 19th ACM Conference on Computer Supported Cooperative Work and Social Computing Companion. ACM, 333–336.
[34]
Barbara H. Liskov and Jeannette M. Wing. 1994. A Behavioral Notion of Subtyping. ACM Trans. Program. Lang. Syst. 16, 6 (Nov. 1994), 1811–1841.
[35]
Anil Madhavapeddy, Richard Mortier, Charalampos Rotsos, David Scott, Balraj Singh, Thomas Gazagnaire, Steven Smith, Steven Hand, and Jon Crowcroft. 2013. Unikernels: Library operating systems for the cloud. ACM SIGPLAN Notices 48, 4 (2013), 461–472.
[36]
Ming Mao, Jie Li, and Marty Humphrey. 2010. Cloud auto-scaling with deadline and budget constraints. In 2010 11th IEEE/ACM International Conference on Grid Computing. IEEE, 41–48.
[37]
Dirk Merkel. 2014. Docker: Lightweight Linux Containers for Consistent Development and Deployment. Linux J. 2014, 239, Article 2 (March 2014).
[38]
Mathias Meyer. 2014. Continuous integration and its tools. IEEE software 31, 3 (2014), 14–16.
[39]
Microsoft. 2016. Azure Functions. (2016). https://functions.azure.com/
[40]
Neil Middleton, Richard Schneeman, and others. 2013. Heroku: Up and Running. O’Reilly Media, Inc.
[41]
Lee Momtahan, Andrew Martin, and A. W. Roscoe. 2006. A Taxonomy of Web Services Using CSP. Electron. Notes Theor. Comput. Sci. 151, 2 (May 2006), 71–87.
[42]
Oscar Nierstrasz and Theo Dirk Meijler. 1995. Requirements for a composition language. Springer Berlin Heidelberg, Berlin, Heidelberg, 147–161.
[43]
Martin Odersky, Philippe Altherr, Vincent Cremet, Burak Emir, Stphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, and Matthias Zenger. 2004. The Scala language specification. (2004).
[44]
Semih Okur, David L Hartveld, Danny Dig, and Arie van Deursen. 2014. A study and toolkit for asynchronous programming in C. In Proceedings of the 36th International Conference on Software Engineering. ACM, 1117– 1127.
[45]
Norman W. Paton and Oscar Díaz. 1999. Active Database Systems. ACM Comput. Surv. 31, 1 (1999), 63–103.
[46]
Baishakhi Ray, Daryl Posnett, Vladimir Filkov, and Premkumar Devanbu. 2014. A large scale study of programming languages and code quality in github. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 155–165.
[47]
Will Reese. 2008. Nginx: The High-performance Web Server and Reverse Proxy. Linux J. 2008, 173, Article 2 (Sept. 2008).
[48]
Donald Robinson. 2008. Amazon Web Services Made Simple: Learn how Amazon EC2, S3, SimpleDB and SQS Web Services enables you to reach business goals faster. Emereo Pty Ltd.
[49]
Dan Sanderson. 2009. Programming Google App Engine: build and run scalable web apps on google’s infrastructure. O’Reilly Media, Inc.
[50]
Ion Stoica. 2004. Stateless Core: A Scalable Approach for Quality of Service in the Internet: Winning Thesis of the 2001 ACM Doctoral Dissertation Competition. Vol. 2979. Springer.
[51]
Anthony Velte and Toby Velte. 2010. Microsoft Virtualization with Hyper-V (1 ed.). McGraw-Hill, Inc., New York, NY, USA.
[52]
Anthony T Velte, Toby J Velte, Robert C Elsenpeter, and Robert C Elsenpeter. 2010. Cloud computing: a practical approach. McGraw-Hill New York.
[53]
Philip Wadler. 1990. Comprehending Monads. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming (LFP ’90). ACM, New York, NY, USA, 61–78.
[54]
Zhanyong Wan and Paul Hudak. 2000. Functional reactive programming from first principles. In Acm sigplan notices, Vol. 35. ACM, 242–252.
[55]
Jia Yu, Rajkumar Buyya, and Kotagiri Ramamohanarao. 2008. Workflow scheduling algorithms for grid computing. Metaheuristics for scheduling in distributed computing environments (2008), 173–214.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Onward! 2017: Proceedings of the 2017 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software
October 2017
261 pages
ISBN:9781450355308
DOI:10.1145/3133850
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]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 October 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. cloud
  2. composition
  3. functional
  4. serverless

Qualifiers

  • Research-article

Conference

SPLASH '17
Sponsor:

Acceptance Rates

Overall Acceptance Rate 40 of 105 submissions, 38%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)201
  • Downloads (Last 6 weeks)28
Reflects downloads up to 23 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

Login options

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