SlideShare a Scribd company logo
# M D B l o c a l
Sig Narvaez, Sr Solutions Architect
Jan 22 2018
The Cove @ UCI Applied Innovation
Jumpstart: Building Your First
Serverless App with MongoDB
#MDBlocal
Sig Narváez
Sr. Solution Architect
MongoDB
@SigNarvaez
#MDBlocal
AGENDA
“Building something is the best way to learn”
1) MongoDB Basics: JSON Documents, CRUD, Indexes, Agg Fmwk
2) Build App: MEAN stack
3) Serverless: MongoDB Atlas + AWS Lambda
#MDBlocal
MongoDB Basics
#MDBlocal
Rigid 2D vs. Dynamic 3D
https://iedei.files.wordpress.com/2012/04/mercedes-f1-car-disassembled.jpeg
http://www.northlodge.org/f1/2002/bar/bar-2002-01-honda-02.jpg
#MDBlocal
Documents are RICH DATA STRUCTURES
{
fname: ‘Paul’,
lname: ‘Miller’,
cell: 447557505611,
city: ‘London’,
location: { type: Point,
coordinates: [45.123,47.232]},
Profession: [‘banking’, ‘finance’, ‘trader’],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Lists of sub-documents
Typed field values
(BSON)
Fields can contain
arrays
Fields
Query and Index
at any level
#MDBlocal
{
sku: ‘PAINTZXC123’,
product_name: ‘Metallic Paint’,
product_type: ‘Paint’,
colors: [‘Red’, ‘Green’],
size_gallons: [5, 10]
}
{
sku: ‘TSHRTASD43546’,
product_name: ‘Funny Car T’,
product_type: ‘T-shirt’
size: [‘S’, ‘M’, ‘L’, ‘XL’],
colors: [‘Heather Gray’ … ],
material: ‘100% cotton’,
wash: ‘cold’,
dry: ‘tumble dry low’
}
{
sku: ‘WHEELBVCX6543’,
product_name: ’19” 5-spoke’,
product_type: ‘Wheel’
material: ‘aluminum alloy’,
color: ‘silver’,
frame_material: ‘aluminum’,
package_height: ’20.5x32.9x55’,
weight_lbs: 5.15,
wheel_size_in: 19
}
Polymorphic Schema – Aligns with OOP principles
ProductCatalog collection:
Car Paint products Car T-Shirt products Car Wheels products
Documents are FLEXIBLE
#MDBlocal
SQL & NoSQL
Relational MongoDB
Data
Governance
Document Validation &
JSON Schema
Trigger Change Streams (3.6)
Joins $lookup (left-outer)
Indexes &
Views
✔️
NoSQL MongoDB
High Availability /
Always On
Replica Sets
High Scalability /
Global Scale
Sharding
Horizontal Scale Secondary Nodes
(read scale)
Shards
(write scale)
MongoDB NEXUS Architecture
#MDBlocal
How easy is it to get started?
A: Let’s see some code!
#MDBlocal
.local development
 npm install mongodb --save  mongod --dbpath ../data Compass
#MDBlocal
Writing Data
#MDBlocal
Find collectors within 10 mile radius of London who
own cars from the 1970’s
http://static2.uk.businessinsider.com/image/57925947dd089545048b49d4-1200/jay-lenos-garage-jaguar-e-type.jpg
#MDBlocal
Expressive Queries
London 10 Miles
(in Radians)
1970’s
#MDBlocal
db.collectors.createIndex(
{
"location":"2dsphere",
"cars.year": 1
}
);
Rich indexes
#MDBlocal
Aggregation Framework  Analytics
Find the top 10 collectors
#MDBlocal
How easy was it to get started?
A: VERY EASY!
#MDBlocal
Let’s build an app!
#MDBlocal
The MEAN Stack
#MDBlocal
Driver or ODM?
● Official Driver
● Support Latest Features
● Not an ODM
● 3rd Party
● May not support Latest Features
● ODM
● De facto with MEAN
#MDBlocal
MEAN Questions (& Applauses 👏 👏 👏)
#MDBlocal
MEAN Questions (& Applauses 👏 👏 👏)
#MDBlocal
Was that easy?
A: 👏 👏 👏
#MDBlocal
Path to Serverless:
DBaaS
#MDBlocal
MongoDB Atlas: Database as a Service
Self-service, elastic,
and automated
Secure by default
Comprehensive
monitoring
Global and highly
available
Continuous & Queryable
Backups.
Migrations
Orgs, Teams and
Projects
#MDBlocal
Update to connect to Atlas
Security
1. RBAC (User & Permissions)
2. IP Whitelist
Update connection string
#MDBlocal
What burden does Atlas remove?
A: Running “Production Grade”
MongoDB in the Cloud
#MDBlocal
Path to Serverless:
FaaS
#MDBlocal
Where will my logic run?
Big Iron Commodity
Hardware
Virtualized Containers Functions
#MDBlocal
Thoughtworks Technology Radar
https://www.thoughtworks.com/radar/techniques/serverless-architecture
https://www.thoughtworks.com/radar/platforms/mongodb
#MDBlocal
Serverless Architecture
aws-serverless-express
VPC Peering
#MDBlocal
MEAN Questions (& Applauses 👏 👏 👏)
aws-serverless-express
#MDBlocal
VPC Peering
explained
#MDBlocal
Atlas
#MDBlocal
Atlas AWS
#MDBlocal
Atlas AWS
#MDBlocal
Atlas AWS
#MDBlocal
Easy!
#MDBlocal
What burden does Serverless remove?
A: App Servers – Setup, Run & Scale!
#MDBlocal
What did we learn?
Basics
More? Servererless Architectures Webinar:
https://www.mongodb.com/presentations/webinar-serverless-
architectures-with-aws-lambda-and-mongodb-atlas
#MDBlocal
THANK YOU!!
@SigNarvaez

More Related Content

PPTX
MongoDB Stitch Introduction
PPTX
Keynote - Speaker: Grigori Melnik
PPTX
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
PPTX
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
PPTX
[MongoDB.local Bengaluru 2018] Keynote
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
PPTX
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB Stitch Introduction
Keynote - Speaker: Grigori Melnik
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Keynote
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB

What's hot (20)

PPTX
Tutorial: Building Your First App with MongoDB Stitch
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PPTX
A Free New World: Atlas Free Tier and How It Was Born
PDF
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
PDF
Building Your Own MongoDB as a Service Offering
PDF
MongoDB World 2019: MongoDB in Data Science: How to Build a Scalable Product ...
PDF
MongoDB Stitch Introduction
PPTX
Performance and Security Enhancements in MongoDB's BI Connector
PDF
Building mobile apps with Realm for React Native
PPTX
Jumpstart: Your Introduction to MongoDB
PPTX
NGSIv2 Overview for Developers That Already Know NGSIv1
PDF
MongoDB.local Berlin: MongoDB Mobile
PDF
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
PPTX
MongoDB.local DC 2018: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
PDF
Backend asa service - juan
PPTX
MongoDB World 2018: Tutorial - MongoDB & NodeJS: Zero to Hero in 80 Minutes
PDF
Webinar: Building a Blockchain Database with MongoDB
PPTX
Enterprise Integration Pack & On-Premises Data Gateway
PDF
MongoDB.local Austin 2018: MongoDB Mobile: Bringing the Power of MongoDB to Y...
PPTX
Going Serverless with CQRS on AWS
Tutorial: Building Your First App with MongoDB Stitch
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
A Free New World: Atlas Free Tier and How It Was Born
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
Building Your Own MongoDB as a Service Offering
MongoDB World 2019: MongoDB in Data Science: How to Build a Scalable Product ...
MongoDB Stitch Introduction
Performance and Security Enhancements in MongoDB's BI Connector
Building mobile apps with Realm for React Native
Jumpstart: Your Introduction to MongoDB
NGSIv2 Overview for Developers That Already Know NGSIv1
MongoDB.local Berlin: MongoDB Mobile
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
MongoDB.local DC 2018: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
Backend asa service - juan
MongoDB World 2018: Tutorial - MongoDB & NodeJS: Zero to Hero in 80 Minutes
Webinar: Building a Blockchain Database with MongoDB
Enterprise Integration Pack & On-Premises Data Gateway
MongoDB.local Austin 2018: MongoDB Mobile: Bringing the Power of MongoDB to Y...
Going Serverless with CQRS on AWS
Ad

Similar to Jumpstart: Building Your First App with MongoDB (20)

PPTX
Jumpstart: Introduction to MongoDB
PPTX
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDB
PDF
MongoDB .local Chicago 2019: Practical Data Modeling for MongoDB: Tutorial
PDF
MongoDB .local Toronto 2019: MongoDB Atlas Jumpstart
PDF
MongoDB .local Chicago 2019: MongoDB Atlas Jumpstart
PPTX
Jumpstart: Your Introduction To MongoDB
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
PPTX
MongoDB.local Seattle 2019: Building Your First MongoDB App Using Atlas & Stitch
PPTX
MongoDB.local Seattle 2019: Building Your First MongoDB App Using Atlas & Stitch
PDF
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
PPTX
Building your First MEAN App
PDF
Simplifying & accelerating application development with MongoDB's intelligent...
PPTX
When to Use MongoDB
PPTX
Webinar: General Technical Overview of MongoDB for Ops Teams
PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PPTX
Webinar: Realizing the Promise of Machine to Machine (M2M) with MongoDB
PPTX
Webinar: When to Use MongoDB
PDF
Enabling Telco to Build and Run Modern Applications
PPTX
When to Use MongoDB...and When You Should Not...
PPTX
Building your first MEAN application
Jumpstart: Introduction to MongoDB
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDB
MongoDB .local Chicago 2019: Practical Data Modeling for MongoDB: Tutorial
MongoDB .local Toronto 2019: MongoDB Atlas Jumpstart
MongoDB .local Chicago 2019: MongoDB Atlas Jumpstart
Jumpstart: Your Introduction To MongoDB
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB.local Seattle 2019: Building Your First MongoDB App Using Atlas & Stitch
MongoDB.local Seattle 2019: Building Your First MongoDB App Using Atlas & Stitch
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
Building your First MEAN App
Simplifying & accelerating application development with MongoDB's intelligent...
When to Use MongoDB
Webinar: General Technical Overview of MongoDB for Ops Teams
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
Webinar: Realizing the Promise of Machine to Machine (M2M) with MongoDB
Webinar: When to Use MongoDB
Enabling Telco to Build and Run Modern Applications
When to Use MongoDB...and When You Should Not...
Building your first MEAN application
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
PDF
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
PDF
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
PDF
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts

Jumpstart: Building Your First App with MongoDB