Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why...

39
Look Ma! No Servers! Serverless Application Development with MongoDB Stitch YouOldMaid Karen Huaulmé, Developer Advocate

Transcript of Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why...

Page 1: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Look Ma! No Servers!

Serverless Application Development with

MongoDB Stitch

YouOldMaid

Karen Huaulmé, Developer

Advocate

Page 2: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling
Page 3: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling
Page 4: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling
Page 5: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling
Page 6: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling
Page 7: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling
Page 8: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

{

“name”: “Karen Huaulmé”,

“MongoDB”: {

“positions”: [“Developer Advocate”, “Solutions Architect”],

“since” : new Date (“2018-01”),

},

“Pre-MongoDB”: {

“positions”: [“Solutions Architect”, “Integration Engineer”, “Dev Rel”],

“companies”: [ “Twitch”, “Amazon”, “Nvidia”]

},

“likes”: [“running”, “gleitschirmfliegen”, “butchering languages” ]

}

About Me

Page 9: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

AGENDA

Serverless MongoDB

Stitch Demos and

Tutorials

Page 10: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

What is serverless?

Page 11: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Serverless

No Servers

Page 12: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Why serverless?

You can be the minimum champion of…

• Infrastructure

• Scaling

• Paying only for what you use

• Independent deployments

Page 13: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

The serverless platform

for building modern

applications

QueryAnywhere Functions Stitch Triggers MongoDB

Page 14: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

MongoDB Cloud Architecture

Page 15: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

Stitch is a multi-tool

Page 16: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

Stitch is a Rorschach test

Page 17: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

Decoupled front-end & back-end

Front-end

Atlas

Mong

oDB

Back-end

APIs Auth API

calls

Page 18: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

Microservices architecture

Front-end

M

DB

Micro

Service 1

API calls

M

DB

Micro

Service 2

M

DB

Micro

Service 3

Page 19: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

Where does Stitch fit in?

Atlas

Front-end Mongo

DB

Back-end

APIs Auth API

calls

Page 20: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

Where does Stitch fit in?

Atlas

Front-end Mongo

DB

Back-end

API

s Auth API

calls

Page 21: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

“We were going to write a

backend, and then we realized,

oh sh**, we didn’t need to!” Greg Hopkins, Lead Application Developer at TrademarkVision

Page 23: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Triggers Functions

Page 24: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Atlas Triggers

• Your app reacts in real time to database

changes

• Invokes Stitch function

• No need to write polling code

Page 25: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Hosted Functions

• Code server-side JavaScript functions

– Full ES6 support

• Orchestrate data across multiple services

• Invoke through Stitch API or Webhooks

• Access to context, including requesting user

• Serverless

Page 26: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

3 Types of Triggers

Atlas

Triggers

Enable

applications to

quickly and

intelligently react

to changes.

● Database Triggers responds when documents are added,

removed, or updated

● Authentication Triggers responds when a user created, authenticated,

or deleted

● Scheduled Triggers

responds on a pre-defined scheduled, CRON

job

Page 27: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

High Availability Horror Story

Page 28: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

High Availability Horror Story

Page 29: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

DEMO:

My Lazy Life Log

Page 30: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

DEMO:

MongoMart

Authentication Triggers

Real Time Notifications

- Twilio

- AWS

Scheduled Chron Job

Stitch Hosting

Page 31: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal #MDBLocal

DEMO:

Movie Search Engine

http://bit.ly/AtlasSearch_Movies

Atlas Sample Data:

- sample_mflix.movies

Page 32: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Benefits of Stitch

Page 33: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal

Managing Backend Infrastructure

Core Database Functionality

Storage

Integrations, Security, Server-side logic

Code that moves Business Forward

Managing OS, Scale, Security, Backups, etc.

MongoDB

Atlas

MongoDB

Stitch Managed

Scalable

Highly Available

Secure

Enable developers to

focus here

Stitch + Atlas = focusing on code that matters

Page 34: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal

4 wks 2

wks 5 wks

Backend: 12 wks Data Access: 6

wks

Frontend: 6

wks

Without

Stitch/

Atlas

With

Stitch/

Atlas

Stitch helps cut development time in half

Page 35: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

#MDBLocal

MongoDB Stitch Reduces Infrastructure Costs

Dev Production

$$$$

0

Demand

MongoDB Stitch

Traditional App Servers

Cloud Compute Instances

Page 36: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Key Takeaways

When You Want to Be the Minimum Champion of Infrastructure

Use MongoDB

Stitch

Page 37: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

FAQ Can I use this for free? • Yes! Stitch provides a free tier:

• The first 25 GB of data transfer per month is free.

• 1,000,000 requests + 100,000 GB-sec per month are free.

•Do I have to use the GUI? • No, There is a CLI available

•Do I have to use JS to write serverless functions? • Yes

•How can I get started? • http://bit.ly/serverlessATX

Page 38: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

DEMO DEMO

http://bit.ly/AtlasSearch_Movie

s

YouOldMaid

[email protected]

m

Page 39: Look Ma! No Servers! Serverless Application Development with … · Serverless ≠ No Servers . Why serverless? You can be the minimum champion of… • Infrastructure • Scaling

Questions?

[email protected]

YouOldMaid