googlearchive / graphd

The Metaweb graph repository server
Apache License 2.0
451 stars 53 forks source link

Any more documentation #17

Open Outstep opened 5 years ago

Outstep commented 5 years ago

Hello,

I have just started playing around with graphd and it compiles nicely on my Ubuntu 16.04 system.

Is there any more documentation on interfacing and interactive commands?

Perhaps some examples of adding data multiple types of data and querying the data back?

Also, what a but a REST interface with Curl or something?

I'm just trying to get a feel for the capabilities and how to use graphd.

Any help would be greatly appreciated. Cheers, Lonnie

teeler commented 5 years ago

Hey Lonnie - yea we're under-documented, for sure.

There's no REST interfaces, nor any HTTP servers generally to speak of here ... the best examples I can point you to are in the unit tests, but even those require some digging to understand.

Just to get you over the hump did you look at https://github.com/google/graphd/blob/master/doc/graphd.8.md and https://github.com/google/graphd/blob/master/doc/graphd.conf.5.md?

Besides that, graphd operates a pretty simple protocol, it's line-oriented and you can use telnet to talk to it, or you can start it interactively with -y.

If you'd like to ask questions, feel free to chat: https://join.slack.com/t/mw-graphd/shared_invite/enQtNDMxNjU1OTcxMzQ3LTE1YmFmZWY1MjY2MmFkZDEwYTZhNzc1MGU5ZmY2ODc2OGFjYmU5ODU2MGI0ODAwOWRkNzdmZDc4ZmJiM2JmZmM

But i'll try writing a more in-depth tutorial in the meantime....

Outstep commented 5 years ago

Hello,

Thanks for getting back to me and for the links.

I have actually read over the first 2 and also just joined Slack so that perhaps we can chat more.

In looking over the graphd.conf, I see:

isten type { parameters }:

Wait for incoming client connections on the specified interface. The parameters differ by type:

listen tcp { host hostname port portnumber }

I am wondering what type of client you have available so that I can connect to a running instance? Do you have one in open source for C/C++ or Golang?

Also, will this current version of graphd horizontally scale with multiple instances as that would be really exciting to see.

Thanks again :)

teeler commented 5 years ago

I am wondering what type of client you have available so that I can connect to a running instance? Do you have one in open source for C/C++ or Golang?

There's a C client in the code (https://github.com/google/graphd/blob/master/libgraphdb/graphdb.h), and @pierogmorski is currently hacking away at a Go client (https://github.com/google/graphd/tree/master/go/graphd).

I also added a file that details the protocol (https://github.com/google/graphd/blob/master/doc/gr-protocol.txt, tl;dr its text based, newline-delimited)

Also, will this current version of graphd horizontally scale with multiple instances as that would be really exciting to see.

Graphd sadly doesn't scale horizontally with respect to the graph - for example, i can't put different sections of the graph on different machines and serve queries consistently (this is an open problem!), but graphd does have a well-defined replication protocol and works in a master/replica pattern. This is a setup that allows you to run N replica graphd's, each containing a full copy of the graph data, and a single master (there are other setups, but this is the common one).

There's another doc that lightly describes other replica setup and status (https://github.com/google/graphd/blob/master/doc/gr-replication.txt).

laeuter commented 5 years ago

If you can choose what to write documentation about, I would like to read something about

Prerequisites

Usage

Onboarding/Community

Big thanks for sharing this repository! I don't mind sharing my experience with it, too, yet I miss a preferred platform.

teeler commented 5 years ago

These are great topics - I can cover some of them, others I'm going to have to either re-learn or go find an expert (I'm not the original author of any of this code, i'm just the steward).

If you could help me out with one more thing - could you order that list?

qiuwei commented 5 years ago

@teeler Hi, thanks for bringing this repo online. I am a huge fan of freebase before it was shutdown. Glad to see the database which powers freebase now opensourced.

Since you are already writing an in-depth tutorial, could you illustrate how to load the freebase data? e.g., load a small portion of freebase into graphd, and run some MQL queries.

That would be super helpful.