暂无图片
暂无图片
6
暂无图片
暂无图片
暂无图片

图数据库领导者Galaxybase先锋版初体验

原创 严少安 2024-06-21
370

head.png

Galaxybase 由创邻科技自主研发,作为第三代图数据库技术的代表产品,是国内首个成熟、通用、全自主知识产权的商业化图数据库。Galaxybase 银河图数据库采用原生分布式架构,对图数据存储和处理进行了深度匹配优化,横向扩展性能优异,符合大数据时代下,高效数据存储和查询的需求。Galaxybase 产品拥有丰富完善的功能,如:动态化图构建、可视化图探索、精细化集群监控、自动化图服务,等。适用于社交网络、金融、电网等多个领域。

arch.png
Galaxybase 产品架构图

下面介绍 Galaxybase 先锋版的安装和基础使用,需要注意的是,先锋版限制存储容量,仅供非商业性质的学习使用。

Galaxybase 先锋版 v3.5.1 变化一览

数据库内核

  • JDK版本从JDK11升级到JDK17,并进行代码改造和优化。对图库各项指标有不同程度的提升,包括增删改查吞吐量、算法等。
  • 新增 更丰富的存储类型。
    • 时间类型:ZONEDDATETIME、ZONEDTIME、LOCALDATETIME、LOCALDATE、LOCALTIME、DURATION。
    • 数值类型:SHORT、BIGINT。
    • 字节串类型:BINARY。
  • 新增 导入时支持自动补点参数。导入边时,如果起止点不存在的情况下,会自动创建起止点。
  • 优化 日志结构调整,目录更加丰富清晰。

语言

  • 新增 pipeline模式下,支持点边索引扫描和索引查找算子。依赖于pipeline模式进行更快速的索引查询。
  • 新增 call的子查询语句的支持,可以进行更丰富的组合调用。
  • 优化 生成TOP算子替代内存使用量更大的sort算子。避免内存异常的情况。

工具

  • 新增【export】支持导出模型的时候,仅导出数据部分对应的模型。
  • 变更【export】废除initSchema参数,默认返回的schema即为初始化后的schema。新增currentSchema获取原始schema。

微信图片_20240621013629.jpg

Galaxybase 先锋版安装部署

环境信息

文本使用的操作系统为 CentOS 7,因为要使用到 docker 服务,这里不建议使用搭载 podman 的更高版本的操作系统。

[shawnyan@centos7 ~]$ hostnamectl Static hostname: centos7.shawnyan.cn Kernel: Linux 3.10.0-1160.118.1.el7.x86_64 Architecture: x86-64
复制

安装依赖

需要安装解压压缩包的依赖,以及 docker 服务。

[root@centos7 ~]# yum install tar bzip2 docker-ce Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Package 2:tar-1.26-35.el7.x86_64 already installed and latest version Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version Package 3:docker-ce-26.1.4-1.el7.x86_64 already installed and latest version Nothing to do
复制

确认 docker 服务已启动。

[root@centos7 ~]# systemctl is-active docker active
复制

下载安装包

从官方网站下载 Galaxybase 图数据库先锋版。

  • https://www.galaxybase.com/download

下载安装包,上传到目标服务器,并解压。

[root@centos7 gb]# tar xjf galaxybase-amd64-pioneer-20240613141804.tar.bz2 [root@centos7 gb]# ls galaxybase-20240613141804 galaxybase-amd64-pioneer-20240613141804.tar.bz2 [root@centos7 gb]# tree galaxybase-20240613141804/ galaxybase-20240613141804/ ├── bin │   ├── galaxybase-deploy │   ├── galaxybase-export │   └── galaxybase-load └── images └── images.wim 2 directories, 4 files
复制

安装 galaxybase 先锋版

  1. 查看 galaxybase 部署工具的版本。
[root@centos7 gb]# ./galaxybase-deploy version Server: galaxybase Engine - pioneer Version: 3.5.1 Build: 20240613141804 OS/Arch: linux/amd64
复制
  1. 安装 graph 服务
[root@centos7 bin]# ./galaxybase-deploy build --interactive --save-config 2024/06/19 18:25:02 [INFO] Welcome to use the galaxybase deployment tool. Please follow the following tips to fill in the information to complete the deployment of the galaxybase Start building environmental information to confirm... Step Number 1. Do you need to check the docker environment? If required, the docker service is installed for the uninstalled docker environment [yes/no] (default: no) > Step Number 2. Do you need to build the graph container? [yes/no] > yes Step Number 2.1. Please enter the server IP address for the deployment graph container. (graph) (default: 127.0.0.1) > Step Number 2.2. Please enter the home directory used by the deployment graph container. (graph) > /data/graph The building information is as follows: +--------------+-------+-------------+ | check docker | false | | +--------------+-------+-------------+ | graph | hosts | 127.0.0.1 | + +-------+-------------+ | | home | /data/graph | +--------------+-------+-------------+ Do you want to start deploying? [yes/no] > yes Start generating the deployment configuration 2024/06/19 18:25:13 [INFO] the configuration [1eaa9a9faf34] has been successfully generated 2024/06/19 18:25:13 [INFO] Successfully apply the configuration [1eaa9a9faf34] Start importing the service image 2024/06/19 18:25:15 [INFO] check docker service state 2024/06/19 18:25:15 [INFO] images load env check pass 2024/06/19 18:25:15 [INFO] check original graph image 2024/06/19 18:25:15 [INFO] check original graph container 2024/06/19 18:25:15 [INFO] start stop containers : [b5bddf978a79] 2024/06/19 18:25:26 [INFO] start remove containers : [b5bddf978a79] 2024/06/19 18:25:26 [INFO] start remove images : [sha256:c615b8b53a75dfd70ce4eb12019e07070304dfd402719fdb65d65a27c4e3a11c] 2024/06/19 18:25:26 [INFO] clear original graph images succeeded 2024/06/19 18:25:26 [INFO] start load graph image 2024/06/19 18:26:04 [INFO] [local] [local] [graph] id : d2dd0af1a609(8/8) [==================================================] 100.00% 2024/06/19 18:26:04 [INFO] images is successfully loaded Start deploying the service instance 2024/06/19 18:26:04 [INFO] check docker service state 2024/06/19 18:26:04 [INFO] the service container is checked pass 2024/06/19 18:26:04 [INFO] build resources 2024/06/19 18:26:04 [INFO] start get cpu info 2024/06/19 18:26:04 [INFO] build container running environment 2024/06/19 18:26:05 [INFO] [graph] container created successfully 2024/06/19 18:26:05 [INFO] starts [graph]-39ae804253fa3753bdf3c52453c404b0448f3ffd120787d2b2a38567f411a3d0 container 2024/06/19 18:26:06 [INFO] [graph]-39ae804253fa3753bdf3c52453c404b0448f3ffd120787d2b2a38567f411a3d0 container started successfully 2024/06/19 18:26:06 [INFO] waiting for server [server.manager.http] port [51314] listen 2024/06/19 18:26:14 [INFO] the service container is successfully build 2024/06/19 18:26:14 [INFO] Deployment completion
复制
  1. 安装完成后,检查确认配置生效。
[root@centos7 bin]# ./galaxybase-deploy check 2024/06/19 18:27:23 [INFO] check docker service state +--------------------------------------+-------+-------------------+-------------------+ | TAG | HOST | DATA | CSTATUS | +--------------------------------------+-------+-------------------+-------------------+ | graph_local_1eaa9a9faf3439ae804253fa | local | home: /data/graph | Up About a minute | +--------------------------------------+-------+-------------------+-------------------+
复制
  1. 先锋版已 docker 容器方式运行,也可通过 docker 命令查看 galaxybase 信息。
[root@centos7 bin]# docker images galaxybase REPOSITORY TAG IMAGE ID CREATED SIZE galaxybase p-20240613141804 c615b8b53a75 6 days ago 714MB [root@centos7 bin]# docker ps -s CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE 39ae804253fa galaxybase:p-20240613141804 "/usr/bin/runner-pio…" About a minute ago Up About a minute galaxybase-1eaa9a9faf34 584MB (virtual 1.3GB)
复制

登录图服务管理平台

登录 Galaxybase 节点管理平台。<ip>:51314

输入初始用户名和密码,默认均为 admin

admin.png

默认存在1个节点。目前处于在线、未运行状态。

2notrun.png

启动节点

启动节点,启动过程中,后台服务器会有些繁忙。

3start.png

4top.png

启动时,图服务将进行远程授权认证,授权通过后,节点将处于在线/运行中的状态。

5running.png

数据可视化服务

节点启动后,启动数据可视化服务。启动后,通过<ip>:8888进行访问。

6studio.png

监控页面

监控页面包括CPU、内存、磁盘可用空间、磁盘读写、页缓存交换、网络带宽等指标。

7monitor.png

Galaxybase 先锋版的基础使用

快速建图

  1. 将图数据 csv 文件上传到服务器数据目录。
[root@centos7 data]# pwd /data/graph/graph/data [root@centos7 data]# ls 出演电视剧.csv 出演电影.csv 导演电视剧.csv 导演电影.csv 电视剧.csv 电影.csv 人物.csv
复制
  1. 通过图构建导数工具构建。
[root@centos7 bin]# ./galaxybase-load -g MovieDemo -s ./MovieDemo_Schema.json -m ./MovieDemo_Mapping.json -u admin -p admin 2024/06/21 00:36:01 info : The graph [MovieDemo] does not exist, start creating the graph 2024/06/21 00:36:01 info : create graph successfully 2024/06/21 00:36:01 info : save mapping successfully 2024/06/21 00:36:01 info : Start loading data... current time : 2024-06-21 00:36:25 graph name : MovieDemo start time : 2024-06-21 00:36:01 end time : 2024-06-21 00:36:25 load state : loadSuccessful use time : 23.669s loading graph number : 0 vertexLoad speed : -/s edgeLoad speed : -/s vertexLoad speed avg : 1832/s edgeLoad speed avg : 3031/s vertex line scan : 10371 edge line scan : 17283 vertex db count : 10368 edge db count : 34558 vertex count : 10368 edge count : 17279 file error line : 0 2024/06/21 00:36:26 info : load successfully [root@centos7 bin]#
复制
  1. 确认数据已成功导入。

通过管理页面,可以看到成功导入的数据情况。

20240621_003840.png

20240621_004140.png

20240621_004254.png

查询数据

Demo: 找出女神 苏菲·玛索 参演的电影

graph.png

新书推荐:《图数据库:理论与实践》

《图数据库:理论与实践》系统论述了图数据库的理论知识与行业应用实践。

本书分为理论篇和实践篇,共15章。

其中,理论篇包括第1~8章,由浅入深地介绍了图数据库的概念和底层技术原理,涵盖主流图数据库的内核原理与架构设计、图查询语言、图算法 、图数据库客户端编程、图数据库服务端编程、图可视化、图数据库选型等内容;

实践篇包括第9~15章,介绍了图数据库的行业应用案例,涵盖知识图谱、金融、泛政府、零售、制造业供应链管理、企业资产管理、生命科学等内容。

Galaxybase 培训认证

创邻科技现推出全新 Galaxybase 培训认证体系,凝聚创邻科技近十年实践经验和行业理解,致力于帮助个人更轻松、更快速、更深入地学习系统的图数据库理论知识和实操方法,全面掌握面向关联复杂、变化迅速、查询频繁场景的图技术处理方案,迅速成长为图数据库专家。

GBCA(Galaxybase数据库认证专员)认证限时免费。

微信图片_20240621013553.jpg

微信图片_20240621013601.jpg

结语

创邻科技通过 Galaxybase 为客户提供了从数据迁移、数据建模、数据存储、数据查询、数据运算到数据分析的一站式解决方案,已经在金融、能源、工业、零售、医疗卫生、网络安全、企业管理等多个领域得到应用。

欢迎了解体验。


🌻 往期精彩 ▼

[Oracle]

[MySQL]

[TiDB]

[PG]


– / END / –

👉 这里可以找到我

如果这篇文章为你带来了灵感或启发,就请帮忙点『赞』or『在看』or『转发』吧,感谢!(๑˃̵ᴗ˂̵)

最后修改时间:2024-06-21 10:01:42
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论

目录
  • Galaxybase 先锋版 v3.5.1 变化一览
    • 数据库内核
    • 语言
    • 工具
  • Galaxybase 先锋版安装部署
    • 环境信息
    • 安装依赖
    • 下载安装包
    • 安装 galaxybase 先锋版
    • 登录图服务管理平台
    • 启动节点
    • 数据可视化服务
    • 监控页面
  • Galaxybase 先锋版的基础使用
    • 快速建图
    • 查询数据
  • 新书推荐:《图数据库:理论与实践》
  • Galaxybase 培训认证
  • 结语
  • 🌻 往期精彩 ▼