Newsletters




New Features in MongoDB 3.6


MongoDB 3.6 was announced publically in November and should be in production by the time this article is posted.  There are no shock features in this version, but it is an attractive release that should see rapid uptake.

Members of MongoDB's leadership consistently note that they regard MongoDB as a “developer-first” product.  The developer-first strategy has been wildly successful for MongoDB:  As the database of choice for modern developers MongoDB has seen more rapid growth over the past few years than any other database system.   However, as MongoDB applications become increasingly mission-critical, operations features become more significant.  So while this release includes many features aimed squarely at developers, many of the features also attempt to address concerns relating to data integrity and security.    

MongoDB 3.6 "retryable writes" eliminate the uncertainty that occurs if a network failure occurs between the transmission of the write and the acknowledgement.  In this scenario, the application might not be able to determine if the write has completed and fairly complex application logic needs to be included to ensure that data does not become inconsistent or corrupted.       

In a similar vein, MongoDB 3.6 "causal consistency" ensures that a single session sees a consistent view of data regardless of the cluster configuration.  In previous versions, it was possible to get an inconsistent view of the data you had written when read requests were routed across multiple nodes of the cluster. 

MongoDB 3.6 change stream" allows data changes to be notified in real time to listeners. This hooks into the MongoDB “oplog” replication mechanism.  This can be used by applications who want real time updates of data driven events, but could also be used for customized real time ETL between disparate systems.

MongoDB has offered a desktop data exploration and discovery tool - "Compass" – for a few years, but until recently this was only available in the MongoDB enterprise edition. In 3.6, a free version of Compass is available, though some features are only enabled in the enterprise edition.  The MongoDB performance and backup features in the Enterprise edition have also received some incremental though useful improvements.

A key part of the MongoDB document database paradigm relies on embedded nested arrays of documents to represent master-child relationships that in relational database would require multiple tables.  To further support these complex nested data structures, new functions in MongoDB 3.6 allow for complex array manipulation in atomic operations.  These operators are not for the faint of heart, but experienced JavaScript programmers should find them very useful.  

Although MongoDB is a “schema-free” database, it has offered limited support for enforcing some aspects of schema since 3.2.  For instance, it is possible to specify mandatory attributes that every document should have and specify allowable data types.  However, this validation was fairly loose, and in MongoDB 3.6 full JSON schema support is offered which allows virtually all aspects of the schema to be defined. 

The ransomware attacks that afflicted MongoDB users earlier this year left many with the impression that MongoDB was inherently insecure.  The reality is that these attacks were made possible by poor user configuration abetted by (in hindsight) unwise default security settings in the MongoDB binaries.  These vulnerabilities are mitigated in 3.6 by default settings which prevent external connections to the database until explicitly configured and which has IP whitelisting – restricting connections to nominated IP addresses - turned on by default.  While an administrator may still configure an insecure MongoDB database, it is unlikely to be done unintentionally or through sheer laziness.

MongoDB 3.6 is an incremental release that improves MongoDB’s capability as a robust general purpose developer-oriented database platform.  The release won’t keep anyone at Oracle up at night, but it will be welcomed by developers building increasingly robust applications on MongoDB.


Sponsors