Advertisement
Advertisement

More Related Content

Slideshows for you(20)

Similar to Fifty shades of Serverless(20)

Advertisement

Fifty shades of Serverless

  1. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Fifty shades of Serverless
  2. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Speaker me = new Speaker(”Mattias Jiderhamn”); me.setEmployer(”Solid Beans”); me.setJavaEnthusiast(true); me.addAchievemnt(Achievement.JavaOneRockStar); me.setTwitterHandle(”@mjiderhamn”) me.setBlog(”java.jiderhamn.se”)
  3. Copyright©SolidBeansAB it’s just someone else’s computer There is no Cloud
  4. Copyright©SolidBeansAB it’s just someone else’s server There is no Serverless
  5. Copyright©SolidBeansAB Serverless = Function as a Service = FaaS
  6. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Monolith Microservices Serverless
  7. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Monolith Microservices FaaS Monolith Function Microservice Microservice Microservice Function Function Function Function Function
  8. Copyright©SolidBeansAB Serverless offerings
  9. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com AWS Lambda Azure Functions Google Cloud Functions Supported languages /runtime Java Node.js C# Python (Go, Rust via Apex) Java (preview) Node.js, TypeScript C#, F# Python PHP Batch, Bash, PowerShell Node.js Python Offering Cloud Cloud (Consumption vs Dedicated) On Premise (Azure Stack) Cloud Free tier (per month) 1 M requests 400 k GB-s 1 M requests 400 k GB-s 2 M requests 400 k GB-s, 200 k GHz-s 5GB traffic Pricing (August 2018, Europe) $0.20 / 1M requests $0.00001667 / GB-s $0.20 / 1M requests $0.000016 / GB-s $0.40 / 1M requests $0.0000025 / GB-s $0.00001 / GHz-s $0.12 per GB traffic The Big Three
  10. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com IBM Cloud Functions Webtask Spotinst Functions Supported languages /runtime Docker Java Node.js Swift Go Scala Python, PHP, Ruby Bash Node.js Python Ruby Perl Php Lua, Babel, Coffee, Scheme, Smalltalk, Tcl Node.js C# T-SQL Java Go Node.js Ruby Python Node.js Offering Cloud On Premise (OpenWhisk) Cloud Cloud Multi cloud Free tier (per month) 400 k GB-s 1 k requests 1 request/s 3 services 64 MB/service Pricing (August 2018) $0.000017 / GB-s $10/25/50/200 / mth Spot pricing $5/30/150 / mth The Challengers
  11. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com OpenWhisk Runs on Docker Kubernetes Cloud (IBM) Docker Libraries for Java Go Ruby Python PHP Node.js Java Node.js Python Shell Java Node.js Swift Go Scala Python PHP Ruby License Apache 2.0 Apache 2.0 Apache 2.0 The Open Source
  12. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Runs on Kubernetes Kubernetes Docker Swarm Kubernetes Docker Libraries for Node.js .NET Python Ruby PHP Go Ballerina Java C# Node.js Go Python Ruby C# Node.js Python Go PHP Go Node.js Ruby License Apache 2.0 MIT Apache 2.0 Apache 2.0 The Open Source
  13. Copyright©SolidBeansAB it’s just someone else’s server There is no Serverless
  14. Copyright©SolidBeansAB Serverless-ishServerless
  15. Copyright©SolidBeansAB DEMO
  16. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com HTTP API Gateway HTTP Web hooks (GitHub, Slack) HTTP Blob store S3 Blob storage Cloud Storage DB DynamoDB Cosmos DB Table storage Firebase Messages SQS Queue storage Service Bus Event Grid Cloud Pub/Sub Stream Kinesis Event Hub Notifications SNS Notification Hub Cron CloudWatch Events Timer Event sources / Triggers
  17. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com AWS Lamda event sources • E-mail (Simple Email Service) • Log (CloudWatch Log) • Provisioning (CloudFormation) • Infra events (CloudWatch Events) • Git push (CodeCommit) • Voice (Alexa) • Conversation (Lex) • Hardware (IoT Button) • ...
  18. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Azure Functions triggers External file (experimental) • Box • Dropbox • FTP/SFTP • OneDrive • Google Drive
  19. Copyright©SolidBeansAB Caveats
  20. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Cost management • Pay-as-you-go • Estimate memory usage and invocation time • More expensive = cheaper? • Async operations/ background threads • Low max time
  21. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Logging • ExecutionContext.getLogger() • AWS: Log4j 2 appender AWS Lambda Log4J appender CloudWatch Logs
  22. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Logging • ExecutionContext.getLogger() • AWS: Log4j 2 appender • TCP appender Function Async appender TCP appender
  23. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Cold start • 20-45 minutes of inactivity • 30+ seconds start for Java • Keep alive ping requests –Azure: per Function App
  24. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Vendor lock-in • Vendor specific method signature • Cloud Native Computing Foundation (CNCF) working on standard • Abstract the vendor specific … or not
  25. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Spring Cloud Function • Decouple business logic and deployment –Plain Old Function (POF) • Spring Boot –IoC etc • On the fly string compilation • Reactive Streams (Flux)
  26. Copyright©SolidBeansAB DEMO
  27. Copyright©SolidBeansAB Mattias Jiderhamn www.solidbeans.com Ask not what you can do with
  28. Copyright©SolidBeansAB java.jiderhamn.se github.com/mjiderhamn/ fifty-shades-of-serverless @mjiderhamn

Editor's Notes

  1. Copyright © Tieturi Oy
Advertisement