MongoDB: gradually becoming irrelevant, and mongodb is irrelevant
Abstract:Compared with TokuMX and PostgreSQL, MongoDB is at a disadvantage. However, it is still a good product and will continue to improve to compete with these alternative products. However, it can only be ranked third at most. We will wait for the improvement and development of MongoDB in 2015.
[Editor's note] Henrique Lobo Weissmann is a software developer from Brazil. He is the co-founder of itexto, a consulting company. Henrique talked about a lot of database content on his blog. Recently, he wrote that non-relational database MongoDB is becoming irrelevant and worthy of attention, especially for developers who intend to use MongoDB.
The following is a translation:
The relationship between me and MongoDB can be divided into three stages. For me in the third stage, this product seems to have become irrelevant. Soon you will understand why I say so.
Phase 1: obsession
My first contact with MongoDB is amazing: A poliglot persistent architecture uses it to process some systems, but the relational model of the framework is not very suitable. However, it runs very well: fast, easy to install and use, and runs well. I have to say that MongoDB is suitable for such cases.
Phase 2: Reality
Perhaps the better name of this stage should be mature. At this stage, I know under what circumstances should I use MongoDB, and more importantly, when should I not use MongoDB. At this time, you will find that MongoDB is a good product that requires careful use. The document model provided by it is powerful enough to help you solve many but not all problems: in fact, it is just a lot.
I realized this problem from my own failures and others' failures. Many people are excited to simplify the world into a model, so MongoDB can be the perfect solution to all problems. However, at these moments, some facts that do not conform to the imagination but actually exist will hit your face to prove that your thoughts are wrong:
- Relational Models are not as bad as they are. In fact, this model is very popular at present, and its position will not change for a long time in the future. The reason is: It works. In contrast to NoSQL, We have a variety of good or bad practices for this model.
- ACID transactions. MongoDB is a little annoying: you cannot create a transaction to process multiple documents. The problem arises: In most cases, you must process multiple documents at the same time.
- Before you know what your system needs, the powerful performance mentioned above has little to do with you.
At this stage, all the excitement and vision have vanished. This is what everyone will do. At this time, you will know what this tool can do and what it cannot do. This is the best phase.
Stage 3: irrelevant
Now MongoDB has become irrelevant to me. Of course, it is not a document model, but a product. One morning I woke up and suddenly realized that I no longer needed MongoDB, because it is more attractive for my projects. They come in batches.
First wave: TokuMX
TokuMX is a branch of MongoDB. I like to call it "the charming twin brother of MongoDB ". It uses the same communication protocol as MongoDB, uses basically the same commands, and is compatible with MongoDB 100%. However, it has some powerful advantages that MongoDB does not have:
- Multi-document ACID processing is supported.
- Faster than MongoDB (50 times faster ).
- Storage consumption is 90% less than that of MongoDB.
- Compatible with MongoDB 100%. All you need to do is replace the MongoDB instance with TokuMX, and then transfer the data (which is quite easy), so you will be done.
Yes, like MongoDB, it is also open-source and has a free version that runs very well. Of course, it is not completely impeccable. It has two limitations:
- No Windows release (Distribution ).
- Currently, the Java library does not support MongoDB ACID execution locally. It can be used, but some sample code is still needed.
TokuMX for the first time made me realize that MongoDB does not seem to matter to me. Of course, this may be temporary: MongoDB may still beat TokuMX after a later version is released. However, you can only hope for a later version. So far, it cannot.
Second wave: PostgreSQL
If TokuMX makes me feel that MongoDB is irrelevant, PostgreSQL 9.2 strengthens this impression. Since version 9.2, PosetgreSQL has supported JSON and JSONB data types. This is an interesting solution because it gives me a better idea of document flexibility in the relational model. All of these are based on the same product. Great!
However, MongoDB has a higher performance than PostgreSQL. I said "Zeng" because PostgreSQL 9.4 turned it into history: the latest benchmark shows that PostgreSQL is faster than MongoDB in processing JSON data types. I didn't want to compare PostgreSQL and TokuMX, but since the two have better performance than MongoDB, I think you know my point of view.
Compared with TokuMX and PostgreSQL, MongoDB is at a disadvantage. However, it is still a good product and will continue to improve to compete with these alternative products. However, it can only be ranked third at most. However, the capital market is very recognized by MongoDB. The latest news shows that MongoDB received $2015 in financing in 80 million, with a valuation of more than $1.5 billion. We look forward to improving and developing MongoDB.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.