【问题标题】:Is it possible to use Tinkerpop/Gremlin in Nodejs to manipulate data in OrientDB?是否可以在 Nodejs 中使用 Tinkerpop/Gremlin 来操作 OrientDB 中的数据?
【发布时间】:2019-02-09 06:54:22
【问题描述】:

我想使用 Gremlin/Tinkerpop 将我的本地 NodejsNO JVM)应用程序连接到远程 OrientDB 3.x 实例。这有可能吗?怎么样?

我尝试使用“gremlin”npm 库但没有成功。

const gremlin = require('gremlin');

const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;
const traversal = gremlin.process.traversal;
const PlainTextSaslAuthenticator = gremlin.driver.auth.PlainTextSaslAuthenticator;

const authenticator = new PlainTextSaslAuthenticator('root', 'admin');
const g = await traversal().withRemote(new DriverRemoteConnection('wss://localhost:8182/demodb', {authenticator: authenticator}));

并且希望它能够连接,但我得到了这个错误:

Unhandled exception at: Error: Client network socket disconnected before secure TLS connection was established
    at TLSSocket.onConnectEnd (_tls_wrap.js:1177:19)
    at Object.onceWrapper (events.js:285:13)
    at TLSSocket.emit (events.js:202:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)

【问题讨论】:

    标签: orientdb gremlin tinkerpop3


    【解决方案1】:

    好的,我设法使用 url ws://localhost:8182/gremlin 和我在 OrientDB 文件夹中的 gremlin-server.yaml 文件中配置的 gremlin 访问的数据库。

    【讨论】:

      猜你喜欢
      • 2020-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-18
      • 1970-01-01
      相关资源
      最近更新 更多