Skip to content

Commit

Permalink
README update + rebranding
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya16 committed May 7, 2018
1 parent 67ad826 commit ecfe83f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 13 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Distributed Graph Database
# not4oundGraph

Distributed Graph Database Management System written on `Python` as the project in Advanced Databases course at Innopolis University.
Simple Distributed Graph Database Management System written on `Python` as the project in Advanced Databases course at Innopolis University.

## Getting Started

Expand Down Expand Up @@ -78,11 +78,12 @@ Tests affect various layers of the Graph Database:

To deploy ***Graph Database*** simply use
```
graphDB [conf_path]
n4Graph [conf_path]
```
where `conf_path` stands for the path to configuration file that describes peers of distributed file system including managers and workers (slaves).

Configuration file has the following JSON format:
### Distributed File System
DFS configuration file has the following JSON format:

```
{
Expand Down Expand Up @@ -114,15 +115,20 @@ Configuration file has the following JSON format:

Without specifying any arguments, the default [configuration file](configs/config.json) with `replica_factor = 2` is used.

***not4oundGraph*** supports two DFS modes:
* **Replication** of data across multiple workers, each worker contains the same portion of data (example configuration file: [config.json](configs/config.json))
* **Distribution** of data across multiple workers using Round-Robin algorithm (example configuration file: [config.json](configs/config_distributed.json))

### Graph Engine API
We provide an [API](src/graph_db/engine/api.py) for managing graph database system directly from Python code.
We provide an [API](src/graph_db/engine/api.py) for managing graph database system directly from Python code. Supported graph operations are listed in [specifications](SPECIFICATIONS.md).

### Data Access API (Query Language)
We provide own simple graph query language (*SGQL*) for executing queries and a [wrapper](src/graph_db/access/db.py) around it.
We provide own simple graph query language ***not4oundQL*** for executing queries and a [wrapper](src/graph_db/access/db.py) around it.
Language specification can found in ***not4oundGraph*** [specifications](SPECIFICATIONS.md).

Executable file `graphDB` runs [console](src/graph_db/console/console.py) mode and accepts *SGQL* queries:
Executable file `n4Graph` runs [console](src/graph_db/console/console.py) mode and accepts *not4oundQL* queries:
```
Welcome to Graph DB. (c) Ilya Borovik, Artur Khayaliev, Boris Makaev
Welcome to not4oundGraph DB. (c) Ilya Borovik, Artur Khayaliev, Boris Makaev
You can enter `/help` to see query examples.
Expand All @@ -139,6 +145,8 @@ create relationship: label from label1 to label2 key:value
create relationship: label from id:0 to id:1 key:value
...
```

**Note:** *not4oundGraph* DB does not support `delete graph` queries. If you want to delete graph, please, delete the `db_path` directory with data that you have specified in configuration file.
## Built With

* Python 3.6
Expand Down
41 changes: 38 additions & 3 deletions SPECIFICATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

| `in_use` | `label_id` | `first_rel_id` | `first_prop_id` |
|:------:|:---------:|:----------:|:----------:|
| 1 byte | 4 bytes | 4 bytes | 4 byte |
| 1 byte | 4 bytes | 4 bytes | 4 bytes |

* `Relationship` - 33 bytes

Expand All @@ -28,12 +28,47 @@

* `Dynamic Data` - 32 bytes

| `number of bytes taken by data` | `data` | `pointer to id of next_chunk` |
| `real data length` | `data` | `next_chunk_id` |
|:------:|:------:|:-----------:|
| 1 byte | 27 bytes | 4 bytes |

## Types

* `Int` - 4 bytes
* `Bool` - 1 byte
* `Str` - depends on the length
* `Str` - depends on the length

## Graph Engine API

Following graph operations are supported:

* Creation of graph
* Creation of nodes, relationships with label and properties
* Match (selection) of nodes, relationships, labels and all graph objects together
* Deletion of nodes and relationships
* Addition of new properties to nodes adn relationships

## Query Language

Graph Database *not4oundQL* supports the following queries:

```
create graph: label
create node: label
create node: label key:value
create node: label key:value key:value key:value
create relationship: label from label1 to label2
create relationship: label from label1 to label2 key:value
create relationship: label from id:0 to id:1 key:value
match node: label
match node: id:0
match relationship: label
match relationship: id:1
match node: key=value
match node: key<value
match relationship: key>=value
match graph: label
delete node: id:0
delete relationship: id:0
```

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package_dir={'graph_db': 'src/graph_db'},
entry_points={
'console_scripts':
['graphDB = graph_db.console.console:run']
['n4Graph = graph_db.console.console:run']
},
test_suite='src.tests',
install_requires=['rpyc'],
Expand Down
2 changes: 1 addition & 1 deletion src/graph_db/console/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from graph_db.engine.types import DFS_CONFIG_PATH

GREETING = """
Welcome to Graph DB. (c) Ilya Borovik, Artur Khayaliev, Boris Makaev
Welcome to not4oundGraph DB. (c) Ilya Borovik, Artur Khayaliev, Boris Makaev
Use `help` to see query examples.
Use `exit` to close database connection.
"""
Expand Down

0 comments on commit ecfe83f

Please sign in to comment.