Your SlideShare is downloading. ×
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & Michael Nutt)

12,187

Published on

Published in: Technology
0 Comments
43 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
12,187
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
251
Comments
0
Likes
43
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Real Time Ecommerce Analytics at Gilt Groupe
    Michael Bryzek, CTO & Founder
    Michael Nutt, Senior Engineer
    Mongo SF - April 30, 2010
    We’re hiring: michael@gilt.com
    www.gilt.com/invite/michael
  • 2. What is Gilt Groupe?
    The world’s best brands at up to 70% off
    Sales start every day at noon
    Simple, luxurious online experience
    Relentless focus on the customer
    . . .
    A fast growing young company
  • 3.
  • 4. What does noon look like in Tech?
  • 5. What does noon look like?
  • 6. MongoDB at Gilt Groupe
    Real time analytics is a sweet spot for MongoDB
    Two production examples we’ll share today at Gilt Groupe:
    Selecting product to sell based on real time data
    Hummingbird: Real time visualization of site traffic
  • 7. Using MongoDB for Real Time Analytics
    Goal: Improve conversion of our gifts section (www.gilt.com/gifts) by ensuring good products are being promoted at the right time
    Challenge: High traffic makes it hard to collect and analyze data in a scalable and fast way
    Approach:
    Capture data in real time in MongoDB
    Analyze w/ Map Reduce
    Update txn systems
    Repeat
  • 8. Step 1: Data Capture
    • Java server speaks JSON/HTTP, writes to MongoDB
    • 9. Each page view receive a list of every item on the page and its position via AJAX
    • 10. Purchase data sent by background job post purchase
  • Step 1: Data Capture
    Storing Data in Java
    _db = new Mongo().getDB("gifts");
    _listing_visits = _db.getCollection("listing_visits");
    --------------------------------------------------
    BasicDBObject record = new BasicDBObject();
    record.put("gift_product_look_guid", de.giftProductLookGuid);
    record.put("product_look_guid", de.productLookGuid);
    record.put("sale_id", info.saleId);
    record.put("user_guid", info.userGuid);
    record.put("subsite_id", info.subsiteId);
    record.put("created_at", info.createdAt);
    record.put("position", position);
    _listing_visits.save(record);
  • 11. Step 2: Map
    Calculate a score for each item based on page views, conversion, inventory, and merchandising input
    m = function(){
    [snip]
    if ( hourly.visits > 0 && this.quantity_sold > 0 ) {
    var rate = this.quantity_sold / hourly.visits;
    points = parseInt(100*rate);
    v += points;
    explanation += "Conversion rate of " + points + "% ”;
    } else if ( hourly.visits == null || hourly.visits == 0 ) {
    v += 500;
    explanation += "Product has never been seen (500 points). ";
    }
    [snip]
    emit( { gift_product_look_guid : this._id },
    { score : v,
    explanation : explanation}});
    }
  • 12. Step 2: Reduce
    Reduce is a passthrough
    r = function( pid , values ){
    return values[0];
    }
    Map Reduce run every 15 minutes via CRON – results stored in a collection named “scores”
    res = db.gift_product_looks.mapReduce( m , r , { out : "scores" } );
  • 13. Step 3: Update Transactional Systems
    • Mongo + server run on ec2
    • 14. Send “scores” collection back to our primary data center, storing latest scores in our primary relational database
    • 15. Gift items are always sorted by score – transactional system only needed an “order by score desc” clause
  • Questions before we move on to Hummingbird?
  • 16. Tracking Pixels
    /tracking.gif?events=&prop1=women&server=www.gilt.com&products=&pageName=sales%3A+women&channel=sale&prop4=sale+category+page&u=http%3A%2F%2Fwww.gilt.com%2Fsale%2Fwomen&guid=418237ca-2bc6-932e-84c2-d4f02d9fd5bf&gen=f&uid=25423567&cb=443460396
  • 17. Omniture
    GILT
    Data
    Warehouse
    Users
  • 18. Omniture
    24 hours
    later...
    GILT
    Data
    Warehouse
    Users
  • 19. Node.js
    Asynchronous, evented web framework
    http://nodejs.org
  • 20. var mongo = require(’lib/mongodb’);
    var db = new mongo.Db('hummingbird', new mongo.Server('localhost', 27017, {}), {});
    db.createCollection('visits', function(err, collection) {
    db.collection('visits', function(err, collection) {
    collection.insert(env);
    });
    });
  • 21. DEMO

×