building a serverless app

27
Building a Serverless App Vinay Krishna

Upload: vinay-krishna

Post on 12-Jan-2017

74 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Building a serverless app

Building a Serverless AppVinay Krishna

Page 2: Building a serverless app

Pre-cloud daysWhen developer’s life was easy only code was complex Really?

Page 3: Building a serverless app

Development

ClientDatabase

Server(App logic)

Page 4: Building a serverless app

Not only Development – What about Deployment• We also need to think a lot about

• Servers

• Budget / Cost

• Deployment time

• Scale

• Migration

• Maintenance

• Connectivity

• Availability

Page 5: Building a serverless app

Later• As demand grows, it became more complicated

• Many servers

• Providing racks, power, Internet access and other key resources.

• Dealing with provisioning, clustering, and maintaining servers required spending:

• Lots of money (capital expenditures, power, internet, cooling, security)

• Tons of time and detailed planning (contingency, develop/test/produce, site growth, and so on)

Page 6: Building a serverless app

http://docplayer.net/docs-images/24/2575088/images/3-0.png

Page 7: Building a serverless app

The shift to Cloud daysNo worry on servers, manage infrastructure on demand

Page 8: Building a serverless app

http://docplayer.net/docs-images/24/2575088/images/3-0.png

Page 9: Building a serverless app

What does it mean?

• On demand service

• Cost reduction

• Scalability and Elasticity

• Easy Maintenance

• High Performance

• Multi-tenancy

• Reliability

• Resource pooling

Page 10: Building a serverless app

Cloud – Seismic shift

• Provides an almost limitless supply of virtual machines

• With no upfront costs

• With just a bit of effort, developers can • fire up servers with their operating system of choice

• load in their applications (custom or open-source)

• and they’re off and running.

• Launching hundreds of servers and coordinating among them is a bit more work but it’s still far easier than it was just few years ago.

• Total cost of ownership of servers has fallen dramatically.

Page 11: Building a serverless app

https://www.iron.io/wp-content/uploads/2012/10/eras_compute_units-300x114.png

Page 12: Building a serverless app

Yet, Shift is not overOh really!! What’s left now?

Page 13: Building a serverless app

https://d262ilb51hltx0.cloudfront.net/max/800/1*FXxFtLqfIQdMT2i6T5Og1w.png

Serverless – a game changer

Page 14: Building a serverless app

VMsMachine as unit of scaleAbstracts the Hardware

ContainersApplications as the unit of scale

Abstracts the OS

ServerlessFunctions as the unit of scale

Abstracts the language runtime

I want to configure machines, storage, networking and my

OS

I want to run servers, configure applications

and control scaling

I want to run my code when it’s needed

Page 15: Building a serverless app

Still, it needs server

• Serverless does not mean “No Server” required

• It means think less about servers• such as scalability, high-availability, infrastructure-security, and so forth

https://pbs.twimg.com/media/Cr1HEpnXgAAK9vV.jpg

Page 16: Building a serverless app

Serverless

• Run code without provisioning or managing servers• Backend as a Service

• A model for providing web app and mobile app developers with a way to link their applications to backend cloud storage and APIs exposed by back end applications while also providing features such as user management, push notifications, and integration with social networking services.

• Function as a Service• Develop, run, and manage application functionalities without the complexity of building

and maintaining the infrastructure typically associated with developing and launching an app

Pay only for time your code runs

Page 17: Building a serverless app

Scenarios

• Time based processing

• Event based activity / processing

• Serverless web application architectures

• Serverless mobile backends

• Real-time stream processing

• File Processing

• Data and Analytics

• Websites

• Mobile applications

Page 18: Building a serverless app

• Problem

• Replicate one log from one data center to another

• Analyze the logs

• Take action

• Before Serverless

• Setup a VM/Container/WebJobs

• Build/Patch/Deploy

• Monitor

• Manage FTP cred

• Use FTP library

• Use cloud service SDK

• Using Serverless

• Setup a VM/Container/WebJobs

• Build/Patch/Deploy

• Monitor

• Manage FTP cred

• Use FTP library

• Use cloud service SDK

Page 19: Building a serverless app
Page 20: Building a serverless app

Hands-onLets try it now

Page 21: Building a serverless app

Pre-requisites

• Create your AWS account

• Create pair or group

• Knowledge of Node.js / Python / Java

Page 22: Building a serverless app

My first serverless application

• Write your “Hello participants!” serverless app

• Test the app

Page 23: Building a serverless app
Page 24: Building a serverless app

Link with AWS API

Page 25: Building a serverless app

Monitor and MetricsCloudWatch and CloudTrail

Page 26: Building a serverless app

What’s next…..

http://www.scuba-snorkeling-adventures.com/image-files/scuba-snorkeling-adventures.com-snorkelingdeep.jpg

Page 27: Building a serverless app

Thank You!Vinay Krishna

[email protected]

vinaykris

http://linkedin.com/in/vinaykrishna