1 unstable release
new 0.5.0 | Feb 18, 2025 |
---|
#16 in #knowledge
585KB
15K
SLoC
Client to connect to an Orchestra system, or any Avial-complient knowledge host.
Orchestra is an opinionated distribution of AvesTerra which comes with a lot of extra convenience.
Orchestra allows for the orchestration of knowledge in a distributed hypergraph
Orchestra documentation con be found at https://docs.ledr.io/
Provide both async and blocking clients.
Current status
Supports the 25-02 build taxonomy and most of the constructs from AvesTerra, Avial and Orchestra.
Some lesser used constructs that appeared in 24-01 and after are still missing.
It is considered ready for production, as most features are implemented and robust.
Async or blocking client
Both an async and blocking client are provided.
Only tokio is currently supported as async runtime, but it would be possible to support more in the future.
The blocking client uses the async client under the hood. It also allows the user to run async block of code by giving it a reference to the underlying async client.
It is recommanded to use the blocking client for convenience, and then use async whenever the extra performance boost is needed. There are examples of using both type of clients in the examples directory.
The blocking implementation was inspired by reqwest/blocking:
The blocking Client will block the current thread to execute, instead of returning futures that need to be executed on a runtime. Conversely, the functionality in reqwest::blocking must not be executed within an async runtime, or it will panic when attempting to block. If calling directly from an async function, consider using an async reqwest::Client instead. If the immediate context is only synchronous, but a transitive caller is async, consider changing that caller to use
tokio::task::spawn_blocking
around the calls that need to block.
That design decision gives a lot of convenience, but also means that a Tokio runtime is used even when the blocking client is used.
The tradeoff should however be fine, since users wanting to use the blocking client already decide to reduce complexity at the cost of some performance.
TODO:
- Make avial wrappers such as find return an Option
Dependencies
~9–16MB
~213K SLoC