Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
17bc09d
add ontology description as a got graph visualization
YANG-DB Feb 7, 2021
3d75deb
ignore some issued test .
YANG-DB Feb 8, 2021
6b45edd
add file persistence for adding new ontology
YANG-DB Feb 8, 2021
2e972e5
add running profiles
yneuman Mar 4, 2021
2d334e6
add release notes and documentation with samples and tutorials
yneuman Mar 6, 2021
ee841c0
add release notes and documentation with samples and tutorials
yneuman Apr 5, 2021
0296121
add documentations for the first tutorial
May 26, 2021
4bfbf67
Update README.MD
YANG-DB May 26, 2021
74c7b69
Update README.MD
YANG-DB May 26, 2021
355dac1
Update installation.md
YANG-DB May 26, 2021
8ed6bbd
Update create-ontology.md
YANG-DB May 26, 2021
a05fdb2
Update load-data.md
YANG-DB May 26, 2021
4d8275c
Update query-the-data.md
YANG-DB May 26, 2021
3b6c6d9
Update query-the-data.md
YANG-DB May 26, 2021
c16f4d8
add documentations for the first tutorial
May 30, 2021
f82eaf8
add documentations for the first tutorial
Jun 1, 2021
5a5f2aa
Merge remote-tracking branch 'origin/develop' into develop
Jun 1, 2021
22e80e9
add documentations for the first tutorial
Jun 1, 2021
3924e20
Update KnowledgeGraphDeck.md
YANG-DB Jun 1, 2021
6fa8ab3
Update KnowledgeGraphDeck.md
YANG-DB Jun 1, 2021
f923913
add documentations for the first tutorial
Jun 1, 2021
b5f934a
fix csv cursor projection
Jun 2, 2021
b8927a9
fix csv cursor projection
Jun 2, 2021
3dbc486
fix csv cursor projection
Jun 2, 2021
f0f8f4a
fix csv cursor projection
Jun 2, 2021
774556c
fix csv cursor projection
Jun 3, 2021
f39ccbb
presentation for opensearch / opendistrocommunity community meeting
YANG-DB Jun 3, 2021
0dce9fc
Update KnowledgeGraphDeck.md
YANG-DB Jun 3, 2021
9c4ed93
Update README.MD
YANG-DB Jun 3, 2021
1f77b74
fix csv cursor projection
Jun 14, 2021
2d594d6
fix csv cursor projection
Jun 14, 2021
e688ede
add support for aggregation operation on all levels:
Jun 15, 2021
dbcf150
add support for aggregation operation on all levels:
Jun 17, 2021
887e3bf
add support for aggregation operation on all levels:
Jun 22, 2021
3d19fdc
add support for aggregation operation on all levels:
Jun 22, 2021
63150e4
add support for aggregation operation on all levels:
Jun 24, 2021
232607a
Merge remote-tracking branch 'origin/develop' into develop
Jun 24, 2021
f102595
add support for aggregation operation on all levels:
Jun 24, 2021
7b3b7a1
add support for aggregation operation on all levels:
Jun 24, 2021
a3a22c6
add support for aggregation operation on all levels:
Jun 24, 2021
1f1766a
add support for aggregation operation on all levels:
Jun 24, 2021
56bc8c5
Update general.md
YANG-DB Jun 25, 2021
d088f07
Delete about.md
YANG-DB Jun 25, 2021
dc72705
Update query_language.md
YANG-DB Jun 25, 2021
a7b91b8
adding bolt protocol support for graph SPI driven by Neo4J driver
Jun 29, 2021
c655c99
add size support for aggregation functions
Jun 30, 2021
00c09c1
Merge remote-tracking branch 'origin/develop' into develop
Jun 30, 2021
0f6af5a
fix issue with empty bucket of vertices
Jun 30, 2021
ab6fd4d
add support for distinct filter on edges:
Jul 2, 2021
1db6eaa
add support for distinct filter on edges:
Jul 4, 2021
663bac9
add support for distinct filter on edges:
Jul 4, 2021
3896b1c
Merge branch 'distinct-expression-support' into develop
Jul 4, 2021
e092986
remove un-used maven projects
Jul 4, 2021
950c6f4
The purpose of this feature is to provide a consistent and general wa…
Jul 6, 2021
77fccfb
fix agg size issues
Jul 8, 2021
b5a5cac
add support for generating projected mapping for slice & dice actions…
Jul 8, 2021
55fa4da
add support for generating projected mapping for slice & dice actions…
Jul 11, 2021
b27dcda
add support for generating projected mapping for slice & dice actions…
Jul 11, 2021
98d66c5
add support for system index to be generated in the index provider
Jul 11, 2021
17010a5
add support for system index to be generated in the index provider
Jul 12, 2021
c544df0
add transformation from projection entity to document
Jul 15, 2021
060ab5f
add transformation from projection entity to document
Jul 15, 2021
8f566b6
add transformation from projection entity to document
Jul 15, 2021
fac67e5
add transformation from projection entity to document
Jul 18, 2021
2c48710
add transformation from projection entity to document
Jul 18, 2021
a1aa731
add transformation from projection entity to document
Jul 18, 2021
0a09270
Merge pull request #115 from YANG-DB/query-data-as-insert-index
YANG-DB Jul 18, 2021
432c0cd
documentation
Jul 18, 2021
e7f336d
Update projection-and-count.md
YANG-DB Jul 27, 2021
2776fb0
Update README.MD
YANG-DB Jul 27, 2021
6d072b3
Update README.MD
YANG-DB Oct 24, 2021
9f46dc0
remove knowledge extension
YANG-DB Oct 25, 2021
82aa811
Merge remote-tracking branch 'origin/develop' into develop
YANG-DB Oct 25, 2021
404151e
add support for cursor runtime provisioning
YANG-DB Oct 27, 2021
b14a193
add support for cursor runtime provisioning
YANG-DB Nov 6, 2021
9edd172
Update backend.md
YANG-DB Nov 8, 2021
2428231
Update projectionIndex.md
YANG-DB Nov 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 45 additions & 15 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From Graph to Elastic - A tail of a Yang-DB...
From Graph to Open(Elastic)Search - A tail of a Yang-DB...
=========================================================================================

[![Coverage Status](https://coveralls.io/repos/github/YANG-DB/yang-db/badge.svg?branch=develop)](https://coveralls.io/github/YANG-DB/yang-db?branch=develop)
Expand All @@ -14,6 +14,11 @@ From Graph to Elastic - A tail of a Yang-DB...
* Download [yang.db] (https://github.com/YANG-DB/yang-db) latest docker release docker pull yangdb/yang.db
* Run: docker run -p 8888:88 --net=host -it yangdb/yang.db:latest (https://hub.docker.com/r/yangdb/yang.db/tags)

#### Latest News
* opensearch community lecture given on yangDb
* https://github.com/YANG-DB/yang-db/blob/develop/docs/info/YangDbOpenSearch.pdf
* https://github.com/YANG-DB/yang-db/blob/develop/docs/info/KnowledgeGraphDeck.md


#### Project YANG-DB
* http://www.yangdb.org/
Expand Down Expand Up @@ -56,6 +61,7 @@ Infrastructure Technologies
-----------------------------------------------------------------------------------------------

* [elasticsearch](https://www.elastic.co/)
* [opensearch](https://opensearch.org/)
* [jooby](https://jooby.org/)
* [tinkerpop](http://tinkerpop.apache.org/)

Expand Down Expand Up @@ -127,7 +133,7 @@ One major difference in this model (compared to the strict relational schema) is
Additional graph model is the Resource Description Framework (RDF) model.


Why Elastic
Why Elastic / Opensearch
===========
![](https://media.licdn.com/dms/image/C4E12AQFR7RVJvIIVxA/article-inline_image-shrink_1000_1488/0?e=1547683200&v=beta&t=thjzxR2XgRNw1ldZCaRXzn4K7Nuc-giG0zAdtUIW7XU)

Expand All @@ -141,12 +147,12 @@ social graph that must be frequently updated and available for both:
All the read & write are made in concurrency with reasonable response
time and ever growing throughput.

The first requirement was fulfilled using Elasticsearch – a well
The first requirement was fulfilled using the DB – a well
known and established NoSql document search and storage engine capable
of containing very large volume of data.

For the second requirement **we decided that our best solution would be to
use elasticsearch as the non-native graph-DB storage layer**.
use opensearch as the non-native graph-DB storage layer**.

As mentioned before, a graph-DB storage layer can be implemented using a
non-native storage such as NoSql storage.
Expand All @@ -161,11 +167,11 @@ Modeling data as graph

The first issue on our plate is to design the data model representing the graph, as a set of vertices and edges.

With elastic we can utilize its powerful search abilities to efficiently fetch node & relation documents according to the query filters.
With opensearch we can utilize its powerful search abilities to efficiently fetch node & relation documents according to the query filters.

##### Elastic Index
##### opensearch Index

In elasticsearch each index can be described as a table for a specific
In opensearch each index can be described as a table for a specific
schema, the index itself is partitioned into shared which allow scale
and redundancy (with replicas) across the cluster.

Expand All @@ -174,9 +180,9 @@ following formula:

*shard_num = hash(_routing) % num_primary_shards*

Each index has a schema (called type in elastic) which defines the
documents structure (called mapping in elastic). Each index can hold
only a single type of mapping (since elastic 6)
Each index has a schema (called type in opensearch) which defines the
documents structure (called mapping in opensearch). Each index can hold
only a single type of mapping

The vertices index will contain the vertices documents with the
properties, the edges index will contain the edges documents with their
Expand Down Expand Up @@ -225,9 +231,9 @@ From logical to physical
------------------------

Once a logical query is given we need to translate it to the physical layer
of the data storage which is elasticsearch.
of the data storage which is opensearch.

Elastic has a query DSL which is focused on search and aggregations –
opensearch has a query DSL which is focused on search and aggregations –
not on traversing, we need an additional translation phase that will
take into account the schematic structure of the graph (and the
underlying indices).
Expand All @@ -239,7 +245,7 @@ steps:

- translating the labels into real schema entities (indices)

- creating the physical elastic query
- creating the physical opensearch query

This is the process in a high-level review, in practice - there will be
more stages that optimize the logical query; in some cases it is
Expand All @@ -252,9 +258,9 @@ Conclusion
---------------
We started with discussing the purpose of graphs DB in today’s business use cases and reviewed different models for representing a graph. Understanding the fundamental logical building blocks that a potential graph DB should consist and discussed an existing NoSql candidate to fulfill the storage layer requirements.

Once we selected elasticsearch as the storage layer we took the LDBC Social Network Benchmark graph model and simplified it to be optimized in that specific storage. We discussed the actual storage schema with the redundant properties and reviewed cypher language to query the storage in an sql-like graph pattern language.
Once we selected opensearch as the storage layer we took the LDBC Social Network Benchmark graph model and simplified it to be optimized in that specific storage. We discussed the actual storage schema with the redundant properties and reviewed cypher language to query the storage in an sql-like graph pattern language.

We continued to see the actual transformation of the cypher query into a physical execution query that will run by Elasticsearch.
We continued to see the actual transformation of the cypher query into a physical execution query that will run by opensearch.

In the last section we took a simple graph query and drilled down into the details of the execution strategies and the bulking mechanism.

Expand All @@ -265,3 +271,27 @@ Start Using
- See http://www.yangdb.org/general-info.html
- See http://www.yangdb.org/docker.html
- See http://www.yangdb.org/get-involved.html

Please review the following tutorial pages:
---------------
Installaiton tutorial:

- https://github.com/YANG-DB/yang-db/blob/develop/docs/tutorial/sample/dragons/installation.md

Schema creation tutorial:

- https://github.com/YANG-DB/yang-db/blob/develop/docs/tutorial/sample/dragons/create-ontology.md

Data Loading tutorial:

- https://github.com/YANG-DB/yang-db/blob/develop/docs/tutorial/sample/dragons/load-data.md

Query the Graph tutorial:

- https://github.com/YANG-DB/yang-db/blob/develop/docs/tutorial/sample/dragons/query-the-data.md

Projection materialization & count tutorial:

- https://github.com/YANG-DB/yang-db/blob/develop/docs/tutorial/sample/dragons/projection-and-count.md


Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
#docker pull grafana
docker pull grafana/grafana
# docker Run grafana
Expand Down
7 changes: 7 additions & 0 deletions dashboards/kibana/runKibana.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
docker run \
--name kibana \
--publish 5601:5601 \
--network host \
--env "ELASTICSEARCH_HOSTS=http://127.0.0.1:9200" \
docker.elastic.co/kibana/kibana:6.5.4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 25 additions & 31 deletions docker-compose-embedded.yml → docker/docker-compose-embedded.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
version: '3.3'

services:
fuse:
image: yangdb/yang.db:latest
ports:
- 8888:8888
environment:
- "elasticsearchHosts=localhost"
- "elasticsearchClusterName=Knowledge"
volumes:
- fuse-data:/usr/share/fuse
networks:
- network
es:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
environment:
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- "discovery.type=single-node"
- "network.publish_host=127.0.0.1"
- "cluster.name=${ELASTICSEARCH_CLUSTER_NAME}"
- "network.publish_host=http://elasticsearch:9200"
- "cluster.name=Dragons"
networks:
- network
ports:
Expand All @@ -30,31 +19,36 @@ services:
published: 9300
protocol: tcp
mode: host
deploy:
endpoint_mode: dnsrr
mode: 'global'
elasticsearch_exporter:
image: justwatch/elasticsearch_exporter:1.1.0
command:
- '--es.uri=http://fuse:9200'
restart: always
ports:
- "127.0.0.1:9114:9114"
grafana:
image: grafana/grafana
container_name: grafana
volumes:
- grafana-data:/usr/share/grafana
- esdata1:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:6.5.4
links:
- elasticsearch
depends_on:
- elasticsearch
ports:
- 3000:3000
- 5601:5601
networks:
- network
fuse:
image: yangdb/yang.db:latest
depends_on:
- elasticsearch
ports:
- 8888:8888
environment:
- "elasticsearchHosts=localhost"
- "elasticsearchClusterName=${ELASTICSEARCH_CLUSTER_NAME}"
volumes:
- fuse-data:/usr/share/fuse
networks:
- network
user: "0"

volumes:
fuse-data:
driver: local
grafana-data:
esdata1:
driver: local

networks:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml → docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
ports:
- 8888:8888
environment:
- "elasticsearchHosts=10.6.91.1"
- "elasticsearchHosts=127.0.0.1"
- "elasticsearchClusterName=${ELASTICSEARCH_CLUSTER_NAME}"
networks:
- network
Expand Down
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions docker/runLocalDevDocker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

clusterName=$1

echo "Starting elasticsearch clusterName:$clusterName"

docker network create elastic
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.5.4
docker run -d --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "cluster.name=$clusterName" -e "ES_JAVA_OPTS=-Xms13g -Xmx13g" docker.elastic.co/elasticsearch/elasticsearch:6.5.4
echo " elasticsearch started"

echo " Starting Kibana"
docker pull docker.elastic.co/kibana/kibana:7.12.1
docker run -d --name kibana --net elastic -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://elasticsearch:9200" docker.elastic.co/kibana/kibana:6.5.4
echo " Kibana started"

echo " Starting Yang-DB"
echo "docker run --network host -it yangdb/yang.db:${clusterName}"

#run docker locally with port exposed - option 1
docker run -d --net elastic -it yangdb/yang.db:${clusterName}
echo " Yang-DB started"
43 changes: 43 additions & 0 deletions docs/branch/analytics_support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Abstract:

The purpose of this branch is to integrate the E/S transformer API into yandDb offering advance analytics

**Details**

The transform API defines a transform, which copies data from source indices, transforms it, and persists it into an entity-centric destination index. The entities are defined by the set of group_by fields in the pivot object.

You can also think of the destination index as a two-dimensional tabular data structure (known as a data frame).

Every YangDb Entity/Relation has a logical representation in an ontology structure, We would like to allow the ability to group and collect common features from an entity/relation into a materialized index that will optimize certain aggregation query and will reflect some informative feature that is otherwise available only using query.

Lets review the next sample...

Node type Person with the following fields:

* id
* name
* gender
* birth date
* birth location
* family status

We also have the following relation of type friend (person to person):

* source Id
* source Name
* target Id
* target Name
* date Of Friendship
* friendship description

Lets assume that we have an analytics that would like to express the following characteristics:

* amount of people having more than 100 friends gained recently (last month)
* amount of people born near-by (some radius) and are friends
* amount of single people (male/female) having fewer than 10 friends

These questions can be queried on demand but will drain memory and cause large resource spikes

Lets assume that we would like to query these questions often and would like to materialize them for performance considerations

We can also take advantage of these materialized views in order to more efficiently join this information directly with standard yangDb queries...
23 changes: 23 additions & 0 deletions docs/branch/es7_4_2-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Abstract:

The purpose of this branch is to integrate the E/S version 7.4.2 into yandDb

Changes:

Upgrade jooby version to 1.6.8

Upgrade Elasticsearch version to 7.4.2

Fixes:

Remove BasicIdGenerator.getNext() needs no version lock
Fix CSV-convertor to concider LOV (dictionary) when creating the json document

Fix ES:
- remove "_all" mapping
- remove standard filter
- fix ngram max-min diff

Upgrades:

Add support for retry using https://reflectoring.io/retry-with-resilience4j/
Loading