将 GraphAware 友谊计数器示例部署到一些独立的 neo4j 服务器

Deploying the GraphAware friendship-counter example to some standalone neo4j server

我正在尝试使用 GraphAware 的示例来了解它的工作原理。但我遇到了麻烦 运行 他们的 friendship counter example.

为此,我使用 mvn package 构建了上述示例包,它生成了以下 jar 文件:

然后我将第一个文件与 GraphAware framework-server-community 的 latest version 一起复制到 neo4j 的插件目录中。然后我将以下行添加到 neo4j.conf 文件:

dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware

并重新启动了 neo4j 服务器。当我转到 http://localhost:7474/graphaware/friendship/strength 时,我可以看到代码的 REST API 部分正在工作,因为它 returns 0 并且它还创建了一个 :FriendshipCounter 节点服务器。

但是 FriendshipStrengthCounter class 似乎没有注册为 TransactionEventHandler 因为当我创建以下两个节点时:

CREATE (n)-[:FRIEND_OF{strength: 2}]->(m);

计数器未更新。有人可以告诉我我在哪里犯了错误吗?谢谢。

您能否通过将这些行添加到您的 neo4j.conf 来尝试启用框架和模块:

com.graphaware.runtime.enabled=true

#COUNTER becomes the module ID:
com.graphaware.module.COUNTER.1=com.graphaware.example.module.FriendshipStrengthModuleBootstrapper