SlideShare a Scribd company logo
© OPITZ CONSULTING 2018
s
¢¢¢ überraschend mehr Möglichkeiten!
© OPITZ CONSULTING 2018
Sven Bernhardt, Danilo Schmiedel
Serverless architectures
with Fn Project
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 2
OPITZ CONSULTING - A success story since 1990
¢ Our Mission: Help organizations to leverage the possibilities of
digitalization to be different, better and faster than their competitors
¢ Owner-led company with
¢ 450+ consultants
¢ 11 locations in Germany and Poland
Danilo Schmiedel
¢
¢ Senior Managing Consultant
¢ Business Development and Innovation
About us
Sven Bernhardt
¢ Senior Solution Architect
¢ Technical Lead for API Management
© OPITZ CONSULTING 2018 Seite 3
Agenda
1
2
3
5
Serverless, FaaS, BaaS
Fn Project
Fn Flow
Summary
Serverless architectures with Fn Project
4 Use Cases and Scenarios
© OPITZ CONSULTING 2018 Seite 4
Serverless, FaaS and BaaS
1
Serverless architectures with Fn Project
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 5
Serverless standard picture
¢ Serverless != No Server => Just means someone else‘s computer
https://www.flickr.com/photos/91707070@N03/8331732961
Source: https://bit.ly/2zeliT9
Serverless = Exit door from traditional IT operations,
since no Servers are needed anymore?
Clearly no! Serverless just mean that your code is
running on someone elses computer somewhere,
somehow and you don‘t have to care about it.
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 6
Promises of Serverless
¢ Easier: Just think about your code, not infrastructure
¢ Powerful: Transparent and limitless scaling
¢ Faster: Deploy faster, iterate faster, innovate faster
¢ Cheaper: Only pay for what you use (never idle)
Source: https://bit.ly/2QSP0nd
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project
Serverless Manifesto by Potes & Nair (AWS)
¢ Functions are the unit of deployment and scaling
¢ No machines, VMs, or containers visible in the programming model
¢ Permanent storage lives elsewhere
¢ Scales per request: Users cannot over- or under-provision capacity
¢ Never pay for idle (no cold servers/containers or their costs)
¢ Implicitly fault-tolerant because functions can run anywhere
¢ BYOC — Bring Your Own Code
¢ Metrics and logging are a universal right
Seite 7
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 8
Characteristics of a Function
¢ Granular compute unit in Serverless
¢ Short-lived
¢ Ephemeral
¢ Stateless
¢ Scalable
¢ Event-Driven
¢ Single Purpose
¢ Self-contained
¢ Function has one output for a specific input Function f
Input x
Output f(x)
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 9
Serverless, FaaS and BaaS
¢ Serverless: Abstraction of infrastructure and its operations including
provisioning, scaling, patching, etc.
¢ Serverless applications significantly depend on third-party services
¢ A Serverless Computing Platform may provide one or both of:
¢ Functions-as-a-Service:
¢ Compute component in a serverless platform
¢ Custom Code that runs in ephemeral containers
¢ Backend-as-a-Service:
¢ Third-party API-based services
¢ Replaces core subsets of functionality in an application
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 10
Evolution of application architectures
Monolithic
architectures
µService
architectures
Serverless
architectures
f(a1) f(a2)
f(a3) f(a4) f(b4)f(b3)
f(b2)f(b1)
f(c3) f(c4)
f(c2)f(c1) f(d1) f(d2)
f(d3) f(d4)
Ø Single application
Ø Mixed data from different
business context
Ø Mixed business logic
Ø Application consists of
different µService
Ø Business logic and data
belong to a bounded
business context
Ø Application consists of
multiple functions
Ø Fine-granular logic for a
specific step, data resides
externally
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 11
Serverless: Focus on implementing business logic
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 12
Serverless and Cloud-Native technologies
Source: https://bit.ly/2S5tgoH
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 13Source: https://bit.ly/2CJaco4
© OPITZ CONSULTING 2018 Seite 14
Fn Project
2
Serverless architectures with Fn Project
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 15
About Fn Project
¢ Open-source Functions-as-a-Service compute platform (Apache 2.0
licence)
¢ Easy to use for developers
¢ Easy to manage for operators
¢ Active large core team, 3500+ commits, 75+ contributors
¢ Members on the CNCF serverless working group
¢ Native CloudEvents support (https://cloudevents.io/)
¢ Specification for describing event data in a common way
¢ Event declaration and delivery across services and platforms
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 16
Fn Project architecture
¢ Written in Go
¢ Container-based: Leverages Docker
¢ Run anywhere:
¢ Cloud
¢ On-Premise Datacenter
¢ Local development environment
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 17
Fn Project runtime
¢ Fn is runtime-agnostic
¢ Can be targeted to run on Kubernetes (K8s)
¢ K8s optimizations are WIP
¢ Plans for deeper K8s integration using CRDs
¢ Helm chart available to install to K8s (https://bit.ly/2S1bvXm)
¢ Runtime monitoring:
¢ Prometheus support for metrics collection
¢ Metrics visualization with Grafana
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 18
Function in Fn
¢ Small chunk of code wrapped into a container image
¢ Developers just need to care about business logic
¢ Function is wrapped in a Container Image
¢ Function is defined and deployed within an app
¢ Functions are written in code
Function f
STDIN
(Input)
STDOUT
(Output)
STDERR
(Logs)
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 19
Wait! Functions and Containers... What the heck?
¢ Serverless Manifesto says: „No machines, VMs, or containers visible in the
programming model“ à So Fn Project is not really Serverless, right?
¢ Fn is FaaS, the underlying platform needs to ensure that
¢ Developer does not need to care about the containers and the technical stuff belonging to
it (Build, Deploy, Run....)
¢ Users does not need to pay for idle containers
¢ Function is capable to scale automatically and infinitetly
¢ Advantage of the container-based approach is increased iteroperability
(no vendor lock-in)
¢ Other Container-based FaaS Frameworks: Kubeless, Fission
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 20
Function development
¢ Multi language support through Function Developer Kit (FDK)
¢ FDKs comprise of different building blocks, like
¢ Language-specific Fn libraries
¢ Build-Time Docker images
¢ Minimal runtime Docker images
¢ Fn CLI is used to manage and create Functions
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project
Serverless Manifesto and Fn Project
¢ Functions are the unit of deployment and scaling ✓
¢ No machines, VMs, or containers visible in the programming model ✓
¢ Permanent storage lives elsewhere ✓
¢ Scales per request: Users cannot over- or under-provision capacity
¢ Never pay for idle (no cold servers/containers or their costs)
¢ Implicitly fault-tolerant because functions can run anywhere
¢ BYOC — Bring Your Own Code ✓
¢ Metrics and logging are a universal right ✓
Seite 21
© OPITZ CONSULTING 2018 Seite 22
Demo - Function development
Serverless architectures with Fn Project
© OPITZ CONSULTING 2018 Seite 23
Fn Flow
3
Serverless architectures with Fn Project
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 24
Building advanced functions with Fn Flow
¢ Build reliable and scalable FaaS applications with functions
¢ Flow functions are written purely in code
¢ Build distributed applications
¢ Provides rich concurrency primitives including fork-join, chaining,
delays and error handling
¢ Testable using standard programming tools and mechanisms (e.g.
Unit tests)
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 25
Fn Flow compared to workflow solutions
¢ No context-switching, beause everything is code
¢ Leverage full power of the used programming language
¢ More powerful errorhandling capabilities
¢ Easy, consistent and comprehensible data and context handling
¢ Highly functional approach for implementing the flow
¢ Might be hard to read and understand for non-technicians
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 26
Example Use Case Fn Flow: Saga
¢ Microservice Pattern: Saga defined
by Chris Richardson
¢ Specifically: Orchestration-based
Saga
Source: https://microservices.io/patterns/data/saga.html
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 27Source: https://github.com/fnproject/tutorials/blob/master/FlowSaga/images/1-travel-app.png
© OPITZ CONSULTING 2018 Seite 28
Use Cases and Scenarios
4
Serverless architectures with Fn Project
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 29
10 common use cases for Serverless platforms
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 30
Serverless Best Practices
1. Each function should do only one thing
2. Functions don‘t call other functions
3. Use as few libraries in your functions as possible
4. Avoid using connection based services (use services rather than
connections)
5. One function per route (if using HTTP)
6. Learn to use messages and queues
7. Data flows, not data lakes
8. Just coding for scale is a mistake, you have to consider how it scales
(c) Paul Johnsten, ServerlessDays CoFounder
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 31
Severless & Enterprise Integration Patterns (EIP)
¢ EIPs try to address integration problems based on
messaging
¢ In EIPs there are definitions for basic components that
are used to implement integrations, like
¢ Channels
¢ Splitter
¢ Aggregator
¢ Router …
Source: https://www.enterpriseintegrationpatterns.com/patterns/messaging/Filter.html
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 32
Example: EIP Message Translator
System A System B
X
f(x) getData f(x) sendDataf(x) transformData
https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageTranslator.html
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 33
Example: EIP Message Splitter and Router
System A
System C
System B
f(x) getData f(x) splitData f(x) routeDataToC
f(x) routeDataToB
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 34
When is FaaS adequate for integration?
¢ Typical use cases:
¢ Batch processing, which takes place on regular schedules
¢ Event processing
¢ Considerations to make:
¢ Number of invocations
¢ Keep runtime short
¢ Serverless Platforms will terminate long-running Functions
¢ Don‘t block HW resources for too long
© OPITZ CONSULTING 2018 Seite 35
Summary
5
Serverless architectures with Fn Project
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 36
Summary
¢ Functions are first class citizens
¢ Fn Project is a
¢ Framework for implementing FaaS-style applications
¢ But is not a Serverless framework (no Serverless runtime available)
¢ FaaS is good for the right use cases, but it‘s no silver bullet!
¢ Strength of Fn Project: No vendor lock-in!
¢ FaaS provides new opportunities for implementing applications
¢ Event-based, scalable and ephemeral
¢ Stateless
¢ Infinitely scalable (in theory)
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 37
With great power, comes great responsibility...
¢ Rethink the traditional application architectures!
Client
API Gateway
IDM /
Authentication
PlaceOrder
SearchProducts
POST /api/v1/orders
GET /api/v1/products
CreateInvoiceCheckoutWarehouse
Event Hub
OrderCreated
OrderCreatedOrderCreated
© OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 38
Links and Resources
¢ Fn Project: http://fnproject.io
¢ Github Fn Project: https://github.com/fnproject
¢ CNCF Whitepaper Serverless: https://bit.ly/2S5tgoH
¢ CloudEvents: https://cloudevents.io/
¢ Enterprise Integration Patterns:
https://www.enterpriseintegrationpatterns.com
¢ Microservices Patterns: https://microservices.io
© OPITZ CONSULTING 2018 Seite 39Serverless architectures with Fn Project
Q & A
© OPITZ CONSULTING 2018
¢¢¢ überraschend mehr Möglichkeiten!
@OC_WIRE OPITZCONSULTING opitzconsultingWWW.OPITZ-CONSULTING.COM
Seite 40
Contact us!
Danilo Schmiedel
Senior Managing Consultant Solutions | Oracle ACE Director
OPITZ CONSULTING Deutschland GmbH
Tempelhofer Weg 64, 12347 Berlin, Germany
Phone: +49 173 7279001
Mail: danilo.schmiedel@opitz-consulting.com
@dschmied
http://inside-bpm-and-soa.blogspot.com
Sven Bernhardt
Senior Solution Architect | Oracle ACE
OPITZ CONSULTING Deutschland GmbH
Kirchstrasse 6, 51647 Gummersbach, Germany
Phone: +49 172 2193529
Mail: sven.bernhardt@opitz-consulting.com
@sbernhardt
https://svenbernhardt.wordpress.com
Serverless architectures with Fn Project

More Related Content

What's hot (20)

PDF
Continuous (Non)-Functional Testing of Microservices on k8s
QAware GmbH
 
PDF
Continuous (Non-)Functional Testing of Microservices on K8s
QAware GmbH
 
PPTX
Rancher master class globalized edge workloads with k3s
Joseph Marhee
 
PDF
8.cncf en
Juraj Hantak
 
PDF
High-Performance FAAS with Nuclio
QAware GmbH
 
PDF
[DevConf.US 2019]Quarkus Brings Serverless to Java Developers
Daniel Oh
 
PDF
Real World CI/CD with Kubernetes
Opsta
 
PPTX
K8s from Zero to ~Hero~ Seasoned Beginner
Kristof Jozsa
 
PDF
Knative makes Developers Incredible on Serverless
Daniel Oh
 
PDF
Enabling Cloud Native Buildpacks for Windows Containers
VMware Tanzu
 
PDF
Building and Running Workloads the Knative Way
QAware GmbH
 
PDF
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Red Hat Developers
 
PDF
Cloud-Native Drupal: a survival guide
sparkfabrik
 
PDF
How we can do Multi-Tenancy on Kubernetes
Opsta
 
PDF
E bpf and profilers
LibbySchulze
 
PDF
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
Red Hat Developers
 
PDF
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
NETWAYS
 
PDF
OpenShift pour le developpement cloud native - 20171214
Laurent Broudoux
 
PDF
Integracia security do ci cd pipelines
Juraj Hantak
 
PDF
Introduction to Kubernetes and GKE
Opsta
 
Continuous (Non)-Functional Testing of Microservices on k8s
QAware GmbH
 
Continuous (Non-)Functional Testing of Microservices on K8s
QAware GmbH
 
Rancher master class globalized edge workloads with k3s
Joseph Marhee
 
8.cncf en
Juraj Hantak
 
High-Performance FAAS with Nuclio
QAware GmbH
 
[DevConf.US 2019]Quarkus Brings Serverless to Java Developers
Daniel Oh
 
Real World CI/CD with Kubernetes
Opsta
 
K8s from Zero to ~Hero~ Seasoned Beginner
Kristof Jozsa
 
Knative makes Developers Incredible on Serverless
Daniel Oh
 
Enabling Cloud Native Buildpacks for Windows Containers
VMware Tanzu
 
Building and Running Workloads the Knative Way
QAware GmbH
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Red Hat Developers
 
Cloud-Native Drupal: a survival guide
sparkfabrik
 
How we can do Multi-Tenancy on Kubernetes
Opsta
 
E bpf and profilers
LibbySchulze
 
Quarkus: From developer joy to Kubernetes nirvana! | DevNation Tech Talk
Red Hat Developers
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
NETWAYS
 
OpenShift pour le developpement cloud native - 20171214
Laurent Broudoux
 
Integracia security do ci cd pipelines
Juraj Hantak
 
Introduction to Kubernetes and GKE
Opsta
 

Similar to Serverless architectures with Fn Project (20)

PPTX
TechEvent Servlerless Computing with Fn Project
Trivadis
 
PDF
Serverless Computing with Fn Project
Matthias Furrer
 
PPTX
The FN Project by Maximilian Jerg
Harald Schmaldienst
 
PDF
Introduction to Serverless through Architectural Patterns
Mathieu Mailhos
 
PPTX
Functions and DevOps
Shaun Smith
 
PPTX
An introduction to Serverless
Adrien Blind
 
PPTX
Building Serverless Microservices Using Serverless Framework on the Cloud
Srini Karlekar
 
PPTX
Serverless design with Fn project
Siva Rama Krishna Chunduru
 
PDF
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
Sakari Hoisko
 
PDF
Java Serverless in Action - Voxxed Banff
David Delabassee
 
PDF
Serverless brewbox
Lino Telera
 
PDF
Free the Functions with Fn project!
J On The Beach
 
PPTX
Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ...
Frank Munz
 
PDF
It's a Serverless World
Eran Stiller
 
PPTX
Democratizing Serverless
Shaun Smith
 
PPTX
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Srini Karlekar
 
PPTX
The Architectural Thinking Behind Full Stack Serverless
Yazid Hamdi
 
PDF
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Ewan Slater
 
PPTX
Serverless Architectures
SuraiyaHasan19004210
 
PDF
Where can you use serverless?  How does it relate to APIs, integration and mi...
Kim Clark
 
TechEvent Servlerless Computing with Fn Project
Trivadis
 
Serverless Computing with Fn Project
Matthias Furrer
 
The FN Project by Maximilian Jerg
Harald Schmaldienst
 
Introduction to Serverless through Architectural Patterns
Mathieu Mailhos
 
Functions and DevOps
Shaun Smith
 
An introduction to Serverless
Adrien Blind
 
Building Serverless Microservices Using Serverless Framework on the Cloud
Srini Karlekar
 
Serverless design with Fn project
Siva Rama Krishna Chunduru
 
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
Sakari Hoisko
 
Java Serverless in Action - Voxxed Banff
David Delabassee
 
Serverless brewbox
Lino Telera
 
Free the Functions with Fn project!
J On The Beach
 
Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ...
Frank Munz
 
It's a Serverless World
Eran Stiller
 
Democratizing Serverless
Shaun Smith
 
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Srini Karlekar
 
The Architectural Thinking Behind Full Stack Serverless
Yazid Hamdi
 
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Ewan Slater
 
Serverless Architectures
SuraiyaHasan19004210
 
Where can you use serverless?  How does it relate to APIs, integration and mi...
Kim Clark
 
Ad

More from Sven Bernhardt (20)

PDF
The integration revolution: Building bridges between On-premises and Cloud ec...
Sven Bernhardt
 
PDF
Efficient development of smart apps: The role of AI gateways
Sven Bernhardt
 
PDF
Next-level Kubernetes Service Management with an API gateway
Sven Bernhardt
 
PDF
Effective and simple - integration architectures with Apache Camel and Quarkus
Sven Bernhardt
 
PDF
One Gateway to Rule them All: Building a Federated API Management Platform
Sven Bernhardt
 
PDF
Modernization options for Oracle Forms applications
Sven Bernhardt
 
PDF
Elevating Development: Embracing APIOps for Enhanced Developer Productivity
Sven Bernhardt
 
PDF
Kong 101 - Jumpstart into the world of APIs
Sven Bernhardt
 
PDF
Declarative observability management for Microservice architectures
Sven Bernhardt
 
PDF
Integration architectures based on Microservices, APIs and events
Sven Bernhardt
 
PDF
Build and Manage Multi-Cloud Applications Using Kuma
Sven Bernhardt
 
PDF
Build and Manage Multi-Cloud Applications Using Kuma
Sven Bernhardt
 
PDF
Torch the light - Implementing Observability for Microservice Architectures
Sven Bernhardt
 
PDF
Analytics meets Integration - Modern Development with Data APIs
Sven Bernhardt
 
PDF
Modern Integration based on OCI Cloud-native Services
Sven Bernhardt
 
PDF
Service Mesh Advanced Use Cases
Sven Bernhardt
 
PDF
Cloud-native Application Development on OCI
Sven Bernhardt
 
PDF
Rumble in the Jungle - API Kickstart with Kong
Sven Bernhardt
 
PDF
Cloud-native Application Development - The new normal
Sven Bernhardt
 
PDF
Efficient API delivery with APIOps
Sven Bernhardt
 
The integration revolution: Building bridges between On-premises and Cloud ec...
Sven Bernhardt
 
Efficient development of smart apps: The role of AI gateways
Sven Bernhardt
 
Next-level Kubernetes Service Management with an API gateway
Sven Bernhardt
 
Effective and simple - integration architectures with Apache Camel and Quarkus
Sven Bernhardt
 
One Gateway to Rule them All: Building a Federated API Management Platform
Sven Bernhardt
 
Modernization options for Oracle Forms applications
Sven Bernhardt
 
Elevating Development: Embracing APIOps for Enhanced Developer Productivity
Sven Bernhardt
 
Kong 101 - Jumpstart into the world of APIs
Sven Bernhardt
 
Declarative observability management for Microservice architectures
Sven Bernhardt
 
Integration architectures based on Microservices, APIs and events
Sven Bernhardt
 
Build and Manage Multi-Cloud Applications Using Kuma
Sven Bernhardt
 
Build and Manage Multi-Cloud Applications Using Kuma
Sven Bernhardt
 
Torch the light - Implementing Observability for Microservice Architectures
Sven Bernhardt
 
Analytics meets Integration - Modern Development with Data APIs
Sven Bernhardt
 
Modern Integration based on OCI Cloud-native Services
Sven Bernhardt
 
Service Mesh Advanced Use Cases
Sven Bernhardt
 
Cloud-native Application Development on OCI
Sven Bernhardt
 
Rumble in the Jungle - API Kickstart with Kong
Sven Bernhardt
 
Cloud-native Application Development - The new normal
Sven Bernhardt
 
Efficient API delivery with APIOps
Sven Bernhardt
 
Ad

Recently uploaded (20)

PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 

Serverless architectures with Fn Project

  • 1. © OPITZ CONSULTING 2018 s ¢¢¢ überraschend mehr Möglichkeiten! © OPITZ CONSULTING 2018 Sven Bernhardt, Danilo Schmiedel Serverless architectures with Fn Project
  • 2. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 2 OPITZ CONSULTING - A success story since 1990 ¢ Our Mission: Help organizations to leverage the possibilities of digitalization to be different, better and faster than their competitors ¢ Owner-led company with ¢ 450+ consultants ¢ 11 locations in Germany and Poland Danilo Schmiedel ¢ ¢ Senior Managing Consultant ¢ Business Development and Innovation About us Sven Bernhardt ¢ Senior Solution Architect ¢ Technical Lead for API Management
  • 3. © OPITZ CONSULTING 2018 Seite 3 Agenda 1 2 3 5 Serverless, FaaS, BaaS Fn Project Fn Flow Summary Serverless architectures with Fn Project 4 Use Cases and Scenarios
  • 4. © OPITZ CONSULTING 2018 Seite 4 Serverless, FaaS and BaaS 1 Serverless architectures with Fn Project
  • 5. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 5 Serverless standard picture ¢ Serverless != No Server => Just means someone else‘s computer https://www.flickr.com/photos/91707070@N03/8331732961 Source: https://bit.ly/2zeliT9 Serverless = Exit door from traditional IT operations, since no Servers are needed anymore? Clearly no! Serverless just mean that your code is running on someone elses computer somewhere, somehow and you don‘t have to care about it.
  • 6. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 6 Promises of Serverless ¢ Easier: Just think about your code, not infrastructure ¢ Powerful: Transparent and limitless scaling ¢ Faster: Deploy faster, iterate faster, innovate faster ¢ Cheaper: Only pay for what you use (never idle) Source: https://bit.ly/2QSP0nd
  • 7. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Serverless Manifesto by Potes & Nair (AWS) ¢ Functions are the unit of deployment and scaling ¢ No machines, VMs, or containers visible in the programming model ¢ Permanent storage lives elsewhere ¢ Scales per request: Users cannot over- or under-provision capacity ¢ Never pay for idle (no cold servers/containers or their costs) ¢ Implicitly fault-tolerant because functions can run anywhere ¢ BYOC — Bring Your Own Code ¢ Metrics and logging are a universal right Seite 7
  • 8. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 8 Characteristics of a Function ¢ Granular compute unit in Serverless ¢ Short-lived ¢ Ephemeral ¢ Stateless ¢ Scalable ¢ Event-Driven ¢ Single Purpose ¢ Self-contained ¢ Function has one output for a specific input Function f Input x Output f(x)
  • 9. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 9 Serverless, FaaS and BaaS ¢ Serverless: Abstraction of infrastructure and its operations including provisioning, scaling, patching, etc. ¢ Serverless applications significantly depend on third-party services ¢ A Serverless Computing Platform may provide one or both of: ¢ Functions-as-a-Service: ¢ Compute component in a serverless platform ¢ Custom Code that runs in ephemeral containers ¢ Backend-as-a-Service: ¢ Third-party API-based services ¢ Replaces core subsets of functionality in an application
  • 10. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 10 Evolution of application architectures Monolithic architectures µService architectures Serverless architectures f(a1) f(a2) f(a3) f(a4) f(b4)f(b3) f(b2)f(b1) f(c3) f(c4) f(c2)f(c1) f(d1) f(d2) f(d3) f(d4) Ø Single application Ø Mixed data from different business context Ø Mixed business logic Ø Application consists of different µService Ø Business logic and data belong to a bounded business context Ø Application consists of multiple functions Ø Fine-granular logic for a specific step, data resides externally
  • 11. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 11 Serverless: Focus on implementing business logic
  • 12. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 12 Serverless and Cloud-Native technologies Source: https://bit.ly/2S5tgoH
  • 13. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 13Source: https://bit.ly/2CJaco4
  • 14. © OPITZ CONSULTING 2018 Seite 14 Fn Project 2 Serverless architectures with Fn Project
  • 15. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 15 About Fn Project ¢ Open-source Functions-as-a-Service compute platform (Apache 2.0 licence) ¢ Easy to use for developers ¢ Easy to manage for operators ¢ Active large core team, 3500+ commits, 75+ contributors ¢ Members on the CNCF serverless working group ¢ Native CloudEvents support (https://cloudevents.io/) ¢ Specification for describing event data in a common way ¢ Event declaration and delivery across services and platforms
  • 16. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 16 Fn Project architecture ¢ Written in Go ¢ Container-based: Leverages Docker ¢ Run anywhere: ¢ Cloud ¢ On-Premise Datacenter ¢ Local development environment
  • 17. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 17 Fn Project runtime ¢ Fn is runtime-agnostic ¢ Can be targeted to run on Kubernetes (K8s) ¢ K8s optimizations are WIP ¢ Plans for deeper K8s integration using CRDs ¢ Helm chart available to install to K8s (https://bit.ly/2S1bvXm) ¢ Runtime monitoring: ¢ Prometheus support for metrics collection ¢ Metrics visualization with Grafana
  • 18. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 18 Function in Fn ¢ Small chunk of code wrapped into a container image ¢ Developers just need to care about business logic ¢ Function is wrapped in a Container Image ¢ Function is defined and deployed within an app ¢ Functions are written in code Function f STDIN (Input) STDOUT (Output) STDERR (Logs)
  • 19. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 19 Wait! Functions and Containers... What the heck? ¢ Serverless Manifesto says: „No machines, VMs, or containers visible in the programming model“ à So Fn Project is not really Serverless, right? ¢ Fn is FaaS, the underlying platform needs to ensure that ¢ Developer does not need to care about the containers and the technical stuff belonging to it (Build, Deploy, Run....) ¢ Users does not need to pay for idle containers ¢ Function is capable to scale automatically and infinitetly ¢ Advantage of the container-based approach is increased iteroperability (no vendor lock-in) ¢ Other Container-based FaaS Frameworks: Kubeless, Fission
  • 20. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 20 Function development ¢ Multi language support through Function Developer Kit (FDK) ¢ FDKs comprise of different building blocks, like ¢ Language-specific Fn libraries ¢ Build-Time Docker images ¢ Minimal runtime Docker images ¢ Fn CLI is used to manage and create Functions
  • 21. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Serverless Manifesto and Fn Project ¢ Functions are the unit of deployment and scaling ✓ ¢ No machines, VMs, or containers visible in the programming model ✓ ¢ Permanent storage lives elsewhere ✓ ¢ Scales per request: Users cannot over- or under-provision capacity ¢ Never pay for idle (no cold servers/containers or their costs) ¢ Implicitly fault-tolerant because functions can run anywhere ¢ BYOC — Bring Your Own Code ✓ ¢ Metrics and logging are a universal right ✓ Seite 21
  • 22. © OPITZ CONSULTING 2018 Seite 22 Demo - Function development Serverless architectures with Fn Project
  • 23. © OPITZ CONSULTING 2018 Seite 23 Fn Flow 3 Serverless architectures with Fn Project
  • 24. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 24 Building advanced functions with Fn Flow ¢ Build reliable and scalable FaaS applications with functions ¢ Flow functions are written purely in code ¢ Build distributed applications ¢ Provides rich concurrency primitives including fork-join, chaining, delays and error handling ¢ Testable using standard programming tools and mechanisms (e.g. Unit tests)
  • 25. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 25 Fn Flow compared to workflow solutions ¢ No context-switching, beause everything is code ¢ Leverage full power of the used programming language ¢ More powerful errorhandling capabilities ¢ Easy, consistent and comprehensible data and context handling ¢ Highly functional approach for implementing the flow ¢ Might be hard to read and understand for non-technicians
  • 26. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 26 Example Use Case Fn Flow: Saga ¢ Microservice Pattern: Saga defined by Chris Richardson ¢ Specifically: Orchestration-based Saga Source: https://microservices.io/patterns/data/saga.html
  • 27. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 27Source: https://github.com/fnproject/tutorials/blob/master/FlowSaga/images/1-travel-app.png
  • 28. © OPITZ CONSULTING 2018 Seite 28 Use Cases and Scenarios 4 Serverless architectures with Fn Project
  • 29. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 29 10 common use cases for Serverless platforms
  • 30. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 30 Serverless Best Practices 1. Each function should do only one thing 2. Functions don‘t call other functions 3. Use as few libraries in your functions as possible 4. Avoid using connection based services (use services rather than connections) 5. One function per route (if using HTTP) 6. Learn to use messages and queues 7. Data flows, not data lakes 8. Just coding for scale is a mistake, you have to consider how it scales (c) Paul Johnsten, ServerlessDays CoFounder
  • 31. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 31 Severless & Enterprise Integration Patterns (EIP) ¢ EIPs try to address integration problems based on messaging ¢ In EIPs there are definitions for basic components that are used to implement integrations, like ¢ Channels ¢ Splitter ¢ Aggregator ¢ Router … Source: https://www.enterpriseintegrationpatterns.com/patterns/messaging/Filter.html
  • 32. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 32 Example: EIP Message Translator System A System B X f(x) getData f(x) sendDataf(x) transformData https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageTranslator.html
  • 33. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 33 Example: EIP Message Splitter and Router System A System C System B f(x) getData f(x) splitData f(x) routeDataToC f(x) routeDataToB
  • 34. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 34 When is FaaS adequate for integration? ¢ Typical use cases: ¢ Batch processing, which takes place on regular schedules ¢ Event processing ¢ Considerations to make: ¢ Number of invocations ¢ Keep runtime short ¢ Serverless Platforms will terminate long-running Functions ¢ Don‘t block HW resources for too long
  • 35. © OPITZ CONSULTING 2018 Seite 35 Summary 5 Serverless architectures with Fn Project
  • 36. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 36 Summary ¢ Functions are first class citizens ¢ Fn Project is a ¢ Framework for implementing FaaS-style applications ¢ But is not a Serverless framework (no Serverless runtime available) ¢ FaaS is good for the right use cases, but it‘s no silver bullet! ¢ Strength of Fn Project: No vendor lock-in! ¢ FaaS provides new opportunities for implementing applications ¢ Event-based, scalable and ephemeral ¢ Stateless ¢ Infinitely scalable (in theory)
  • 37. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 37 With great power, comes great responsibility... ¢ Rethink the traditional application architectures! Client API Gateway IDM / Authentication PlaceOrder SearchProducts POST /api/v1/orders GET /api/v1/products CreateInvoiceCheckoutWarehouse Event Hub OrderCreated OrderCreatedOrderCreated
  • 38. © OPITZ CONSULTING 2018 Serverless architectures with Fn Project Seite 38 Links and Resources ¢ Fn Project: http://fnproject.io ¢ Github Fn Project: https://github.com/fnproject ¢ CNCF Whitepaper Serverless: https://bit.ly/2S5tgoH ¢ CloudEvents: https://cloudevents.io/ ¢ Enterprise Integration Patterns: https://www.enterpriseintegrationpatterns.com ¢ Microservices Patterns: https://microservices.io
  • 39. © OPITZ CONSULTING 2018 Seite 39Serverless architectures with Fn Project Q & A
  • 40. © OPITZ CONSULTING 2018 ¢¢¢ überraschend mehr Möglichkeiten! @OC_WIRE OPITZCONSULTING opitzconsultingWWW.OPITZ-CONSULTING.COM Seite 40 Contact us! Danilo Schmiedel Senior Managing Consultant Solutions | Oracle ACE Director OPITZ CONSULTING Deutschland GmbH Tempelhofer Weg 64, 12347 Berlin, Germany Phone: +49 173 7279001 Mail: [email protected] @dschmied http://inside-bpm-and-soa.blogspot.com Sven Bernhardt Senior Solution Architect | Oracle ACE OPITZ CONSULTING Deutschland GmbH Kirchstrasse 6, 51647 Gummersbach, Germany Phone: +49 172 2193529 Mail: [email protected] @sbernhardt https://svenbernhardt.wordpress.com Serverless architectures with Fn Project