No More, No Less

A Formal Model for Serverless Computing
  • Maurizio Gabbrielli
  • Saverio GiallorenzoEmail author
  • Ivan Lanese
  • Fabrizio Montesi
  • Marco Peressotti
  • Stefano Pio Zingaro
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11533)


Serverless computing, also known as Functions-as-a-Service, is a recent paradigm aimed at simplifying the programming of cloud applications. The idea is that developers design applications in terms of functions, which are then deployed on a cloud infrastructure. The infrastructure takes care of executing the functions whenever requested by remote clients, dealing automatically with distribution and scaling with respect to inbound traffic.

While vendors already support a variety of programming languages for serverless computing (e.g. Go, Java, Javascript, Python), as far as we know there is no reference model yet to formally reason on this paradigm. In this paper, we propose the first core formal programming model for serverless computing, which combines ideas from both the \(\lambda \)-calculus (for functions) and the \(\pi \)-calculus (for communication). To illustrate our proposal, we model a real-world serverless system. Thanks to our model, we capture limitations of current vendors and formalise possible amendments.



This work was partially supported by the Independent Research Fund Denmark, grant no. DFF-7014-00041.


  1. 1.
    Williams, A.: Tailor - the AWS Account Provisioning Service. Accessed Feb 2019
  2. 2.
    Ancona, D., et al.: Behavioral types in programming languages. Found. Trends Program. Lang. 3(2–3), 95–230 (2016)CrossRefGoogle Scholar
  3. 3.
    Apache: OpenWhisk. Accessed Feb 2019
  4. 4.
    AWS: Lambda. Accessed Feb 2019
  5. 5.
    Baker Jr., H.C., Hewitt, C.: The incremental garbage collection of processes. ACM Sigplan Not. 12(8), 55–59 (1977)CrossRefGoogle Scholar
  6. 6.
    Baldini, I., et al.: Serverless computing: current trends and open problems. In: Chaudhary, S., Somani, G., Buyya, R. (eds.) Research Advances in Cloud Computing, pp. 1–20. Springer, Singapore (2017). Scholar
  7. 7.
    Brengos, T., Peressotti, M.: A uniform framework for timed automata. In: CONCUR. LIPIcs, vol. 59, pp. 26:1–26:15. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2016)Google Scholar
  8. 8.
    Brengos, T., Peressotti, M.: Behavioural equivalences for timed systems. Log. Methods Comput. Sci. 15(1), 17:1–17:41 (2019)MathSciNetzbMATHGoogle Scholar
  9. 9.
    Carbone, M., Montesi, F.: Deadlock-freedom-by-design: multiparty asynchronous global programming. In: POPL, pp. 263–274. ACM (2013)CrossRefGoogle Scholar
  10. 10.
    Cruz-Filipe, L., Montesi, F.: A core model for choreographic programming. In: Kouchnarenko, O., Khosravi, R. (eds.) FACS 2016. LNCS, vol. 10231, pp. 17–35. Springer, Cham (2017). Scholar
  11. 11.
    Dalla Preda, M., et al.: Dynamic choreographies: theory and implementation. Log. Methods Comput. Sci. 13(2), 1–57 (2017)MathSciNetzbMATHGoogle Scholar
  12. 12.
    Dragoni, N., et al.: Microservices: yesterday, today, and tomorrow. Present and Ulterior Software Engineering, pp. 195–216. Springer, Cham (2017). Scholar
  13. 13.
    Ecmascript 2018 language specification. Accessed Feb 2019
  14. 14.
    Giallorenzo, S., Montesi, F., Gabbrielli, M.: Applied choreographies. In: Baier, C., Caires, L. (eds.) FORTE 2018. LNCS, vol. 10854, pp. 21–40. Springer, Cham (2018). Scholar
  15. 15.
    Goetz, B., et al.: Java Concurrency in Practice. Pearson Education, London (2006)Google Scholar
  16. 16.
    Google: Cloud Functions. Accessed Feb 2019
  17. 17.
    Halstead Jr., R.H.: Multilisp: a language for concurrent symbolic computation. ACM Trans. Program. Languages Syst. (TOPLAS) 7(4), 501–538 (1985)CrossRefGoogle Scholar
  18. 18.
    Hellerstein, J.M., et al.: Serverless computing: one step forward, two steps back. In: CIDR (2019).
  19. 19.
    Hendrickson, S., et al.: Serverless computation with OpenLambda. In: USENIX. USENIX Association (2016)Google Scholar
  20. 20.
    Hüttel, H., et al.: Foundations of session types and behavioural contracts. ACM Comput. Surv. 49(1), 3:1–3:36 (2016)CrossRefGoogle Scholar
  21. 21.
    IBM: Cloud Functions. Accessed Feb 2019
  22. 22. IronFunctions. Accessed Feb 2019
  23. 23.
    Jangda, A., et al.: Formal foundations of serverless computing. CoRR abs/1902.05870 (2019). arXiv:1902.05870
  24. 24.
    Jonas, E., et al.: Cloud programming simplified: a berkeley view on serverless computing. Technical report, EECS Department, University of California, Berkeley, Feburary 2019Google Scholar
  25. 25.
    K-Optional Software: serverless out of Control. Accessed Feb 2019
  26. 26.
    Kavantzas, N., Burdett, D., Ritzinger, G., Lafon, Y.: Web services choreography description language version 1.0, W3C candidate recommendation. Technical report, W3C (2005).
  27. 27.
    Kevin Vandenborne: serverless: a lesson learned. The hard way. Accessed Feb 2019
  28. 28.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979)CrossRefGoogle Scholar
  29. 29.
    Microsoft: Azure Functions. Accessed Feb 2019
  30. 30.
    Milner, R. (ed.): A Calculus of Communicating Systems. LNCS, vol. 92. Springer, Heidelberg (1980). Scholar
  31. 31.
    Montesi, F.: Kickstarting choreographic programming. In: Hildebrandt, T., Ravara, A., van der Werf, J.M., Weidlich, M. (eds.) WS-FM 2014-2015. LNCS, vol. 9421, pp. 3–10. Springer, Cham (2016). Scholar
  32. 32.
    Niehren, J., Schwinghammer, J., Smolka, G.: A concurrent lambda calculus with futures. Theor. Comput. Sci. 364(3), 338–356 (2006)MathSciNetCrossRefGoogle Scholar
  33. 33.
    Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26(4), 631–653 (1979)MathSciNetCrossRefGoogle Scholar
  34. 34.
    Sangiorgi, D., Walker, D.: The Pi-Calculus - A Theory of Mobile Processes. Cambridge University Press, Cambridge (2001)zbMATHGoogle Scholar
  35. 35.
    Summerfield, M.: Python in Practice: Create Better Programs Using Concurrency, Libraries, and Patterns. Addison-Wesley, Reading (2013)Google Scholar
  36. 36.
    Wright, T.: Beware “RunOnStartup” in Azure Functions – a serverless horror story. Accessed Feb 2019
  37. 37.
    Williams, A.: C++ Concurrency in Action. Manning, New York (2017)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2019

Authors and Affiliations

  • Maurizio Gabbrielli
    • 1
    • 2
  • Saverio Giallorenzo
    • 3
    Email author
  • Ivan Lanese
    • 1
    • 2
  • Fabrizio Montesi
    • 3
  • Marco Peressotti
    • 3
  • Stefano Pio Zingaro
    • 1
    • 2
  1. 1.InriaSophia Antipolis CedexFrance
  2. 2.Università di BolognaBolognaItaly
  3. 3.University of Southern DenmarkOdenseDenmark

Personalised recommendations