悦数图数据库

Yueshu Graph Database
悦数原生分布式图数据库

悦数图数据库(Yueshu Graph Database)是一款安全可靠、性能高效的原生分布式图数据库产品,擅长处理千亿节点万亿条边的超大规模数据集,同时保持毫秒级查询延时。产品发布以来被多家互联网、金融头部企业竞相采用,广泛应用于金融风控、实时推荐、知识图谱等业务场景。

通过视频快速了解什么是图数据库,以及能给您的业务带来怎样的帮助

观看介绍视频

了解悦数图数据库的最佳用户实践及行业应用,结合案例场景了解图应用收益

查看真实用户分享

悦数图数据库 v3.6.0 release note,支持 Zone 管理

查看最新版本介绍

实时决策 打造的图数据库

万亿级数据毫秒级查询,打造强大可信的图技术底座

高性能:高吞吐低时延

拥有强大的原生图引擎来提供低延迟的读写和高吞吐量,确保高并发访问、快速的图遍历和有效的内存使用,将大规模数据场景下的业务决策推进到实时级

了解更多

易扩展:线性扩缩容,业务不断线

采用 Shared-Nothing 分布式架构和计算与存储分离的设计,可以按需在集群中增加更多节点或服务而不影响性能,满足不同业务场景计算存储容量的不同需求

了解更多

安全稳定:数据备份,多地容灾部署

支持快照、全量备份、增量备份等多种数据备份方式,提供同城/异地容灾和跨集群同步能力,支持两地三中心、三地五中心等部署方案,保证数据不丢失和业务连续性

了解更多

生态完善:兼容 OpenCypher 及多种数据格式

原生图查询语言兼容 OpenCypher,支持 CSV、JSON、MySQL、Hive、HBase、Kafka、Pulsar、Neo4j、Dgraph 等多种数据源导入,学习和迁移成本更低

了解更多

多种图算法:易用易分析

支持路径查询、风险传播、社区发现、重要性分析、模式挖掘、图神经网络等多种算法模型

了解更多

灵活部署:支持本地及云端部署

支持公有/私有化的部署方式,企业用户可以按需选择,轻松享受更便捷的一站式图数据库体验

了解更多

悦数 图数据产品架构概览

「悦数图数据库」采用原生分布式架构设计,支持快速查找海量复杂数据间的关联关系,并提供从数据导入到工具应用的全流程生态支持及技能培训

查看产品架构详情

支持多种主流编程语言

兼容 C++、Go、Java、Python、Node 以及 ORM、JDBC 等编程语言及方式

#include <atomic>
#include <chrono>
#include <thread>

#include <nebula/client/Config.h>
#include <nebula/client/ConnectionPool.h>
#include <common/Init.h>

int main(int argc, char* argv[]) {
    nebula::init(&argc, &argv);
    auto address = "127.0.0.1:9669";
    if (argc == 2) {
        address = argv[1];
    }
    std::cout << "Current address: " << address << std::endl;
    nebula::ConnectionPool pool;
    pool.init({address}, nebula::Config{});
    auto session = pool.getSession("root", "nebula");
    if (!session.valid()) {
        return -1;
    }

    auto result = session.execute("SHOW HOSTS");
    if (result.errorCode != nebula::ErrorCode::SUCCEEDED) {
        std::cout << "Exit with error code: " << static_cast<int>(result.errorCode) << std::endl;
        return static_cast<int>(result.errorCode);
    }
    std::cout << *result.data;

    std::atomic_bool complete{false};
    session.asyncExecute("SHOW HOSTS", [&complete](nebula::ExecutionResponse&& cbResult) {
        if (cbResult.errorCode != nebula::ErrorCode::SUCCEEDED) {
            std::cout << "Exit with error code: " << static_cast<int>(cbResult.errorCode)
                      << std::endl;
            std::exit(static_cast<int>(cbResult.errorCode));
        }
        std::cout << *cbResult.data;
        complete.store(true);
    });

    while (!complete.load()) {
        std::this_thread::sleep_for(std::chrono::seconds(1));
    }

    session.release();
    return 0;
}
import (
	"fmt"

	nebula "github.com/vesoft-inc/nebula-go/v3"
)

const (
	address = "127.0.0.1"
	// The default port of NebulaGraph 2.x is 9669.
	// 3699 is only for testing.
	port     = 3699
	username = "root"
	password = "nebula"
)

// Initialize logger
var log = nebula.DefaultLogger{}

func main() {
	hostAddress := nebula.HostAddress{Host: address, Port: port}
	hostList := []nebula.HostAddress{hostAddress}
	// Create configs for connection pool using default values
	testPoolConfig := nebula.GetDefaultConf()

	// Initialize connection pool
	pool, err := nebula.NewConnectionPool(hostList, testPoolConfig, log)
	if err != nil {
		log.Fatal(fmt.Sprintf("Fail to initialize the connection pool, host: %s, port: %d, %s", address, port, err.Error()))
	}
	// Close all connections in the pool
	defer pool.Close()

	// Create session
	session, err := pool.GetSession(username, password)
	if err != nil {
		log.Fatal(fmt.Sprintf("Fail to create a new session from connection pool, username: %s, password: %s, %s",
			username, password, err.Error()))
	}
	// Release session and return connection back to connection pool
	defer session.Release()

	checkResultSet := func(prefix string, res *nebula.ResultSet) {
		if !res.IsSucceed() {
			log.Fatal(fmt.Sprintf("%s, ErrorCode: %v, ErrorMsg: %s", prefix, res.GetErrorCode(), res.GetErrorMsg()))
		}
	}

	{
		// Prepare the query
		createSchema := "CREATE SPACE IF NOT EXISTS basic_example_space(vid_type=FIXED_STRING(20)); " +
			"USE basic_example_space;" +
			"CREATE TAG IF NOT EXISTS person(name string, age int);" +
			"CREATE EDGE IF NOT EXISTS like(likeness double)"

		// Excute a query
		resultSet, err := session.Execute(createSchema)
		if err != nil {
			fmt.Print(err.Error())
			return
		}
		checkResultSet(createSchema, resultSet)
	}
	// Drop space
	{
		query := "DROP SPACE IF EXISTS basic_example_space"
		// Send query
		resultSet, err := session.Execute(query)
		if err != nil {
			fmt.Print(err.Error())
			return
		}
		checkResultSet(query, resultSet)
	}

	fmt.Print("
")
	log.Info("Nebula Go Client Basic Example Finished")
}
NebulaPoolConfig nebulaPoolConfig = new NebulaPoolConfig();
nebulaPoolConfig.setMaxConnSize(10);
List<HostAddress> addresses = Arrays.asList(new HostAddress("127.0.0.1", 9669),
        new HostAddress("127.0.0.1", 9670));
NebulaPool pool = new NebulaPool();
pool.init(addresses, nebulaPoolConfig);
Session session = pool.getSession("root", "nebula", false);
session.execute("SHOW HOSTS;");
session.release();
pool.close();
from nebula3.gclient.net import ConnectionPool
from nebula3.Config import Config

# define a config
config = Config()
config.max_connection_pool_size = 10
# init connection pool
connection_pool = ConnectionPool()
# if the given servers are ok, return true, else return false
ok = connection_pool.init([('127.0.0.1', 9669)], config)

# option 1 control the connection release yourself
# get session from the pool
session = connection_pool.get_session('root', 'nebula')

# select space
session.execute('USE nba')

# show tags
result = session.execute('SHOW TAGS')
print(result)

# release session
session.release()

# option 2 with session_context, session will be released automatically
with connection_pool.session_context('root', 'nebula') as session:
    session.execute('USE nba')
    result = session.execute('SHOW TAGS')
    print(result)

# close the pool
connection_pool.close()
// ESM
import { createClient } from '@nebula-contrib/nebula-nodejs'

// CommonJS
// const { createClient } = require('@nebula-contrib/nebula-nodejs')

// Connection Options
const options = {
  servers: ['ip-1:port','ip-2:port'],
  userName: 'xxx',
  password: 'xxx',
  space: 'space name',
  poolSize: 5,
  bufferSize: 2000,
  executeTimeout: 15000,
  pingInterval: 60000
}

// Create client
const client = createClient(options)

// Execute command
// 1. return parsed data (recommend)
const response = await client.execute('GET SUBGRAPH 3 STEPS FROM -7897618527020261406')
// 2. return nebula original data
const responseOriginal = await client.execute('GET SUBGRAPH 3 STEPS FROM -7897618527020261406', true)

100% 自主研发,拥有多项核心专利及认证

国产信创支持:拥有华为鲲鹏、欧拉 OS 认证以及飞腾、龙芯、麒麟 OS 等多个芯片/服务器/操作系统的国产化支持
多项权威认证:通过 ISO27001、ISO9001、CMMI3 认证,中国信通院 图数据库/图计算基础和高级能力专项评测

CMMI3
ISO9001
ISO27001
xinbiaowei
nits
caict
cshcc
ldbc
kunpeng
yinghe
openeuler
hygon
longson
kyinsoft
phytium
ueo
suma
linux
CMMI3
ISO9001
ISO27001
xinbiaowei
nits
caict
cshcc
ldbc
kunpeng
yinghe
openeuler
hygon
longson
kyinsoft
phytium
ueo
suma
linux