arangodb

怎么用Kafka 实现数据中心到数据中心的复制?

只愿长相守 提交于 2020-01-07 16:26:12
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 它能做什么? 此功能允许您在两个不同的数据中心A和B中运行两个 ArangoDB 群集,并设置从A到B的异步复制。这意味着数据中心A中的群集A可以照常用于读取和写入操作以及所有更改数据通过网络复制到数据中心B中的另一个集群B。复制是异步的,也就是说,更改出现在短暂的延迟之后,通常在几秒钟内。(阅读更多关于 ArangoDB集群架构 ) 在数据中心A发生灾难的情况下,如网络连接完全丢失,可以快速停止复制,并开始使用数据中心B中的群集B作为群集A的替代品。之后,当灾难结束时,可以或者使用集群A作为群集B的异步副本,或者切换回A并继续复制到群集A。 挑战 ? 单个ArangoDB集群是具有良好的水平可扩展性的分布式系统。数据容量和查询性能(读写)都与使用的服务器数量呈线性关系。自动分片导致数据的实际更改同时发生在所有服务器的整个地方。特别是,这意味着设计 - 没有一个地方确定所有更改的总顺序。也就是说,我们正在处理同时发生大量数据更新的分布式混乱。变化率可能会有很大差异,我们必须处理大量的写入突发。 同时,ArangoDB集群是容错的。例如,如果数据中心中的单个服务器出现故障,则ArangoDB群集可以容易地容忍这种损失,并假定用户将复制因子设置为至少为2 - 既没有丢失任何数据,也没有丢失可用性

friends of friend Query in ArangoDB 3.0

断了今生、忘了曾经 提交于 2020-01-05 04:17:51
问题 I want to writing 'friends of friend' traversal using AQL I have a Collection with Name: User and a edge Collection with name Conatct . my Conatct documents: I also read this article that implement friends of friend in ArangoDb, but that's post Uses functions of lower version of ArangoDB that used GRAPH_NEIGHBORS() function. in ArnagoDB 3.0(latest version), GRAPH_NEIGHBORS() function have been removed! now, how can I implement fof using Aql in ArnagoDB 3.0 ? thanks a lot 回答1: The graph

Arangodb AQL UPDATE for internal field of object

三世轮回 提交于 2020-01-03 12:32:20
问题 Given the following example document of collection: { "timestamp": 1413543986, "message": "message", "readed": { "8": null, "9": null, "22": null }, "type": "1014574149174" } How do I update the value of specific key in object with key "readed"? For example update value for key "8": ... "8": 10, ... 回答1: You can use MERGE or MERGE_RECURSIVE as follows: db._query("FOR u IN test FILTER u._key == @key UPDATE u WITH 'read': MERGE_RECURSIVE(u.read, { '8': 10 }) } IN test", { key: "11611344050" })

Arangodb AQL UPDATE for internal field of object

半世苍凉 提交于 2020-01-03 12:32:09
问题 Given the following example document of collection: { "timestamp": 1413543986, "message": "message", "readed": { "8": null, "9": null, "22": null }, "type": "1014574149174" } How do I update the value of specific key in object with key "readed"? For example update value for key "8": ... "8": 10, ... 回答1: You can use MERGE or MERGE_RECURSIVE as follows: db._query("FOR u IN test FILTER u._key == @key UPDATE u WITH 'read': MERGE_RECURSIVE(u.read, { '8': 10 }) } IN test", { key: "11611344050" })

How to store documents in an ArangoDb graph using ArangoJs?

半城伤御伤魂 提交于 2020-01-02 07:14:14
问题 I am using latest version of ArangoDb and ArangoJs from a nodejs application. I have got following two vertexes users tokens tokens vertex contain the security tokens issues to one of the user in the users vertex. I have got an edge definition named token_belongs_to connecting tokens to users How do I store a newly generated token belonging to an existing user using ArangoJs? 回答1: I am going to assume you are using ArangoDB 2.7 with the latest version of arangojs (4.1 at the time of this

Arangodb AQL recursive graph traversal

纵饮孤独 提交于 2019-12-31 03:21:26
问题 I have a graph with three collections which items can be connected by edges. ItemA is a parent of itemB which in turn is a parent of itemC. Elements only can be connected by edges in direction "_from : child, _to : parent" Currently I can get only "linear" result with this AQL query: LET contains = (FOR v IN 1..? INBOUND 'collectionA/itemA' GRAPH 'myGraph' RETURN v) RETURN { "root": { "id": "ItemA", "contains": contains } } And result looks like this: "root": { "id": "itemA", "contains": [ {

Determining which unique constraint caused INSERT failure in ArangoDB

三世轮回 提交于 2019-12-25 08:33:35
问题 I have a document collection in ArangoDB that has multiple unique indexes. When inserting a new document, the insert could fail because of any of the unique indexes. Is there a way to easily figure out which field(s) in the document caused the insert to fail? For example, take a collection that stores user data. Unique indexes on both the "username" and "email" fields mean that an insert could fail if either of those fields are duplicated. Error messages are non-specific: { error: true,

When graph consistency will be implemented in ArangoDB java driver?

霸气de小男生 提交于 2019-12-25 03:38:34
问题 Some time ago I asked about deleting vertices with associated edges. The answer was that the edges don't deleted automatically by AQL when vertices are deleted. I use Arango java driver for working with ArangoDB. My questions are: When graph consistency will be implemented in ArangoDB java driver and edges will be deleted automatically by AQL when vertices are deleted? Is it planned? Thank you in advance! 回答1: I received the answer directly from ArangoDB contributors and they said that in v 3

ETL Tools that function well with ArangoDB - What are they?

折月煮酒 提交于 2019-12-25 01:33:50
问题 There are so many ETL tools out there. Not many that are Free. And of the Free choices out there they don't appear to have any knowledge of or support for ArangoDB. If anyone has dealt with the migration of their data over to ArangoDB and automated this process I would love to hear how you accomplished this. Below I have listed out several choices we have for ETL Tools. These choices I actually took from the 2016 Spark Europe presentation by Bas Geerdink. * IBM InfoSphere DataStage * Oracle

How to eliminate all paths that pass through particular document or vertex while during Graph Traversal in ArangoDB

两盒软妹~` 提交于 2019-12-25 01:30:37
问题 I am trying to do a graph traversal here I created two collections in ArangoDB, a document collection "Node" and an edge collection "Path" . All my nodes have a name attribute (labels) and are connected by edges (lines) as shown in above illustration. I tried below query to find paths that end with an end or error node: FOR v, e, p IN 1..10 OUTBOUND 'Node/start_0' Path OPTIONS { bfs: true} FILTER (v.name == "end" OR v.name == "error") RETURN CONCAT_SEPARATOR(' - ', p.vertices[*].name) The