Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dgraph
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
dgraph
Commits
8d47af32
Commit
8d47af32
authored
9 years ago
by
Manish R Jain
Browse files
Options
Downloads
Patches
Plain Diff
Update README for v0.2 launch
parent
dc732505
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+35
-8
35 additions, 8 deletions
README.md
with
35 additions
and
8 deletions
README.md
+
35
−
8
View file @
8d47af32
...
...
@@ -11,7 +11,7 @@ with low enough latency to be serving real time user queries, over terabytes of
DGraph supports
[
GraphQL
](
http://graphql.org/
)
as query language, and responds in
[
JSON
](
http://www.json.org/
)
.
# Current Status
#
# Current Status
*Check out [the demo at dgraph.io](http://dgraph.io).*
...
...
@@ -33,9 +33,9 @@ See the [query section below](#querying) for a sample query.
`curl dgraph.xyz/query -XPOST -d '{}'`
# Quick Testing
#
# Quick Testing
##
V
ia Docker
##
# Single instance v
ia Docker
There's a docker image that you can readily use for playing with DGraph.
```
$ docker pull dgraph/dgraph:latest
...
...
@@ -66,8 +66,33 @@ $ curl localhost:80/query -X POST -d '{me(_xid_: alice) { name _xid_ follows { n
```
Note how we can retrieve XIDs by using
`_xid_`
identifier.
### Multiple distributed instances
We have loaded 21M RDFs from Freebase Films data along with their names into 3 shards.
They're located in dgraph-io/benchmarks repository.
To use it, install
[
Git LFS first
](
https://git-lfs.github.com/
)
.
I've found the Linux download to be the easiest way to install.
Note that this repository has over 1GB worth of data.
```
$ git clone https://github.com/dgraph-io/benchmarks.git
$ cd benchmarks/rocks
$ tar -xzvf uids.async.tar.gz -C $DIR
$ tar -xzvf postings.tar.gz -C $DIR
# You should now see directories p0, p1, p2 and uasync.final. The last directory name is unfortunate, but made sense at the time.
```
For quick testing, you can bring up 3 different processes of DGraph. You can of course, also set this up across multiple machines.
```
go build . && ./server --instanceIdx 0 --mutations $DIR/m0 --port "8080" --postings $DIR/p0 --workers ":12345,:12346,:12347" --uids $DIR/uasync.final --workerport ":12345" &
go build . && ./server --instanceIdx 1 --mutations $DIR/m1 --port "8081" --postings $DIR/p1 --workers ":12345,:12346,:12347" --workerport ":12346" &
go build . && ./server --instanceIdx 2 --mutations $DIR/m2 --port "8082" --postings $DIR/p2 --workers ":12345,:12346,:12347" --workerport ":12347" &
```
Now you can run any of the queries mentioned in
[
Test Queries
](
https://github.com/dgraph-io/dgraph/wiki/Test-Queries
)
.
You can hit any of the 3 processes, they'll produce the same results.
`curl localhost:8081/query -XPOST -d '{}'`
## Mutations
Note that the mutation syntax uses
[
RDF NQuad format
](
https://www.w3.org/TR/n-quads/
)
.
```
mutation {
set {
<subject> <predicate> <objectid> .
...
...
@@ -76,6 +101,7 @@ mutation {
_uid_:0xabcdef <predicate> <objectid> .
}
}
```
You can batch multiple mutations in a single GraphQL query.
DGraph would assume that any data in
`<>`
is an external id (XID),
...
...
@@ -91,9 +117,8 @@ Best way to do this is to refer to [Dockerfile](Dockerfile), which has the most
instructions on getting the right setup.
All the instructions below are based on a Debian/Ubuntu system.
### Install Go 1.4
Go 1.5 has a regression bug in
`cgo`
, due to which DGraph is dependent on Go1.4.
So
[
download and install Go 1.4.3
](
https://golang.org/dl/
)
.
### Install Go 1.6
Download and install
[
Go 1.6 from here
](
https://golang.org/dl/
)
.
### Install RocksDB
DGraph depends on
[
RocksDB
](
https://github.com/facebook/rocksdb
)
for storing posting lists.
...
...
@@ -101,10 +126,10 @@ DGraph depends on [RocksDB](https://github.com/facebook/rocksdb) for storing pos
```
# First install dependencies.
# For Ubuntu, follow the ones below. For others, refer to INSTALL file in rocksdb.
$ sudo apt-get install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev
$ sudo apt-get
update && apt-get
install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev
$ git clone https://github.com/facebook/rocksdb.git
$ cd rocksdb
$ git checkout v4.
1
$ git checkout v4.
2
$ make shared_lib
$ sudo make install
```
...
...
@@ -127,6 +152,8 @@ glock sync github.com/dgraph-io/dgraph
go test github.com/dgraph-io/dgraph/...
```
TODO(manish): Update from below.
# Usage
## Data Loading
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment