Na konci minulého roku vyšla nová verze MongoDB ve verzi 3.4, která je nyní ready for production deployment.
What’s New in MongoDB 3.4 white paper
Pěkný článek popisující novinky verze 3.4 o třech částech: 1.díl, 2.díl, 3.díl.
Native Graph Processing
Applications storing data in MongoDB frequently contain data that represents graph or tree type hierarchies. Graph and hierarchical data is commonly queried to uncover indirect or transitive relationships. MongoDB 3.4 offers this functionality via a new aggregation stage called $graphLookup to recursively lookup a set of documents with a specific defined relationship to a starting document. Developers can specify the maximum depth for the recursion, and apply additional filters to only search nodes that meet specific query predicates. $graphLookup can recursively query within a single collection, or across multiple collections.
MongoDB $graphLookup operator for graph processing
Faceting is a popular analytics and search capability that allows an application to group information into related categories by applying multiple filters to query results. Facets allow users to narrow their search results by selecting a facet value as a filter criteria. Facets also provide an intuitive interface to exploring a data set, and allow convenient navigation to data that is of most interest. MongoDB 3.4 introduces new aggregation pipeline stages for the bucketing, grouping and counting of one or more facets in a single round trip to the database. As a result, developers can generate richer and intuitive experiences to help users navigate complex data sets.
MongoDB faceted navigation
Each language has different rules governing the comparison and sorting of data. In order to create intuitive, localized user experiences, applications must handle non-English text with the appropriate rules for that language. For example, French has detailed rules for sorting names with accents on them. German phonebooks order words differently than the German dictionary. MongoDB 3.4 significantly expands language support capabilities to allow users to build applications that adhere to language-specific comparison rules. Support for collations – the rules governing text comparisons and sorting – has been added throughout the MongoDB Query Language and indexes for over 100 different languages and locales. Each collation can also be further customized to provide precise control over case sensitivity, numeric ordering, whitespace handling, and more.
collation in MongoDB from the documentation
Aggregation Pipeline Enhancements
MongoDB 3.4 continues to extend the aggregation pipeline by adding new capabilities within the database that simplify application-side code, as well as optimizer enhancements that improve performance.
MongoDB 3.4 aggregation pipeline enhancements from the documentation
Decimal Data Type
Decimal128 is a 16 byte decimal floating-point number format. Decimal128 supports 34 decimal digits of significance and an exponent range of −6143 to +6144. MongoDB 3.4 adds support for the decimal data type which represents decimal128 values. Unlike the double data type, which only stores approximations of decimal values, the decimal data type stores the exact value.
MongoDB decimal data type
Visualizing MongoDB Data
Building on its initial release, the Connector for BI has been reengineered to improve performance, simplify installation and configuration, and support Windows. Performance and scalability has been improved by moving more query execution down to the MongoDB processes themselves. Queries and complex aggregations are executed natively within the database, thus reducing latency and bandwidth consumption. The Connector for BI is part of the Advanced Analytics suite available with MongoDB Enterprise Advanced.
MongoDB Connector for BI documentation
MongoDB Connector for Apache Spark
MongoDB Connector for Apache Spark has been updated to support the latest Spark 2.0 release.
MongoDB Zones: Sophisticated Data Distribution
MongoDB zones (superceding tag-aware sharding in earlier MongoDB releases) allow precise control over where data is physically stored, accommodating a range of deployment scenarios – for example by geographic region, by hardware configuration, or by application feature. Administrators can continuously refine data placement rules by modifying shard key ranges, and MongoDB will automatically migrate the data to its new zone.
Faster Cluster Balancing & Node Synchronization: The balancer process now supports parallel data migrations. Multiple node pairs can perform balancing migrations simultaneously, significantly improving balancing throughput as nodes are added or removed from the cluster, or as data is redistributed across nodes.
Intra-Cluster Network Compression: MongoDB 3.4 introduces a new option to compress the wire protocol used for intra-cluster communications. Based on the snappy compression algorithm, network traffic can be compressed by up to 70%, providing major performance benefits in bandwidth-constrained environments, and reduced networking costs.
MongoDB 3.4 adds a new readConcern level of “linearizable”. This option confirms the primary replica is still connected to a quorum (majority) of replica nodes before returning results to the client. When used to perform reads against a single document, linearizable read concern provides two guarantees: First, it guarantees that the returned data reflects only writes that are committed to a majority of nodes in the replica set, and therefore will not roll back in the future as a result of a replica set election. Second, it guarantees that the read is not stale. This means that the returned data reflects the last write operation to the document that successfully replicated to a majority of nodes. In order to provide the extra guarantees, using linearizable read concern level will have a significant impact on read latency.
reviewing the linearizable read concern documentation
Expanded Platform Support
MongoDB 3.4 has been ported to the ARM v8-64 bit platform. MongoDB 3.4 has been ported to IBM’s POWER8 and zSeries platforms.
Enterprise-Grade Security for Regulatory Compliance
LDAP Authorization: When configured with an LDAP server for authorization, MongoDB 3.4 will allow user authentication via LDAP, Active Directory, Kerberos, or X.509 without requiring local user documents in the $external database.
Read-Only Views: New in MongoDB 3.4, DBAs can define non-materialized views that expose only a subset of data from an underlying collection.
The latest Compass release expands functionality to allow users to manipulate documents directly from the GUI, optimize performance, and create data governance controls.
Operational Management for DevOps Teams
Ops Manager is the simplest way to run MongoDB on your own infrastructure, making it easy for operations teams to deploy, monitor, backup, and scale MongoDB. Ops Manager is available as part of MongoDB Enterprise Advanced, and its capabilities are also available in Cloud Manager, a tool hosted by MongoDB in the cloud.
Ops Manager Monitoring
Ops Manager now allows telemetry data to be collected every 10 seconds, up from the previous minimum 60 seconds interval.
MongoDB Atlas: VPC Peering
MongoDB Atlas offers the latest 3.4 release (community edition) as an option. In addition, MongoDB Atlas also now offers AWS Virtual Private Cloud (VPC) peering. Each MongoDB Atlas group is provisioned into its own AWS VPC, thus isolating the customer’s data and underlying systems from other MongoDB Atlas users. With the addition of VPC peering, customers can now connect their application servers deployed to another AWS VPC directly to their MongoDB Atlas cluster using private IP addresses.