Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 66c12b3

Browse files
author
Adam Mitchell
authored
Upgrade client-python to new protocol for grakn 1.7 (#88)
## What is the goal of this PR? Update client-python to the new 1.0.5 protocol with changed iteration style and local/remote concept API split. The new protocol significantly reduces the number of round trips necessary to complete queries, down to 1 in most cases, from the previous solution which required some multiple of the number of results. This should alleviate slowdown problems caused by connecting to a remote Grakn instance. Iteration now follows a streaming principle and results are pre-filled with data the user would normally be expected to retrieve via the concept API. The step to split local and remote concepts helps us move towards "value" results rather than results which need to embed the transaction they were retrieved with. The added requirement to convert these concepts back to remote concepts should also make it clear to the user which methods require additional RPCs (where it wasn't clear beforehand that ALL methods required additional RPCs). ## What are the changes implemented in this PR? * Implement local and remote concepts. * Use local concept for conceptmap answers. * Implement new iteration for queries, get_attributes_by_value and all iterating concept methods
1 parent 7488655 commit 66c12b3

File tree

12 files changed

+908
-696
lines changed

12 files changed

+908
-696
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
bazel-*
44
__pycache__
55
**.pyc
6+
venv

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.1
1+
1.7.0

WORKSPACE

+6-5
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,22 @@ com_github_grpc_grpc_deps()
9191
# Load Grakn Core dependencies #
9292
################################
9393

94+
9495
load("@graknlabs_grakn_core//dependencies/graknlabs:dependencies.bzl",
95-
"graknlabs_graql", "graknlabs_common", "graknlabs_client_java", "graknlabs_console", "graknlabs_benchmark")
96+
"graknlabs_graql", "graknlabs_common", "graknlabs_client_java", "graknlabs_console", "graknlabs_grabl_tracing")
9697
graknlabs_graql()
9798
graknlabs_common()
9899
graknlabs_client_java()
99100
graknlabs_console()
100-
graknlabs_benchmark()
101+
graknlabs_grabl_tracing()
101102

102103
load("@graknlabs_grakn_core//dependencies/maven:dependencies.bzl",
103104
graknlabs_grakn_core_maven_dependencies = "maven_dependencies")
104105
graknlabs_grakn_core_maven_dependencies()
105106

106-
load("@graknlabs_benchmark//dependencies/maven:dependencies.bzl",
107-
graknlabs_benchmark_maven_dependencies = "maven_dependencies")
108-
graknlabs_benchmark_maven_dependencies()
107+
load("@graknlabs_grabl_tracing//dependencies/maven:dependencies.bzl",
108+
graknlabs_grabl_tracing_maven_dependencies = "maven_dependencies")
109+
graknlabs_grabl_tracing_maven_dependencies()
109110

110111
# Load Graql dependencies for Grakn Core
111112

dependencies/graknlabs/dependencies.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def graknlabs_grakn_core():
2828
git_repository(
2929
name = "graknlabs_grakn_core",
3030
remote = "https://github.com/graknlabs/grakn",
31-
tag = "1.6.2" # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_grakn_core
31+
commit = "fda48ff1557e674b061c2df135fe04634110c42f" # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_grakn_core
3232
)
3333

3434
def graknlabs_protocol():
3535
git_repository(
3636
name = "graknlabs_protocol",
3737
remote = "https://github.com/graknlabs/protocol",
38-
tag = "1.0.4" # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_protocol
38+
commit = "e608f85401fc3eee3f6fe631748378246eaacc55" # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_protocol
3939
)

0 commit comments

Comments
 (0)