GitHub user dosubot[bot] added a comment to the discussion: 
请问hugegraph-server有支持国产信创数据库的计划吗?

<!-- Greeting -->
@nozebraline 
你好!我是[Dosu](https://dosu.dev),我是一个可以帮你解决问题、回答疑问,甚至成为贡献者的机器人。有什么我可以帮你解决的吗?

<!-- Answer -->
目前,HugeGraph 支持的后端数据库包括 RocksDB、MySQL、HBase、Cassandra、ScyllaDB、Palo 和 
PostgreSQL 
<sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/README.md)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java)</sup>。

如果你计划自己改造以支持国产信创数据库,可以参考以下步骤:

1. **实现 BackendStoreProvider 接口**:创建一个类实现 `BackendStoreProvider` 接口或继承 
`AbstractBackendStoreProvider` 类。这个类将定义如何为你的自定义后端创建 schema 和 graph 存储。

2. **实现 BackendStore 接口**:创建一个类实现 `BackendStore` 
接口。这个类将处理打开、关闭、初始化和清理数据库,以及添加、删除和查询数据的操作。

3. **实现 Serializer**:如果需要,实现一个自定义序列化器,继承 `AbstractSerializer` 类并实现 
`GraphSerializer` 和 `SchemaSerializer` 接口。

4. **添加自定义配置选项**:如果你的后端需要自定义配置选项,创建一个继承 `OptionHolder` 的配置类,并定义必要的配置选项。

5. **注册插件**:在一个类中实现 `HugeGraphPlugin` 接口,注册你的自定义后端、序列化器和其他组件。使用 
`registerBackend()` 方法注册你的后端。

6. **创建 SPI 配置**:确保项目中存在 `META-INF/services` 目录,并创建一个名为 
`org.apache.hugegraph.plugin.HugeGraphPlugin` 的文件,内容为你的插件类的全限定名。

7. **打包和部署**:将你的实现打包成 JAR 文件,并放置在 HugeGraph Server 安装目录的 `plugins` 目录下。修改 
`hugegraph.properties` 文件以使用你的自定义后端,并重启服务器 
<sup>[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/guides/architectural.md)</sup><sup>[[4]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-server.md)</sup><sup>[[5]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/guides/custom-plugin.md)</sup>。

关于有潜力的国产数据库,可以考虑 TiKV、OceanBase、达梦数据库(DM)、人大金仓(KingbaseES)等。你可以参考 [这个 
issue](https://github.com/apache/incubator-hugegraph/issues/2353) 中提到的 TiKV 
分支来进行改造 
<sup>[[6]](https://github.com/apache/incubator-hugegraph/issues/2353)</sup>。


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*


GitHub link: 
https://github.com/apache/incubator-hugegraph/discussions/2570#discussioncomment-9963830

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to