hop on the server less adventure - javascript-conference.com€¦ ·...

47
Hop on the server less adventure Simona Cotin

Upload: others

Post on 10-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

Hop on the server less adventure

Simona Cotin

Page 2: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

Simona CotinCloud Dev Advocate @ Microsoft @simona_cotin

Page 3: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

WHAT IS SERVERLESS?

Page 4: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin–Martin Fowler

“Serverless architectures refer to applications that significantly

depend on third-party services (known as Backend as a Service

or "BaaS") or on custom code that's run in ephemeral

containers (Function as a Service or "FaaS")”

Page 5: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotinCodepen by awesome @sarah_edo https://t.co/PvqK1M2Pwz

Page 6: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

•Reacts to events

•Autoscales

•‘Pay as you go’

Page 7: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotinhttp://serverlesscalc.com/

Page 10: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Functions are stateless

Page 11: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Cold start

Page 12: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

“Serverless computing has made its way into the enterprise because

it simplifies deployment and allows developers to focus more on application features than on tasks such as provisioning VMs.

Emerging uses for serverless technology include image

processing, task management, workflows and notifications.”

Page 13: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Because it’s

awesome!

Why Node.js?

Page 14: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

•Javascript has a rich ecosystem of libraries and tools

•Enable FE developers to build scalable backends

•Large use base - javascript is the English of languages

Why Node.js?

Page 15: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

•Lightweight - helps reduce cold start

•Commonly run in a distributed, horizontally scaled fashion

•Scripting means no compilation required to start from a portal

•Runs equally easy on most OS’s

Why Node.js?

Page 16: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Serverless providers•Azure Functions

•Amazon Lambda

•Google Cloud Functions

•Auth0 Webtask

•Ibm Openwhisk

Page 17: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

What can I do with serverless?

Page 18: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Hello world

Page 19: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Timer

Run background tasks

Page 20: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Web hook

Page 21: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function
Page 22: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Web API

Implement CRUD operations

Page 23: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Web API

Page 24: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Web API Pluralsight course with

John Papa https://aka.ms/pbp

GitHub repo https://aka.ms/pbp-serverless

Page 25: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Data processing

Page 26: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Data processingDemo by Sarah Drasner (follow her on Twitter!!)

Article: https://css-tricks.com/exploring-data-with-serverless-

and-vue-part-i/

Page 27: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

How do I get started?

Page 28: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Create function - portal

Page 29: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Page 30: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Page 31: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Local debugging - prerequisites

• Node v8.0+ ◦ Older versions of node will be

supported soon. • .NET Core 2.0 • Azure Core Function Tools 2.0 npm install --global azure-functions-core-

tools@core

Page 32: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Local debugging

Page 33: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Create function - cli

Page 34: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Create function - cli

Page 35: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Page 36: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Publish function

Page 37: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Publish function

Page 38: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Page 39: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Git deployment

Page 40: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Git deployment

Page 41: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Git deployment - setup

Page 42: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Git deployment - setup

Page 43: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

–https://aka.ms/serverless-demos

Page 44: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

• Event driven code

• Autoscales

• Only pay for what you’re using/Pay as you go

Page 45: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

Resources• https://github.com/anaibol/awesome-serverless

• https://aka.ms/functions

• https://github.com/simonaco/pbp-serverless

• https://css-tricks.com/exploring-data-with-serverless-and-vue-part-i/

• https://github.com/simonaco/property-suggester

Page 46: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin– https://london.serverlessdays.io/

Page 47: Hop on the server less adventure - javascript-conference.com€¦ · exploring-data-with-serverless-and-vue-part-i/ @simona_cotin How do I get started? @simona_cotin Create function

@simona_cotin

–Joe Emison

“the thing that distinguishes the best, fastest, most efficient engineering

organizations is how little code they actually write”