docker run --rm -p 2480:2480 -p 2424:2424
-e JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata -Darcadedb.server.defaultDatabases=Imported[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz}"
arcadedata/arcadedb:latest
(2) Open your browser on http://localhost:2480 to access ArcadeDB Studio web tool. Login by using "root" as
user and "playwithdata" as a password.
kubectl create secret generic server-root-password --from-literal=arcadedb.server.rootPassword='<password>'
(2) Start a Kubernetes cluster with 3 servers:
kubectl apply -f arcadedb-statefulset.yaml
For more information check out ArcadeDB Kubernetes support.
$ bin/server.sh █████╗ ██████╗ ██████╗ █████╗ ██████╗ ███████╗██████╗ ██████╗ ██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗ ███████║██████╔╝██║ ███████║██║ ██║█████╗ ██║ ██║██████╔╝ ██╔══██║██╔══██╗██║ ██╔══██║██║ ██║██╔══╝ ██║ ██║██╔══██╗ ██║ ██║██║ ██║╚██████╗██║ ██║██████╔╝███████╗██████╔╝██████╔╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝ PLAY WITH DATA arcadedb.com 2021-08-31 17:50:46.762 INFO [ArcadeDBServer]The first time the server is running, the password for the root user will be asked. Save it in a safe place.ArcadeDB Server v22.1.3 (build 258eb/163044331/main) is starting up... 2021-08-31 17:50:46.769 INFO [ArcadeDBServer] Starting ArcadeDB Server with plugins [] ... 2021-08-31 17:50:46.793 INFO [ArcadeDBServer] - JMX Metrics Started... +--------------------------------------------------------------------+ | WARNING: FIRST RUN CONFIGURATION | +--------------------------------------------------------------------+ | This is the first time the server is running. Please type a | | password of your choice for the 'root' user or leave it blank | | to auto-generate it. | | | | To avoid this message set the environment variable or JVM | | setting `arcadedb.server.rootPassword` to the root password to use.| +--------------------------------------------------------------------+ Root password [BLANK=auto generate it]: *
$ bin/console.sh
ArcadeDB Console v.22.1.3 - Copyrights (c) 2021 Arcade Data (https://arcadedata.com)
>
For more information check out ArcadeDB Server.
<dependency>
<groupId>com.arcadedb</groupId>
<artifactId>arcadedb-engine</artifactId>
<version>22.1.3</version>
</dependency>
If you're using a snapshot, make sure to add the snapshot repository in your pom.xml file:
<repositories>
<repository>
<id>github</id>
<name>Sonatype OSS</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
(2) Create the database "Heroes" with a basic schema and a graph of 2 people connected:
try( Database db = new DatabaseFactory( "Heroes" ).create() ) {
db.transaction( (tx) -> {
db.getSchema().createVertexType("Hero");
db.getSchema().createEdgeType("IsFriendOf");
Vertex jay = database.newVertex("Hero").set("firstName", "Jay").set("lastName", "Miner").save();
Vertex elon = database.newVertex("Person").set("firstName", "Elon").set("lastName", "Musk").save();
jay.newEdge("IsFriendOf", elon, true).set("since", "1990").save();
});
}
(3) Query all the people connected to Elon Musk by using OpenCypher:
Resultset result = db.query("cypher", "MATCH {class: Hero, where: (firstName = 'Elon' AND lastName = 'Musk')}
.both('IsFriendOf') {as: friend}
RETURN friend" );
while( result.hasNext(); ) {
result.next().getProperty()
}
For more information check out ArcadeDB Java API.
ArcadeDB is FREE for any usage (Apache 2 License), no strings attached. If you like ArcadeDB, you can actively contribute or you can sponsor the project as an individual or as a company. Check under GitHub Sponsor to see the available tiers. The contributions through GitHub will be shared with the active committers creating a totally new sustainable model for Open Source projects. Check out the ArcadeDB project on GitHub, download the latest release for FREE.