SlideShare a Scribd company logo
MICRO-BLOGGING
        FOR

   THE
ENTERPRISE
Who Am I
Who Am I

Amit Kumar
Who Am I

Amit Kumar

Consultant and Rubyist
Who Am I

Amit Kumar

Consultant and Rubyist

TATA Consultancy Services Limited
Who Am I

Amit Kumar

Consultant and Rubyist

TATA Consultancy Services Limited

twitter.com/toamit
Who Am I

Amit Kumar

Consultant and Rubyist

TATA Consultancy Services Limited

twitter.com/toamit

github.com/toamitkumar
AGENDA
AGENDA


Micro-Blogging for “The Enterprise”
AGENDA


Micro-Blogging for “The Enterprise”

Relational DB Structure
AGENDA


Micro-Blogging for “The Enterprise”

Relational DB Structure

Performance issues
AGENDA


Micro-Blogging for “The Enterprise”

Relational DB Structure

Performance issues

Caching?
AGENDA


Micro-Blogging for “The Enterprise”

Relational DB Structure

Performance issues

Caching?

MongoDB
AGENDA


Micro-Blogging for “The Enterprise”

Relational DB Structure

Performance issues

Caching?

MongoDB

Hybrid Approach
What
Micro-Blogging
   Mean To
  Enterprise
Micro-Blogging for The Enterprise (MongoDB)
Micro-Blogging for The Enterprise (MongoDB)
Micro-Blogging for The Enterprise (MongoDB)
Micro-Blogging for The Enterprise (MongoDB)
Enterprise Demands
Enterprise Demands



Message threads (Facebook like experience)
Enterprise Demands



Message threads (Facebook like experience)

Activities of follower list
Enterprise Demands



Message threads (Facebook like experience)

Activities of follower list

Two timelines
Enterprise Demands



Message threads (Facebook like experience)

Activities of follower list

Two timelines

  Individual
Enterprise Demands



Message threads (Facebook like experience)

Activities of follower list

Two timelines

  Individual

  Public
Enterprise Demands



Message threads (Facebook like experience)

Activities of follower list

Two timelines

  Individual

  Public

Filtering messages (role/office etc)
Timeline
Timeline
Timeline
Timeline
Timeline
Timeline
Relational
DB Structure
Traditional Relational Design
Traditional Relational Design
Traditional Relational Design
Enterprise Demands - II
Enterprise Demands - II




Most popular posts
Enterprise Demands - II




Most popular posts

Hash-tags (#hashtag)
Enterprise Demands - II
Enterprise Demands - II


 Ability to follow hash-tags
Enterprise Demands - II


 Ability to follow hash-tags
Enterprise Demands - II
Enterprise Demands - II


Activity on hash-tag flow to timeline
Enterprise Demands - II


Activity on hash-tag flow to timeline
Enterprise Demands - II


Activity on hash-tag flow to timeline
Enterprise Demands - II


Activity on hash-tag flow to timeline
Enterprise Demands - II
Enterprise Demands - II


Hash-tag on comment will tag the whole thread
Enterprise Demands - II


Hash-tag on comment will tag the whole thread
Traditional Relational Design
Traditional Relational Design
Traditional Relational Design
Traditional Relational Design
COMPLEX AND
UNMAINTAINABLE CODE
COMPLEX AND
UNMAINTAINABLE CODE
COMPLEX AND
UNMAINTAINABLE CODE
COMPLEX AND
UNMAINTAINABLE CODE
COMPLEX AND
UNMAINTAINABLE CODE
PERFORMANCE
    DEGRADES
      WITH
INCREASING DATA
     VOLUME
Performance Benchmark
Performance Benchmark

SQL query benchmarks
Performance Benchmark

SQL query benchmarks

   10,000,000 messages
Performance Benchmark

SQL query benchmarks

   10,000,000 messages

   200,000,000 comments
Performance Benchmark

SQL query benchmarks

   10,000,000 messages

   200,000,000 comments

   50,000,000 message likes


                      3000
        Response ms




                      2250

                      1500

                       750

                         0
                             2   4        8        10   12
                                     in millions
Caching?
 (Redis)
Caching Solution Like
Caching Solution Like



Break point in Architecture
Caching Solution Like



Break point in Architecture

No Query Interface
Caching Solution Like



Break point in Architecture

No Query Interface

No clustering support
Caching Solution Like



Break point in Architecture

No Query Interface

No clustering support

More messy code
A Document Based DB?
A Document Based DB?




Activity threads are
    like nested
    “DOCUMENTS”
Micro-Blogging for The Enterprise (MongoDB)
Micro-Blogging for The Enterprise (MongoDB)
Micro-Blogging for The Enterprise (MongoDB)
One Document
A Document Based DB?
A Document Based DB?



Storing them as relational structure
A Document Based DB?



Storing them as relational structure

Converting them back to documents
A Document Based DB?



Storing them as relational structure

Converting them back to documents

Store them as “Activity Documents”
Micro-Blogging for The Enterprise (MongoDB)
Why MONGODB?
Why MONGODB?



It is Cool
Hybrid Approach
 (Relational DB
        +
   MongoDB)
Hybrid Approach
Hybrid Approach
Architecture
Architecture
Data Migration
    From
Relational DB
     TO
  MongoDB
 WAS EASY!!
Performance Benchmark




        SQL   MongoDB
Performance Benchmark

                            SQL QUERY vs MongoDB
                 3000
Response in ms



                 2250


                 1500


                  750


                    0
                        2     4        8        10   12
                                  in millions


                              SQL          MongoDB
Micro-Blogging for The Enterprise (MongoDB)
Simple, Clean
Simple, Clean
    And
Simple, Clean
       And
Maintainable Code
Simple, Clean
       And
Maintainable Code
   BUT WAIT !!!
Simple, Clean
        And
 Maintainable Code
    BUT WAIT !!!

TRANSACTION??
Transaction Management
Transaction Management
Scaling with MongoDB
Scaling with MongoDB



Indexing
Scaling with MongoDB



Indexing

Sharding?
Scaling with MongoDB



Indexing

Sharding?

8 GB of Data
Monitoring Mongos

mongostat

Http Console (localhost:28017)
Monitoring Mongos
Relational DB And MongoDB
 Live In Harmony Together
Relational DB And MongoDB
 Live In Harmony Together
THANK YOU

More Related Content

PPTX
Designing Cloud Products
PPTX
App Sharding to Autosharding at Sailthru
PDF
A Mobile-First, Cloud-First Stack at Pearson
PPTX
Using Compass to Diagnose Performance Problems in Your Cluster
PPTX
Trading up: Adding Flexibility and Scalability to Bouygues Telecom with MongoDB
PPTX
SEO (Search Engine Optimization)
KEY
Ruby conf'11
PDF
Multidimensional Data Analysis with Ruby (sample)
Designing Cloud Products
App Sharding to Autosharding at Sailthru
A Mobile-First, Cloud-First Stack at Pearson
Using Compass to Diagnose Performance Problems in Your Cluster
Trading up: Adding Flexibility and Scalability to Bouygues Telecom with MongoDB
SEO (Search Engine Optimization)
Ruby conf'11
Multidimensional Data Analysis with Ruby (sample)

Similar to Micro-Blogging for The Enterprise (MongoDB) (20)

PPTX
Freeing Yourself from an RDBMS Architecture
PPTX
An Evening with MongoDB Detroit 2013
PDF
How to Get Started with Your MongoDB Pilot Project
PPTX
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
PDF
Architectural anti patterns_for_data_handling
PPTX
MediaGlu and Mongo DB
PPTX
Big Data (NJ SQL Server User Group)
PPTX
Webinar: Utilisations courantes de MongoDB
PPTX
An Introduction to Big Data, NoSQL and MongoDB
ODP
Morningwithmongodbisrael 121217184113-phpapp02
KEY
Austin NoSQL 2011-07-06
PDF
Webinar: NoSQL as the New Normal
PPTX
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
PPT
A Morning with MongoDB - Helsinki
PPTX
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
PDF
Enabling Telco to Build and Run Modern Applications
PDF
A Brief Introduction: MongoDB
PDF
Mongodb Introduction
KEY
NoSQL in the context of Social Web
PPTX
RavenDB overview
Freeing Yourself from an RDBMS Architecture
An Evening with MongoDB Detroit 2013
How to Get Started with Your MongoDB Pilot Project
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
Architectural anti patterns_for_data_handling
MediaGlu and Mongo DB
Big Data (NJ SQL Server User Group)
Webinar: Utilisations courantes de MongoDB
An Introduction to Big Data, NoSQL and MongoDB
Morningwithmongodbisrael 121217184113-phpapp02
Austin NoSQL 2011-07-06
Webinar: NoSQL as the New Normal
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Morning with MongoDB - Helsinki
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Enabling Telco to Build and Run Modern Applications
A Brief Introduction: MongoDB
Mongodb Introduction
NoSQL in the context of Social Web
RavenDB overview
Ad

More from toamitkumar (6)

PPTX
Agile+DevOps - do we understand it?
PDF
Digital Transformation with 2 Speed IT & Agile Scrum
KEY
Ruby'izing iOS development
KEY
Your fist RubyMotion Application
KEY
404 not found
PDF
Fibered rails
Agile+DevOps - do we understand it?
Digital Transformation with 2 Speed IT & Agile Scrum
Ruby'izing iOS development
Your fist RubyMotion Application
404 not found
Fibered rails
Ad

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Big Data Technologies - Introduction.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Encapsulation theory and applications.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Monthly Chronicles - July 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Big Data Technologies - Introduction.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Encapsulation theory and applications.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
The AUB Centre for AI in Media Proposal.docx
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Review of recent advances in non-invasive hemoglobin estimation
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Monthly Chronicles - July 2025

Micro-Blogging for The Enterprise (MongoDB)

Editor's Notes

  • #2: Enterprise is a closed ecosystem as compared to openness of Internet. \nThey have their own set of rules. \nYou must comply with internal technical standards, local regulations, enterprise architecture regulations etc.\nThis was no different and we started building the application using Enterprisy traditional relational database ==> which in this case was Oracle. \nThe db structure was simple with few tables but later the solution became convoluted by growing complex business rules. \nNot only this the performance of the app was degrading with growing volume of data.\nWe took a step back and translated the solution into elegance of document based db... yeah MongoDB\n\n
  • #3: \n
  • #4: \n
  • #5: \n
  • #6: \n
  • #7: \n
  • #8: I am going to focus on:\nWhat enterprise wants from micro-blogging tool. What are the major requirement\nThe kind of relational db structure we started with\nWith growing data volume the perf of the app started to degrade. We did some server side fine tuning but we were not solving the actual problem.\nCaching - this is the very first step we developer take, cache it and hide the problem under the covers :))\nHow MongoDB helped us and how we took the hybrid approach\n\n
  • #9: I am going to focus on:\nWhat enterprise wants from micro-blogging tool. What are the major requirement\nThe kind of relational db structure we started with\nWith growing data volume the perf of the app started to degrade. We did some server side fine tuning but we were not solving the actual problem.\nCaching - this is the very first step we developer take, cache it and hide the problem under the covers :))\nHow MongoDB helped us and how we took the hybrid approach\n\n
  • #10: I am going to focus on:\nWhat enterprise wants from micro-blogging tool. What are the major requirement\nThe kind of relational db structure we started with\nWith growing data volume the perf of the app started to degrade. We did some server side fine tuning but we were not solving the actual problem.\nCaching - this is the very first step we developer take, cache it and hide the problem under the covers :))\nHow MongoDB helped us and how we took the hybrid approach\n\n
  • #11: I am going to focus on:\nWhat enterprise wants from micro-blogging tool. What are the major requirement\nThe kind of relational db structure we started with\nWith growing data volume the perf of the app started to degrade. We did some server side fine tuning but we were not solving the actual problem.\nCaching - this is the very first step we developer take, cache it and hide the problem under the covers :))\nHow MongoDB helped us and how we took the hybrid approach\n\n
  • #12: I am going to focus on:\nWhat enterprise wants from micro-blogging tool. What are the major requirement\nThe kind of relational db structure we started with\nWith growing data volume the perf of the app started to degrade. We did some server side fine tuning but we were not solving the actual problem.\nCaching - this is the very first step we developer take, cache it and hide the problem under the covers :))\nHow MongoDB helped us and how we took the hybrid approach\n\n
  • #13: I am going to focus on:\nWhat enterprise wants from micro-blogging tool. What are the major requirement\nThe kind of relational db structure we started with\nWith growing data volume the perf of the app started to degrade. We did some server side fine tuning but we were not solving the actual problem.\nCaching - this is the very first step we developer take, cache it and hide the problem under the covers :))\nHow MongoDB helped us and how we took the hybrid approach\n\n
  • #14: \n
  • #15: - Combination of traditional microblogging like twitter and social networking sites like facebook = enterprise micro-blogging\n- Best of the two worlds (thread like structure of activities)\n- Next lets have a look at some of the requirements we had to start with\n
  • #16: - Combination of traditional microblogging like twitter and social networking sites like facebook = enterprise micro-blogging\n- Best of the two worlds (thread like structure of activities)\n- Next lets have a look at some of the requirements we had to start with\n
  • #17: - Combination of traditional microblogging like twitter and social networking sites like facebook = enterprise micro-blogging\n- Best of the two worlds (thread like structure of activities)\n- Next lets have a look at some of the requirements we had to start with\n
  • #18: - thread like structure of activities\n- Activities done by the people you follow flow to your timeline\n- Having to put filters was the tipping point to start the complexity in the code\n- Lets have a look at the typical Activity thread\n
  • #19: - thread like structure of activities\n- Activities done by the people you follow flow to your timeline\n- Having to put filters was the tipping point to start the complexity in the code\n- Lets have a look at the typical Activity thread\n
  • #20: - thread like structure of activities\n- Activities done by the people you follow flow to your timeline\n- Having to put filters was the tipping point to start the complexity in the code\n- Lets have a look at the typical Activity thread\n
  • #21: - thread like structure of activities\n- Activities done by the people you follow flow to your timeline\n- Having to put filters was the tipping point to start the complexity in the code\n- Lets have a look at the typical Activity thread\n
  • #22: - thread like structure of activities\n- Activities done by the people you follow flow to your timeline\n- Having to put filters was the tipping point to start the complexity in the code\n- Lets have a look at the typical Activity thread\n
  • #23: - thread like structure of activities\n- Activities done by the people you follow flow to your timeline\n- Having to put filters was the tipping point to start the complexity in the code\n- Lets have a look at the typical Activity thread\n
  • #24: - this is my timeline\n- Message from Joh Doe appears on my timeline as I follow him\n- Comment/Like are the ways to participate\n- I can filter threads based on role and office \n- Lets have a look at the DB structure we had to start with\n
  • #25: - this is my timeline\n- Message from Joh Doe appears on my timeline as I follow him\n- Comment/Like are the ways to participate\n- I can filter threads based on role and office \n- Lets have a look at the DB structure we had to start with\n
  • #26: - this is my timeline\n- Message from Joh Doe appears on my timeline as I follow him\n- Comment/Like are the ways to participate\n- I can filter threads based on role and office \n- Lets have a look at the DB structure we had to start with\n
  • #27: - this is my timeline\n- Message from Joh Doe appears on my timeline as I follow him\n- Comment/Like are the ways to participate\n- I can filter threads based on role and office \n- Lets have a look at the DB structure we had to start with\n
  • #28: - this is my timeline\n- Message from Joh Doe appears on my timeline as I follow him\n- Comment/Like are the ways to participate\n- I can filter threads based on role and office \n- Lets have a look at the DB structure we had to start with\n
  • #29: \n
  • #30: - the integration with Legacy database was one of the reason we started with relational Oracle db\n- lets quickly have at other set of requirements which started to make things more complex\n
  • #31: - the integration with Legacy database was one of the reason we started with relational Oracle db\n- lets quickly have at other set of requirements which started to make things more complex\n
  • #32: we treated hash tags as virtual person\nTo make matters even worse - we had to accommodate for \n\n
  • #33: we treated hash tags as virtual person\nTo make matters even worse - we had to accommodate for \n\n
  • #34: \n
  • #35: \n
  • #36: Two things to observe\n- Thread came to profile becoz I am following the hash tag\n- Martha (whom I follow commented)\n\nLets have a look at the impact on db structure coz of these set of requirements\n
  • #37: Two things to observe\n- Thread came to profile becoz I am following the hash tag\n- Martha (whom I follow commented)\n\nLets have a look at the impact on db structure coz of these set of requirements\n
  • #38: Two things to observe\n- Thread came to profile becoz I am following the hash tag\n- Martha (whom I follow commented)\n\nLets have a look at the impact on db structure coz of these set of requirements\n
  • #39: Two things to observe\n- Thread came to profile becoz I am following the hash tag\n- Martha (whom I follow commented)\n\nLets have a look at the impact on db structure coz of these set of requirements\n
  • #40: \n
  • #41: \n
  • #42: - two STIs\n- this is not the end\n- to build a visual threads with all the requirements we saw - we had to start writing hand crafted sql queries.\n- not the usual Rails way of using ActiveRecord\n- Let me show to you what they look like\n
  • #43: - two STIs\n- this is not the end\n- to build a visual threads with all the requirements we saw - we had to start writing hand crafted sql queries.\n- not the usual Rails way of using ActiveRecord\n- Let me show to you what they look like\n
  • #44: - two STIs\n- this is not the end\n- to build a visual threads with all the requirements we saw - we had to start writing hand crafted sql queries.\n- not the usual Rails way of using ActiveRecord\n- Let me show to you what they look like\n
  • #45: - code became complex and unmaintainable\n
  • #46: - code became complex and unmaintainable\n
  • #47: - code became complex and unmaintainable\n
  • #48: - code became complex and unmaintainable\n
  • #49: - we did a quick benchmark of the sql queries\n
  • #50: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #51: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #52: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #53: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #54: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #55: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #56: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #57: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #58: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #59: - How many user loads (10 user load test)\n- Environment of benchmark (mysql or oracle)\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\n- exponential increase in time\n\n- the first thing that struck us - lets cache baby !!\n- and the default option was Redis\n
  • #60: \n
  • #61: - but we soon realized that caching is not going to solve our problem, in fact it would have made matters more worse\n- we started looking at if document based db can help solve the problem at the same time scale with increasing complex business requirements\n
  • #62: - but we soon realized that caching is not going to solve our problem, in fact it would have made matters more worse\n- we started looking at if document based db can help solve the problem at the same time scale with increasing complex business requirements\n
  • #63: - but we soon realized that caching is not going to solve our problem, in fact it would have made matters more worse\n- we started looking at if document based db can help solve the problem at the same time scale with increasing complex business requirements\n
  • #64: - but we soon realized that caching is not going to solve our problem, in fact it would have made matters more worse\n- we started looking at if document based db can help solve the problem at the same time scale with increasing complex business requirements\n
  • #65: - which is true\n- each activity thread is like a small document\n
  • #66: \n
  • #67: \n
  • #68: \n
  • #69: - we are storing the user activity as relational structure\n- We convert the relational structure, run our business rules, convert them into JSON format\n- Give it to the View Layer to layout the result\n- Instead what we can do is store them as documents and cut short the whole deal of business rules etc…\n- Store them in the way business wants us to show…\n- we started to evaluating document based DB and again default was MongoDB\n- you might have this question\n
  • #70: - we are storing the user activity as relational structure\n- We convert the relational structure, run our business rules, convert them into JSON format\n- Give it to the View Layer to layout the result\n- Instead what we can do is store them as documents and cut short the whole deal of business rules etc…\n- Store them in the way business wants us to show…\n- we started to evaluating document based DB and again default was MongoDB\n- you might have this question\n
  • #71: - we are storing the user activity as relational structure\n- We convert the relational structure, run our business rules, convert them into JSON format\n- Give it to the View Layer to layout the result\n- Instead what we can do is store them as documents and cut short the whole deal of business rules etc…\n- Store them in the way business wants us to show…\n- we started to evaluating document based DB and again default was MongoDB\n- you might have this question\n
  • #72: - I am pretty sure everyone sitting in this room is convinced why mongodb :)))\n- We took the hybrid approach as we had to deal with integrating Legacy Tables as well\n
  • #73: - I am pretty sure everyone sitting in this room is convinced why mongodb :)))\n- We took the hybrid approach as we had to deal with integrating Legacy Tables as well\n
  • #74: \n
  • #75: - lets have a look at the simple arch diagram\n
  • #76: We are still in the infant stages and there are so many things to learn from this community\n- the next obvious question how did we migrate the GBs of data from relational to document structure\n
  • #77: - we already had the code to translate relational structure to json format (for view layer)\n- we used it to generate document structure for mongo\n- lets have a look at some benchmarks\n
  • #78: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #79: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #80: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #81: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #82: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #83: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #84: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #85: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #86: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #87: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #88: SQL\n- 2m (200ms), 4m (600 ms), 8m (1100ms), 10m (1800ms), 12m (2500ms)\nMongo\n~ 280ms\n- so now our code is\n
  • #89: \n
  • #90: \n
  • #91: \n
  • #92: \n
  • #93: \n
  • #94: - not a full proof solution\n- but has worked for us \n
  • #95: \n
  • #96: \n
  • #97: \n
  • #98: \n
  • #99: \n
  • #100: \n
  • #101: Few gotchas:\n- Do not forgot the schema design\n- We named the collection --> bloggers and later on changed to blogger\n\n