Well Actually Serverless, - DrupalCon Well Actually...The Serverless Framework with Node.js & AWS -...

Post on 21-May-2020

47 views 0 download

Transcript of Well Actually Serverless, - DrupalCon Well Actually...The Serverless Framework with Node.js & AWS -...

Serverless, Well Actually...Bob Kepford

| 2

Bob is a Lead Architect at Mediacurrent who has been

slinging Drupal code since 2008. An active member of

the Drupal community, Bob manages the Fresno,

California Drupal User's Group, co-organizes the

Decoupled Days Conference, belongs to the Drupal

Association, and is the editor of TheWeeklyDrop, a

popular Drupal newsletter.

When he's not in front of a computer, Bob enjoys a

good cup of coffee, playing bass, watching Dodgers

baseball, and hanging out with his wife and two sons in

sunny California.

Bob KepfordLead Architect

/in/kepford

@kepford

| 3

About Mediacurrent

| 4

Who We Are

Mediacurrent is a full-service digital agency that

implements world class open source software

development, strategy, and design to achieve

defined goals for enterprise organizations

seeking a better return on investment.

| 5

Serverless, what is it?

...cloud-computing execution model in which the cloud provider acts as the server, dynamically managing the allocation of machine resources.

Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.”

“~ Wikipedia

| 6

Mediacurrent is a full-service digital agency that

implements world class open source software

development, strategy and design to achieve defined

goals for enterprise organizations seeking a better

return on investment.

Who We Are

| 7https://readwrite.com/2012/10/15/why-the-future-of-software-and-apps-is-serverless/

“The phrase “serverless” doesn’t mean servers are no longer involved. It simply means that developers

no longer have to think that much about them.”~ Ken Fromm

| 8

So there IS a Server!

| 9

Yeah. The Name. Whatever.

| 10

| 11

4 Pillars of Serverless

1. Service based

2. Cloud runtime

3. Usage based pricing

4. Managed infrastructure

~ Bob Kepford - noted tech luminary

| 12

S.C.U.M.

| 13

So What’s the Big Deal?

Low start up cost Predictable Pricing Web Scale Write your front-end &

back-end Javascript

Built for microservices

approaches

| 14

Components of Serverless

● FaaS (Functions as a Service)

● HTTP Endpoints

● Events / Scheduling

● File Services

● Data stores (SQL/NoSQL)

● Messaging Services (Email, SMS)

● Queuing Services

● Authentication Services

● Logging Services

| 15

How'd We Get Here?

● Microservices

● AWS

● PaaS / Containerization

● Kubernetes

● Serverless

| 16

Service Providers

● Amazon (AWS)

● Google (Cloud & Firebase)

● Microsoft (Azure)

● IBM (Uses Apache OpenWhisk which is OSS)

● Some that build on top of AWS like Webtask

| 17

Serverless Languages

| 18

Languages Used for Serverless Development

| 19

Common Uses

● Static websites - contact forms

● Image processing

● Ops / Infrastructure

● IoT

● Data normalization - GraphQL Server

● Offloading expensive tasks from your web server

● Serverless at the edge

● Bots - A Slackbot

● Avoid high upfront costs for infrastructure

| 20

● Discrete API functionality

● Scale is a concern

● Cost is a concern

● Maintenance is a concern

● Tight timeline &

inexperienced team

● Execution time is critical

● Need co-located resources

● Pricing: Some high traffic

situations. Mileage varies

When should I use it? When should I avoid it?

| 21

How much does it cost?

● It depends...

● Do your homework and use Calculators

● It can be cost effective

● Set billing limits and notifications

| 22

Concerns● Vendor Lock-In

● Identity & Access Management

● Cold starts

| 23

● Serverless framework - serverless.com

● Serverless Plugins - github.com/serverless/plugins

● SAM (AWS Serverless Application Model) -

github.com/awslabs/serverless-application-model

Frameworks and Tools

| 24

● CLI tool for deployment

● Standardizes project structure

● Rich plugin ecosystem

● Eases migration between providers

Serverless Framework

| 25

Getting Startednpm install serverless -g

serverless create --template aws-nodejs --path my-service

cd my-service

| 26

Real World Use Case

| 27

| 28

| 29

github.com/kepford/serverless-feedbin-to-pinboard

Feedbin to Pinboard

| 30

| 31

Project Directory

| 32

serverless.yml

| 33

serverless.yml

| 34

serverless.yml

| 35

package.json

| 36

handler.js getIds()

| 37●●●●●●

handler.js getItems()

| 38

Deployment

sls deploy

sls deploy -s prod

sls deploy -f functionName -s dev

| 39

Serverless Deploy

| 40

Project Teardown

sls remove

sls remove -s prod

| 41

Removal

| 42

Logging? Yep!

sls logs -f hello -s dev -t

Tail the logs on dev for function named hello.

| 43

Local Development? Yep

sls offline start

sls invoke -f functionName -l

| 44

Serverless Offline

| 45

The Serverless Revolution is Coming

| 46

Resources

● Think FAAS with TREK10 - Podcast

● The Serverless Framework with Node.js & AWS - Udemy Course

● Serverless Status - Newsletter

● Serverless Chronicle - Newsletter

● The Power of Serverless - Site for Frontend Developers

● Visualizing Cloud Starts - by Mikhail Shilkov

● Debunking Serverless Tropes 🔥 - Ryan Marsh

Call for papersThe Decoupled Days 2019 call for papers is extended until May 3, 2019 at 11:59pm EST.

SponsorshipsFor sponsorship information, reach out to our team at decoupleddays@gmail.com.

@decoupleddaysFollow us on Twitter to stay updated on important announcements.

#decoupleddays • decoupleddays.com • @decoupleddays

Friday, April 12, 2019

#DrupalContributions

Contribution Opportunities

9:00-18:00Room: 602

Mentored Contribution

First TimeContributor Workshop

9:00-12:00Room: 606

GeneralContributions

9:00-18:00Room: 6A

Join Us!

Thank you!

@mediacurrent

What did you think?Locate this session at the DrupalCon Seattle website:

http://seattle2019.drupal.org/schedule

Take the Survey!https://www.surveymonkey.com/r/DrupalConSeattle

| 50

Title

Text

| 51

Today’s Team

Josh LinardVP, Sales

Executive Sponsor

Dave TerryPartner, Client Services

Bill ShaouySenior Business Analyst

Matt DavisLead Architect

Emerging Technology

●●●●●●