look ma! no servers! serverless application development with … · serverless ≠ no servers . why...

Post on 22-May-2020

17 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Look Ma! No Servers!

Serverless Application Development with

MongoDB Stitch

YouOldMaid

Karen Huaulmé, Developer

Advocate

#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

#MDBLocal #MDBLocal

AGENDA

Serverless MongoDB

Stitch Demos and

Tutorials

What is serverless?

Serverless

No Servers

Why serverless?

You can be the minimum champion of…

• Infrastructure

• Scaling

• Paying only for what you use

• Independent deployments

The serverless platform

for building modern

applications

QueryAnywhere Functions Stitch Triggers MongoDB

#MDBLocal #MDBLocal

MongoDB Cloud Architecture

#MDBLocal #MDBLocal

Stitch is a multi-tool

#MDBLocal #MDBLocal

Stitch is a Rorschach test

#MDBLocal #MDBLocal

Decoupled front-end & back-end

Front-end

Atlas

Mong

oDB

Back-end

APIs Auth API

calls

#MDBLocal #MDBLocal

Microservices architecture

Front-end

M

DB

Micro

Service 1

API calls

M

DB

Micro

Service 2

M

DB

Micro

Service 3

#MDBLocal #MDBLocal

Where does Stitch fit in?

Atlas

Front-end Mongo

DB

Back-end

APIs Auth API

calls

#MDBLocal #MDBLocal

Where does Stitch fit in?

Atlas

Front-end Mongo

DB

Back-end

API

s Auth API

calls

“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

Triggers Functions

Atlas Triggers

• Your app reacts in real time to database

changes

• Invokes Stitch function

• No need to write polling code

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

#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

High Availability Horror Story

High Availability Horror Story

#MDBLocal #MDBLocal

DEMO:

My Lazy Life Log

#MDBLocal #MDBLocal

DEMO:

MongoMart

Authentication Triggers

Real Time Notifications

- Twilio

- AWS

Scheduled Chron Job

Stitch Hosting

#MDBLocal #MDBLocal

DEMO:

Movie Search Engine

http://bit.ly/AtlasSearch_Movies

Atlas Sample Data:

- sample_mflix.movies

Benefits of Stitch

#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

#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

#MDBLocal

MongoDB Stitch Reduces Infrastructure Costs

Dev Production

$$$$

0

Demand

MongoDB Stitch

Traditional App Servers

Cloud Compute Instances

Key Takeaways

When You Want to Be the Minimum Champion of Infrastructure

Use MongoDB

Stitch

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

DEMO DEMO

http://bit.ly/AtlasSearch_Movie

s

YouOldMaid

kwh@mongodb.co

m

Questions?

kwh@mongodb.com

YouOldMaid

top related