The document-oriented database MongoDB 5.0 is now available

The release of the document-oriented database MongoDB 5.0 has been introduced, which occupies a niche between fast and scalable systems that operate with key/value data formats, and relational databases that are functional and easy to query. The MongoDB code is written in C++ and is distributed under the SSPL license, which is based on the AGPLv3 license but is not open source because it includes a discriminatory requirement for delivery under the SSPL license not only for the application code but also for the source texts of all components involved in providing cloud service.

MongoDB supports storing documents in a JSON-like format, has a sufficiently flexible language for forming queries, can create indexes for various stored attributes, efficiently handles large binary objects, supports logging of operations for modifying and adding data to the DB, can work according to the Map/Reduce paradigm, supports replication, and facilitates the creation of fault-tolerant configurations.

MongoDB has built-in tools for segmenting (distributing a dataset across servers based on a specific key), which, combined with replication, allow the creation of a horizontally scalable storage cluster that does not have a single point of failure (a failure of any node does not affect the operation of the DB), supports automatic recovery after a failure, and load balancing from a failed node. Expanding the cluster or transforming one server into a cluster is performed without stopping the DB operation by simply adding new machines.

Features of the new release:

  • Time series collections have been added, optimized for storing slices of parameter values recorded at specific intervals (time and the set of corresponding values at that time). The need to store such data arises in monitoring systems, financial platforms, and sensor state polling systems. Working with time series data is done like with regular document collections, but the indexes and storage method for them are optimized considering time binding, which significantly reduces disk space consumption, decreases query execution latency, and implements real-time data analysis capabilities.

    MongoDB treats such collections as writable, materialized views created based on internal collections that automatically group time series data into an optimized storage format upon insertion. Each time-bound record is interpreted as a separate document upon querying. Data is automatically sorted and indexed by time (there is no need to explicitly create time indexes).

  • Support for window operators (analytical functions) has been added, allowing actions to be performed on a specific set of documents within a collection. Unlike aggregate functions, window functions do not collapse the grouped set but aggregate based on the content of the "window," which includes one or more documents from the result set. To manipulate a subset of documents, a new stage $setWindowFields has been introduced, enabling tasks such as determining differences between two documents in a collection, calculating sales rankings, and analyzing information in complex time series.
  • API versioning support has been added, allowing an application to be tied to a specific state of the API and mitigating risks associated with potential backward compatibility issues when transitioning to new releases of the DBMS. API versioning separates the application lifecycle from the DBMS lifecycle and allows developers to make changes to the application when the need arises to harness new capabilities rather than only during a transition to a new DBMS version.
  • Support for the Live Resharding mechanism has been added, enabling the shard keys to change on the fly without stopping the DBMS.
  • The capabilities for client-side field-level encryption have been enhanced. It is now possible to reconfigure audit filters and rotate x509 certificates without stopping the DBMS. Support has been added for configuring the cipher suite for TLS 1.3.
  • A new command-line shell for MongoDB (mongosh) has been proposed, which is developing as a separate project, written in JavaScript using the Node.js platform and distributed under the Apache 2.0 license. MongoDB Shell allows connecting to the DBMS, changing settings, and sending queries. It supports intelligent auto-completion of methods, commands, and MQL expressions, syntax highlighting, contextual hints, error message parsing, and functionality extension through plugins. The old CLI shell 'mongo' has been deprecated and will be removed in a future release.
    The document-oriented database MongoDB 5.0 is now available
  • New operators have been added: $count, $dateAdd, $dateDiff, $dateSubtract, $sampleRate, and $rand.
  • Indexing is ensured when using the operators $eq, $lt, $lte, $gt, and $gte within the $expr expression.
  • The aggregate, find, findAndModify, update, delete commands and the methods db.collection.aggregate(), db.collection.findAndModify(), db.collection.update(), and db.collection.remove() now support the 'let' option for defining a list of variables, making the commands more readable by separating variables from the query text.
  • The find, count, distinct, aggregate, mapReduce, listCollections, and listIndexes operations are no longer blocked when a parallel operation is executing that acquires an exclusive lock on the document collection.
  • As part of the initiative to eliminate politically incorrect terms, the isMaster command and the db.isMaster() method have been renamed to hello and db.hello() respectively.
  • The release numbering scheme has been changed, and a predictable release schedule has been adopted. A significant release (5.0, 6.0, 7.0) will be produced once a year, with intermediate releases featuring new capabilities (5.1, 5.2, 5.3) every three months, along with corrective updates for bug fixes and vulnerabilities (5.1.1, 5.1.2, 5.1.3) as needed. Intermediate releases will introduce functionality for the next major release, meaning that new features for MongoDB 6.0 will be developed in MongoDB 5.1, 5.2, and 5.3.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster