SlideShare a Scribd company logo
OTA Platform
with MongoDB
with MongoDB


     talks 19 Jan 2013
About Our Application
•   One stop shopping OTA (Online Travel Agency)

    •   Regular

    •   Flash Deals

•   Various type of products

    •   eg: hotels, flights, tours/activities, campaigns (flash
        deals), etc

•   Facilitate B2B travel
About Our Application
IS THAT IT?
About Our Application
Travel Ideas
  •   Travel News, up-to-date info all around the world

  •   Travel Tips

      •   based on places (countries, cities, areas)

      •   covers various aspects, such as overview, sightseeing,
          eating/restaurants, shopping and events

  •   Travel Stories, submitted by members

  •   Photos and Videos

  •   Blog, monthly theme posts based on event calendar
TRAVEL BUSINESS
BREAKTHROUGH
SOON ON YOUR BROWSER
Technology Overview
These are stuff that we use behind our apps
Web Server : Apache
Application : PHP
               CodeIgniter (PHP MVC Framework)
               Backbone.js (Javascript Framework) with its friends
               Require.js, Underscore.js, Mustache.js, jQuery

Database      : MongoDB
Why MongoDB?
•   It’s fast

•   Development speed time faster

•   No join, no relation

•   No sql injection worries (you bet)

•   Reduced database requests

•   Super flexible schema design

    •   Fewer tables/collections used
What do we store in
MongoDB?
              All datas are stored in MongoDB.

Including important data such as bookings,
inventory, etc.
Building the Apps...




We will tell you guys how
MongoDB helps us a lot
Saving huge amount of time
on database stuff

         spreadsheet is more than enough



db structure alters and changes
straight on the code
With RDBMS approach, dynamic
data is pain in the a*s

                 Embedded documents to the rescue



 This is how we handle dynamic data on our apps
Use Case

• Hotels may have multiple contracts
 • One hotel contracts may have multiple
    bank accounts
• Hotels may have multiple facilities
 • Hotel facilities have several categories
Schema Design
                                           MongoDB approach
            RDBMS approach




      more or less like this...
plus two/three tables for reference data
And now the query...
“get me hotels with its facilities which has BCA account in
                       Jakarta only”

 RDBMS approach
  SELECT * FROM hotels
  INNER JOIN facilities ....
  INNER JOIN photos ....
  AND THEN JOIN the_banks ....
  AND OF COURSE JOIN the_locations ....
  AND JOIN the_city ....
  WHERE
  the_city IS “Jakarta”
  AND
  the_banks IS “Bank BCA”



  We all know JOINs are expensive.
               Use EXPLAIN on SQL to see it
And now the query...
“get me hotels with its facilities which has BCA account in
                       Jakarta only”

      MongoDB approach
    db.hotel.find( { “locations.city” : “Jakarta” , “contracts.banks.name” : “Bank BCA” } )




One single query to fetch all the data we need
Be wise when choosing which
Data Models are used


      Embedded documents not applied to all data model




   We use referenced model when it comes to very
            large record sets / documents
Model Referenced One-to-Many
Relationships between Documents
   http://docs.mongodb.org/manual/tutorial/model-referenced-one-to-many-relationships-between-
   data-modeling-publisher-and-books




Normalize the data, just like RDBMS approach but
using “fake” relationship

Use key/id to store references between two documents
Use Case
• Each hotel may have multiple room types
 • One room type may have up to 10
    photos/videos
 • Each room type have their rate/price
 • Room rates based on contract period
    (one or more years)
 • Room rates stored daily
Use Case
Example :
A Hotel has 5 room types
Each Room type has 10 photos
Hotel contract period is one year

5 room types x 10 photos = 50 documents
5 room types x 365 room rates = 1825 documents

Total documents for 1 hotel :
1 + 5 + 50 + 1825 = 1881 documents
Use Case
     Example :
     Total documents for 1 hotel :
     1 + 5 + 50 + 1825 = 1881 documents

     If we have 1500 hotels then 1881 x 1500 = 2.821.500


What if we have more than 1500 hotels?
What if a hotel have more than 5 room types?
What if a room type has more than 15 photos?
And then we decided to separate the
collections that potentially has huge data

               example : room_rates, hotel_media, etc
More to see...
•   Other slides

    •   http://www.slideshare.net/h.ariawan/okezonecom-inline-voting-system

    •   http://www.slideshare.net/h.ariawan/sekilas-php-mongodb

•   Codes and Articles

    •   https://github.com/hadiariawan/monode-crud

    •   http://hadiariawan.web.id/2012/06/27/simple-crud-web-using-nodejs-and-
        mongodb/
@hadiariawan
    hadi.ariawan
http://about.me/hadiariawan

More Related Content

What's hot

Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Neo4j
 
MongoDB For Online Advertising at AOL
MongoDB For Online Advertising at AOLMongoDB For Online Advertising at AOL
MongoDB For Online Advertising at AOLJon_Reed
 
Wanderu - Lessons from Building a Travel Site with Neo4j
Wanderu - Lessons from Building a Travel Site with Neo4jWanderu - Lessons from Building a Travel Site with Neo4j
Wanderu - Lessons from Building a Travel Site with Neo4j
Neo4j
 
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Cali Mongo
 
Web Scraping Technologies
Web Scraping TechnologiesWeb Scraping Technologies
Web Scraping Technologies
Krishna Sunuwar
 
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
MongoDB
 
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDB
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDBBusiness Jumpstart: The Right (and Wrong) Use Cases for MongoDB
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDB
MongoDB
 
Data Analytics: Understanding Your MongoDB Data
Data Analytics: Understanding Your MongoDB DataData Analytics: Understanding Your MongoDB Data
Data Analytics: Understanding Your MongoDB Data
MongoDB
 
Jumpstart: Introduction to Schema Design
Jumpstart: Introduction to Schema DesignJumpstart: Introduction to Schema Design
Jumpstart: Introduction to Schema Design
MongoDB
 
Building A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and GoBuilding A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and Go
ardan-bkennedy
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQL
Mayur Patil
 

What's hot (13)

Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
 
MongoDB For Online Advertising at AOL
MongoDB For Online Advertising at AOLMongoDB For Online Advertising at AOL
MongoDB For Online Advertising at AOL
 
Wanderu - Lessons from Building a Travel Site with Neo4j
Wanderu - Lessons from Building a Travel Site with Neo4jWanderu - Lessons from Building a Travel Site with Neo4j
Wanderu - Lessons from Building a Travel Site with Neo4j
 
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Web Scraping Technologies
Web Scraping TechnologiesWeb Scraping Technologies
Web Scraping Technologies
 
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0
 
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
[MongoDB.local Bengaluru 2018] The Path to Truly Understanding Your MongoDB Data
 
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDB
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDBBusiness Jumpstart: The Right (and Wrong) Use Cases for MongoDB
Business Jumpstart: The Right (and Wrong) Use Cases for MongoDB
 
Data Analytics: Understanding Your MongoDB Data
Data Analytics: Understanding Your MongoDB DataData Analytics: Understanding Your MongoDB Data
Data Analytics: Understanding Your MongoDB Data
 
Jumpstart: Introduction to Schema Design
Jumpstart: Introduction to Schema DesignJumpstart: Introduction to Schema Design
Jumpstart: Introduction to Schema Design
 
Building A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and GoBuilding A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and Go
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQL
 

Viewers also liked

Webinar: Schema Design
Webinar: Schema DesignWebinar: Schema Design
Webinar: Schema Design
MongoDB
 
Sekilas PHP + mongoDB
Sekilas PHP + mongoDBSekilas PHP + mongoDB
Sekilas PHP + mongoDB
Hadi Ariawan
 
Old & wise(에듀시니어)
Old & wise(에듀시니어)Old & wise(에듀시니어)
Old & wise(에듀시니어)Jungku Hong
 
Tecnologìas de la Información y la Comunicación
Tecnologìas de la Información y la ComunicaciónTecnologìas de la Información y la Comunicación
Tecnologìas de la Información y la Comunicación
Yenmely
 
Leinster college dublin - brochure web
Leinster college   dublin - brochure webLeinster college   dublin - brochure web
Leinster college dublin - brochure web
Thiago Pimentel
 
MongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB
 
Introduction Pentaho 5.0
Introduction Pentaho 5.0 Introduction Pentaho 5.0
Introduction Pentaho 5.0
Xpand IT
 
Review: Leadership Frameworks
Review: Leadership FrameworksReview: Leadership Frameworks
Review: Leadership Frameworks
Mariam Nazarudin
 
2016 SRA Globalization Poster_Justice_Caruson
2016 SRA Globalization Poster_Justice_Caruson2016 SRA Globalization Poster_Justice_Caruson
2016 SRA Globalization Poster_Justice_CarusonSandy Justice
 
Anti-social Databases
Anti-social DatabasesAnti-social Databases
Anti-social Databases
William LaForest
 
Migrating to git
Migrating to gitMigrating to git
Migrating to gitXpand IT
 
Division of roles and responsibilities
Division of roles and responsibilitiesDivision of roles and responsibilities
Division of roles and responsibilitieskausargulaid
 
Cartagena Data Festival | Telling Stories with Data 2015 04-21
Cartagena Data Festival | Telling Stories with Data 2015 04-21Cartagena Data Festival | Telling Stories with Data 2015 04-21
Cartagena Data Festival | Telling Stories with Data 2015 04-21
ulrichatz
 
MongoDB at Flight Centre Ltd
MongoDB at Flight Centre LtdMongoDB at Flight Centre Ltd
MongoDB at Flight Centre Ltd
MongoDB
 
Secret Life of a Weather Datum end of project event
Secret Life of a Weather Datum end of project eventSecret Life of a Weather Datum end of project event
Secret Life of a Weather Datum end of project eventlifeofdata
 
Mgidigitalglobalization
MgidigitalglobalizationMgidigitalglobalization
Mgidigitalglobalization
Vera Kovaleva
 
Av capabilities presentation
Av capabilities presentationAv capabilities presentation
Av capabilities presentationNAISales2
 
Heavy Metal PowerPivot Remastered
Heavy Metal PowerPivot RemasteredHeavy Metal PowerPivot Remastered
Heavy Metal PowerPivot RemasteredJason Himmelstein
 

Viewers also liked (20)

Webinar: Schema Design
Webinar: Schema DesignWebinar: Schema Design
Webinar: Schema Design
 
Sekilas PHP + mongoDB
Sekilas PHP + mongoDBSekilas PHP + mongoDB
Sekilas PHP + mongoDB
 
Old & wise(에듀시니어)
Old & wise(에듀시니어)Old & wise(에듀시니어)
Old & wise(에듀시니어)
 
Tecnologìas de la Información y la Comunicación
Tecnologìas de la Información y la ComunicaciónTecnologìas de la Información y la Comunicación
Tecnologìas de la Información y la Comunicación
 
Leinster college dublin - brochure web
Leinster college   dublin - brochure webLeinster college   dublin - brochure web
Leinster college dublin - brochure web
 
MongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB and AWS Best Practices
MongoDB and AWS Best Practices
 
Introduction Pentaho 5.0
Introduction Pentaho 5.0 Introduction Pentaho 5.0
Introduction Pentaho 5.0
 
Review: Leadership Frameworks
Review: Leadership FrameworksReview: Leadership Frameworks
Review: Leadership Frameworks
 
2016 SRA Globalization Poster_Justice_Caruson
2016 SRA Globalization Poster_Justice_Caruson2016 SRA Globalization Poster_Justice_Caruson
2016 SRA Globalization Poster_Justice_Caruson
 
Anti-social Databases
Anti-social DatabasesAnti-social Databases
Anti-social Databases
 
Creative Overview
Creative OverviewCreative Overview
Creative Overview
 
Migrating to git
Migrating to gitMigrating to git
Migrating to git
 
Division of roles and responsibilities
Division of roles and responsibilitiesDivision of roles and responsibilities
Division of roles and responsibilities
 
Cartagena Data Festival | Telling Stories with Data 2015 04-21
Cartagena Data Festival | Telling Stories with Data 2015 04-21Cartagena Data Festival | Telling Stories with Data 2015 04-21
Cartagena Data Festival | Telling Stories with Data 2015 04-21
 
MongoDB at Flight Centre Ltd
MongoDB at Flight Centre LtdMongoDB at Flight Centre Ltd
MongoDB at Flight Centre Ltd
 
Secret Life of a Weather Datum end of project event
Secret Life of a Weather Datum end of project eventSecret Life of a Weather Datum end of project event
Secret Life of a Weather Datum end of project event
 
Mgidigitalglobalization
MgidigitalglobalizationMgidigitalglobalization
Mgidigitalglobalization
 
Av capabilities presentation
Av capabilities presentationAv capabilities presentation
Av capabilities presentation
 
GIT Best Practices V 0.1
GIT Best Practices V 0.1GIT Best Practices V 0.1
GIT Best Practices V 0.1
 
Heavy Metal PowerPivot Remastered
Heavy Metal PowerPivot RemasteredHeavy Metal PowerPivot Remastered
Heavy Metal PowerPivot Remastered
 

Similar to OTA Platform with MongoDB

Which database should I use for my app?
Which database should I use for my app?Which database should I use for my app?
Which database should I use for my app?
Nawaz Dhandala
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
MongoDB
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
MongoDB
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB
 
Augmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure DataAugmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure Data
Treasure Data, Inc.
 
Augmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure dataAugmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure data
Treasure Data, Inc.
 
Multi datastores - CLOSER'14
Multi datastores - CLOSER'14Multi datastores - CLOSER'14
Multi datastores - CLOSER'14
Marcos Almeida
 
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB
 
Webinar: Elevate Your Enterprise Architecture with In-Memory Computing
Webinar: Elevate Your Enterprise Architecture with In-Memory ComputingWebinar: Elevate Your Enterprise Architecture with In-Memory Computing
Webinar: Elevate Your Enterprise Architecture with In-Memory Computing
MongoDB
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
Sarang Shravagi
 
01 nosql and multi model database
01   nosql and multi model database01   nosql and multi model database
01 nosql and multi model database
Mahdi Atawneh
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
Aayush Chimaniya
 
Building your First MEAN App
Building your First MEAN AppBuilding your First MEAN App
Building your First MEAN AppMongoDB
 
Creating Real-time Systems of Engagement with Analytics and Big Data
Creating Real-time Systems of Engagement with Analytics and Big DataCreating Real-time Systems of Engagement with Analytics and Big Data
Creating Real-time Systems of Engagement with Analytics and Big Data
MongoDB
 
MongoDB vs Firebase
MongoDB vs Firebase MongoDB vs Firebase
MongoDB vs Firebase
MERN Stack Development Company
 
MongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrincetonMongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrinceton
Valeri Karpov
 
Canopy view of single-page applications (SPAs)
Canopy view of single-page applications (SPAs)Canopy view of single-page applications (SPAs)
Canopy view of single-page applications (SPAs)Benjamin Howarth
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Laura Ventura
 
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
 

Similar to OTA Platform with MongoDB (20)

NoSQL
NoSQLNoSQL
NoSQL
 
Which database should I use for my app?
Which database should I use for my app?Which database should I use for my app?
Which database should I use for my app?
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading Strategies
 
Augmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure DataAugmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure Data
 
Augmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure dataAugmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure data
 
Multi datastores - CLOSER'14
Multi datastores - CLOSER'14Multi datastores - CLOSER'14
Multi datastores - CLOSER'14
 
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
 
Webinar: Elevate Your Enterprise Architecture with In-Memory Computing
Webinar: Elevate Your Enterprise Architecture with In-Memory ComputingWebinar: Elevate Your Enterprise Architecture with In-Memory Computing
Webinar: Elevate Your Enterprise Architecture with In-Memory Computing
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
01 nosql and multi model database
01   nosql and multi model database01   nosql and multi model database
01 nosql and multi model database
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 
Building your First MEAN App
Building your First MEAN AppBuilding your First MEAN App
Building your First MEAN App
 
Creating Real-time Systems of Engagement with Analytics and Big Data
Creating Real-time Systems of Engagement with Analytics and Big DataCreating Real-time Systems of Engagement with Analytics and Big Data
Creating Real-time Systems of Engagement with Analytics and Big Data
 
MongoDB vs Firebase
MongoDB vs Firebase MongoDB vs Firebase
MongoDB vs Firebase
 
MongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrincetonMongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrinceton
 
Canopy view of single-page applications (SPAs)
Canopy view of single-page applications (SPAs)Canopy view of single-page applications (SPAs)
Canopy view of single-page applications (SPAs)
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
 
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
 

Recently uploaded

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
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
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
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
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
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
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
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
 
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
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
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
 
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)

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
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
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
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
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
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...
 
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*
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
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
 
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...
 

OTA Platform with MongoDB

  • 1. OTA Platform with MongoDB with MongoDB talks 19 Jan 2013
  • 2. About Our Application • One stop shopping OTA (Online Travel Agency) • Regular • Flash Deals • Various type of products • eg: hotels, flights, tours/activities, campaigns (flash deals), etc • Facilitate B2B travel
  • 5. About Our Application Travel Ideas • Travel News, up-to-date info all around the world • Travel Tips • based on places (countries, cities, areas) • covers various aspects, such as overview, sightseeing, eating/restaurants, shopping and events • Travel Stories, submitted by members • Photos and Videos • Blog, monthly theme posts based on event calendar
  • 7. SOON ON YOUR BROWSER
  • 8. Technology Overview These are stuff that we use behind our apps Web Server : Apache Application : PHP CodeIgniter (PHP MVC Framework) Backbone.js (Javascript Framework) with its friends Require.js, Underscore.js, Mustache.js, jQuery Database : MongoDB
  • 9. Why MongoDB? • It’s fast • Development speed time faster • No join, no relation • No sql injection worries (you bet) • Reduced database requests • Super flexible schema design • Fewer tables/collections used
  • 10. What do we store in MongoDB? All datas are stored in MongoDB. Including important data such as bookings, inventory, etc.
  • 11. Building the Apps... We will tell you guys how MongoDB helps us a lot
  • 12. Saving huge amount of time on database stuff spreadsheet is more than enough db structure alters and changes straight on the code
  • 13. With RDBMS approach, dynamic data is pain in the a*s Embedded documents to the rescue This is how we handle dynamic data on our apps
  • 14. Use Case • Hotels may have multiple contracts • One hotel contracts may have multiple bank accounts • Hotels may have multiple facilities • Hotel facilities have several categories
  • 15. Schema Design MongoDB approach RDBMS approach more or less like this... plus two/three tables for reference data
  • 16. And now the query... “get me hotels with its facilities which has BCA account in Jakarta only” RDBMS approach SELECT * FROM hotels INNER JOIN facilities .... INNER JOIN photos .... AND THEN JOIN the_banks .... AND OF COURSE JOIN the_locations .... AND JOIN the_city .... WHERE the_city IS “Jakarta” AND the_banks IS “Bank BCA” We all know JOINs are expensive. Use EXPLAIN on SQL to see it
  • 17. And now the query... “get me hotels with its facilities which has BCA account in Jakarta only” MongoDB approach db.hotel.find( { “locations.city” : “Jakarta” , “contracts.banks.name” : “Bank BCA” } ) One single query to fetch all the data we need
  • 18. Be wise when choosing which Data Models are used Embedded documents not applied to all data model We use referenced model when it comes to very large record sets / documents
  • 19. Model Referenced One-to-Many Relationships between Documents http://docs.mongodb.org/manual/tutorial/model-referenced-one-to-many-relationships-between- data-modeling-publisher-and-books Normalize the data, just like RDBMS approach but using “fake” relationship Use key/id to store references between two documents
  • 20. Use Case • Each hotel may have multiple room types • One room type may have up to 10 photos/videos • Each room type have their rate/price • Room rates based on contract period (one or more years) • Room rates stored daily
  • 21. Use Case Example : A Hotel has 5 room types Each Room type has 10 photos Hotel contract period is one year 5 room types x 10 photos = 50 documents 5 room types x 365 room rates = 1825 documents Total documents for 1 hotel : 1 + 5 + 50 + 1825 = 1881 documents
  • 22. Use Case Example : Total documents for 1 hotel : 1 + 5 + 50 + 1825 = 1881 documents If we have 1500 hotels then 1881 x 1500 = 2.821.500 What if we have more than 1500 hotels? What if a hotel have more than 5 room types? What if a room type has more than 15 photos?
  • 23. And then we decided to separate the collections that potentially has huge data example : room_rates, hotel_media, etc
  • 24. More to see... • Other slides • http://www.slideshare.net/h.ariawan/okezonecom-inline-voting-system • http://www.slideshare.net/h.ariawan/sekilas-php-mongodb • Codes and Articles • https://github.com/hadiariawan/monode-crud • http://hadiariawan.web.id/2012/06/27/simple-crud-web-using-nodejs-and- mongodb/
  • 25. @hadiariawan hadi.ariawan http://about.me/hadiariawan