New version... new features
Tags: mongodb
Published: 2017-05-01 14:21:21

---
title: New version... new features
published: true
description: New features in MongoDB 3.4
tags: MongoDB
---
If you get involved in the software development industry, or heck, even just use a computer, you know that vendors pump out new versions of their software very frequently. It often seems like just when you get a handle on version 10, version 11 is introduced and the learning curve has to start all over. I'm so stubborn that I'm personally still on Microsoft Office 2003... I know, don't laugh.

Sometimes new versions offer nothing but bug fixes and additional headaches. Other times new software versions come packed with a wide assortment of immediately useful new features. Such is the case of the latest release of <a href="http://www.mongodb.com">MongoDB</a>, 3.4, released in December of 2016.

I'd like to take a look at some of the new features they have included in this latest version for developers. There are several new features more suited for a discussion from an administrator standpoint, such as <a href="https://docs.mongodb.com/manual/tutorial/manage-shard-zone/">zones</a>, <a href="https://docs.mongodb.com/manual/core/sharding-balancer-administration/">elastic scalabilty</a> enhancements, <a href="https://docs.mongodb.com/manual/reference/read-concern/">consistency control</a>, and improvements to <a href="https://docs.mongodb.com/manual/release-notes/3.4/#security-enhancement">security</a> for database access. For this post though, let's stick to a discussion about some of the development oriented features.

<a href="https://www.mongodb.com/download-center?jmp=nav#community">Version 3.4</a> provides some excellent improvements for data processing and aggregation, international language considerations, and third-party application connection tools.

They have brought the ability to do graph processing directly into MongoDB with the new <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/">$graphLookup</a> aggregation stage. This new stage allows MongoDB to recursively lookup documents based on a specific relationship to a starting document. There are, of course, many uses for this feature alone, such as graphing social networks, business entities, genealogical family trees, etc. One can now utilize the power of a graph database natively within MongoDB. For those that have used a separate graph database, like <a href="https://neo4j.com/">Neo4j</a>, they can now process their data using a single MongoDB datastore and get graphs along with other business critical data. With the rise of applications that are connected globally, being able to graph relationships is becoming a larger and larger need.

Additionally, with the globalization of applications it is becoming more and more critical to be able to offer localized language considerations to your application. My family just gone done hosting an exchange student from Germany and let us know that German phone books and German dictionaries sort words differently. Well, it would be great to be able to have the ability to account for these language rules and nuances. MongoDB 3.4 has support for over 100 different languages and locales. One can specify a <a href="https://docs.mongodb.com/manual/reference/collation/">collation</a> based on <a href="https://docs.mongodb.com/manual/reference/glossary/#term-collection">collection</a>, <a href="https://docs.mongodb.com/manual/indexes/">index</a>, or <a href="https://docs.mongodb.com/manual/core/views/">view</a>. Further, several operations support collation as well, such as <a href="https://docs.mongodb.com/manual/reference/method/db.collection.find/">find</a>, <a href="https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/">aggregate</a>, and <a href="https://docs.mongodb.com/manual/reference/method/db.collection.update/">update</a>.

A couple of additional things which personally got me excited were some updates to the <a href="https://www.mongodb.com/products/bi-connector">MongoDB Connector for BI</a> and the <a href="https://docs.mongodb.com/spark-connector/current/">MongoDB Connector for Apache Spark</a>. As someone who enjoys being able to visualize data, the Connector for BI is very exciting. The performance improvements have been made by moving more query execution into MongoDB processes to reduce latency and bandwidth. Other improvements around the Connector for BI include a simplification of the <a href="https://www.mongodb.com/download-center#bi-connector">installation</a>, configuration process, authorization, and support for Windows.

The Spark Connector has received some nice attention as well with updates to support the latest <a href="http://spark.apache.org/">Spark 2.0 release</a>. For those familiar with Spark, the connector allows us access to Spark's libraries for Scala, Java, Python, and R and brings MongoDB data in as DataFrames and Datasets. This allows us to utilize data already in MongoDB to be analysed through Spark's tools for machine learning, graph, streaming, and SQL APIs and provide shorter turn around times for data scientists and engineers.

There are several other features new in 3.4 as well, such as <a href="https://docs.mongodb.com/master/release-notes/3.4/#new-aggregation-stages-for-faceted-search">faceted navigation</a>, enhancements to the <a href="https://docs.mongodb.com/master/release-notes/3.4/#aggregation">aggregation pipeline</a>, and a support for the <a href="https://docs.mongodb.com/master/release-notes/3.4/#decimal-type">decimal data type</a>. In previous posts I have mentioned some of the advancements to <a href="https://www.kenwalger.com/blog/nosql/mongodb/mongodb-compass-an-overview/">MongoDB Compass</a> and their DBaaS offering <a href="https://www.kenwalger.com/blog/nosql/mongodb/mongodb-atlas/">Atlas</a>. There are a lot of exciting things in all of these new and/or enhanced features that make version 3.4 worth examining further.

I am excited to continue to examine the possibilities especially around $graphLookup, multi-language collations, and the various connectors. I know that not every organization is in a place and able to upgrade to 3.4 today, but it is definitely worth a look. You can download it in their download center <a href="https://www.mongodb.com/download-center?jmp=nav#community">here</a>.


<em>Follow me on Twitter <a href="https://www.twitter.com/kenwalger">@kenwalger</a> to get the latest updates on my postings, or see the original post on my <a href="https://www.kenwalger.com/blog" target="_blank">blog</a>.</em>