Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sdiemert/grape

 
 

Repository files navigation

logo

GrapeVine

GrapeVine is a functional Graph Rewriting and Persistence Engine for Clojure. GrapeVine can be used with or without the integrated computational notebook (based on Gorilla REPL).

GrapeVine is a fundamentally new release of Grape and GrapePress with the difference that GrapeVine empraces functional graph transformations, while Grape and GrapePress used stateful computation. (If you are looking for the old Grape / GrapePress please swith to branch "grape-legacy".)

Installation

Quickstart - using Docker

The easiest way to install GrapeVine is by using Docker. If you don't have Docker, please install it first.

GrapeVine is based on the Neo4J graph database. We will run Neo4J in one Docker container and GrapeVine in a another container. The installation takes three steps:

Step 1. Create a network between the two Docker containers:

docker network create grapenet

This creates a network called "grapenet". Of course, you can give it a different name. If you do, make sure to use it below, too.

Step 2: Start Neo4J:

docker run --name neo4j -p 7474:7474 -p 7687:7687 --net grapenet -d -v $HOME/neo4j/data:/data -v $HOME/neo4j/logs:/logs -v $HOME/neo4j/import:/var/lib/neo4j/import -v $HOME/neo4j/plugins:/plugins -e NEO4JLABS_PLUGINS=\[\"apoc\"\] -e NEO4J_apoc_export_file_enabled=true -e NEO4J_AUTH=none -e NEO4J_apoc_import_file_use__neo4j__config=true -e NEO4J_apoc_import_file_enabled=true -e NEO4J_cypher_lenient__create__relationship=true -e NEO4JLABS_PLUGINS=\[\"apoc\"\] arm64v8/neo4j

This runs a Neo4J container (and downloads it if need be). The command also connects the container to the network we created. Note that the command switches off authentication (to the Neo4J database). This may not want to be what you want if you install this on a public system. If you do want authentication, you may need to edit the password in the GrapeVine profiles.clj file. Also note that the above command assumes that you are on an ARM processor. If you have an Intel/AMD processor, select the appropriate Docker image here.

After the above command, you should be able to access the Neo4J browser at http://localhost:7474/browser/

Step 3. Start GrapeVine:

 docker run -it -v ~/grapevine:/usr/src/app/book \
--net grapenet \
--name grapevine \
-p 8999:8999 -p 62222:62222 \
ghcr.io/jenshweber/grape:release

The above command starts a GrapeVine constainer and mounts the ~/grapevine directory on the host machine to the book directory in the GrapeVine container. You can save your worksheets in that directory and exchange it with the host.

Slow(er) Start - without using Docker

If you don't want to use Docker, you need to install Clojure, Leiningen and Graphviz before starting GrapeVine with "lein run".

Tutorial

GrapeVine comes with an "executable" tutorial worksheet in the "help" directory. Simply load it by hitting control-g control-l.

Here is a read-only version of the tutorial and here is part 2 .

Copyright © 2016-23 Jens Weber

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Grape - Graph Rewriting and Persistence Engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 99.8%
  • Shell 0.2%