简体   繁体   English

分布式存储过程 Neo4j

[英]Stored procedure in a distributed Neo4j

I have some experience with Neo4j, but now we are discussing both the ideas of employing custom stored procedures and a sharded Neo4j database (so using Neo4j Fabric) that I both haven't used, so far.我对 Neo4j 有一些经验,但现在我们正在讨论使用自定义存储过程和分片 Neo4j 数据库的想法(所以使用 Neo4j 到目前为止,两者都使用过的织物)

What I have been searching for a while on the internet but couldn't find an answer to is the actual possibility of mixing a custom stored procedure with a sharded database.我在互联网上搜索了一段时间但找不到答案的是将自定义存储过程与分片数据库混合的实际可能性。 I guess the procedure would have to be stored in the Fabric instance to be able to work with the whole graph.我猜该过程必须存储在 Fabric 实例中才能使用整个图形。 If that is true, still - is this even possible?如果这是真的,仍然 - 这甚至可能吗? Can I write a stored procedure and run it on a sharded database via the Neo4j Fabric?我可以编写一个存储过程并通过 Neo4j Fabric 在分片数据库上运行它吗?

If so, would it be automatically handled in a distributed transaction, or is it something I'd have to take care of?如果是这样,它会在分布式事务中自动处理,还是我必须处理的事情?

Thank you very much, If I missed a source that talks about it.非常感谢,如果我错过了谈论它的消息来源。 I'd be happy to be redirected.我很高兴被重定向。 Or even tell me I just talk rubbish if you think so.或者甚至告诉我,如果你这么认为,我只会说废话。

Good questions好问题

Fabric itself doesn't execute any Cypher on a physical database it just distributes the queries and aggregates the results. Fabric 本身不会在物理数据库上执行任何 Cypher,它只是分发查询并聚合结果。

The procedures that access graph data from the store will have to be installed on all shards.从存储访问图形数据的过程必须安装在所有分片上。

And then can be called on each database to be queried.然后可以在每个要查询的数据库上调用。

You can also install procedures on the fabric proxies but those can only be used in the parts of the query that is actually executed on the fabric instance, ie outside the CALL { USE... } subqueries.您还可以在结构代理上安装过程,但这些过程只能用于结构实例上实际执行的查询部分,即在CALL { USE... }子查询之外。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM