Skip to content

Grakn Core 1.3.0

Compare
Choose a tag to compare
@lolski lolski released this 07 Aug 18:10
· 3634 commits to master since this release

Grakn Core 1.3 has been unleashed!

Finally, the long-awaited 1.3 release has arrived! Kudos to our Grakn team (kuple-kuple!), and thank you to everyone in our community for helping us improve Grakn every day!

There is an incredible amount of work that has gone into this PR. So much so, that it has taught us the lesson to make much smaller releases and to do so more frequently. Below is the list of changes in this release. We’ve got quite exciting news to share, we hope you enjoy reading about it and we look forward to seeing you upgrade to it!

New Language Drivers

The changes and improvements in this category are actually very extensive for each component, but we'll keep the summary at a high level because the modules have either been heavily re-written or are completely new. And, all Grakn Client Drivers are released under the Apache 2 license!

  1. New client driver protocol (client-protocol): we now provide access to Grakn via a GRPC (Google’s Remote Procedure Call) framework, which allows us to provide Grakn drivers directly in more native languages! Please reach out to us if you’d like to collaborate on writing a Grakn driver in a new programming language!
  2. New Java client driver (client-java): we’ve upgraded our Java client driver to implement the latest GRPC protocol and fully support all Graql queries in a Java client.
  3. New NodeJS client driver (client-nodejs): we’ve upgraded our NodeJS client driver to implement the latest GRPC protocol and fully support all Graql queries in a NodeJS client.
  4. New Python client Driver (client-python): we’ve upgraded our Python client driver to implement the new GRPC protocol and fully support all Graql queries in a Python client.

Engine

(This module will soon be renamed to "Server".)

  1. New RPC Server, implemented using GRPC (Google’s Remote Procedure Call) framework - it's all about performance and control! So far, we've implemented 2 "services" for any Graql driver (in any language) to interact with Grakn remotely:

    • Session Service: provides the full API of Grakn Transactions. This includes the Graql query API, as well as the all of the methods in the Concept API.
    • Keyspace Service: provides Keyspace management functionalities - create, retrieve, and delete. Only retrieve and delete have been implemented in this release - create will follow soon.
  2. Improved boot-up process:

    • No longer fails to start because it could not find the PID.
    • Properly exits with code 1 on failure.
    • Boots up even when located on a path which has whitespaces.
    • Terminates immediately when there is a bootup failure.
    • Outputs stderr into the log file whenever an error occurs.
    • The grakn-bootup module has been removed, and the codebase merged into grakn-engine.

Graql: usability and performance

The following are the medium to large changes and improvements in this release. There have been a lot of smaller improvements and bug fixes that may not be included in this list.

  1. Refinement of the Graql compute queries

    We have an improved Graql compute query grammar (Graql.g4:23-75) that produces a more generic and expressive language for analytics, whilst making it simpler to use. The new Graql compute query now has the following behaviour:

    • A simple structure of: compute <method> <conditions>? ;
    • Uses commas (,) properly instead of semicolons (;), and
    • Uses square brackets ([ and ]) to provide a list of arguments.
    • Improved error messages for Graql compute queries.

    Thus, analytics queries will look like: compute cluster in [person, marriage], using connected-component, where [start = "V123"];

  2. Refinement of the Graql compute path query

    Graql compute path (that returns one shortest path) and compute paths (that returns all shortest paths) are now merged into just compute path that returns all shortest paths. This change is also followed by:

    • Improved performance by streaming the results of compute path (which is a list of paths), both on server-side and client-side queries.
  3. Graql reasoning

    • Improved performance by considering rule resolvability and query atomicity when planning resolution.
    • Improved performance for queries with missing type labels.
    • Added transaction-level rule cache to improve performance with large rule bases.
    • Added extra rule pruning step to improve performance with large rule bases.
    • Improved query planning to guarantee production of complete plans.
    • Improved validation of resolution plans.
    • Corrected behaviour of isa! patterns.
    • Optimised propagation of partial substitutions within queries with neq predicates.
    • Fixed query cache inconsistencies involving disconnected id predicates and surplus variable mappings.
    • Corrected behaviour of rules that attach a role player to an existing and/or new relations.
    • Improved correctness of atom decomposition for conjunctions.
    • Removed the materialise option for inferred answers as it unnecessarily cluttered the code, and the functionality can be accomplished straight-forwardly with the current API.
    • Improved resolution logging to be more meaningful.
  4. Disambiguation of equality comparison operators

    • $x = $y requires $x and $y to be the same concept
    • $x != $y requires $x and $y to be different concepts
    • $x == $y requires $x and $y to have the same value
    • $x !== $y requires $x and $y to have different values
    • As a result, the val keyword became redundant, thus it has been removed.
  5. Concept API

    • A lot of method renaming to be simpler, and more aligned with Graql terminology.
    • Lightened the dependencies by removing TinkerPop.
  6. Unification of Graql Query Answers

    • All Graql queries now return a List of Answers, where Answer could be one of 6 types of common data structures: Value, ConceptMap, ConceptList, ConceptSet, ConceptSetMeasure, and AnswerGroup. This includes queries that previously returned a single or void value, such as delete and aggregate queries.
    • Given the above change, all Graql queries are now streamable.
    • A delete query now returns the list of ConceptIds that it has deleted.
    • Several aggregate queries are removed because they do not fit with any data structure, and do not deliver a strong and unique use case: ask, select, and as aggregate. They have plenty of workarounds too.
  7. Graql correctness and reliability

    • Graql queries that perform match over both instance and schema concepts now work correctly.
    • Graql queries of the form match(...).get(var("x")) (single var) no longer crash on remote client-java.
    • Improved various error message and exception handling.
    • Upgraded TinkerPop to 3.2.9 and removed the dependency on our custom TinkerPop 3.2.5-grakn-snapshot.
    • Fixed delete queries to work remotely, and with an arbitrary number of given variables.
    • match-insert queries now execute inserts before streaming results.
    • Improved exception logging for execution of remote Graql queries via GRPC.
    • match-get queries containing a relationship with roleplayers that share a role no longer break on remote client-java.
    • Graql aggregate count queries now take in a variable in which it computes count on a distinct set of results.
    • Graql aggregate and compute queries that perform a numerical computation no longer return a just a value. Instead, they return a list containing the value. Therefore, when there are no instances of the aggregated attribute type, we no longer return a null value, but rather an empty list. I.e. match $x isa person, has age $y; aggregate min $y; will return an empty list {}, rather than 0, if there are no instances of an age connected to a person in the graph.

Visualisation Dashboard

There hasn't been a lot of work going into Grakn Visualisation Dashboard. That's because we're putting all our effort on getting Grakn Workbase together - and it will be released very soon!

  1. Added a command option to the main menu to display a window that lists all possible commands/shortcuts.

  2. Added a button in the node settings panel to reset attribute labels of a concept.

  3. Added a relationship settings to allow users to configure whether to autoload role players and also to limit them.

Continuous Integration

This may be more important/relevant to the Grakn developers than Grakn users right now, but as we prepare our codebase to be contributor-friendly, cleaning up our Continuous Integration framework is one of the first important steps.

  1. All Grakn tests are now tested on CircleCI, which can be found at: circleci.com/gh/graknlabs.

  2. More bootup, distribution and release integration tests have been added.

  3. Notifications of GitHub Pull Requests and CI test run status can also be found in #github channel of the Grakn Community Slack (you can join here if you haven't: grakn.ai/slack).