SlideShare a Scribd company logo
MongoSF
April 30, 2010




      1
Hot Potato Overview

• What: Hot Potato connects audiences around shared interests

• When: Founded early 2009 / PoC: Dec 2009 / Beta: 2 months ago

• Where: Williamsburg, Brooklyn!

• Who: Lincoln, Justin, Saadiq, Jeremy, Jace, Matt, Mike, Will




                                            2
hotpotato.com




                3
Hot Potato on the iPhone




                     4
Technology Stack

Design principles: Simple and stateless


API
 • Scala / MongoDB

API Clients
 • Web application (Python/Django)
 • iPhone (Obj-C)



                               5
Hot Potato API - Why MongoDB?

• Good documentation and excellent support
• Fully Featured (like an RDBMS) but with a migration path to scale-
out
• Replication
• Easy administration / scripting
• Fast

• Auto-sharding coming soon




                                    6
Hot Potato API - Why MongoDB?




                   7
Hot Potato API - Why MongoDB?

RDBMS Optimization process




                             7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache




                                 7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache
2. too many joins -> de-normalize your data




                                  7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache
2. too many joins -> de-normalize your data
3. too many writes -> scale up hardware, CPU, RAM, IO




                                  7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache
2. too many joins -> de-normalize your data
3. too many writes -> scale up hardware, CPU, RAM, IO
4. too much db load -> eliminate triggers, stored procedures




                                  7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache
2. too many joins -> de-normalize your data
3. too many writes -> scale up hardware, CPU, RAM, IO
4. too much db load -> eliminate triggers, stored procedures
5. too much db load -> pre-materialize complex queries




                                  7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache
2. too many joins -> de-normalize your data
3. too many writes -> scale up hardware, CPU, RAM, IO
4. too much db load -> eliminate triggers, stored procedures
5. too much db load -> pre-materialize complex queries
6. writes bottleneck -> drop secondary indexes




                                  7
Hot Potato API - Why MongoDB?

RDBMS Optimization process
1. too many reads -> add cache
2. too many joins -> de-normalize your data
3. too many writes -> scale up hardware, CPU, RAM, IO
4. too much db load -> eliminate triggers, stored procedures
5. too much db load -> pre-materialize complex queries
6. writes bottleneck -> drop secondary indexes


At this point you are using the RDBMS as a KV store. The full-
featured nature of the RDBMS is merely getting in the way of scaling.


                                  7
Hot Potato API - Why MongoDB?




                   8
Hot Potato API - Why MongoDB?
Mongo comparison




                    8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled




                                    8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled
2. mongo doesn’t support joins - data starts de-normalized




                                    8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled
2. mongo doesn’t support joins - data starts de-normalized
3. writes start out fast, can be horizontally scaled




                                     8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled
2. mongo doesn’t support joins - data starts de-normalized
3. writes start out fast, can be horizontally scaled
4. much less opportunity for logic in the db




                                     8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled
2. mongo doesn’t support joins - data starts de-normalized
3. writes start out fast, can be horizontally scaled
4. much less opportunity for logic in the db
5. map/reduce for pre-materialization/aggregation, which can be
horizontally scaled




                                     8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled
2. mongo doesn’t support joins - data starts de-normalized
3. writes start out fast, can be horizontally scaled
4. much less opportunity for logic in the db
5. map/reduce for pre-materialization/aggregation, which can be
horizontally scaled
6. indexes can be removed over time as usage becomes more KV-like




                                     8
Hot Potato API - Why MongoDB?
Mongo comparison
1. reads start out fast, can be externally cached, can also be
horizontally scaled
2. mongo doesn’t support joins - data starts de-normalized
3. writes start out fast, can be horizontally scaled
4. much less opportunity for logic in the db
5. map/reduce for pre-materialization/aggregation, which can be
horizontally scaled
6. indexes can be removed over time as usage becomes more KV-like


The gradual scaling process is more natural with Mongo. Horizontal
scaling is not an after-thought or bolt on addition. Mongo works
perfectly well as a KV store if you ever get to that point.
                                     8
Hot Potato API - Why Scala?

• Runs on JVM (Stable, Fast)
• Access to Java’s many libraries
• Language benefits
 • Terse
 • Supports Immutability
 • Functional
 • Concurrent
 • Easy to write DSLs


                             9
Three key Scala features



• Pattern Matching / Case classes

• Implicit conversions

• Actors


                         10
Building a DSL for Mongo
Documents are a flexible building block:
• Insertion
• Updates
• Queries
• Sorting
• parts of Map / Reduce
• Indexes




                            11
Building a DSL for Mongo
Goals
 • Stay close to the MongoDB Java API
 • Keep it flexible
 • Focus on document creation
  • New documents, queries, updates
  • Protect against mis-named fields

Key classes and objects
  • Collection - wraps MongoDB DBCollection
  • MongoAST - defines the types for building Mongo documents
  • MongoDSL - defines DSL syntax

                                12
Usage Patterns

Asynchronous atomic updates

• Simple observer pattern implemented with Lift Actors
 • HpActor, HpActorPool, Notifier

• Main action object with a Notifier
 • Example: checkins

• Listeners that use MongoDB atomic updates
 • Example: EventAdjuster
                            13

More Related Content

What's hot

Branch Management in Git Fusion
Branch Management in Git FusionBranch Management in Git Fusion
Branch Management in Git Fusion
Perforce
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
Bud Siddhisena
 
Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Sadayuki Furuhashi
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
johnrjenson
 
Lessons Learned Migrating 2+ Billion Documents at Craigslist
Lessons Learned Migrating 2+ Billion Documents at CraigslistLessons Learned Migrating 2+ Billion Documents at Craigslist
Lessons Learned Migrating 2+ Billion Documents at Craigslist
Jeremy Zawodny
 
Ui perf
Ui perfUi perf
MongoDB memory management demystified
MongoDB memory management demystifiedMongoDB memory management demystified
MongoDB memory management demystified
Alon Horev
 
Perforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the ProfanePerforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the Profane
Perforce
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
Perrin Harkins
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
MongoDB
 
Presto+MySQLで分散SQL
Presto+MySQLで分散SQLPresto+MySQLで分散SQL
Presto+MySQLで分散SQL
Sadayuki Furuhashi
 
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Ontico
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBasezpinter
 
Presto in my_use_case
Presto in my_use_casePresto in my_use_case
Presto in my_use_case
wyukawa
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
Scalable Text File Service with MongoDB (Intuit)
Scalable Text File Service with MongoDB (Intuit)Scalable Text File Service with MongoDB (Intuit)
Scalable Text File Service with MongoDB (Intuit)
MongoDB
 
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
Ontico
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB Clusters
Severalnines
 
Day 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConfDay 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConf
Redis Labs
 

What's hot (20)

Branch Management in Git Fusion
Branch Management in Git FusionBranch Management in Git Fusion
Branch Management in Git Fusion
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
 
Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
Lessons Learned Migrating 2+ Billion Documents at Craigslist
Lessons Learned Migrating 2+ Billion Documents at CraigslistLessons Learned Migrating 2+ Billion Documents at Craigslist
Lessons Learned Migrating 2+ Billion Documents at Craigslist
 
Ui perf
Ui perfUi perf
Ui perf
 
MongoDB memory management demystified
MongoDB memory management demystifiedMongoDB memory management demystified
MongoDB memory management demystified
 
Perforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the ProfanePerforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the Profane
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
 
Presto+MySQLで分散SQL
Presto+MySQLで分散SQLPresto+MySQLで分散SQL
Presto+MySQLで分散SQL
 
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
 
Presto in my_use_case
Presto in my_use_casePresto in my_use_case
Presto in my_use_case
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
Scalable Text File Service with MongoDB (Intuit)
Scalable Text File Service with MongoDB (Intuit)Scalable Text File Service with MongoDB (Intuit)
Scalable Text File Service with MongoDB (Intuit)
 
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB Clusters
 
Day 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConfDay 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConf
 

Viewers also liked

A Regression Analysis Approach for Building a Prediction Model for System Tes...
A Regression Analysis Approach for Building a Prediction Model for System Tes...A Regression Analysis Approach for Building a Prediction Model for System Tes...
A Regression Analysis Approach for Building a Prediction Model for System Tes...
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)MongoSF
 
A Proposal of Postgraduate Programme for Software Testing Specialization
A Proposal of Postgraduate Programme for Software Testing SpecializationA Proposal of Postgraduate Programme for Software Testing Specialization
A Proposal of Postgraduate Programme for Software Testing Specialization
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)MongoSF
 
MongoHQ (Jason McCay & Ben Wyrosdick)
MongoHQ (Jason McCay & Ben Wyrosdick)MongoHQ (Jason McCay & Ben Wyrosdick)
MongoHQ (Jason McCay & Ben Wyrosdick)MongoSF
 
Performance Testing: Analyzing Differences of Response Time between Performan...
Performance Testing: Analyzing Differences of Response Time between Performan...Performance Testing: Analyzing Differences of Response Time between Performan...
Performance Testing: Analyzing Differences of Response Time between Performan...
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
A Method for Predicting Defects in System Testing for V-Model
A Method for Predicting Defects in System Testing for V-ModelA Method for Predicting Defects in System Testing for V-Model
A Method for Predicting Defects in System Testing for V-Model
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
Establishing A Defect Prediction Model Using A Combination of Product Metrics...
Establishing A Defect Prediction Model Using A Combination of Product Metrics...Establishing A Defect Prediction Model Using A Combination of Product Metrics...
Establishing A Defect Prediction Model Using A Combination of Product Metrics...
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
Breaking the Software - A Topic on Software Engineering & Testing
Breaking the Software -  A Topic on Software Engineering & TestingBreaking the Software -  A Topic on Software Engineering & Testing
Breaking the Software - A Topic on Software Engineering & Testing
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
Administration (Eliot Horowitz)
Administration (Eliot Horowitz)Administration (Eliot Horowitz)
Administration (Eliot Horowitz)MongoSF
 
Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)MongoSF
 
Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)MongoSF
 
An Alternative of Secured Online Shopping System via Point-Based Contactless ...
An Alternative of Secured Online Shopping System via Point-Based Contactless ...An Alternative of Secured Online Shopping System via Point-Based Contactless ...
An Alternative of Secured Online Shopping System via Point-Based Contactless ...
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...MongoSF
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoSF
 
Performance Testing Strategy for Cloud-Based System using Open Source Testing...
Performance Testing Strategy for Cloud-Based System using Open Source Testing...Performance Testing Strategy for Cloud-Based System using Open Source Testing...
Performance Testing Strategy for Cloud-Based System using Open Source Testing...
MIMOS Berhad/Open University Malaysia/Universiti Teknologi Malaysia
 

Viewers also liked (20)

Testing Experience Magazine Vol.12 Dec 2010
Testing Experience Magazine Vol.12 Dec 2010Testing Experience Magazine Vol.12 Dec 2010
Testing Experience Magazine Vol.12 Dec 2010
 
A Regression Analysis Approach for Building a Prediction Model for System Tes...
A Regression Analysis Approach for Building a Prediction Model for System Tes...A Regression Analysis Approach for Building a Prediction Model for System Tes...
A Regression Analysis Approach for Building a Prediction Model for System Tes...
 
Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)Practical Ruby Projects (Alex Sharp)
Practical Ruby Projects (Alex Sharp)
 
A Proposal of Postgraduate Programme for Software Testing Specialization
A Proposal of Postgraduate Programme for Software Testing SpecializationA Proposal of Postgraduate Programme for Software Testing Specialization
A Proposal of Postgraduate Programme for Software Testing Specialization
 
Robert Pattinson
Robert PattinsonRobert Pattinson
Robert Pattinson
 
Robert Pattinson
Robert PattinsonRobert Pattinson
Robert Pattinson
 
Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)
 
MongoHQ (Jason McCay & Ben Wyrosdick)
MongoHQ (Jason McCay & Ben Wyrosdick)MongoHQ (Jason McCay & Ben Wyrosdick)
MongoHQ (Jason McCay & Ben Wyrosdick)
 
Performance Testing: Analyzing Differences of Response Time between Performan...
Performance Testing: Analyzing Differences of Response Time between Performan...Performance Testing: Analyzing Differences of Response Time between Performan...
Performance Testing: Analyzing Differences of Response Time between Performan...
 
A Method for Predicting Defects in System Testing for V-Model
A Method for Predicting Defects in System Testing for V-ModelA Method for Predicting Defects in System Testing for V-Model
A Method for Predicting Defects in System Testing for V-Model
 
Establishing A Defect Prediction Model Using A Combination of Product Metrics...
Establishing A Defect Prediction Model Using A Combination of Product Metrics...Establishing A Defect Prediction Model Using A Combination of Product Metrics...
Establishing A Defect Prediction Model Using A Combination of Product Metrics...
 
Breaking the Software - A Topic on Software Engineering & Testing
Breaking the Software -  A Topic on Software Engineering & TestingBreaking the Software -  A Topic on Software Engineering & Testing
Breaking the Software - A Topic on Software Engineering & Testing
 
Administration (Eliot Horowitz)
Administration (Eliot Horowitz)Administration (Eliot Horowitz)
Administration (Eliot Horowitz)
 
Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)
 
Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)Schema design with MongoDB (Dwight Merriman)
Schema design with MongoDB (Dwight Merriman)
 
An Alternative of Secured Online Shopping System via Point-Based Contactless ...
An Alternative of Secured Online Shopping System via Point-Based Contactless ...An Alternative of Secured Online Shopping System via Point-Based Contactless ...
An Alternative of Secured Online Shopping System via Point-Based Contactless ...
 
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)
 
Performance Testing Strategy for Cloud-Based System using Open Source Testing...
Performance Testing Strategy for Cloud-Based System using Open Source Testing...Performance Testing Strategy for Cloud-Based System using Open Source Testing...
Performance Testing Strategy for Cloud-Based System using Open Source Testing...
 
VIEWLEX # 08
VIEWLEX # 08VIEWLEX # 08
VIEWLEX # 08
 

Similar to Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)

2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planningasya999
 
Silicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDBSilicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDB
Daniel Coupal
 
Partner Webinar: The Scaling Checklist for MongoDB - 100GB and beyond
Partner Webinar: The Scaling Checklist for MongoDB - 100GB and beyondPartner Webinar: The Scaling Checklist for MongoDB - 100GB and beyond
Partner Webinar: The Scaling Checklist for MongoDB - 100GB and beyond
MongoDB
 
Developing and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST APIDeveloping and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST API
All Things Open
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
SharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceSharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 Performance
Brian Culver
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategies
ronwarshawsky
 
Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0
Norberto Leite
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
Jimmy Ray
 
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
OpenShift Origin
 
Benchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersBenchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible Disasters
MongoDB
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Ravi Teja
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopValeri Karpov
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
Marko Mitranić
 
Operationalizing MongoDB at AOL
Operationalizing MongoDB at AOLOperationalizing MongoDB at AOL
Operationalizing MongoDB at AOL
radiocats
 
MongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDB
 
Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"
Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"
Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"
Paybay
 

Similar to Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg) (20)

2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
2013 CPM Conference, Nov 6th, NoSQL Capacity Planning
 
Silicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDBSilicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDB
 
Partner Webinar: The Scaling Checklist for MongoDB - 100GB and beyond
Partner Webinar: The Scaling Checklist for MongoDB - 100GB and beyondPartner Webinar: The Scaling Checklist for MongoDB - 100GB and beyond
Partner Webinar: The Scaling Checklist for MongoDB - 100GB and beyond
 
Developing and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST APIDeveloping and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST API
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
 
SharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceSharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 Performance
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategies
 
Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
 
Benchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersBenchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible Disasters
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 
Operationalizing MongoDB at AOL
Operationalizing MongoDB at AOLOperationalizing MongoDB at AOL
Operationalizing MongoDB at AOL
 
MongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOL
 
Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"
Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"
Salvatore Incandela "Loyalty cashback - Scaling with MongoDB"
 

More from MongoSF

Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) MongoSF
 
C# Development (Sam Corder)
C# Development (Sam Corder)C# Development (Sam Corder)
C# Development (Sam Corder)MongoSF
 
Flexible Event Tracking (Paul Gebheim)
Flexible Event Tracking (Paul Gebheim)Flexible Event Tracking (Paul Gebheim)
Flexible Event Tracking (Paul Gebheim)MongoSF
 
Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)MongoSF
 
Administration
AdministrationAdministration
AdministrationMongoSF
 
Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)MongoSF
 
Indexing and Query Optimizer (Aaron Staple)
Indexing and Query Optimizer (Aaron Staple)Indexing and Query Optimizer (Aaron Staple)
Indexing and Query Optimizer (Aaron Staple)MongoSF
 
Zero to Mongo in 60 Hours
Zero to Mongo in 60 HoursZero to Mongo in 60 Hours
Zero to Mongo in 60 HoursMongoSF
 
PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)MongoSF
 
Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)MongoSF
 
From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)MongoSF
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)MongoSF
 

More from MongoSF (12)

Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
 
C# Development (Sam Corder)
C# Development (Sam Corder)C# Development (Sam Corder)
C# Development (Sam Corder)
 
Flexible Event Tracking (Paul Gebheim)
Flexible Event Tracking (Paul Gebheim)Flexible Event Tracking (Paul Gebheim)
Flexible Event Tracking (Paul Gebheim)
 
Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)
 
Administration
AdministrationAdministration
Administration
 
Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)
 
Indexing and Query Optimizer (Aaron Staple)
Indexing and Query Optimizer (Aaron Staple)Indexing and Query Optimizer (Aaron Staple)
Indexing and Query Optimizer (Aaron Staple)
 
Zero to Mongo in 60 Hours
Zero to Mongo in 60 HoursZero to Mongo in 60 Hours
Zero to Mongo in 60 Hours
 
PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)
 
Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)
 
From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)From MySQL to MongoDB at Wordnik (Tony Tam)
From MySQL to MongoDB at Wordnik (Tony Tam)
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)

  • 2. Hot Potato Overview • What: Hot Potato connects audiences around shared interests • When: Founded early 2009 / PoC: Dec 2009 / Beta: 2 months ago • Where: Williamsburg, Brooklyn! • Who: Lincoln, Justin, Saadiq, Jeremy, Jace, Matt, Mike, Will 2
  • 4. Hot Potato on the iPhone 4
  • 5. Technology Stack Design principles: Simple and stateless API • Scala / MongoDB API Clients • Web application (Python/Django) • iPhone (Obj-C) 5
  • 6. Hot Potato API - Why MongoDB? • Good documentation and excellent support • Fully Featured (like an RDBMS) but with a migration path to scale- out • Replication • Easy administration / scripting • Fast • Auto-sharding coming soon 6
  • 7. Hot Potato API - Why MongoDB? 7
  • 8. Hot Potato API - Why MongoDB? RDBMS Optimization process 7
  • 9. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 7
  • 10. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 2. too many joins -> de-normalize your data 7
  • 11. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 2. too many joins -> de-normalize your data 3. too many writes -> scale up hardware, CPU, RAM, IO 7
  • 12. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 2. too many joins -> de-normalize your data 3. too many writes -> scale up hardware, CPU, RAM, IO 4. too much db load -> eliminate triggers, stored procedures 7
  • 13. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 2. too many joins -> de-normalize your data 3. too many writes -> scale up hardware, CPU, RAM, IO 4. too much db load -> eliminate triggers, stored procedures 5. too much db load -> pre-materialize complex queries 7
  • 14. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 2. too many joins -> de-normalize your data 3. too many writes -> scale up hardware, CPU, RAM, IO 4. too much db load -> eliminate triggers, stored procedures 5. too much db load -> pre-materialize complex queries 6. writes bottleneck -> drop secondary indexes 7
  • 15. Hot Potato API - Why MongoDB? RDBMS Optimization process 1. too many reads -> add cache 2. too many joins -> de-normalize your data 3. too many writes -> scale up hardware, CPU, RAM, IO 4. too much db load -> eliminate triggers, stored procedures 5. too much db load -> pre-materialize complex queries 6. writes bottleneck -> drop secondary indexes At this point you are using the RDBMS as a KV store. The full- featured nature of the RDBMS is merely getting in the way of scaling. 7
  • 16. Hot Potato API - Why MongoDB? 8
  • 17. Hot Potato API - Why MongoDB? Mongo comparison 8
  • 18. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 8
  • 19. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 2. mongo doesn’t support joins - data starts de-normalized 8
  • 20. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 2. mongo doesn’t support joins - data starts de-normalized 3. writes start out fast, can be horizontally scaled 8
  • 21. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 2. mongo doesn’t support joins - data starts de-normalized 3. writes start out fast, can be horizontally scaled 4. much less opportunity for logic in the db 8
  • 22. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 2. mongo doesn’t support joins - data starts de-normalized 3. writes start out fast, can be horizontally scaled 4. much less opportunity for logic in the db 5. map/reduce for pre-materialization/aggregation, which can be horizontally scaled 8
  • 23. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 2. mongo doesn’t support joins - data starts de-normalized 3. writes start out fast, can be horizontally scaled 4. much less opportunity for logic in the db 5. map/reduce for pre-materialization/aggregation, which can be horizontally scaled 6. indexes can be removed over time as usage becomes more KV-like 8
  • 24. Hot Potato API - Why MongoDB? Mongo comparison 1. reads start out fast, can be externally cached, can also be horizontally scaled 2. mongo doesn’t support joins - data starts de-normalized 3. writes start out fast, can be horizontally scaled 4. much less opportunity for logic in the db 5. map/reduce for pre-materialization/aggregation, which can be horizontally scaled 6. indexes can be removed over time as usage becomes more KV-like The gradual scaling process is more natural with Mongo. Horizontal scaling is not an after-thought or bolt on addition. Mongo works perfectly well as a KV store if you ever get to that point. 8
  • 25. Hot Potato API - Why Scala? • Runs on JVM (Stable, Fast) • Access to Java’s many libraries • Language benefits • Terse • Supports Immutability • Functional • Concurrent • Easy to write DSLs 9
  • 26. Three key Scala features • Pattern Matching / Case classes • Implicit conversions • Actors 10
  • 27. Building a DSL for Mongo Documents are a flexible building block: • Insertion • Updates • Queries • Sorting • parts of Map / Reduce • Indexes 11
  • 28. Building a DSL for Mongo Goals • Stay close to the MongoDB Java API • Keep it flexible • Focus on document creation • New documents, queries, updates • Protect against mis-named fields Key classes and objects • Collection - wraps MongoDB DBCollection • MongoAST - defines the types for building Mongo documents • MongoDSL - defines DSL syntax 12
  • 29. Usage Patterns Asynchronous atomic updates • Simple observer pattern implemented with Lift Actors • HpActor, HpActorPool, Notifier • Main action object with a Notifier • Example: checkins • Listeners that use MongoDB atomic updates • Example: EventAdjuster 13

Editor's Notes