Serverless is a form of cloud computing that’s changing the way software is delivered. The talk introduces key characteristics of serverless and serverless apps, how serverless compute works, and then dives into a live demo.
Video: https://www.youtube.com/watch?v=BRFd-PHyu7g&t=324s
@n_bassBuilding Everything on Serverless
View Slide
@n_bassλ
@n_bassCloud App / Hobby ProjectsEnter Serverless + Serverless ComputeExamplesUnder the HoodAWS LambdaServerless FrameworkLive Demo
@n_bassHow do you write + run cloud apps?
@n_bassCodeTestDeployMonitorProvisionInfrastructure
@n_bassYour Code!Virtual Machine (or maybe PaaS)?Your Code!Database/DatastoreLogsCronHTTP/SSSH
@n_bassInfrastructure and Management
@n_bassInfrastructure is an implementation detail.
@n_bassDevelopers should care about only their code.
@n_bassDrop the infrastructure.
@n_bassIdle Code == Idle Servers
@n_bassServerless?
@n_bassHTTP API for Web/Mobile AppHTTPS TriggerEventYour Code!FunctionDatabase/DatastoreServicesOtherFunctions,APIsAPIsLogs, …Monitoring
@n_bassServerless == BaaS
@n_bassServerless Compute == FaaS
@n_bassServerless Function
@n_bassServerless (BaaS)Serverless Compute (FaaS)Serverless Function
@n_bassServerless is another abstraction.
@n_bassFaaSPaaSIaaS
@n_bassBut there are servers?!?!?!
@n_bassGood Use Cases
@n_bassHTTP API for Web/Mobile AppHTTPS CallEventYour Code!FunctionDatabase/DatastoreService
@n_bassExample: ACM@UC Slack Badge
@n_bassScheduledEventEventYour Code!FunctionMessaging,Reporting, etc.APIAutomated TasksDataAPI
@n_bassNew Image/Video in S3BucketEventYour Code!FunctionS3 BucketServiceImage and Video Resizing
@n_bassBad Use CasesPersistent Connections, State Sharing
@n_bassBuilding Everything on ServerlessSome Things
@n_bassContainers
@n_bassSimple Function: AvailabilityEventInstanceFunctionHTTPS GETInstanceInstanceInstancehttps://martinfowler.com/articles/serverless.html
@n_bassContainersPackage code into an image that can be run (almost anywhere)
@n_bassContainer Reuseaws.amazon.com/blogs/compute/container-reuse-in-lambda/
@n_bass
@n_bassHTTP CallEvent StreamS3 BucketDatabaseQueue (SQS)LogsAnd more…
@n_bassCostServerless Computing for College Students?
@n_bass$ = Number Requests +Compute Time (gb-sec)
@n_bassPricing on AWS Lambda• $0.2 per 1 million requests• $0.00001667 per gb-sec
@n_bassSample Function1 million requests 800ms per request 256mb (0.25gb) memory-> $0.2-> 1M * 0.8sec -> 0.8M sec-> 0.8M sec * 0.25gb = 200,000 gb-sec 200,000 * $0.00001667 = $3.34 Total = $0.2 + $3.34 = $3.54/month
@n_bassAWS Free Tieraws.amazon.com/free/
@n_bassServerless Framework(serverless.com)
@n_bassServerless != Serverless Framework
@n_bassServerless Framework is Cloud Agnostic
@n_bassWhy A Framework?
@n_bassLive Demo
@n_bassSimple HTTP Endpoint (hello world)EventOur Code!Respond 200 OKFunctionHTTPS GET
@n_bassScheduled Event: Weather ReportScheduledEvent (1d)EventOur Code!Get data, then sendemailFunctiondarksky.netAPIAPIAWS SESAPI
@n_bassBuilding Some Things on Serverless
@n_bassResources• serverless.com• serverless.com/framework/docs/providers/aws/guide/quick-start/• aws.amazon.com/lambda• aws.amazon.com/free• cloud.google.com/free• github.com/serverless/examples• github.com/anaibol/awesome-serverless• martinfowler.com/articles/serverless.html• www.youtube.com/watch?v=Y6B3Eqlj9Fw• github.com/openfaas/faas