Why The Washington Post chose MongoDB over Couchbase for its Submission Platform app
Washington Post builds a MEAN stack for web development
The Washington Post claims that it is reaping the benefits of using MongoDB over Couchbase for its Submission Platform app.
The US newspaper calls its app a "dynamic form builder that lets you collect user submissions of text, images and other data".
The organisation's senior web developers, Matt Cwalinski and Sruti Cheedalla, and web developer Kat Styons, spoke to Computing at MongoDB World in New York, and revealed why they selected MongoDB and how they were using the NoSQL database.
"We're using the MEAN stack - so MongoDB, Express.js, Angular.js and Node.js - to build our Submission Platform. It enables the newsroom to create custom forms within our application, which they can then embed into articles or put up and collect submissions from our users," said Styons.
One of the use cases is a travel contest.
"The travel team in the newsroom created their travel content form and users filled out where they were travelling to, where the photo was taken. Then they uploaded their photo... the winners' photos were included into a gallery," said Styons.
There are more than 50 use cases like this at The Washington Post, he added, but while images or metadata within any image can be exported into the content management system, the tool doesn't work with the CMS to collect data or store it.
The developers' line manager didn't know exactly what the project in-hand was going to consist of. The team had already built a photo uploader tool, and they wanted to find other apps within the organisation, so it met with a team from the newsroom that wanted to do a photo contest.
"It turned out they needed some form-data wrapped around this photo, and then we had this idea to make this customisable form user-generated content (UGC) tool, and it began from there," Cheedalla said.
Why MongoDB?
According to Cwalinski, the team experimented with a few options before deciding on MongoDB.
"There was a need to improve the UGC collection within the newsroom. We looked at building something in PHP really quickly, and building a whole Java service, we tried Couchbase DB a little bit, and then somebody mentioned that they were using MongoDB for something else, and we looked into that a bit more," he explained.
The developers agreed that what stood out about MongoDB, particularly over its rival Couchbase, was its community, rather than any differences in features. There was also an added flexibility to MongoDB, according to Cwalinski, who said that it was easier to take the application where they wanted it to go.
"We wanted the database to be our primary data store - so that's how it stood out," he explained.
"It's really flexible having MongoDB as our database. If we are talking to the newsroom and coming up with new ideas and requirements, we can easily make changes to our database," added Cheedalla.
And prior to the shift to MongoDB 3.0 with WiredTiger, there had been criticism of MongoDB's scalability - or lack thereof - but this isn't something that affected The Washington Post.
"It's not something that has been a huge issue yet. At the Post we have our own enterprise cluster set-up, so scaling was easy to latch on to before we built our own cluster - but scalability is very important to us," Cwalinski said.
He added that implementation of MongoDB was the easiest part of the entire process, and claimed that there hasn't been a need to keep tinkering with the database when new ideas arise.
"When we started we defined what the models were going to be early, and then they were fairly open and loosely defined. Since then, we have added dozens of features and changes, but we've barely ever touched those models or anything that has to do with the configuration of MongoDB to get this new stuff in," said Cwalinski.
As for training, the developers have learnt how to use MongoDB using online tutorials. "The API documentation and community support is really great," said Cheedalla.
And adoption of the app has expanded across the newsroom, said Cwalinski. "It's 'developer-less adoption', so it's just through word of mouth. The editors don't need to be influencers - I can show one person and they can use it and tell someone else," said Cwalinski.
"Things are [now] being created that we don't know about, so it's being used. Whereas, when it first started we were pushing it and peddling it. Now that it's well received the next step is to get it to step up to a white label so that other newsrooms can use it," he added.
Computing's DevOps Summit 2015 is in London on 8 July and is FREE for end users. Register here