After months of consideration, preparation, and also weeks of hard work, we finally completed the transition to Cypher and the Bolt protocol. And we couldn’t be happier.
We recently announced the first beta version of the upcoming Structr 2.1, running on Neo4j 3.0 using the Bolt driver. Feel free to download and give it a try: Download Structr 2.1 SNAPSHOT – Debian package or Distribution ZIP (OS X, Windows)
WARNING: Please note that any snapshot or beta version we release is not intended for production use. It may contain bugs that could lead to malfunctions of the software and even data loss. Before using a snapshot or beta release, please make sure to have a working backup in place!
Not only are we back on track and fully aligned with the strategy the Neo4j team mapped out two years ago, but we are also very pleased about the positive impact on the overall performance of Structr. There’s still some potential in squeezing some more speed from the Cypher queries, but as a preliminary result, Structr 2.1 will be already faster in most disciplines than 2.0 running on the Java Core API.
What took us so long to release a Structr version that runs on Neo4j 3.0?
The answer is that we had to rewrite large parts of Structr’s indexing engine and core classes, switching from an imperative local Java API to a declarative remote API. For a rather complex and capable application as Structr, this is nothing you treat lightly. Since Cypher was not available back when we started the development of Structr about six years ago, the now so-called “legacy indexes” were the only available option for complex queries, and Structr used to use them a lot.
The pre-2.1 query engine had to translate every query into Lucene’s own query language. Over time and with the growing capabilities of Structr, the complexity of the query engine rose, including geospatial queries mixed with Lucene index queries, range queries, full-text search, etc. We implemented these capabilities based on multiple Lucene indexes and a geospatial index, all of which had to be maintained separately.
Switching to 100% Cypher allowed us to greatly reduce the complexity of our query engine, getting rid of the duplicate indexes and all the glue code that was necessary to interact with the text-based Lucene query engine. Structr now uses a single internal index implementation (inspired by the
Index<Node>class of the old Neo4j Java API) that translates Structr’s object-oriented search attribute trees into Cypher statements.
The new implementation also uses Cypher’s advanced features to provide things like inheritance-aware queries, inexact string search, regular expression search, null-first sorting with
COALESCEand even geospatial queries using the
Another great advantage of the migration to Bolt is that it allows Structr to connect to local and remote databases seamlessly. Structr can of course be configured to start a local database just like in the previous version, but being able to use a remote database provides greater flexibility, and this was one of the top feature requests of our customers and users.
Last but not least, the new release allows us to fully profit from all the upcoming features and improvements of the Cypher graph query language.
What Else Is New in Structr 2.1?
Besides a number of new features, many bug fixes and performance improvements, we provide four different editions and also Docker images. We’ll cover this and some of the new features in upcoming blog posts.