SlideShare una empresa de Scribd logo
1 de 20
MongoDB at Coupons Inc.
    http://www.coupons.com/coupon-codes/
http://www.coupons.com/passbook (for iPhone)

                    Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.
How do coupon codes work?
                 1. User searches “Kmart
                 coupons” in Google/Coupons Inc.                                    2. Sees a Coupons.com
                                                                                    link on search results
                                                                                    page.
5. Applies
coupon code at
checkout.
Saves money,
gets items =
happy
customer!                                                                              3. Finds coupon
                                                                                       code for $5 for $50.
                 4. Clicks to get code and is
                 redirected to Kmart. Affiliate
                 “cookie” is dropped.




                              Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   2
Why we looked for new DB?


      Needed to build a data driven website for
       Coupon Codes in a short amount of time.
      Want one DB to reasonably handle multiple
       use cases.
      Want to quickly iterate.
      Only thing we knew about our schema is
       that it’s going to change pretty quickly.


                          Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   3
Main requirements

       Easy to change our model. Low
        operational overhead. Developer
        can do the changes herself.
       Wanted a DB to avoid multiple
        caching layers as this got us into
        trouble earlier.
       Initially data size is not going to be
        large, but if we do things right its
        expected to grow quickly.


                         Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   4
Requirements Contd.

      Main use cases did not require join,
       and did not need multi row
       transactions.
      Need to support Java, Python, Perl
       and PHP – because we want to
       develop things quickly.
      Should be easy to set up across
       multiple data centers soon after
       launch.
      Should work in EC2.

                        Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   5
Requirements Contd.

      Ok to have only Linux support ( We
       have some windows servers in the
       company, but we didn't need to
       support multiple OS(for DB clients).




                         Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   6
DBs considered

       SQLServer behind cache
        [Gemfire/Varnish/memcache/apc]
           Used heavily in company. Existing
            expertise with SQL Server.
           Operational overhead(schema
            changes)
       MySQL
           Familiarity with the DB in the Coupon
            Codes team.
           Could not easily change our model.

                          Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   7
    
DB Considered Contd.

     MongoDB
         Easy to model, make changes to
          “schema”.
         Sharding would let us scale in future.
          Easy to go from non sharded to
          sharded mode.




                            Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   8
1st Use Case

      Main datastore for all
       Coupon/Merchant related data.
            Writes by internal processes,
           periodic reads for indexing into
           Solr.
      Down time does not impact
       availability of live site.
           Important consideration when
           deploying a new technology. (If
           MongoDB fails, it does not affect
           the live site.)
                       Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   9
Sample Coupon
    {
        "category_id" : NumberLong(117),
        "category_name" : "Books, News & Magazines",
        "code" : "",
        "coupon_id" : "53_2",
        "created_by" : 5,
        "exclusive_offer" : 1,
        "passbook_offer" : 1,
        "tags" : ['passbook', 'black friday' ]

        "merchant" : {
                       "name" : "Abebooks",
                       "id" : NumberLong(678),
                       "image_url_small" : "http://cdn.cpnscdn.com/.../aff/in/small/abebooks_88x31_1.gif",
                       "image_url_large":"http://cdn.cpnscdn.com/.../in/large/abebooks_234x60_0.gif"
        },
        "url" : "/coupon-codes/go/rs?k=53_2"
    }




                                         Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   10
Real time analytics for website

      Writes from frontend servers, reads
      internally.




                       Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   11
Serve user preferences data for live site.


  • 1st use case where live site depends on
    MongoDB.

  • Writes happen from internal processes

  • Reads from frontend servers.




                         Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   12
Archiving data

    Archiving old data feeds: Useful for periodic
     analysis.
    Internal writes and reads




                         Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   13
Internal CMS

   First version Django and MongoDB. Didn't have
    good integration.
   Current version is based on MongoDB, but not
    Django. Used extensively internally.




                        Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   14
Passbooks/Printable Images

 Examples of Blobs.
  Passbooks are zip files.
  Need tight control on Printable Coupons
 Images (These are different than the
 Grocery Coupons).




                    Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   15
Coming up soon

        User Generated Content from
         Mongo
            Both real time writes and reads.
            Schema : Still evolving!




                         Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   16
What pleasantly surprised us

   Stability
   Database easy to set up (install packages
    and some configuration)
   Good documentation (easy to find stuff you
    want to do).
   Multi Data Center replication.
   MMS (Mongo Monitoring Service) - Really
    excellent service.



                          Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   17
Things we learnt the hard way

    Didn't have the latest Debian, Ubuntu, PHP,
     Python client packages on Ubuntu repository.
    No great support for Django(packages were not
     marked stable then). We moved away from
     Django.
    In JavaScript number 42 becomes number 42.0.
     (Hit us in production). This is a common
     pitfall/learning item for users but it's an aspect of
     importing data into Mongo.



                             Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   18
Things we learnt the hard way
contd…
     Our application would benefit from
      joins which MongoDB does not
      support.
     Need a package to install replica
      sets on same machine.




                       Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   19
This slide is intentionally left blank to mark the last slide.




                             Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.   20

Más contenido relacionado

Similar a Mongo DB at Coupons Inc.

Duplicate Code Detection (DCD) presentation
Duplicate Code Detection (DCD) presentationDuplicate Code Detection (DCD) presentation
Duplicate Code Detection (DCD) presentationJean-Yves Rigolet
 
Avoiding the Slog of Real-time Data Distribution
Avoiding the Slog of Real-time Data DistributionAvoiding the Slog of Real-time Data Distribution
Avoiding the Slog of Real-time Data Distributionelunt
 
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016Spark Solutions
 
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
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryPriyanka Aash
 
Enabling a hardware accelerated deep learning data science experience for Apa...
Enabling a hardware accelerated deep learning data science experience for Apa...Enabling a hardware accelerated deep learning data science experience for Apa...
Enabling a hardware accelerated deep learning data science experience for Apa...DataWorks Summit
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCloudIDSummit
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCloudIDSummit
 
Java and the GPU - Everything You Need To Know
Java and the GPU - Everything You Need To KnowJava and the GPU - Everything You Need To Know
Java and the GPU - Everything You Need To KnowAdam Roberts
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!pixelonion
 
Ian cohen tech in law project
Ian cohen tech in law projectIan cohen tech in law project
Ian cohen tech in law projectIan Cohen
 
Maximize Your Magento Site for Dramatic Traffic Sites
Maximize Your Magento Site for Dramatic Traffic SitesMaximize Your Magento Site for Dramatic Traffic Sites
Maximize Your Magento Site for Dramatic Traffic SitesIndaba Group
 
NoSQL into E-Commerce: lessons learned
NoSQL into E-Commerce: lessons learnedNoSQL into E-Commerce: lessons learned
NoSQL into E-Commerce: lessons learnedLa FeWeb
 
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 BlackfireMarko Mitranić
 
Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Dev_Events
 
"You don't need a bigger boat": serverless MLOps for reasonable companies
"You don't need a bigger boat": serverless MLOps for reasonable companies"You don't need a bigger boat": serverless MLOps for reasonable companies
"You don't need a bigger boat": serverless MLOps for reasonable companiesData Science Milan
 
ASANT Media - Site Starter
ASANT Media - Site StarterASANT Media - Site Starter
ASANT Media - Site StarterAmey
 
Getting to timely insights - how to make it happen?
Getting to timely insights - how to make it happen?Getting to timely insights - how to make it happen?
Getting to timely insights - how to make it happen?Mandie Quartly
 
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxE-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxAbbasSayyed5
 
The convergence of reporting and interactive BI on Hadoop
The convergence of reporting and interactive BI on HadoopThe convergence of reporting and interactive BI on Hadoop
The convergence of reporting and interactive BI on HadoopDataWorks Summit
 

Similar a Mongo DB at Coupons Inc. (20)

Duplicate Code Detection (DCD) presentation
Duplicate Code Detection (DCD) presentationDuplicate Code Detection (DCD) presentation
Duplicate Code Detection (DCD) presentation
 
Avoiding the Slog of Real-time Data Distribution
Avoiding the Slog of Real-time Data DistributionAvoiding the Slog of Real-time Data Distribution
Avoiding the Slog of Real-time Data Distribution
 
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
 
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"
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec glory
 
Enabling a hardware accelerated deep learning data science experience for Apa...
Enabling a hardware accelerated deep learning data science experience for Apa...Enabling a hardware accelerated deep learning data science experience for Apa...
Enabling a hardware accelerated deep learning data science experience for Apa...
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You Eat
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You Eat
 
Java and the GPU - Everything You Need To Know
Java and the GPU - Everything You Need To KnowJava and the GPU - Everything You Need To Know
Java and the GPU - Everything You Need To Know
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
 
Ian cohen tech in law project
Ian cohen tech in law projectIan cohen tech in law project
Ian cohen tech in law project
 
Maximize Your Magento Site for Dramatic Traffic Sites
Maximize Your Magento Site for Dramatic Traffic SitesMaximize Your Magento Site for Dramatic Traffic Sites
Maximize Your Magento Site for Dramatic Traffic Sites
 
NoSQL into E-Commerce: lessons learned
NoSQL into E-Commerce: lessons learnedNoSQL into E-Commerce: lessons learned
NoSQL into E-Commerce: lessons learned
 
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
 
Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8
 
"You don't need a bigger boat": serverless MLOps for reasonable companies
"You don't need a bigger boat": serverless MLOps for reasonable companies"You don't need a bigger boat": serverless MLOps for reasonable companies
"You don't need a bigger boat": serverless MLOps for reasonable companies
 
ASANT Media - Site Starter
ASANT Media - Site StarterASANT Media - Site Starter
ASANT Media - Site Starter
 
Getting to timely insights - how to make it happen?
Getting to timely insights - how to make it happen?Getting to timely insights - how to make it happen?
Getting to timely insights - how to make it happen?
 
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxE-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
 
The convergence of reporting and interactive BI on Hadoop
The convergence of reporting and interactive BI on HadoopThe convergence of reporting and interactive BI on Hadoop
The convergence of reporting and interactive BI on Hadoop
 

Más de MongoDB

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump StartMongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
 

Más de MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with 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: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
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: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
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: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
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 SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
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 Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
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: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
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: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
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: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
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: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
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: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
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: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
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 San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Último

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Mongo DB at Coupons Inc.

  • 1. MongoDB at Coupons Inc. http://www.coupons.com/coupon-codes/ http://www.coupons.com/passbook (for iPhone) Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute.
  • 2. How do coupon codes work? 1. User searches “Kmart coupons” in Google/Coupons Inc. 2. Sees a Coupons.com link on search results page. 5. Applies coupon code at checkout. Saves money, gets items = happy customer! 3. Finds coupon code for $5 for $50. 4. Clicks to get code and is redirected to Kmart. Affiliate “cookie” is dropped. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 2
  • 3. Why we looked for new DB?  Needed to build a data driven website for Coupon Codes in a short amount of time.  Want one DB to reasonably handle multiple use cases.  Want to quickly iterate.  Only thing we knew about our schema is that it’s going to change pretty quickly. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 3
  • 4. Main requirements  Easy to change our model. Low operational overhead. Developer can do the changes herself.  Wanted a DB to avoid multiple caching layers as this got us into trouble earlier.  Initially data size is not going to be large, but if we do things right its expected to grow quickly. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 4
  • 5. Requirements Contd.  Main use cases did not require join, and did not need multi row transactions.  Need to support Java, Python, Perl and PHP – because we want to develop things quickly.  Should be easy to set up across multiple data centers soon after launch.  Should work in EC2. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 5
  • 6. Requirements Contd.  Ok to have only Linux support ( We have some windows servers in the company, but we didn't need to support multiple OS(for DB clients). Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 6
  • 7. DBs considered  SQLServer behind cache [Gemfire/Varnish/memcache/apc]  Used heavily in company. Existing expertise with SQL Server.  Operational overhead(schema changes)  MySQL  Familiarity with the DB in the Coupon Codes team.  Could not easily change our model. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 7 
  • 8. DB Considered Contd.  MongoDB  Easy to model, make changes to “schema”.  Sharding would let us scale in future. Easy to go from non sharded to sharded mode. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 8
  • 9. 1st Use Case  Main datastore for all Coupon/Merchant related data.  Writes by internal processes, periodic reads for indexing into Solr.  Down time does not impact availability of live site.  Important consideration when deploying a new technology. (If MongoDB fails, it does not affect the live site.) Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 9
  • 10. Sample Coupon { "category_id" : NumberLong(117), "category_name" : "Books, News & Magazines", "code" : "", "coupon_id" : "53_2", "created_by" : 5, "exclusive_offer" : 1, "passbook_offer" : 1, "tags" : ['passbook', 'black friday' ] "merchant" : { "name" : "Abebooks", "id" : NumberLong(678), "image_url_small" : "http://cdn.cpnscdn.com/.../aff/in/small/abebooks_88x31_1.gif", "image_url_large":"http://cdn.cpnscdn.com/.../in/large/abebooks_234x60_0.gif" }, "url" : "/coupon-codes/go/rs?k=53_2" } Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 10
  • 11. Real time analytics for website Writes from frontend servers, reads internally. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 11
  • 12. Serve user preferences data for live site. • 1st use case where live site depends on MongoDB. • Writes happen from internal processes • Reads from frontend servers. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 12
  • 13. Archiving data  Archiving old data feeds: Useful for periodic analysis.  Internal writes and reads Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 13
  • 14. Internal CMS  First version Django and MongoDB. Didn't have good integration.  Current version is based on MongoDB, but not Django. Used extensively internally. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 14
  • 15. Passbooks/Printable Images Examples of Blobs. Passbooks are zip files. Need tight control on Printable Coupons Images (These are different than the Grocery Coupons). Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 15
  • 16. Coming up soon  User Generated Content from Mongo  Both real time writes and reads.  Schema : Still evolving! Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 16
  • 17. What pleasantly surprised us  Stability  Database easy to set up (install packages and some configuration)  Good documentation (easy to find stuff you want to do).  Multi Data Center replication.  MMS (Mongo Monitoring Service) - Really excellent service. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 17
  • 18. Things we learnt the hard way  Didn't have the latest Debian, Ubuntu, PHP, Python client packages on Ubuntu repository.  No great support for Django(packages were not marked stable then). We moved away from Django.  In JavaScript number 42 becomes number 42.0. (Hit us in production). This is a common pitfall/learning item for users but it's an aspect of importing data into Mongo. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 18
  • 19. Things we learnt the hard way contd…  Our application would benefit from joins which MongoDB does not support.  Need a package to install replica sets on same machine. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 19
  • 20. This slide is intentionally left blank to mark the last slide. Coupons.com Incorporated Confidential and Proprietary Information - Please Do Not Copy or Distribute. 20

Notas del editor

  1. Introduction: The way people shop has changed through the integration of technology into our daily lives. Who hasn’t price compared on the web to find the store that gives them the best deal or used their smartphone while in-store to help make a purchase decision? This has fundamentally changed how we need to reach, engage and motivate consumers through our marketing activities. This paradigm shift in how consumers shop is an opportunity for marketers to re-think how, when and where you spend your promotional and advertising dollars.