SlideShare a Scribd company logo
FaaS You Like It
(If Shakespeare had written
Functions as a Service)
“All the world’s a stage, And all the men and women
merely players; They have their exits and their entrances,
And one man in his time plays many parts…”
Cast
Cloud Architect - Ewan Slater
Agenda
1. What is FaaS (or “Serverless”)
2. The Fn Project
3. FDKs
4. As you like it - performed by Fn functions, written in Ruby & Java
Synopsis
“As You Like It subverts the traditional rules of romance.
Gender roles, nature and politics are confused in a play that
reflects on how bewildering yet utterly pleasurable life can
be.”
- Royal Shakespeare Company
Bewilderment:
Why dost thy Serverless Architecture have
so many servers?
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Soliloquy
<Grumpy-Old-Man-Moment>
There are only two hard things in Computer
Science: cache invalidation and naming
things.
- Phil Karlton
I don’t like “Serverless” as a name
● Hidden Servers
● Transient Servers
● Abstracted Infrastructure
● Anything really
"For everyone's sake, someone
please come up with a better
name than serverless”
- Simon Wardley
</Grumpy-Old-Man-Moment>
Suspension of Disbelief
“The Play’s the thing…”
Actor learns own part
● Cues (input)
● Lines (output)
● Stage Directions (state)
Actor ⇒ Function
Single responsibility
Audience care about action
Not what happens backstage
Business doesn’t care about
infrastructure
FaaS: action not infrastructure
Increase developer
Productivity
by adding another layer of
Abstraction
(a recurring theme)
FaaS
● Write small functions
● Do one thing well
● Easy to Understand
● Easy to Maintain
● Run on Abstracted Infrastructure (“Serverless”) platform
Avoid
What is “Serverless”?
● Serverless is an abstraction of infrastructure and its operations including
provisioning, scaling, patching, etc.
● Serverless architecture is when an app is built entirely on serverless
components (compute, storage, networking)
● Function as a Service (FaaS) is the compute component in a serverless
architecture
For a fuller discussion...
Mike Roberts article on MartinFowler.com
https://martinfowler.com/articles/serverless.html
“Fundamentally, FaaS is about running backend code without managing
your own server systems or your own long-lived server applications.”
From Microservices to Functions
Granularity
Scale
Time
PaaS vs FaaS
● Granularity, Scale & Time
○ Paas (or IaaS) ⇒ (Micro)Service, long - running
○ FaaS ⇒ Function, invoked on demand
If your PaaS can efficiently start instances in 20ms that run for half a
second, then call it serverless.
- Adrian Cockcroft
Functions != Functional
● Functions can have side effects
● Functions don’t have to be idempotent
FaaS Upsides
● Make development easier
● Improve developer productivity
● Increased agility (Dev & Business)
● Reduce costs (Dev & Operations)
FaaS Downsides
● “ball of mud”
● Lock - in
● Restricted choice
○ Language
○ Run - time environment
Language Support
● AWS
○ Node, Python, Java, C#, Go
● Google
○ Node
● Azure
○ C#, JavaScript, F#, (Java - preview)
“Gadzooks! No Ruby?”
(Or Erlang, or Rust, or FORTRAN etc.)
Choice:
Write your functions in any language.
Run them in any environment.
Fn Project:
Write your functions in any language*.
Run them in any environment*.
*Supports / supported by Docker
Fn Project ( fnproject.io )
● Open-source serverless compute platform
● Can be deployed to any cloud or on-premises
● Containers are primitives
● Active w/ 2500+ commits across 50+ contributors
● Independently governed with representation at CNCF
● support for the upcoming CloudEvents specification
○ (CNCF Serverless working group )
● integration with the Serverless Framework toolkit
Functions as Containers
● Function and dependencies
● Single - purpose
● Self - Contained
● Stateless
● Ephemeral
● Run on Demand
An Fn Function
● Small chunk of code wrapped into container
● Input from STDIN & Environment
● Output to STDOUT
● Logs to STDERR
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Fn deploy details
● Bump version in func.yaml
● Build container (multi stage)
● Push container to registry
● Create / Update function route
MyFunc:0.0.2
MyFunc:0.0.2 MyFunc:0.0.2
Your code
Fn Service
myfunc →
/r/myapp/myfunc:0.0.2
1 2 3
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Fn Server
● “API Gateway”
● Manages apps and functions
○ (app ⇒ group of functions)
● Synchronous function calls
○ Executed immediately
● Asynchronous function calls
○ Queued and executed when capacity available
● Runs as a Container
● Hosts function containers using Docker - in - Docker
Docker in Docker
● Limited “blast radius”
○ Doesn’t affect outer VM
○ Kill Fn container & restart
● Docker version independence
○ (inner can differ from outer)
● Reduce chance of container name collisions
Architecture
Hot and Cold
● Cold Functions
○ Run once only
○ Terminate immediately
○ New container every invocation
● Hot Functions
○ Run at least once
○ Wait before terminating
○ Potentially reusable
Synchronous Request
Asynchronous Request
Function Development Kits (FDKs)
● Developer writes a handler function to the FDKs interface
● FDK
○ Parses STDIN
○ Provides input data to function
○ Handles writing output and errors
○ Manages multiple invocations
● Makes it a lot easier to write hot functions
FDKs
● Ruby ( https://github.com/fnproject/fdk-ruby )
● Others
○ Python
○ Go
○ Java
○ Node
○ Rust
○ ...more on the way...
Without an FDK
● Dockerfile
● func.yaml
● func.* (e.g. func.sh)
● DIY
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Orchestration
Flow
● Promises based Orchestration
○ No new “special” language
○ Composable
○ Flexible
○ Supports “Saga Pattern”
● A Flow is...
○ ...written in Code
○ ...written as Function
○ ...deployed as a function (within an application)
Flow
● Language Support:
○ Java
○ Python
○ Node
● In the works:
○ Go
● To - do:
○ Ruby
As You Like It
bitbucket.org/ewan_slater/comedy/src/master/
Summary
● FaaS ⇒ Greater developer productivity
● Fn Project ⇒ FaaS Framework
○ Open Source
○ Portable
○ Language Agnostic
○ Multiple FDKs
● Feedback and contributions welcome!
Links & Contact
● Fn Project ( fnproject.io )
○ github.com/fnproject
○ Slack
● Twitter
○ Fn Project: @fnproj
○ Me: @ewanslater
Proceed, proceed: we will begin these rites,
As we do trust they'll end, in true delights.
(all exit to the pub)

More Related Content

PDF
Dockersh and a brief intro to the docker internals
ODP
Beyond Xen: A look into the Xen Cloud Platform
PDF
Building GUI App with Electron and Lisp
PDF
Writing a fast HTTP parser
PDF
Woo: Writing a fast web server @ ELS2015
ODP
AGES Presentation on Web, Python, Django and GeoServer
KEY
About Clack
PPTX
fsharp goodness for everyday work
Dockersh and a brief intro to the docker internals
Beyond Xen: A look into the Xen Cloud Platform
Building GUI App with Electron and Lisp
Writing a fast HTTP parser
Woo: Writing a fast web server @ ELS2015
AGES Presentation on Web, Python, Django and GeoServer
About Clack
fsharp goodness for everyday work

What's hot (20)

ODP
Developing high-performance network servers in Lisp
ODP
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
PPTX
Lisp in the Cloud
PDF
Jslab rssh: JS as language platform
PPT
Ruby eventmachine pres at rubybdx
PDF
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
PPTX
Git introduction
PPT
Initiation à Ruby on Rails
PDF
GeoDistributed datacenter: the DNS way
PDF
My talk at Linux Piter 2015
PDF
Taming Pythons with ZooKeeper (Pyconfi edition)
PDF
fluent-plugin-beats at Elasticsearch meetup #14
PDF
4Developers 2015: Scaling LAMP doesn't have to suck - Sebastian Grodzicki
PPTX
Run C++ as serverless with GCP Cloud Functions
PPT
Openshift GeoSpatial Capabilities
ODP
Docker and stuff
PPTX
HTTP::Parser::XS - writing a fast & secure XS module
PDF
Dockerizing Rails
PDF
Ruby in office time reboot
Developing high-performance network servers in Lisp
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
Lisp in the Cloud
Jslab rssh: JS as language platform
Ruby eventmachine pres at rubybdx
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
Git introduction
Initiation à Ruby on Rails
GeoDistributed datacenter: the DNS way
My talk at Linux Piter 2015
Taming Pythons with ZooKeeper (Pyconfi edition)
fluent-plugin-beats at Elasticsearch meetup #14
4Developers 2015: Scaling LAMP doesn't have to suck - Sebastian Grodzicki
Run C++ as serverless with GCP Cloud Functions
Openshift GeoSpatial Capabilities
Docker and stuff
HTTP::Parser::XS - writing a fast & secure XS module
Dockerizing Rails
Ruby in office time reboot
Ad

Similar to FaaS you like it (if Shakespeare had written Functions-as-a-Service) (20)

PDF
A Gentle Introduction to Docker and Containers
PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
PDF
Erlang - Concurrent Language for Concurrent World
PDF
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
PDF
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
PDF
FITC - Node.js 101
PDF
Free the Functions with Fn project!
PDF
Docker for local development
PPTX
Realtime web2012
PDF
Let's Containerize New York with Docker!
PDF
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
PDF
The Obsoletion of the OS
PDF
Improving Development and Deployment with Docker
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
PDF
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
PDF
Introduction to Docker, December 2014 "Tour de France" Edition
PDF
LXC, Docker, and the future of software delivery | LinuxCon 2013
PDF
LXC Docker and the Future of Software Delivery
A Gentle Introduction to Docker and Containers
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Docker 0.11 at MaxCDN meetup in Los Angeles
Erlang - Concurrent Language for Concurrent World
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
FITC - Node.js 101
Free the Functions with Fn project!
Docker for local development
Realtime web2012
Let's Containerize New York with Docker!
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
The Obsoletion of the OS
Improving Development and Deployment with Docker
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Introduction to Docker, December 2014 "Tour de France" Edition
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC Docker and the Future of Software Delivery
Ad

Recently uploaded (20)

PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Cost to Outsource Software Development in 2025
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
AutoCAD Professional Crack 2025 With License Key
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
assetexplorer- product-overview - presentation
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Digital Systems & Binary Numbers (comprehensive )
Autodesk AutoCAD Crack Free Download 2025
17 Powerful Integrations Your Next-Gen MLM Software Needs
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
wealthsignaloriginal-com-DS-text-... (1).pdf
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Computer Software and OS of computer science of grade 11.pptx
Advanced SystemCare Ultimate Crack + Portable (2025)
Cost to Outsource Software Development in 2025
iTop VPN Free 5.6.0.5262 Crack latest version 2025
AutoCAD Professional Crack 2025 With License Key
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Oracle Fusion HCM Cloud Demo for Beginners
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
assetexplorer- product-overview - presentation
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps

FaaS you like it (if Shakespeare had written Functions-as-a-Service)

  • 1. FaaS You Like It (If Shakespeare had written Functions as a Service)
  • 2. “All the world’s a stage, And all the men and women merely players; They have their exits and their entrances, And one man in his time plays many parts…”
  • 4. Agenda 1. What is FaaS (or “Serverless”) 2. The Fn Project 3. FDKs 4. As you like it - performed by Fn functions, written in Ruby & Java
  • 5. Synopsis “As You Like It subverts the traditional rules of romance. Gender roles, nature and politics are confused in a play that reflects on how bewildering yet utterly pleasurable life can be.” - Royal Shakespeare Company
  • 6. Bewilderment: Why dost thy Serverless Architecture have so many servers?
  • 9. There are only two hard things in Computer Science: cache invalidation and naming things. - Phil Karlton
  • 10. I don’t like “Serverless” as a name ● Hidden Servers ● Transient Servers ● Abstracted Infrastructure ● Anything really
  • 11. "For everyone's sake, someone please come up with a better name than serverless” - Simon Wardley
  • 14. “The Play’s the thing…”
  • 15. Actor learns own part ● Cues (input) ● Lines (output) ● Stage Directions (state)
  • 19. Not what happens backstage
  • 20. Business doesn’t care about infrastructure
  • 21. FaaS: action not infrastructure
  • 22. Increase developer Productivity by adding another layer of Abstraction
  • 24. FaaS ● Write small functions ● Do one thing well ● Easy to Understand ● Easy to Maintain ● Run on Abstracted Infrastructure (“Serverless”) platform
  • 25. Avoid
  • 26. What is “Serverless”? ● Serverless is an abstraction of infrastructure and its operations including provisioning, scaling, patching, etc. ● Serverless architecture is when an app is built entirely on serverless components (compute, storage, networking) ● Function as a Service (FaaS) is the compute component in a serverless architecture
  • 27. For a fuller discussion... Mike Roberts article on MartinFowler.com https://martinfowler.com/articles/serverless.html “Fundamentally, FaaS is about running backend code without managing your own server systems or your own long-lived server applications.”
  • 30. Scale
  • 31. Time
  • 32. PaaS vs FaaS ● Granularity, Scale & Time ○ Paas (or IaaS) ⇒ (Micro)Service, long - running ○ FaaS ⇒ Function, invoked on demand If your PaaS can efficiently start instances in 20ms that run for half a second, then call it serverless. - Adrian Cockcroft
  • 33. Functions != Functional ● Functions can have side effects ● Functions don’t have to be idempotent
  • 34. FaaS Upsides ● Make development easier ● Improve developer productivity ● Increased agility (Dev & Business) ● Reduce costs (Dev & Operations)
  • 35. FaaS Downsides ● “ball of mud” ● Lock - in ● Restricted choice ○ Language ○ Run - time environment
  • 36. Language Support ● AWS ○ Node, Python, Java, C#, Go ● Google ○ Node ● Azure ○ C#, JavaScript, F#, (Java - preview)
  • 38. (Or Erlang, or Rust, or FORTRAN etc.)
  • 39. Choice: Write your functions in any language. Run them in any environment.
  • 40. Fn Project: Write your functions in any language*. Run them in any environment*. *Supports / supported by Docker
  • 41. Fn Project ( fnproject.io ) ● Open-source serverless compute platform ● Can be deployed to any cloud or on-premises ● Containers are primitives ● Active w/ 2500+ commits across 50+ contributors ● Independently governed with representation at CNCF ● support for the upcoming CloudEvents specification ○ (CNCF Serverless working group ) ● integration with the Serverless Framework toolkit
  • 42. Functions as Containers ● Function and dependencies ● Single - purpose ● Self - Contained ● Stateless ● Ephemeral ● Run on Demand
  • 43. An Fn Function ● Small chunk of code wrapped into container ● Input from STDIN & Environment ● Output to STDOUT ● Logs to STDERR
  • 52. Fn deploy details ● Bump version in func.yaml ● Build container (multi stage) ● Push container to registry ● Create / Update function route MyFunc:0.0.2 MyFunc:0.0.2 MyFunc:0.0.2 Your code Fn Service myfunc → /r/myapp/myfunc:0.0.2 1 2 3
  • 54. Fn Server ● “API Gateway” ● Manages apps and functions ○ (app ⇒ group of functions) ● Synchronous function calls ○ Executed immediately ● Asynchronous function calls ○ Queued and executed when capacity available ● Runs as a Container ● Hosts function containers using Docker - in - Docker
  • 55. Docker in Docker ● Limited “blast radius” ○ Doesn’t affect outer VM ○ Kill Fn container & restart ● Docker version independence ○ (inner can differ from outer) ● Reduce chance of container name collisions
  • 57. Hot and Cold ● Cold Functions ○ Run once only ○ Terminate immediately ○ New container every invocation ● Hot Functions ○ Run at least once ○ Wait before terminating ○ Potentially reusable
  • 60. Function Development Kits (FDKs) ● Developer writes a handler function to the FDKs interface ● FDK ○ Parses STDIN ○ Provides input data to function ○ Handles writing output and errors ○ Manages multiple invocations ● Makes it a lot easier to write hot functions
  • 61. FDKs ● Ruby ( https://github.com/fnproject/fdk-ruby ) ● Others ○ Python ○ Go ○ Java ○ Node ○ Rust ○ ...more on the way...
  • 62. Without an FDK ● Dockerfile ● func.yaml ● func.* (e.g. func.sh) ● DIY
  • 65. Flow ● Promises based Orchestration ○ No new “special” language ○ Composable ○ Flexible ○ Supports “Saga Pattern” ● A Flow is... ○ ...written in Code ○ ...written as Function ○ ...deployed as a function (within an application)
  • 66. Flow ● Language Support: ○ Java ○ Python ○ Node ● In the works: ○ Go ● To - do: ○ Ruby
  • 67. As You Like It bitbucket.org/ewan_slater/comedy/src/master/
  • 68. Summary ● FaaS ⇒ Greater developer productivity ● Fn Project ⇒ FaaS Framework ○ Open Source ○ Portable ○ Language Agnostic ○ Multiple FDKs ● Feedback and contributions welcome!
  • 69. Links & Contact ● Fn Project ( fnproject.io ) ○ github.com/fnproject ○ Slack ● Twitter ○ Fn Project: @fnproj ○ Me: @ewanslater
  • 70. Proceed, proceed: we will begin these rites, As we do trust they'll end, in true delights. (all exit to the pub)