dgraph_client

Crates.iodgraph_client
lib.rsdgraph_client
version0.1.0
sourcesrc
created_at2018-01-31 11:56:19.217709
updated_at2018-01-31 11:56:19.217709
descriptionA rust client for dgraph.
homepagehttps://github.com/davidB/dgraph_client-rs
repositoryhttps://github.com/davidB/dgraph_client-rs
max_upload_size
id49003
size230,775
David Bernard (davidB)

documentation

README

A rust client for dgraph

CC-0Build Status

The client used the grpc channel & api of dgraph.

What is dgraph ?

from dgraph site:

Dgraph is an open source, horizontally scalable and distributed graph database, providing ACID transactions, consistent replication and linearizable reads. It's built from ground up to perform for a rich set of queries. Being a native graph database, it tightly controls how the data is arranged on disk to optimize for query performance and throughput, reducing disk seeks and network calls in a cluster.

Dgraph's goal is to provide Google production level scale and throughput, with low enough latency to be serving real time user queries, over terabytes of structured data. Dgraph supports GraphQL-like query syntax, and responds in JSON and Protocol Buffers over GRPC and HTTP.

Samples

see examples

examples/dgraph_tuto01

Sample adpated from go sample at https://docs.dgraph.io/clients/

# launch dgraph (grpc on localhost:9080)
# see doc of dgraph

# run
cargo run --example dgraph_tuto01

Build

The lib used grpcio to generate the rust code from grpc's proto file.

cargo build

Update the grpc client

# install [grpcio](https://crates.io/crates/grpcio)

# get api.proto & generate client
cd src
curl -O https://github.com/dgraph-io/dgraph/raw/v1.0.2/protos/api.proto
protoc --rust_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_rust_plugin` api.proto

Commit count: 20

cargo fmt