TypeDB 2.10.0 Released!

Install & Run: Install and Run TypeDB | Vaticle

New Features

Reasoner Reactive Computation Graph

With this new version of our reasoning framework, we achieve new level of reasoning correctness that entirely stems from architectural clarity, powerful abstractions and a model which naturally handles rule cycles. Prior to this release, bug-fixing our actor-based reasoning engine to correctness has always been a tremendously difficult challenge. We needed better abstraction models in the actor messaging system, as well as a system that handles user-defined rule cycles without introducing inordinate complexity.

The main goal has been to create a flexible, well-modelled computation framework for generic reasoning operations. As a result we completely rewrite the computation structure of the reasoning engine, introducing a reactive and dynamic computation graph built on an actor model.

Abstract Computation Graph: We compose each reasoning operation as a node in a computation graph. Subgraphs of nodes are executed on a single actor. Very few basic operations (think map, flatmap, filter, distinct) are needed to implement the full reasoning engine when they are composed as a computation graph. By implementing these we fulfil our need for an abstraction that handles message-passing for reasoning operations.

Dynamic Graph: Users stream back answers to their queries, and as such reasoning must be lazy. Therefore the computation graph has also been built to grow dynamically as the solution space is explored.

Reactive Streams: The computation graph loosely implements reactive streams. The system reacts to the user’s demand for answers lazily, and propagates this demand upstream through the graph, with the demand branching as it goes. When a partial answer is found, the demand is fulfilled and the answer is returned upstream.

Terminating rule cycles: Correctly terminating rule cycles has thus far been the hardest challenge, which we now circumvent. We do this with a twofold mechanism:

  • Firstly, the demand propagated by the reactive streams can propagate through cycles, hence we have the guarantee that even under complex rule cycles, all answers will be found.
  • Secondly, once all answers are found, the reactive computation graph has no awareness of when all work is done. Determining completion in the presence of reasoning cycles is a hard task, made much easier with the introduction of a specific monitoring component. Computations report their activity to this monitor, which determines when there is still ongoing work in the graph or whether reasoning can terminate.

The reactive computation graph, which sits atop an actor model, is a powerful and extensive abstraction layer. This novel reasoning architecture enables correct reasoning in the presence of arbitrarily complex (including nested) cycles, with speed that scales in the processing resources available (thanks to an underlying actor model) and extensibility thanks to the abstraction of reasoning operations. As a direct result we see improved performance across the board on micro-benchmarks of reasoning queries, with a reduction in query time of 30% or more.

  • Define BDD test steps for extended Type Concept API

We define the functions corresponding to the BDD test steps introduced for the extended Type Concept API.

Bugs Fixed

  • Synchronize session timeout setter

TypeDB randomly shuts down sessions due to session timeouts, even under incorrect conditions. Via empirical testing this problem appears to be caused by a race condition between the setters/resetters of the idle timeout, which we make safer by synchronizing the starting of the idle timeout.

Code Refactors

Other Improvements

  • remove console from dependency validation

  • Bump VERSION to 2.10.0 and update console and protocol versions

  • Bump @vaticle_typedb_protocol

  • Revert the syntax placement of ‘abstract’ type constraint

  • Split getSyntax() and getSyntaxRecursive() for ThingType

  • Cleanup code implementation of RelationType getSyntax()

  • Cleanup code implementation of ThingType getSyntax()

  • Refine method and argument names for ThingType syntax()

  • Rename ThingType ‘export’ to ‘syntax’ and add to RPC TypeService

  • Formatting

  • Fix infinite recursion during type export

  • Dissolve TypeExporter and move its logic into the appropriate type classes

  • Add console artifact to //:release-validate-deps

Download TypeDB 2.10.0 here: Release TypeDB 2.10.0 · vaticle/typedb · GitHub

Happy reasoning!

1 Like