In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly talks about "what are the scenarios of applying MongoDB". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what are the scenarios of applying MongoDB.
Many people are more concerned about the applicable scenarios of MongoDB, and some users share their business scenarios in the topic, such as
Case 1
The log records used in the application server are more flexible to find than text, and export is also very convenient. It is also for application training, starting from the peripheral system to use MongoDB.
Used in some third-party information acquisition or crawling, because MongoDB schema-less, all the format is flexible, do not need to design a unified format for a variety of different formats of information, greatly reducing the work of development.
Case 2
Mongodb has been used before, mainly used to store some monitoring data, No schema is really convenient for developers, adding fields do not need to change the table structure, and the learning cost is very low.
Case 3
Using MongoDB to do O2O express application, the information of delivery riders and couriers (including location information) is stored in MongoDB, and then queried through the geographical location of MongoDB, which is very convenient to find nearby merchants, riders and other functions, so that express riders can pick up orders nearby. At present, there are no big problems in using MongoDB. The documents on the official website are more detailed and very powerful.
When you often discuss MongoDB business scenarios with some students, you will hear voices such as "you can also solve this scenario with mysql, and you don't have to use MongoDB". Indeed, there is no business scenario that must be solved by using MongoDB, but using MongoDB usually allows you to solve problems at a lower cost (including learning, development, operation and maintenance costs, etc.). Here are the main features of MongoDB, which you can take a look at against your own business needs. The more matches there are, the more appropriate it is to use MongoDB.
MONGODB feature advantage transaction support MongoDB currently only supports single document transaction, and scenarios requiring complex transaction support are not suitable for flexible document model JSON format storage closest to the real object model, which is friendly to developers. It is convenient and rapid to develop iterative high availability replication sets to meet the requirements of high reliability of data and high availability of services. It is simple in operation and maintenance, and can automatically switch over and expand the massive data storage in shard clusters. Service capability expansion high performance mmapv1, wiredtiger, mongorocks (rocksdb), in-memory and other multi-engine support to meet the needs of various scenarios strong index support geolocation index can be used to build a variety of O2O applications, text index to solve the needs of search, TTL index to solve the needs of automatic expiration of historical data Gridfs to solve the requirements of file storage aggregation & mapreduce to solve the requirements of data analysis scenarios, users can write their own query statements or scripts Distribute all requests to MongoDB to complete
From the current users of Aliyun MongoDB cloud database, the application of MongoDB has penetrated into various fields, such as games, logistics, e-commerce, content management, social networking, Internet of things, live video, and so on. Here are several practical application cases.
Game scene, use MongoDB to store game user information, user equipment, points and other directly embedded documents to facilitate query and update
In logistics scenarios, MongoDB is used to store order information, and the order status is constantly updated in the form of an embedded array of MongoDB. All the changes of the order can be read in a single query.
In social scenarios, MongoDB is used to store user information and moments information posted by users, and nearby people and places are realized through geographic location index.
In the Internet of things scenario, MongoDB is used to store information about all connected smart devices, as well as log information reported by devices, and analyze these information in multiple dimensions.
Live video streaming, using MongoDB to store user information, gift information, etc.
……
If you're still wondering whether you should use MongoDB, make a few multiple-choice questions to help you make a decision. (note: the following is adapted from a public technology sharing by a TJ classmate at MongoDB).
Application characteristics YES / NO applications do not need transactions and complex join support must Yes new applications, requirements will change, the data model can not be determined, want to quickly iterative development? Applications require more than 2000-3000 read and write QPS (higher is also possible). Applications require TB or even PB-level data storage? The application is developing rapidly and needs to be able to expand quickly and horizontally. Does the application require that the stored data is not lost? Does the application require 99.999% high availability? Applications require a lot of geolocation queries and text queries.
If there is 1 Yes above, you can consider MongoDB,2 or more Yes, and you will never regret choosing MongoDB.
At this point, I believe you have a deeper understanding of "what are the scenarios of applying MongoDB?". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.