[confluence] MongoDB > How MongoDB is Used in Media and Publishing

21 views
Skip to first unread message

nor...@mongodb.onconfluence.com

unread,
Jan 22, 2013, 4:43:00 PM1/22/13
to mongodb...@googlegroups.com

nor...@mongodb.onconfluence.com

unread,
Jan 22, 2013, 4:45:00 PM1/22/13
to mongodb...@googlegroups.com

Page edited by Sam Kleinman


Changes (3)

We see growing usage of MongoDB in both traditional and new media organizations. In these areas, the challenges for application developers include effectively managing rich content (including user-generated content) at scale, deriving insight into how content is consumed and shared in real-time, weaving personalization and social features into their applications and delivering content to a wide variety of browsers and devices.
{redirect:http://www.10gen.com/use-case/content-management}
From a data storage perspective, there is a need for databases that make it easy to rapidly develop and deploy interactive, content-rich web and mobile application, while cost-effectively meeting performance and scale requirements. Specifically, MongoDB is good fit for application across the media and publishing world for the following reasons:
* The document model is natural fit content-rich data
* Schema-free JSON-like data structures make it easy to import, store, query, and deliver structured and semi-structured content
* High-performance and horizontal scalability for both read and write intensive applications


h3. MongoDB for Content management
MongoDB’s document model makes it easy to model content and associated metadata in flexible ways. While the relational model encourages dividing up related data into multiple tables, the document model (with its support for data structures such as arrays and embedded documents) encourages grouping related pieces of data within a single document. This leads to a data representation that is both efficient and closely matches objects in your application
As an example, the following document represents how a blog post (including its tags and comments) can be modeled with MongoDB:
{code}
{
_id:
author: “Nosh”
title: “Why MongoDB is good for CMS”
date:11/29/2010
body: “MongoDB’s document model makes it easy to model....”
tags: [“media”, “CMS”, “web”, “use case”]
comments: [{author:bob, date:1/1/2011, comment:"I agree"},{..}, {..}]
}
{code}

Modeling content elements with these patterns also simplifies queries. For example, we can retrieve all blog posts by the author ‘nosh’ which have the tag mongodb with the query, {code}find({author:”nosh”, tags:”mongodb”){code}

Flexible document-based representation, efficient and simple queries and scalability makes MongoDB a well suited as a datastore for content management systems. The Business Insider has built their content management system from the [ground up using MongoDB and PHP|http://www.businessinsider.com/how-we-use-mongodb-2009-11], which serves over 2 million visits/month. For sites based on [Drupal|http://drupal.org], Drupal 7 now makes it easier to use MongoDB as a datastore. Examiner.com, ported their legacy CMS (based on ColdFusion and Microsoft SQLServer) to Drupal 7 and a hybrid of MySQL and MongoDB. You can read a case study about the how the examiner.com (a top 100 website, and one of most trafficked Drupal deployments) [made the transition|http://acquia.com/resources/library/case-study-examinercom].

MongoDB can also be used to augment existing content management systems with new functionality. One area that we see MongoDB used increasingly is as a metadata store for rich media. MongoDB’s document model makes it simple to represent the attributes for an asset (e.g. author, dates, categories, versions, etc) and a pointer to the asset (e.g. on a filesystem or on S3) as document and then efficiently search or query the metadata for display. Additionally, because MongoDB is schema-free, new metadata attributes can be added without having to touch existing records. [IGN|http://ign.com] uses MongoDB as a the metadata store for all videos on [IGN Videos|http://ign.com/videos] and serves up millions of video views per month. Another similar use case for MongoDB is in storing user-submitted content. The New York Times, uses MongoDB as the backend for ‘Stuffy’, their tool for allowing users and editors to collaborate on features driven by user-submitted photos. A brief overview on the tool is [here|http://open.blogs.nytimes.com/2010/05/25/building-a-better-submission-form/].


h5. How-to Guides
[Modeling content, comments, and tags with MongoDB (coming soon)|http://]
[Modelling image and video metadata with MongoDB (coming soon)|http://]
[Using MongoDB with Drupal 7 (coming soon)|http://]


Roadmap tip: Watch the full-text search ticket


h3. MongoDB for Real-time analytics
The ability to track and change content based on up-to-minute statistics is becoming increasingly important. MongoDB’s fast write performance and features such as upsert and the $inc operator, make it well suited for capturing real time analytics on how content is being consumed. This [blog post|http://blog.mongodb.org/post/171353301/using-mongodb-for-real-time-analytics] outlines some basic patterns you can use to capture real-time pageview statistics for your content.

A number of companies are using MongoDB, either internally to track their own content in real-time, or are building platforms based on MongoDB to help other companies get real time statistics on their content: [Chartbeat|http://chartbeat.com] provides analytics for publishers, with live dashboards and APIs showing how users are engaging with their content in real-time. [BuzzFeed|http://buzzfeed.com] uses MongoDB to help understand how and when content will go viral, while [ShareThis|http://sharethis.com] uses MongoDB to power its API that gives publishers insight into how content is shared across the web and social media

h5. How-to guides
[Real-time analytics with MongoDB (coming soon)| http://]

h3. MongoDB for Social Graphs & Personalization
While systems such as graph databases excel at complex graph traversal problems, MongoDB’s document structure is well suited for building certain types of social and personalization features. Most often, this involves building user profile documents that include a list of friends, either imported from external social networks or in site. For example,
{code}
{
_id:
user: nosh
email: no...@10gen.com
friendIDs: [....., ….., …..]
}
{code}

In this case the friendIDs field is an array with a list of IDs corresponding to profiles of users that are my friends. This data can then be used to generate personalized feeds based on content that my friends have viewed or liked. IGN’s social network, [MY IGN|http://my.ign.com], uses MongoDB to store profiles of users and generate personalized fields. Users have the ability to import their friends from facebook, ‘follow’ IGN authors, or follow specific game titles they are interested in. When they log in, they are presented with a personalized feed composed from this data.

h5. How-to guides:
[Storing user profiles with MongoDB (coming soon)|http://]
[Importing social graphs into MongoDB (coming soon)|http://]
[Generating personalized feeds with MongoDB (coming soon)|http://]

h3. MongoDB for Mobile/Tablet Apps
Serving similar content across desktop browsers, mobile browsers, as well as mobile apps is driving developers to build standardized API layers that can be accessed by traditional web application servers, mobile client applications, as well as 3rd party applications. Typically these are RESTful APIs that serve JSON data. With MongoDB’s JSON-like data format, building these APIs on top of MongoDB is simplified as minimal code is necessary to translate MongoDB documents and query to JSON representation. Additionally, features such as in-built two-dimensional [geospatial indexing|http://www.mongodb.org/display/DOCS/Geospatial+Indexing] allow developers to easily incorporate location-based functionality into their applications.


h3. MongoDB for Data-driven journalism
One of the strengths of MongoDB is dealing with semi-structured data. Data sources such as those produced by governments and other organizations are often denormalized and distributed in formats like CSV files. MongoDB, with its schema-free JSON-like documents is an ideal store for processing and storing these sparse datasets.

The Chicago Tribune uses MongoDB in its [Illinois School Report Cards application|http://schools.chicagotribune.com/], which is generated from a nearly 9,000 column denormalized database dump produced annually by the State Board of Education. The application allows readers to search by school name, city, county, or district and to view demographic, economic, and performance data for both schools and districts.

h5. How-to guides:
[Importing and Exporting data from MongoDB (coming soon)|http://]
[Reporting and Visualization with MongoDB (coming soon)|http://]


h3. Presentations
* [How MTV Networks leverages MongoDB for CMS|http://www.10gen.com/presentation/mongonyc-2011/how-mtv-networks-leverages-mongodb-for-cms] - MongoNYC Presentation (June 2011)
* [Schema Design for Content Management: eHow on MongoDB|http://www.10gen.com/presentation/mongosf2011/demandmedia] - MongoSF Presentation (May 2011)
* [More Presentations|http://www.10gen.com/presentations?event=&application=content_management]

Full Content

Redirection Notice
This page should redirect to http://www.10gen.com/use-case/content-management.

Reply all
Reply to author
Forward
0 new messages