且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何可视化从嵌入式 Neo4j java 应用程序创建的 Neo4j 图形数据库

更新时间:2023-10-21 14:40:16

根据您的用例,您可能有不同的解决方案:

Depending on your use case you might have different solutions:

  • 使用基于网络的可视化
  • 使用桌面应用程序可视化您的数据

在这种情况下,您必须使用网络应用来可视化数据.您基本上有两种解决方案:Javascript 或 Java 小程序.

In this case you have to take care of the web-app to visualize the data. You have basically two solutions out there: Javascript or Java applets.

对于 Javascript 方面,您有很多选择:D3jsVivaGraphSigmaJSKeyLines.
前三个是开源且免费的,而最后一个有商业许可证且非免费.
SO 上已经有关于这些库的一百万个问题,所以我会把你链接到 一些 那些 了解各种差异.

For the Javascript side you have many choices: D3js, VivaGraph, SigmaJS, KeyLines.
The first three are open source and free while the last one has a commercial licence and non-free.
There're already a million questions about these libraries on SO, so I'll link you to some of those to understand the various differences.

在这种情况下,我建议您的主要解决方案是:GephiCytoscape.
在这两种情况下,我认为您必须编写自己的适配器才能与您的应用程序进行通信.

The main solutions in this case I would recommend you, depending on the kind of data are: either Gephi or Cytoscape.
In both cases I believe you have to write your own adapter to communicate with your application.

两种情况下的架构如下:

The architecture in both cases will be the following:

  • 控制器使用您要使用的 JS 可视化框架呈现网页
  • 控制器提供了几个 JSON 端点,客户端可以使用它们来查询来自 Neo4J 嵌入式的数据
  • 每个查询获取数据,放入模型并渲染 JSON 以发送给客户端