当前位置:网站首页>What started mongodb? What are the application scenarios?

What started mongodb? What are the application scenarios?

2022-06-11 19:04:00 Blue92120

MongoDB The origin of
A few years ago 10gen The company did SaaS R & D in this area , Because the company MongoDB Ease of use of product storage interface , The user's comments were very good , The company began to develop MongoDB. Therefore 10gen The company was renamed MongoDB.


MongoDB Application
MongoDB Applicable to website data 、 Game data 、 cache 、 High scalability and other scenarios . at present , Baidu 、 Ali 、 Quick taxi 、 JD.COM 、 Catch up network 、360、CERN And many other companies have deployed MongoDB.


MongoDB Characteristics
stay Web2.0 Time , Tradition RDBMS In high performance 、 High availability 、 Under the requirement of high extensibility, I began to fall short of my ability .
As NOSQL A solution , from C++ Open source document type database system written in MongoDB Is the NOSQL shipment dynamic in Of bright star become member .MongoDB By db-engines Website (http://db-engines.com/en/ranking_trend) named 2014 The most popular database management system of the year . To sum up MongoDB The main characteristics of : Document oriented 、 Model freedom 、 High availability 、 Horizontal expansion 、 Rich support .


Document oriented
Documents are stored in MongoDB One of the records , Is a data structure composed of key value pairs . Such as {"company":"itcast","address":"Beijing"}. As document oriented (Document-Oriented) Of Count According to the library ,document And On collection,record To table.


Model freedom
The document is MongoDB The basic unit of data in , A set can be seen as a table without a schema . Model freedom (schema-free), every last Document They all contain metadata information , Each document is not forced to use the same format , At the same time, they also support various indexes . Since there is no mode to change , There is usually no need to migrate large amounts of data . For example, a student file :{"name":"C++lover","like": {"Linux System programming "," Distributed systems ","MongoDB"}}


High availability
High availability  (High Availability,HA) Is to minimize downtime due to maintenance and crashes , To improve system and application availability .MongoDB Support in copy set (Replica Set) Fail over through asynchronous replication , Automatic recovery , The primary server in the cluster crashes, stops service and loses data , The backup server gets the majority of votes by election and becomes the primary node , In order to achieve high availability . In this mode, read operations are performed on the backup node to realize read / write separation , Because the backup server synchronizes the primary server in real time Oplog Write operations , Although some appropriate reads can also share the tasks of some primary nodes , But there is a risk of increasing the delay of the slave node . Abreast of the times MongoDB3.0 Provides MVCC Mechanism , It realizes document level concurrency control , Further improve the concurrency performance .


Horizontal expansion
MongoDB It is not recommended to use the slave node to expand the read performance , Instead, use Shards Shard.MongoDB Support fragmentation Technology , It can support parallel processing and horizontal expansion . Through automatic slicing technology ,Shard Ability to distribute data across multiple slices , It can make MongoDB The deployment of addresses the hardware limitations of a single server without increasing the complexity of the application , Solutions include RAM And disk I/O The limitation of , A slice is usually a replica set .


Rich support
MongoDB In addition to providing the above rich functional support , It also provides a wealth of BSON data type , official MongoDB Of Officer, Fang driver the a (C/C++、C#、Java、Node.js、Perl、PHP、Python、Ruby、Scala), In addition, the community supports MongoDB Of Go,Erlang The driver .
Besides MongoDB built-in MapReduce Engine and other aggregation frameworks , Index of spatial geographic data ,GridFS It is suitable for a variety of business needs .


MongoDB Future and thinking
Development in the era of big data will inevitably require programs to be able to handle massive amounts of data ,MongoDB With its own characteristics and with Hadoop The combination of , Undoubtedly, it has established its important position in cloud computing and big data , The market outlook is bright , Demand is naturally strong . On major recruitment websites ,C/C++ Most server engineers have “ be familiar with NOSQL(MongoDB、Redis etc. ) first ” Other requirements .

原网站

版权声明
本文为[Blue92120]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206111902551492.html