Skip to content

Releases: typedb/typedb-driver

Grakn Client Java 2.0.0-alpha

03 Jan 17:40
Compare
Choose a tag to compare

Documentation: http://dev.docs.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>2.0.0-alpha</version>
    </dependency>
</dependencies>

New Client-Server Protocol: a Reactive Stream

With the server performance scaled, we need to ensure the client-server communication was not a bottleneck. We want the client application to leverage the server's asynchronous parallel computation to receive as many answers as possible, as soon as they are ready. However, we don't want the client application to be overwhelmed with server responses. So, we needed some form of "back-pressure". However, to maintain maximum throughput, everything had to be non-blocking. Sounds familiar? Well, it's the "reactive stream" problem.

We took inspiration from Java Flow and Akka Stream, and built our own reactive stream over GRPC, as lightweight as possible, with our unique optimisations. When an application sends a query from the client to the server, a (configurable) batch of asynchronously computed answers will immediately be streamed from the server to the client. This reduces network roundtrips and increases throughput. Once the first batch is consumed, the client will request another batch. We remove waiting time between the first and second batch, by predicting that duration and streaming back surplus answers for a period of that duration, at the end of every batch. This allows us to maintain a continuous stream of answers at maximum throughput, without overflowing the application.

We then hit the max limit of responses GRPC can send per second. So the last trick was to bundle multiple query answers into a single server RPC "response". The impact on query response time was negligible, but it dramatically increased answer throughput again.

The new client architecture and Protobuf definitions are also hugely simplified to ease the developers' effort to build their own client libraries.

Please refer to full release notes of Grakn 2.0.0-alpha to see the changes in Grakn 2.0.0.

Grakn Client Java 1.8.3

07 Sep 10:26
e743601
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

Bugs Fixed

  • Implement missing race condition fix from master.
    We patched a race condition that caused transactions to hang during closing a while ago but the patch was never released and only exists in master. During debugging of a new issue, we rediscovered the same problem, but are now more sure about the nature of the bug and a more correct fix. However, we are also certain that the original fix has proven itself to be stable, so in the interest of keeping master the same as the latest release, we are going to release the original fix as 1.8.3.

Grakn Client Java 1.8.2

10 Aug 19:02
45e7041
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

New Features

Bugs Fixed

Code Refactors

  • Prepare for 1.8.2 Release.
    Prepare for 1.8.2 release. Bump VERSION and dependencies to tags.

  • Migrate Client Tests From Core.
    We migrate one test and implement BDD steps required for typedb/typedb-behaviour#88 which migrated client-java tests from core to BDD as well.

  • Collapse all behavour and integration tests into one CircleCI job.
    In order to save up on CircleCI jobs and increase parallelization (given all jobs are ran remotely anyway), we're collapsing all test-behaviour-* and test-integration-* into one

  • Cleanup WORKSPACE file from extraneous load statements.
    In order for keeping codebase clean and maintainable, extraneous dependencies should not be present WORKSPACE

Other Improvements

  • Override all netty deps to 4.1.38.Final.
    Since introducing a centralised dependencies repository, we ended up with clashing netty versions (4.1.50.Final and 4.1.38.Final) being used -- one was explicitly declared, and another was pulled in indirectly from gRPC. This was flagged by the test-deployment-maven test: https://circleci.com/gh/graknlabs/client-java/5552?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link.
    To resolve this, we now override netty and indirect netty dependencies (from grabl-tracing) to be the same version 4.1.38.Final -- the same Grakn Core's override version.

  • Fix broken master due to bad grakn extract step in CI.

  • Use new artifact extract.
    Depend on the updated artifact extract rule (now executable with bazel run).

  • Move GraknSetup test infrastructure to common repo.
    We are moving the testing infrastructure out of client-java and into common so that it can be re-used by other repos.

  • Depend on grakn artifact.
    To depend on the artifact of grakn for tests instead of depending on it through source. This should cut down issues where the version of grakn core being tested against is incorrect due to dependency leakage from this repository.

  • Integrate building with BuildBuddy.
    Migrate from RBE to BuildBuddy

  • Depend on @graknlabs_dependencies.
    Client Java now uses dependencies that are declared in graknlabs_dependencies

  • Add new BDD steps for graql language tests.
    Add new BDD infrastructure.

  • Update CI image to Ubuntu 16 and bump Build Tools.

Grakn Client Java 1.8.1

18 Jun 17:31
0b356b1
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

New Features

Bugs Fixed

  • Fix infinite recursion calls.
    Fix infinite recursion calls in specific Transaction.execute() methods.

Code Refactors

Other Improvements

Grakn Client Java 1.8.0

17 Jun 18:22
ca67eae
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

New Features

  • Add full async for queries.
    Added fully async queries, which allows clients to queue up multiple queries that will run in sequence without requiring additional round-trips to receive results. This is especially useful for streaming large amounts of writes.

  • Explain query flag.
    We now give clients the option to specify whether or not the explanation cache is enabled for a given query.
    Futher, we're taking the step to use an Options object for query options (such as infer, and the new explain, and batch_size). This is exposed as a simple builder syntax to set the various options.

Bugs Fixed

  • Fix error message missing from async queries on commit.
    Fix an issue where error messages were unclear when committing a transaction with async queries that fail.

  • Fix metatypes.
    To fix the basic metatype getters on transaction and add tests to ensure they don't break again in future. This was broken because the API was confused between using metatypes and using the actual types. Here, we can switch properly to using the actual types, as they contain all the methods and are type-compatible with subs().

Code Refactors

  • Remove implicit relhas.
    Remove implicit relations and all associated functionality, reflecting the changes in the protocol as well (typedb/typedb-protocol#32)

Other Improvements

  • Downgrade gRPC 1.29.0 to 1.24.1 due to performance issue.
    We have downgraded gRPC to the previous version we had (1.24.1) due to performance issue found in 1.29.0

  • Update gRPC, netty, and other related dependencies.
    We have updated gRPC to 1.29.0. This necessitated netty and other related dependencies to be updated as well.

  • Update gRPC to 1.29.0.
    We have upgraded Grakn to use gRPC 1.29.0

  • Bump Protocol - datetime rename.
    The protocol now reflects changes in graql that use datetime instead of date. This PR updates uses the new protocol and bumps various dependencies, including verification

  • Synchronise with graknlabs master branches.
    This reverts commit d81d9b6, which removed usages of ValueType and replaced it with DataType, the old style, for a release. This gets back on track with 1.8 release of client-java by updating all the depencies to current master branches.

Grakn Client Java 1.7.3

21 May 10:10
f8f272e
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

Bugs Fixed

  • Cast meta types to Type base type so that subs is compatible.
    Fixed issue #98 where getting meta types via concept API caused a cast error. The MetaType class should be treated as a Type so that it is compatible with regular type instances. This should prevents calls like subs on the meta type from incorrectly casting their subs to a MetaType.

  • Use release version of tracing.
    Fixed a dependency issue where a snapshot version of Grabl tracing was being used rather than a release version, requiring the user to add our snapshot repo. This release version was not available at the time but the snapshot repo was already in the maven test pom, which meant the issue was not noticed when the snapshot version was used.

  • Fix static tracing not working for async requests.
    Grabl tracing requires us to propagate the trace across threads ourselves, so the introduction of an async decoupling executor in our RPC transceiver (for the results streaming) breaks users of Grabl tracing. We have fixed this.

Other Improvements

  • Use release version of dependencies.
    Updated to the latest release of all graknlabs dependencies.

Grakn Client Java 1.7.2

29 Apr 01:49
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>1.7.2</version>
    </dependency>
</dependencies>

Bugs Fixed

A dependency, Grabl Tracing, was not released and thus depended by snapshot, and cause the Grakn Client Java not dependable through Maven. This has now been fixed.

Grakn Client Java 1.7.1

23 Apr 17:34
b6a65a6
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

New Features

  • Async iteration.
    To allow the client to begin iteration on their local stream of results before all of the results for a batch have completed being fetched.

Bugs Fixed

  • Fix attribute type parameter args.
    When we updated the concept API, we broke using type parameters to cast asAttribute() to a particular data type e.g. concept.<String>asAttribute().

Grakn Client Java 1.7.0

14 Apr 22:13
dab3431
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

New Features

  • Allow duplicate role players.
    Allowing duplicate roles to be played in a relation as of typedb/typedb#5667.
    This means now that relation.getRolePlayerMap() should return a map from Role to List<Thing> rather than Set<Thing>

  • Read rules from the explanation response proto.
    The rule that an explanation is explaining is now returned inside the explanation object. We receive this message via the gRPC and build a Rule instance for the user to access from getRule() on an explanation.
    This requires typedb/typedb-protocol#24
    and is required by typedb/typedb#5657

  • Modify sup() behavior of Types Concept API.
    We previously had the behavior that the supertype of one of the base types (Entity, Relation, Attribute) returned null. This was because going further up the chain of sup()s results in a change of the Java Class itself when going from Entity to Thing.
    To make this change, sup() now generically returns a SchemaConcept instead of a specialised type (such as an Entity always returning a Entity via sup())

Bugs Fixed

  • Close transaction on fully on commit.
    A transaction can currently be committed but still return true for isOpen(). We should have the following behavior:

    1. comitting the tx should close the tx; re-committing the tx should throw an exception
    2. closing a committed/closed tx should be idempotent and do nothing.
  • Fix nullpointer when there is a NOOP trace on the thread.
    To fix a bug when there is a NOOP trace on the thread.

Code Refactors

Other Improvements

  • Refactor GraknClient public methods and add grabl tracing.
    To add grabl tracing to GraknClient.

  • Implement insert behavior BDD tests.
    Implement steps and behaviors for Insert Graql BDD scenarios. Add BDD to CircleCI jobs.

  • Add steps for tx commit and close BDD.
    To match BDD steps for transaction close and commit, we implement corresponding steps for commit throwing and closing transactions explicitly

  • Graql Behavior Steps and Define.
    Create the framework for BDD-based definitions of the graql behavior tests. This includes creating the step definitions for testing graql queries.

  • Test transactions new.
    To implement transaction tests as defined in @graknlabs_behaviour//connection/transaction.feature.

  • Add tracing metadata to requests.
    To add grabl tracing information to the metadata in the requests so that we can continue the tracing on the Grakn server side.

  • Upgrade to Bazel 3.0.0.
    Upgrade Bazel to latest upstream version

  • Add sync-deps marker for grabl-tracing.
    Add a sync-dependencies marker for grabl-tracing.

  • Fix excessive rebuilding.
    Previously, when switching between IDE and terminal builds, build cache would be fully invalidated. due to changed $PATH which defeats the sole purpose of caching. As per suggestion in this thread, we're enabling strict environment for actions (which sets PATH alongside with other variables to minimally viable preconfigured values).

  • Undefine and Match BDD tests.
    Implement and get the Undefine and match BDD tests up and running.

  • Avoids running sync-dependencies-snapshot on user-facing repositories.
    examples and docs are user-facing repositories that should always depend on the latest stable release of client-java. For this reason, they have been removed from targets of sync-dependencies-snapshot.

  • Update LICENSE.
    In #75 we forgot to rename Grakn Labs Ltd to Grakn Labs

  • Update license year.
    Update year in Apache license and bump build-tools version

Grakn Client Java 1.6.2

17 Jan 12:08
c46c9d6
Compare
Choose a tag to compare

Documentation: http://dev.grakn.ai/docs/client-api/java

Distribution

Available through https://repo.grakn.ai

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>io.grakn.client</groupid>
        <artifactid>grakn-client</artifactid>
        <version>{version}</version>
    </dependency>
</dependencies>

New Features

Bugs Fixed

  • Upgrade gRPC to 1.16.0.
    Upgrade gRPC version to match one in @graknlabs_protocol

Code Refactors

Other Improvements

  • Update Graql and Build Tools.
    We have updated graql and build-tools. It fixes the broken build issue caused by the fact that Maven Central artefacts were no longer accessible as the URLs were all HTTP instead of HTTPS.

  • Upgrade grpc to 1.24.1.
    Update gRPC to a more recent version