The Fn Project
Lessons learnt with Serverless
Maximilian Jerg
Open Source Serverless Computing
Agenda
● Serverless
● Lessons learnt
● Fn project
● Live Demo
Serverless
What is Serverless?
● Serverless focuses on applications not infrastructure
● Managed service of infrastructure and its operations including
provisioning, scaling, dynamic allocation of resources,
patching, etc.
● Server management and capacity planning decisions are
completely hidden
● Pricing is based on the resources consumed
Functions-as-a-Service
● Functions are small bits of code that do one thing well and are
easy to understand and maintain
● Stateless since there is typically no shared-memory
In mathematics, a function is a relation between a set
of inputs and a set of permissible outputs with the
property that each input is related to exactly one output.
Function (mathematics) - Wikipedia
https://en.wikipedia.org/wiki/Function_(mathematics)
Why Serverless?
● Easier: Just think about your code, not infrastructure
● Powerful: Transparent and limitless scaling
● Faster: Deploy faster, iterate faster, innovate faster
● Reliability: Increase reliability of critical apps using modern
architectures
● Productivity: Very good for small developer teams
● Cheaper: Only pay for what you use to the 100ms (never idle)
Lessons learnt…
Our use case
● Part of backend is a REST-based service
● Highly variable workloads
○ Usually 1-150 of requests a day
○ But very high traffic during a few days every year
● Data aggregation + transformation
 Decision for Node + Serverless
Problems
● Execution time
○ Much, much slower
○ Cold starts
○ Allocation of RAM
○ Processing power?
● Timeouts
● Lock-in
○ Strongly tied into the vendor implementation
○ Vendor standard and not industry standard
Solution
● Serverless.com
○ CLI
○ Supports all major FaaS vendors and Fn
● OpenFaaS and Fnproject
● CloudEvents / Event Gateway
Fnproject
Fn Project
● Open-source serverless compute platform
● Can be deployed to any cloud and on-premise
● Simple, elegant, and extensible by design
● Containers are primitives
● Active w/ 2500+ commits across 60+ contributors
● Independently governed with plans for foundation
● Strong enterprise focus (security, scalability, observability, etc.)
Components
FDK’sFn Server Fn Flow
Fn CLI
● fn init --runtime go
● fn run
● fn test
● fn deploy --app myapp
● fn call myapp myfunc
→ http://localhost:8080/r/myapp/myfunc
fn deploy details
1. Builds container (multi-stage) + bumps version
2. Pushes container to registry
3. Creates/updates function route (servers lazy load images)
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
Architecture
Demo
What about Serverless?
Traditional architecture Virtualized Architecture FaaS on Demand
Fn Flow
● Build long-running, reliable, scalable functions with rich sets of
language-specific primitives including fork-join, chaining, delays
and error handling
● Supports complex parallel processes that are readable and
testable (including unit tests) with standard programming tools
● Java support using CompletableFuture API from Java 8 with
JS, Python, Go language support on the way!
Thank you!
1. Star the project: github.com/fnproject/fn
2. Join the conversation: slack.fnproject.io
3. Learn more: fnproject.io
4. We’re hiring engineers and evangelists:
chad.arimura@oracle.com
Maximilian Jerg
uniPortal / Oracle
mx.jerg@gmail.com
Get Involved
The Fn Project
FDK’sFn Server Fn Flow

The FN Project by Maximilian Jerg

  • 1.
    The Fn Project Lessonslearnt with Serverless Maximilian Jerg Open Source Serverless Computing
  • 2.
    Agenda ● Serverless ● Lessonslearnt ● Fn project ● Live Demo
  • 3.
  • 4.
    What is Serverless? ●Serverless focuses on applications not infrastructure ● Managed service of infrastructure and its operations including provisioning, scaling, dynamic allocation of resources, patching, etc. ● Server management and capacity planning decisions are completely hidden ● Pricing is based on the resources consumed
  • 5.
    Functions-as-a-Service ● Functions aresmall bits of code that do one thing well and are easy to understand and maintain ● Stateless since there is typically no shared-memory In mathematics, a function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. Function (mathematics) - Wikipedia https://en.wikipedia.org/wiki/Function_(mathematics)
  • 6.
    Why Serverless? ● Easier:Just think about your code, not infrastructure ● Powerful: Transparent and limitless scaling ● Faster: Deploy faster, iterate faster, innovate faster ● Reliability: Increase reliability of critical apps using modern architectures ● Productivity: Very good for small developer teams ● Cheaper: Only pay for what you use to the 100ms (never idle)
  • 7.
  • 8.
    Our use case ●Part of backend is a REST-based service ● Highly variable workloads ○ Usually 1-150 of requests a day ○ But very high traffic during a few days every year ● Data aggregation + transformation  Decision for Node + Serverless
  • 9.
    Problems ● Execution time ○Much, much slower ○ Cold starts ○ Allocation of RAM ○ Processing power? ● Timeouts ● Lock-in ○ Strongly tied into the vendor implementation ○ Vendor standard and not industry standard
  • 10.
    Solution ● Serverless.com ○ CLI ○Supports all major FaaS vendors and Fn ● OpenFaaS and Fnproject ● CloudEvents / Event Gateway
  • 11.
  • 12.
    Fn Project ● Open-sourceserverless compute platform ● Can be deployed to any cloud and on-premise ● Simple, elegant, and extensible by design ● Containers are primitives ● Active w/ 2500+ commits across 60+ contributors ● Independently governed with plans for foundation ● Strong enterprise focus (security, scalability, observability, etc.)
  • 13.
  • 14.
    Fn CLI ● fninit --runtime go ● fn run ● fn test ● fn deploy --app myapp ● fn call myapp myfunc → http://localhost:8080/r/myapp/myfunc
  • 15.
    fn deploy details 1.Builds container (multi-stage) + bumps version 2. Pushes container to registry 3. Creates/updates function route (servers lazy load images) 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
  • 16.
  • 17.
  • 18.
    What about Serverless? Traditionalarchitecture Virtualized Architecture FaaS on Demand
  • 19.
    Fn Flow ● Buildlong-running, reliable, scalable functions with rich sets of language-specific primitives including fork-join, chaining, delays and error handling ● Supports complex parallel processes that are readable and testable (including unit tests) with standard programming tools ● Java support using CompletableFuture API from Java 8 with JS, Python, Go language support on the way!
  • 20.
    Thank you! 1. Starthe project: github.com/fnproject/fn 2. Join the conversation: slack.fnproject.io 3. Learn more: fnproject.io 4. We’re hiring engineers and evangelists: chad.arimura@oracle.com Maximilian Jerg uniPortal / Oracle mx.jerg@gmail.com Get Involved
  • 21.