Ticket #973 (accepted Task)

Opened 4 years ago

Last modified 3 years ago

Upgrade Neo4j from 1.8.1 -> 3.0

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.9
Component: DeepaMehta Standard Distribution Version: 4.8
Keywords: Cc: dgf, Malte, JuergeN
Complexity: 13 Area:
Module: deepamehta-storage-neo4j


We want drop DM's manual indexing approach in favor of Neo4j's (since 2.0) schema-based indexes. Since Neo4j 3.0 the schema-based indexes provide fulltext capabilities as well.

DM then will jump from Java 6 to Java 8, as required by Neo4j 3.0.
And we will jump from Lucene 3.5 to 5.5 (as integrated in Neo4j 3.0).

In the long run we want benefit from Neo4j 3.0's statistics based query optimizers for Cypher.
The perspective is a "Mehta-Cypher" preprocessor that mediates between DM's MehtaGraph? model and the underlying Neo4j model. This would allow queries of arbitrary complexity.

Change History

comment:1 Changed 4 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 4 years ago by Jörg Richter <jri@…>

In 27d8a34ff93f29db0aca244f5fab7f568b813d9f/deepamehta:

Upgrade from Neo4j 1.8.1 to 3.0.2 (#973).

Compiles, and tests run successful. Doesn't run.

DeepaMehtaTransaction makes use of Java 7's AutoClosable and thus can be used in try-with-resource statements.

Further updates:

  • Java 6 -> Java 8
  • Lucene 3.5 -> 5.5
  • Maven Bundle Plugin 2.3.7 -> 3.0.1

See #973.

comment:3 Changed 4 years ago by Jörg Richter <jri@…>

In 0fdec30d116fce93b446219823e830fe1a7125d6/deepamehta:

Storage-Neo4j: run in OSGi container again (#973).

See #973.

comment:4 Changed 4 years ago by Jörg Richter <jri@…>

In 2fffa2dc8270dc188f9fff03512f832b8ec14242/deepamehta:

Storage-Neo4j: embed Lucene 5.5 deps (#973).

When doing a cold start (no DB exists) all DM bundles will activate!
Still doesn't run.

See #973.

comment:5 Changed 4 years ago by Jörg Richter <jri@…>

In 801f934acf44b386afc644cb8090f05aa16a6a89/deepamehta:

Storage-Neo4j: refactor TransactionFactory? (#973).

When doing a cold start (no DB exists) DM basically works with Neo4j 3.0 now!
... but does not yet take any advantage of the Neo4j 3.0 features.

To test it build DM from the neo4j-3.0 branch.


The @Transactional annotation is dropped.

DM now creates a transaction for every request automatically.

Background: Neo4j 3.0 requires transactions for READ operations too. (In contrast Neo4j 1.8 required transactions for WRITE operations only.)

The first approach would be to just annotate also the READing resource methods with @Transactional. But this would not be sufficient as plugins can access the DB also before and after a resource method executes, namely via

  • serviceRequestFilter()
  • serviceResponseFilter()
  • all the preSend... listeners

Implementation detail: creating/closing a transaction has moved from the JAX-RS Resource Filters to JAX-RS Container Filters.

See #973.

comment:6 Changed 4 years ago by Jörg Richter <jri@…>

In 203a8d3d9aea8bd56e13c1c8e2771292b16b3fff/deepamehta:

Storage-Neo4j: fix exception handling (#973).

See #973.

comment:7 Changed 4 years ago by Jörg Richter <jri@…>

In b13d01059acda52b83286626e0290a0d611d7538/deepamehta:

Replace "node_type" property by labels (#973).

Storage Neo4j: the "node_type" property is obsolete.
Instead a node is labeled with "TOPIC" or "ASSOC".
Note: labels are a Neo4j 2.0 concept.

See #973.

comment:8 Changed 3 years ago by jri

In https://github.com/jri/deepamehta/commit/37172781f64d355147e6e77761d1423e238480c7

Merge branch 'master' into neo4j-3.0

Continue the work on Neo4j 3.0

See #973.

comment:10 Changed 3 years ago by jri

In https://github.com/jri/deepamehta/commit/7ad207304c9d00a7b5ae6477bb0bfa6e572f97ab

Transaction Factory: fix warning logging (#973).

JavaUtils? API

1 new method:

String requestInfo(ContainerRequest request)

Used for logging Jersey requests.

See #973.

comment:11 Changed 3 years ago by Malte

Hey! Nice to hear that you plan to up DM's neo4j version to 3.x. Is there any timetable for a new release with the upgrade yet? Thanks for your work!

comment:12 Changed 3 years ago by jri

Basically DM already works with Neo4j 3. See branch neo4j-3.0. However DM makes no use e.g. of Neo4j's schemas/indexes or Cypher. A DM release with Neo4j 3 is not planned. Current priority is DM5 development, which will come with a new data model and a new Webclient.

Note: See TracTickets for help on using tickets.