Released ArcadeDB 21.10.1

Much faster Gremlin and Cypher Queries, Extended Server Security and SQL commands for backup, import and export database

·

4 min read

October 5th, 2021

Hi all, We're happy to announce the latest release for ArcadeDB. We fixed many issues and we released 3 major improvements.

(1) Speedup of Gremlin and Cypher queries

We were able to speed up Gremlin and Cypher by a lot. Now Cypher and Gremlin queries are optimized to use the underlying index if are defined. Look at these examples tested on the Movies database imported from Neo4j.

To run the latest version of ArcadeDB with Neo4j's Movies database, execute this:

$ docker run --rm -p 2480:2480 -p 2424:2424 --env arcadedb.server.rootPassword=playwithdata --env "arcadedb.server.defaultDatabases=Movies[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/neo4j/movies.graphml.tgz}" arcadedata/arcadedb:latest


 █████╗ ██████╗  ██████╗ █████╗ ██████╗ ███████╗██████╗ ██████╗
██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗
███████║██████╔╝██║     ███████║██║  ██║█████╗  ██║  ██║██████╔╝
██╔══██║██╔══██╗██║     ██╔══██║██║  ██║██╔══╝  ██║  ██║██╔══██╗
██║  ██║██║  ██║╚██████╗██║  ██║██████╔╝███████╗██████╔╝██████╔╝
╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚═════╝ ╚══════╝╚═════╝ ╚═════╝
PLAY WITH DATA                                    arcadedb.com

ArcadeDB Server v21.10.1-SNAPSHOT is starting up...
Starting ArcadeDB Server with plugins [] ...
- JMX Metrics Started...
Creating root user with the provided password
Creating default database 'Movies'...
Analyzing url: https://github.com/ArcadeData/arcadedb-datasets/raw/main/neo4j/movies.graphml.tgz...
Recognized format graphml (parsingLimitBytes=9.54MB parsingLimitEntries=0)
Checking schema...- Status update: parsed 0 (0/sec) - 0 documents (0/sec) - 0 vertices (0/sec) - 0 edges (0/sec) - 0 skipped edges - 0 linked edges (0/sec - 0%)
- Starting HTTP Server (host=0.0.0.0 port=2480)...
- HTTP Server started (host=0.0.0.0 port=2480)
Available query languages: [mongo, gremlin, cypher, sql]
ArcadeDB Server started (CPUs=4 MAXRAM=2.00GB)
Studio web tool available at http://localhost:2480

You can now play with both Gremlin and Cypher. Try this Gremlin query to retrieve the movie with the name "The Matrix" (you can switch languages in Studio, it's right at the left of the command text area):

g.V().hasLabel('Movie').has( 'title', 'The Matrix' )

In ArcadeDB v21.10.1 this query uses the indexes previously configured. The default database downloaded has no indexes, so let's create one on the property "title" of the Vertex type "Movie" by using SQL this time. In order to create an index you have to define the property first. In our case Movie.title is a string:

create property Movie.title String
create index `Movie[title]` on Movie (title) UNIQUE

From now on, the query above will be much faster (especially with large datasets) because it will lookup up in the index to retrieve the result. Now try this, by selecting "Cypher" as language:

match (m:Movie {title: 'The Da Vinci Code'})<-[r:REVIEWED]-(p)
where r.rating > 4
return r,p

image.png

(2) Enhanced Server Security

This is a major upgrade in terms of functionalities. Before v21.10.1, the server security allowed only to specify user/password and which database the user can access.

Starting from v21.10.1, users can be associated with groups. Groups specify the kind of access to the database types. For example, a group "Reader" could access the Blogs type in read-only mode, but the group "Editor" can have full access to it.

image.png

Both users and groups are saved as files under the config directory of the database:

  • server-users.jsonl (jsonl = one json per line)
  • server-groups.json

Example of the definition of the group for a Blog writer, where he can only read from the "Blog" type and have full access to the "Post" type:

{
  "types": {
    "*": {
      "access": []
    },
    "Blog": {
      "access": [
        "readRecord"
      ]
    },
    "Post": {
      "access": [
        "createRecord",
        "readRecord",
        "updateRecord",
        "deleteRecord"
      ]
    }
  }
}

You can also specify the query timeout per group and the limit of resultsets. This allows having users that won't impact the database performance too much. Last but not least you can assign the updateSecurity and updateSchema permissions to respectively modify the security (create, update and delete users and groups) and the schema (create, update and delete types, buckets, and indexes).

Now the root user that is created during the first run of the server belongs to the admin group that has full control over the entire database. For more information check out the documentation on Security.

(3) SQL support for Backup, Import and Export operations

We removed from the distribution the scripts backup.sh, importer.sh and exporter.sh. Now you can execute the three commands above by just executing a SQL command from Studio, Console or API. Look at the syntax:

Also, EXPORT and IMPORT DATABASE commands now support the popular GraphML format. This means you can export the database from AWS Neptune and Microsoft CosmosDB and import them into ArcadeDB with one command.


For more information, look at the Milestone 21.10.1 on GitHub.

Have fun with data, The ArcadeDB Team