MongoDB: Gradually becomes irrelevant

Source: Internet
Author: User
Tags postgresql

My relationship with MongoDB can be divided into three stages. For me now in the third phase, this product seems to be irrelevant. Soon you'll see why I'm saying this.

 Stage One: Obsession

My first contact with MongoDB was magical: a poliglot persistence architecture used it to process part of the system, and the framework's relational model was not very suitable. Yet it works beautifully: fast, easy to install and use, and works well. It has to be said that MongoDB is well suited for this kind of situation.

Its performance shocked me: In fact, my main query language is JavaScript, which is already very impressive. I never dreamed that something like that would work so well. During that time, I learned more about the product and how to manage the document model it rationed.

  Stage Two: Reality

Perhaps a better name for this stage should be maturity. At this stage, I know under what circumstances to use MongoDB, and more importantly, when not to use MongoDB. At this point, you will find that MongoDB is a good product that needs careful use. It provides a powerful documentation model that can help you solve many but not all of the problems: in fact, it's just quite a lot.

I am aware of this problem from my own and others ' failures. Many people are excited to simplify the world into a model, so MongoDB can be the perfect solution for all problems. But when these moments, some of the facts that are not imaginary but real exist will hit your face and prove that your idea is wrong:

Relational models are not as bad as they seem. In fact, the model is now very popular, and its status will not change for a long time to come: it works. And contrary to NoSQL, we have a variety of good or bad practices that apply to this pattern.

Acid transactions. MongoDB has a little annoying place: You cannot create a transaction to handle multiple documents. So here's the problem: In most cases, you have to do multi-document processing at the same time.

Before you know what your system needs, all of the above-mentioned powerful features are not very related to you.

At this stage, all the excitement and brief encounter are gone, and this is what everyone will have. At this point, you'll know what the tool can do and what it can't do. This is the best stage.

  Phase three: irrelevant

Now MongoDB has become irrelevant to me. Of course not referring to the document model, but the product. One morning when I woke up, I realized that I no longer needed mongodb, because the alternatives were more appealing to my project. They come in batches.

  First wave: Tokumx

TOKUMX is a branch of MongoDB that I like to call "MongoDB charming twin brothers". It uses the same communication protocol as MONGODB, with basically the same commands, and is compatible with MongoDB 100%. But it has some great advantages that MongoDB does not have:

Multi-document acid processing is possible.

Faster than MongoDB (Fast 50 times times faster).

Storage consumption is 90% less than MongoDB.

Compatible with MongoDB 100%. All you need to do is change the MongoDB instance to tokumx and then transfer the data (which is pretty easy) so you're done.

Yes, like MongoDB, it's also open source, and there's a free version that runs very well. Of course, it is not completely invulnerable. It has two limitations:

No Windows publishing (distribution).

Currently, the Java library does not provide local support for mongodb acid execution. It can be used, but still requires some boilerplate code.

For the first time, tokumx me that MongoDB doesn't seem to matter to me. Of course, this may only be temporary: MongoDB will still be able to defeat TOKUMX after the release of the later version. However, you can only hope for future versions. So far, it can't be done.

  Second wave: PostgreSQL

If Tokumx makes me feel that MongoDB doesn't matter, then PostgreSQL 9.2 reinforces that impression. Since version 9.2, POSETGRESQL has been providing support for JSON and JSONB data types. This is an interesting solution because it allows me to get a good part of the relational model with document flexibility. And all of this is based on the same product. That's great!

But MongoDB has a higher performance than PostgreSQL. I said "Zeng" because the PostgreSQL 9.4 version made it history: The latest benchmark shows that PostgreSQL is faster than MONGODB in processing JSON data types. I don't want to compare PostgreSQL and tokumx, but given that both have better performance than MongoDB, I think everyone has made my point clear.

Conclusion

  MongoDB is at a disadvantage compared to tokumx and PostgreSQL. But it is still a good product, and will continue to improve to compete with these alternatives, but at the moment it can only be ranked in the third place. But the capital markets are very well-recognized by MongoDB, and the latest news shows that MongoDB received $80 million in financing in 2015, valued at more than $1.5 billion. Look forward to the improvement and development of MONGODB.

MongoDB: Gradually becomes irrelevant

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.