Slashdot Mirror


Why My Team Went With DynamoDB Over MongoDB

Nerval's Lobster writes "Software developer Jeff Cogswell, who matched up Java and C# and peeked under the hood of Facebook's Graph Search, is back with a new tale: why his team decided to go with Amazon's DynamoDB over MongoDB when it came to building a highly customized content system, even though his team specialized in MongoDB. While DynamoDB did offer certain advantages, it also came with some significant headaches, including issues with embedded data structures and Amazon's sometimes-confusing billing structure. He offers a walkthrough of his team's tips and tricks, with some helpful advice on avoiding pitfalls for anyone interested in considering DynamoDB. 'Although I'm not thrilled about the additional work we had to do (at times it felt like going back two decades in technology by writing indexes ourselves),' he writes, 'we did end up with some nice reusable code to help us with the serialization and indexes and such, which will make future projects easier.'"

8 of 106 comments (clear)

  1. No one cares by Anonymous Coward · · Score: 5, Insightful

    No one cares. Stop click-baiting the buzzword Slashdot sub-sites. If we wanted to go to them we would do so voluntarily.

  2. It's so ... wrong by Anonymous Coward · · Score: 5, Insightful

    Having actually RTFA, it just enforces how poorly most programmers understand relational databases and shouldn't be let near them. It's so consistently wrong it could be just straight trolling (which given it's posted to post-Taco Slashdot, is likely).

    "However, the articles also contained data less suited to a traditional database. For example, each article could have multiple authors, so there were actually more authors than there were articles."

    This is completely wrong, that's a text book case of something perfectly suited to traditional (relational) database.

    1. Re:It's so ... wrong by MightyMartian · · Score: 5, Funny

      "Those who don't understand SQL are condemned to reinvent it, poorly." (with apologies to Harry Spencer).

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:It's so ... wrong by vux984 · · Score: 5, Funny

      "However, the articles also contained data less suited to a traditional database. For example, each article could have multiple authors, so there were actually more authors than there were articles."

      Good god, how would he model invoices with multiple line items? Where, you know, there were actually more line items than invoices?! Mind blown.

      Or customers that might belong to zero more demographics? There could be more customers than defined demographics to tag them with... or less... we don't even know and it could change as more of either are added!!

      We need a whole new database paradigm!

      Or the sample Northwind database that's been shipping with access since the 90's.

    3. Re:It's so ... wrong by Torvac · · Score: 5, Insightful

      "with big data comes big responsibility". i mean a few very static 100k items require a NoSQL DB solution and cloud storage ? and a full team to do this ?

  3. Bad planning by Samantha+Wright · · Score: 5, Interesting

    Throughout the article the client says they don't want full-text search. The author says he can "add it later," then compresses the body text field. Metadata like authorship information is also stored in a nasty JSON format—so say goodbye to being able to search that later, too!

    About that compression...

    That compression proved to be important due to yet another shortcoming of DynamoDB, one that nearly made me pull my hair out and encourage the team to switch back to MongoDB. It turns out the maximum record size in DynamoDB is 64K. That’s not much, and it takes me back to the days of 16-bit Windows where the text field GUI element could only hold a maximum of 64K. That was also, um, twenty years ago.

    Which is a limit that, say, InnoDB in MySQL also has. So, let's tally it up:

    • There's no way at all to search article text.
    • Comma-separated lists must be parsed to query by author name.
    • The same applies to keywords...
    • And categories...

    So what the hell is this database for? It's unusable, unsearchable, and completely pointless. You have to know the title of the article you're interested in to query it! It sounds, honestly, like this is a case where the client didn't know what they needed. I really, really am hard-pressed to fathom a repository for scientific articles where they store the full text but only need to look up titles. With that kind of design, they could drop their internal DB and just use PubMed or Google Scholar... and get way better results!

    I think the author and his team failed the customer in this case by providing them with an inflexible system. Either they forced the client into accepting these horrible limitations so they could play with new (and expensive!) toys, or the client just flat-out doesn't need this database for anything (in which case it's a waste of money.) This kind of data absolutely needs to be kept in a relational database to be useful.

    Which, along with his horrible Java vs. C# comparison, makes Jeff Cogswell officially the Slashdot contributor with the worst analytical skills.

    --
    Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
  4. My migration path by Lieutenant_Dan · · Score: 5, Funny

    We decided that MongoDB was adequate but didn't leverage the synergies we were trying to harvest from our development methodologies.

    We looked at GumboDB and found it was lacking in visualization tools to create a warehouse for our data that would provide a real-time dashboard of the operational metrics we were seeking.

    Next up was SuperDuperDB which was great from a client-server-man-in-the-middle perspective but required a complex LDAP authentication matrix that reticulated splines within our identity management roadmap.

    After that I quit. I hear they are using Access 95 with VBA.

    --
    Wearing pants should always be optional.
  5. Re:Question from relational-land by ranton · · Score: 5, Insightful

    Don't try to actually make sense of the decisions made in the article. I am glad that he summed up all of the reasons why he didn't go with a relational database early in the article, so I didn't have to bother reading the rest. I am an advocate of NoSQL, but this whole article is describing a project that is almost perfect for a relational database.

    But considering this author's previous analysis of Java vs C#, I am not surprised that this article was hardly worth the time to read.

    --
    -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke