PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Enabling Polyglot Persistence for Neo4j and MongoDB Using Python

William Lyon

Audience level:


Learn why you would want to use a graph database and a document database to power a single application. See how we implemented a MongoDB - Neo4j connector using Python to sync data from MongoDB to Neo4j.


Polyglot persistence is all about using multiple database technologies to enhance your application, taking advantage of the strengths of different databases. However, the benefits come at the expense of complexity: managing multiple databases and keeping the data in sync at the application layer. In this presentation, I will outline some use cases where it makes sense to use a document database (MongoDB) and graph database (Neo4j) together to add functionality to a web application. We will examine a product catalog application that uses MongoDB to power search and browsing while using Neo4j to add personalized product recommendations. Finally, we will show how we implemented a MongoDB-Neo4j connector based on the mongo-connector project and an overview of the Python libraries that made it possible.