Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How MTV Networks leverages MongoDB for CMS

How MTV Networks leverages MongoDB for CMS

A presentation by Jeff Yemin of MTV Networks.

MTV Networks Online Division is leveraging MongoDB as the database platform for its next-generation CMS. The talk will focus on these points: A brief outline of the particular challenges of building a CMS for a large media-focused enterprise company; the selection criteria for the database platform (and how MongoDB fit them); the way the CMS leverages the various features of MongoDB.

Avatar for mongodb

mongodb

June 14, 2011
Tweet

More Decks by mongodb

Other Decks in Programming

Transcript

  1. What is MTV Networks Online? •  Several  hundred  websites,  including

      –  www.comedycentral.com   –  www.thedailyshow.com   –  www.spike.com   –  www.nickelodeon.com   –  www.nickjr.com   –  www.mtv.com   –  www.vh1.com   –  …  
  2. How are web sites constructed @ MTV? •  A  wide

     variety  of  language  and  frameworks,  including   –  Java/JSP/Tiles   –  Java/Grails   –  Java/ATG  Dynamo/JHTML   –  PHP   –  Ruby  on  Rails   •  BUT,  almost  all  are  built  on  top  of  one  or  more  content   management  systems.  
  3. A Brief History of CMS @ MTV •  Two  successful

     CMS  built  in  house   –  TradiNonal  RDBMS  as  repository   –  RDBMS-­‐based  XML  CLOB  Store  as  repository  
  4. Looking for a better solution •  Scalability,  Stability,  Speed  

    •  Client-­‐Defined  Content  Model   •  Hierarchical,  Linkable  Content  Model   •  Query-­‐ability   •  OperaNonal  Efficiency  
  5. MongoDB •  Scalability,  Stability,  Speed   –  CollecNons,  Databases,  Replica

     Sets   –  Proven  stability   –  Legendary  speed  
  6. MongoDB •  Client-­‐Defined  Content  Model   –  MongoDB  is  schema-­‐less,

     so  model  is  by  definiNon  a  client   concern  
  7. MongoDB •  Hierarchical,  Linkable  Content  Model   –  MongoDB  is

     a  document  store   –  DBRef  or  embedded  idenNfiers  
  8. MongoDB •  Query-­‐ability   –  Field  level,  arrays,  embedded  

    –  Sort   –  Skip,  Limit   –  Operators   –  Regex   –  elemMatch  
  9. MongoDB •  OperaNonal  Efficiency   –  Separate  process,  communicaNon  via

     wire  protocol   –  Simple  clustering   –  No  clustered  storage  requirement   –  Explain   –  Slow  query  logging   –  Indexing  
  10. How we use MongoDB for CMS •  As  a  repository

      •  CMS  built  in-­‐house  as  a  Java  applicaNon  on  top   •  CMS  hides  repository  implementaNon  from  client  as   much  as  possible  
  11. Content Modeling •  Content  Models  defined  in  XML   – 

    Field  and  Link  definiNons   –  MulNple  Inheritance   –  AnnotaNons   •  Content  Models,  managed  via  REST  endpoints,  are   stored  in  MongoDB  
  12. Content Publishing •  Three  Stage  Publishing  for  each  Site  

    •  Authoring  (shared),  Staging,  Live   •  Implemented  as  three  separate  MongoDB  databases   •  Copy  documents  between  collecNons  in  different  databases   •  OpNon  to  have  each  database  in  separate  replica  set  
  13. Collections and Databases •  One  database  for  global  configuraNon  

    –  Schema  definiNons   –  Stored  query  definiNons   –  Site  and  stage  definiNons   •  One  database  for  each  stage  of  each  site   –  One  collecNon  for  all  content   –  Intra-­‐collecNon  document  references   –  Lots  of  indices,  mostly  on  link  structure  
  14. Data Access •  Goals   –  To  abstract  underlying  repository

      –  To  allow  clients  to  specify  at  a  very  fine  level  the  shape  of  the   data  access  response  object   –  To  minimize  the  size  of  the  data  access  response  object   –  To  protect  server  from  dangerous  queries