Meidokon Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Useful(?) links

  • furinkan's stuff

  • Postfix snippets


  • SystemInfo

  • This sidebar

Navigation

  • FrontPage
  • RecentChanges
  • FindPage
  • HelpContents
Revision 1 as of 2022-07-31 06:46:29
MeidokonWiki:
  • furinkan
  • Mneme
  • NebulaGraph

Contents

  1. Start the database
  2. Connect to the console
  3. Make some structure

Nebula seems like a decent fit, but getting started with it is a bit tricky, and there's a lot of outdated docs floating around.

While it has a proper large-scale architecture, I want to just use it on my workstation for now, so I'll use the docker-compose method.

Start the database

I don't think this has persistence, so expect to redo all your work if you the workstation is shutdown. I don't know for sure, because I've never used docker-compose before.

These docs are old but they work fine to get it up and running: https://docs.nebula-graph.io/2.0/2.quick-start/2.deploy-nebula-graph-with-docker-compose/

  • Note that the default port has changed from 3699, and it's now 9669
  • If you need to do some debugging with docker: https://medium.com/nebula-graph/debug-the-nebula-graph-processes-inside-the-docker-container-3e28dc5fafe8

Connect to the console

docker run --rm -it --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2-nightly

/ # nebula-console -addr graphd -port 9669 -u root -p nebula

This is like a mysql/psql shell now. :QUIT to exit.

Make some structure

I'm using this series of videos: https://www.youtube.com/watch?v=qF4ZhDEN30k&list=PL4ArMmsAnb84uB2d9L46eXpIi7Epz2cfp&index=3

The syntax has changed a little since then though, here's the reference: https://docs.nebula-graph.io/3.2.0/3.ngql-guide/9.space-statements/1.create-space/

(root@nebula) [(none)]> CREATE SPACE mneme (vid_type = int64);
Execution succeeded (time spent 1229/1435 us)

(root@nebula) [(none)]> use mneme;

(root@nebula) [mneme]> CREATE TAG person (displayname string NOT NULL, dob_year INT, dob_month INT, dob_day INT) comment = 'A single identifiable person, who may have multiple handles/names';
Execution succeeded (time spent 1278/1580 us)

(root@nebula) [mneme]> CREATE TAG photoshoot(shoot_date DATE);

(root@nebula) [mneme]> CREATE EDGE did_shoot(role STRING);
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01
MoinMoin Release 1.9.11 [Revision release], Copyright by Juergen Hermann et al.