Django and Neo4j - Domain Modeling that Kicks Ass

Tobias Ivarsson (Neo Technology)
Python
Location: Portland 252
Average rating: ***..
(3.00, 7 ratings)

Django is possibly the most popular web development framework in the Python ecosystem today. This is understandable from its low learning curve, clear separation of concerns and the boilerplate-free easy-to-read code it encourages. One of the key factors to this success is the domain modeling framework Django provides. It’s simple and declarative, yet expressive and powerful, with an excellent balance between explicit code and automatic behind-the-scenes functionality.

The modeling framework in Django is built on an object/relational mapper. While popular, O/R mappers bring a few problems to the table. First of all the representation they generate is a set of tables that is far from the domain model it actually represents, which makes it difficult to grasp the object structure given the schema in the database. This make it hard to move to a different framework in the future since different O/R mappers have different ways of mapping the object structure to the relational database. It also greatly complicates the process of evolving the domain model, few systems manage to update their models while running live, and in Django’s case only simple updates are supported through external libraries.

Another problem is the fact that a deep activation depth generates joins that are too expensive to be practical. Instead a shallow activation depth is used which means that each time an association to another object is traversed a new query has to be made. Put together this adds up to a complex system with many moving parts and less than ideal performance in many cases.

In contrast a graph database has a much lower mismatch to the object model, while providing a representation that is not tied to a specific object system (a common problem with object databases).

The Python bindings for the Neo4j Graph Database integrate with the Django model layer and work seamlessly with the rest of Django. The dynamic, schema free nature of Neo4j make updating models a breeze. Being optimized for traversals, loading of associated objects is blazingly fast. In this session you will learn how to use Neo4j in your next Django project. To get the most out of this talk you should preferably have some prior experience with Django and Python. Everything you need to know to take your first steps with the Neo4j Graph Database will be presented during the session.

Tobias Ivarsson

Neo Technology

Tobias Ivarsson is a software developer at Swedish startup Neo Technology, the commercial backer of the open source graph database Neo4j. At Neo Technology Tobias is the lead developer of the Python bindings for Neo4j, as well as integration layers for other frameworks, and a few developer tools. Tobias is also the main compiler developer on the Jython project since 2007, when he spearheaded a prototype of Python 2.5 support in Jython during the Google Summer of Code initiative.

  • Intel
  • Microsoft
  • Google
  • Facebook
  • Rackspace Hosting
  • (mt) Media Temple, Inc.
  • ActiveState
  • CommonPlaces
  • DB Relay
  • FireHost
  • GoDaddy
  • HP
  • HTSQL by Prometheus Research
  • Impetus Technologies Inc.
  • Infobright, Inc
  • JasperSoft
  • Kaltura
  • Marvell
  • Mashery
  • NorthScale, Inc.
  • Open Invention Network
  • OpSource
  • Oracle
  • Parallels
  • PayPal
  • Percona
  • Qualcomm Innovation Center, Inc.
  • Rhomobile
  • Schooner Information Technology
  • Silicon Mechanics
  • SourceGear
  • Symbian
  • VoltDB
  • WSO2
  • Linux Pro Magazine

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com

Download the OSCON Sponsor/Exhibitor Prospectus

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@ oreilly.com

Press and Media

For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com

OSCON Newsletter

To stay abreast of conference news and to receive email notification when registration opens, please sign up for the OSCON Newsletter (login required)

OSCON 2.0 Ideas

Have an idea for OSCON to share? oscon-idea@oreilly.com

Contact Us

View a complete list of OSCON contacts