Getting Started with DSE Graph & My Favorite Lessons Learned

By Jonathan Lacefield -  September 28, 2016 | 0 Comments

The 2016 Cassandra Summit was a fantastic event. Friends, new connections, learning, technical discussion everywhere – just fantastic!

One question that was raised several times throughout the event was “How do I get started with DSE Graph?”  This post aims to answer this question and help those who are interested in learning and exploring DataStax Enterprise Graph.  

Acquiring DSE Graph

There are two different options for acquiring DSE Graph:

  1. Use the VM Image from the DataStax Academy – DS330 course
  2. Download and install DataStax Enterprise 5.0

If you are simply looking for a simple sandbox, then the VM Image that accompanies the DS330 course may be a good option for you.

If you would like to explore DSE Graph in a more “real life” scenario, then it’s recommended to download DataStax Enterprise to get access to graph functionality. DataStax documentation can help with installation procedures. Once installed, you simply tell DSE to start in “Graph Mode”.  

DataStax also released a great tool for visual exploration and development against DSE Graph named DataStax Studio. DataStax Studio is the recommended method to work with DSE Graph.  The DSE 5.0 installer will install DataStax Studio for you (just make sure to choose Developer Related Tools during the installation).

Learning DSE Graph

DataStax has and continues to invest in helping you learn DSE Graph.  There are several great resources available to help you quickly gain the skills necessary to master DSE Graph.

  • Free DataStax Academy Training: The first is our free DataStax Academy training content. If you are brand new to Graph, then check out this great “Introduction to Graph” course as well as sql2gremlin .  If you are already acquainted with the general concepts of graph databases, then start with our introductory DSE Graph course.   
  • DataStax Professional Community: DataStax Academy is about more than just learning content – it’s also an entry into the DataStax Professional Community.  DataStax Academy provides a great resource for questions and answers via Slack.  Come join our Graph room for general questions or the DS330 room if you have questions on the Graph course.
  • DSE Graph Documentation: The DSE Graph documentation was created through real world experiences and hands on knowledge.  It’s a must read for those who are new to DSE Graph. There’s also some great documentation on DataStax Studio.
  • DataStax Blogs: DataStax is passionate about blogging experiences around DSE Graph. Here’s a great blog that provides an overview of some of the more powerful features of DSE Graph. Be on the lookout for more blog content in the near future.

Developing with DSE Graph

Once you have DSE Graph up and running and have learned the basics, it’s time to get started with DSE Graph.

To start, check out the two preconfigured notebooks that ship with DataStax Studio, “Welcome to DataStax Studio!” and “DSE Graph QuickStart”. The Welcome notebook provides a very quick way for you to get a feel for the great features in DataStax Studio while the DSE Graph Quickstart walks you through the basic steps of creating a graph in DSE Graph. This is experiential learning at it’s best.

For bulk loading data into DSE Graph, check out the DataStax Graph Loader utility.  This is a handy tool for loading csv, rdbms, Titan data via gyro or graphson, and other data sources.  The bulk loading utility can even generate your graph schema for you.

When the time comes, you’ll want to work with the DataStax Enterprise drivers for your application code needs with DSE Graph. An upcoming dot release of DSE will enable the DSE drivers to use a Fluent Gremlin API. This is a great feature that will provide direct Gremlin query semantics within the DataStax driver. The DataStax drivers are the best choice when developing a graph application against DSE Graph.

We already mentioned the DataStax Academy resources that are available, but the DataStax network of skilled Solutions Engineers and Solutions Architects are also a great resource to help you succeed with DSE Graph.  Simply contact us if you’d like some assistance with your DSE Graph initiative.

Finally, here are some of my personal favorite lessons learned over the past few months, since we’ve released DSE Graph in DSE 5.0:

  • The Apache TinkerPop™ API page is a great place to go for Gremlin API specific learning.
  • Graph Development Mode will enable different behavior compared to Production Mode.  Be sure to check out this part of the documentation for details.  
  • DataStax Studio’s code assist features are nothing short of fantastic. Ctr + Space is your friend.
  • The Gremlin feature/pattern of repeat() + subgraph() is a handy Gremlin traversal pattern when working in DataStax Studio.  
    • An example traversal used in our Cassandra Summit 2016 DSE Powertrain demo follows:
      int degree = 2
      g.V().has('github_user', 'account', 'jlacefie').repeat(bothE().subgraph('x').otherV()).times(degree).cap('x')
  • This query allows us to dynamically select the degree at which we walk out from a single vertex and returns a nice looking result set (subgraph) in Studio.

studio subgraph

  • Code samples from the DataStax documentation query section are great for quick references to repeatable traversal patterns.
  • Removing Vertex Labels isn’t straight forward right now, but we’re working on that. In the meantime, try to get your data model correct up front or, if you need to remove a vertex label in a development/exploratory cycle, it’s recommended to recreate the graph.

Build Something Disruptive

We hope this post will help you get started with DSE Graph. We believe that DSE Graph is the best choice for a real-time, scalable, and enterprise-grade graph database and believe you’ll quickly realize this as well.  Until next time, build something disruptive.  



Comments

Your email address will not be published. Required fields are marked *




Subscribe for newsletter:

© 2017 DataStax, All rights reserved. Tel. +1 (408) 933-3120 sales@datastax.com Offices

DataStax is a registered trademark of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache Cassandra, Apache, Tomcat, Lucene, Solr, Hadoop, Spark, TinkerPop, and Cassandra are trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.