Skip to content

Rust GraphQL Client#2474

Merged
fabubaker merged 34 commits intodb_v4from
db_v4_rust_graphql_client
Feb 18, 2026
Merged

Rust GraphQL Client#2474
fabubaker merged 34 commits intodb_v4from
db_v4_rust_graphql_client

Conversation

@arienandalibi
Copy link
Collaborator

Adding a Rust client for managing and sending GraphQL requests to a server. Previously, the client was only available in Python as PyRaphtoryClient, along with types such as PyRemoteGraph, PyRemoteNode, etc... Now, these will also be available in Rust, which will be useful in our Rust tests.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 8ac5d5d Previous: e37b551 Ratio
lotr_graph/num_edges 4 ns/iter (± 0) 0 ns/iter (± 0) +∞
lotr_graph/num_nodes 415 ns/iter (± 4) 0 ns/iter (± 0) +∞
lotr_graph/has_node_nonexisting 4 ns/iter (± 0) 1 ns/iter (± 0) 4
lotr_graph/graph_latest 3 ns/iter (± 0) 0 ns/iter (± 0) +∞
lotr_graph_materialise/materialize 9313178 ns/iter (± 278357) 1832348 ns/iter (± 6104) 5.08
lotr_graph_window_100/num_edges 28 ns/iter (± 0) 7 ns/iter (± 0) 4
lotr_graph_window_100/num_nodes 406 ns/iter (± 1) 5 ns/iter (± 0) 81.20
lotr_graph_window_100_materialise/materialize 9626724 ns/iter (± 84772) 1970153 ns/iter (± 5637) 4.89
lotr_graph_window_10/iterate nodes 34064 ns/iter (± 106) 10352 ns/iter (± 131) 3.29
lotr_graph_window_10/iterate edges 103341 ns/iter (± 407) 41304 ns/iter (± 89) 2.50
lotr_graph_window_10/graph_latest 54411 ns/iter (± 3332) 26142 ns/iter (± 707) 2.08
lotr_graph_window_10_materialise/materialize 6389931 ns/iter (± 59793) 1119303 ns/iter (± 4903) 5.71
lotr_graph_subgraph_10pc/has_edge_existing 525 ns/iter (± 4) 96 ns/iter (± 1) 5.47
lotr_graph_subgraph_10pc/num_nodes 306 ns/iter (± 1) 14 ns/iter (± 0) 21.86
lotr_graph_subgraph_10pc/has_node_existing 232 ns/iter (± 3) 38 ns/iter (± 6) 6.11
lotr_graph_subgraph_10pc/iterate nodes 4585 ns/iter (± 10) 1501 ns/iter (± 2) 3.05
lotr_graph_subgraph_10pc_windowed/iterate nodes 4433 ns/iter (± 14) 1842 ns/iter (± 6) 2.41
lotr_graph_window_50_layered/num_edges 84935 ns/iter (± 1784) 39455 ns/iter (± 1374) 2.15
lotr_graph_window_50_layered/num_nodes 108212 ns/iter (± 8636) 22150 ns/iter (± 327) 4.89
lotr_graph_window_50_layered/has_node_existing 1360 ns/iter (± 201) 129 ns/iter (± 10) 10.54
lotr_graph_window_50_layered/max_id 118064 ns/iter (± 10665) 28242 ns/iter (± 993) 4.18
lotr_graph_window_50_layered/max_degree 1968923 ns/iter (± 19008) 322469 ns/iter (± 5341) 6.11
lotr_graph_window_50_layered/iterate nodes 245169 ns/iter (± 1463) 18575 ns/iter (± 46) 13.20
lotr_graph_window_50_layered/iterate edges 211405 ns/iter (± 835) 75737 ns/iter (± 341) 2.79
lotr_graph_window_50_layered/max_neighbour_degree 4000202 ns/iter (± 26077) 346124 ns/iter (± 700) 11.56
lotr_graph_window_50_layered/graph_latest 199492 ns/iter (± 3908) 39462 ns/iter (± 1258) 5.06
lotr_graph_window_50_layered_materialise/materialize 20584405 ns/iter (± 123850) 3777711 ns/iter (± 19665) 5.45
lotr_graph_persistent_window_50_layered/num_edges_temporal 588772 ns/iter (± 12670) 221133 ns/iter (± 3715) 2.66
lotr_graph_persistent_window_50_layered/num_nodes 140705 ns/iter (± 8991) 36187 ns/iter (± 1383) 3.89
lotr_graph_persistent_window_50_layered/has_node_existing 1910 ns/iter (± 460) 205 ns/iter (± 86) 9.32
lotr_graph_persistent_window_50_layered/max_id 154888 ns/iter (± 3690) 43873 ns/iter (± 1612) 3.53
lotr_graph_persistent_window_50_layered/max_degree 2764706 ns/iter (± 25079) 505140 ns/iter (± 13010) 5.47
lotr_graph_persistent_window_50_layered/iterate nodes 328862 ns/iter (± 2543) 39379 ns/iter (± 258) 8.35
lotr_graph_persistent_window_50_layered/iterate edges 179228 ns/iter (± 844) 82843 ns/iter (± 1888) 2.16
lotr_graph_persistent_window_50_layered/max_neighbour_degree 5149566 ns/iter (± 54484) 479411 ns/iter (± 6958) 10.74
lotr_graph_persistent_window_50_layered/graph_latest 280461 ns/iter (± 9062) 66659 ns/iter (± 1650) 4.21
lotr_graph_persistent_window_50_layered_materialise/materialize 51476308 ns/iter (± 596966) 5744783 ns/iter (± 25381) 8.96
lotr_graph/proto_decode 11955786 ns/iter (± 151868) 2048943 ns/iter (± 18695) 5.84
lotr_graph/proto_encode 9785462 ns/iter (± 136685) 985528 ns/iter (± 42593) 9.93

This comment was automatically generated by workflow using github-action-benchmark.

@fabubaker fabubaker self-requested a review February 10, 2026 20:34
Copy link
Contributor

@fabubaker fabubaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rust client is incomplete, it's missing RemoteEdge and RemoteNode structs.

Copy link
Contributor

@fabubaker fabubaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, just need to wrap underlying rust remote nodes and edges using Arc.

@fabubaker fabubaker marked this pull request as ready for review February 13, 2026 14:24
#[pyo3(signature = (t, properties=None, layer=None))]
fn add_updates(
&self,
py: Python,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're are no longer passing in the GIL into this function. I'm not very familiar with pyo3 so one of @fabianmurariu or @ljeub-pometry will have to confirm this is ok.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think execute_async_task should take care of that, once I merge pedro's PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copy pasted the execute_async_task function from pedro's PR for now

@fabubaker fabubaker changed the title DB v4 Rust GraphQL Client Rust GraphQL Client Feb 18, 2026
@fabubaker fabubaker merged commit c523ef5 into db_v4 Feb 18, 2026
19 of 20 checks passed
@fabubaker fabubaker deleted the db_v4_rust_graphql_client branch February 18, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants