Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Cloud agnostic serverless with fn project

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 33 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Cloud agnostic serverless with fn project (20)

Anzeige

Aktuellste (20)

Cloud agnostic serverless with fn project

  1. 1. Cloud Agnostic Serverless with Fn Project Todor Todorov | @totollygeek DevOps Evangelist
  2. 2. Todor Todorov @totollygeek » .NET developer; » clean code fanatic; » DevOps evangelist; » speaker; » father of 3 boys; » karaoke enthusiast;
  3. 3. The serverless explained Credits: Matthew Gilliard DIY Bare Metal PaaS K8s-aaS Serverless Hardware OS Hypervisor Virtual OS Container Orchestration Application Code @totollygeek
  4. 4. Monolith Microservice Microservice Microservice Function Function Function Function Function Function Function Function Function Function @totollygeek
  5. 5. @totollygeek Microservice Monolith Microservice Microservice Function Function Function Function Function Function Function Function Function Function
  6. 6. @totollygeek
  7. 7. @totollygeek  C#  F#  JavaScript  Java (ver 2.x only)  PowerShell (ver 2.x only)  Python (ver 2.x only)  TypeScript (ver 2.x only)  some experimental
  8. 8. @totollygeek  JavaScript  Python  Java (8, 11)  C# (dotnetcore2.1)  Go (1.x)  Ruby (2.5)
  9. 9. @totollygeek JavaScript Go Python
  10. 10. That’s it?!? @totollygeek
  11. 11. @totollygeek
  12. 12. @totollygeek
  13. 13. What is Fn Project? • Independent open-source serverless compute platform • Not tied to any cloud vendor • Can be run on premises • Supported by Oracle • Containers are primitives • Strong enterprise in mind @totollygeek
  14. 14. What is a function container? • Sandboxed process • Short running • Event-driven • Stateless (-ish) @totollygeek
  15. 15. Anatomy of an Fn function • Small chunk of code wrapped in a container • Gets input from http-stream and environment • Sends output to http-stream • Logs to STDERR / syslog @totollygeek
  16. 16. FDK (Function Development Kit) support @totollygeek Go Java Node.js Python Ruby Officially supported C# Community supported
  17. 17. The Fn Server • Runs in a container also • Handles as an API gateway • Exposes REST interface • Storing logs @totollygeek
  18. 18. The Fn CLI • Of course we have a CLI! • Used to interact with Fn Server • Initialization • Deployment • Invocation @totollygeek
  19. 19. Initialization of functions • Calling fn init to create a boilerplate in a folder • Does not do anything on the server • Boilerplate includes: Dockerfile, func.yaml & code @totollygeek
  20. 20. Invocation of functions • From the CLI • With HTTP request • From the UI @totollygeek
  21. 21. How deployment works @totollygeek 1. Bumps function version 2.Builds container 3.Pushes it to registry 4.Creates or update function & trigger in server Your code MyFunc:0.0.2 1 & 2 3 MyFunc:0.0.2 MyFunc:0.0.2 Fn Service 4
  22. 22. @totollygeek DEMO
  23. 23. See metrics with Grafana & Prometheus @totollygeek
  24. 24. @totollygeek Source: https://fnproject.io/tutorials/grafana/
  25. 25. Using it in Kubernetes • Recommended way of deployment for production • Helm chart available on GitHub @totollygeek
  26. 26. Fn Flow • Building scalable distributed applications out of functions • Flows are functions also • Support complex parallel processes with error handling, which is testable • Flow functions scale as normal functions • Currently supports Java, hopefully more to come @totollygeek
  27. 27. Fn Flow | Licence plate example @totollygeek Scraper Plate detect Plate detect Plate detect Draw Draw Draw Post to Twitter Post to Twitter Post to Twitter Post to Slack Post to Slack Post to Slack
  28. 28. Fn Flow | Licence plate example @totollygeek Scraper Plate detect Plate detect Plate detect Draw Draw Draw Post to Twitter Post to Twitter Post to Twitter Post to Slack Post to Slack Post to Slack FlowFuture.invoke() thenCompose() thenCompose() allOf() whenComplete()
  29. 29. Fn Flow | Licence plate example @totollygeek
  30. 30. Fn Flow UI @totollygeek Source: https://github.com/fnproject/flow
  31. 31. @totollygeek DEMO
  32. 32. Thank you! (●’◡’●) Where to find me: Todor Todorov e: todor@todorov.bg / ttodorov@nemetschek.bg b: www.todorov.bg t: www.twitter.com/totollygeek l: www.linkedin.com/in/totollygeek g: www.github.com/totollygeek

Hinweis der Redaktion

  • This is me
    My tagline from twitter
    I know what you ask yourself – aren’t you 20?
    I am 24 years and 120 months old.
  • You saw that in every serverless session
    Because the Gods of serverless demand that explanation
    You pay just for execution
  • Generally you have a Monolith, you break to Microservices
    Microservices are broken to functions
    I don’t completely agree, but that is the idea
    Different mindset
  • Most likely this is what you have
    Face it – monoliths are not going anywhere any time soon
    This is OK
  • When you think about it, it is a bit frustrating
  • When you think about it, it is a bit frustrating
  • DISCLAIMER:
    I do not work for Oracle
    I am not affiliated with Oracle in any way shape or form
    Views are my own
  • Apache 2 Licensed, so you can use it however you want
    Running bit of your code on demand, based on triggers
    Anything that is a Linux process can be containerized and used as a function
    Why reinvent the wheel, when you can use already established tools and libraries
    For example use a NuGet package in a Function in Google cloud?
    Or ruby gem in a function in Azure?
  • How many of you use containers on daily basis ?
    In production ?

    Hidden by other processes by a kernel namespacing mechanism
    You can run long running containers
  • Used to use STDIN and STDOUT, but that was not easily supported by all
  • FDKs handle the IN, OUT and Hot function support
    Recently added C#
    Still not “official”
  • Used to use STDIN and STDOUT, but that was not easily supported by all
  • Used to use STDIN and STDOUT, but that was not easily supported by all
  • Used to use STDIN and STDOUT, but that was not easily supported by all
  • Used to use STDIN and STDOUT, but that was not easily supported by all
  • Show fn start
    Fn Init
    Fn Deploy
    Fn Invoke
    Fn UI
  • Completable Future
    Used for Asynchronous programming in Java
    Kinda like task based programming in C#
  • THANK YOU

×