Commit 3cf211a6 authored by Kaiden Fey's avatar Kaiden Fey

rpc-layer: adding documentation outlines for the feature scope

parent 04734f57
......@@ -346,6 +346,12 @@ dependencies = [
"loom",
]
[[package]]
name = "capnp"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "739fa606458e49df64116a3cda1bf711ada360ce714357674d0950ed2132a6a1"
[[package]]
name = "cc"
version = "1.0.55"
......@@ -1869,6 +1875,10 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
[[package]]
name = "rpc-broker"
version = "0.1.0"
dependencies = [
"capnp",
"qrpc-sdk",
]
[[package]]
name = "rubato"
......
......@@ -5,23 +5,27 @@
- [Social](./social/_intro.md)
- [Contributions](./social/contributions.md)
- [Code of Conduct](./social/code-of-conduct.md)
- [Building this manual](./manuals/_intro.md)
- [Manuals & websites](./manuals/_intro.md)
- [Technical](./technical/index.md)
- [qaul.net Services](./technical/services.md)
- [Overview of Crates](./technical/crates.md)
- [libqaul](./technical/libqaul/index.md)
- [libqaul Internals](./technical/libqaul/internals.md)
- [Service API](./technical/libqaul/api.md)
- [libqaul IPC Interfaces](./technical/libqaul/ipc/index.md)
- [socket-ipc](./technical/libqaul/ipc/socket.md)
- [android-ipc](./technical/libqaul/ipc/android.md)
- [Ratman](./technical/ratman/index.md)
- [Ratman API](./technical/ratman/api.md)
- [Netmod](./technical/ratman/netmod.md)
- [Ratman Internals](./technical/ratman/internals/index.md)
- [Routing](./technical/ratman/internals/routing.md)
- [Journal](./technical/ratman/internals/journal.md)
- [Development Interfaces](./technical/api/_intro.md)
- [RPC layer](./technical/rpc-layer/index.md)
- [qrpc-sdk](./technical/rpc-layer/sdk.md)
<!-- - [Overview of Crates](./technical/crates.md) -->
<!-- - [libqaul](./technical/libqaul/index.md) -->
<!-- - [libqaul Internals](./technical/libqaul/internals.md) -->
<!-- - [Service API](./technical/libqaul/api.md) -->
<!-- - [libqaul IPC Interfaces](./technical/libqaul/ipc/index.md) -->
<!-- - [socket-ipc](./technical/libqaul/ipc/socket.md) -->
<!-- - [android-ipc](./technical/libqaul/ipc/android.md) -->
<!-- - [Ratman](./technical/ratman/index.md) -->
<!-- - [Ratman API](./technical/ratman/api.md) -->
<!-- - [Netmod](./technical/ratman/netmod.md) -->
<!-- - [Ratman Internals](./technical/ratman/internals/index.md) -->
<!-- - [Routing](./technical/ratman/internals/routing.md) -->
<!-- - [Journal](./technical/ratman/internals/journal.md) -->
<!-- - [Development Interfaces](./technical/api/_intro.md) -->
- [Testing](./test/index.md)
- [linux-http-test](./test/linux-http-test.md)
- [Translations](./translations/_intro.md)
......
# qaul.net rpc-layer
Because qaul.net aims to be an extensible architecture, the core of
how services (apps) interact with each other is an RPC (remote
procedure call) layer. This means that each service could be running
in a different process, and communicate with the core (the rpc-broker,
and libqaul instance) via sockets.
In actuality the main qaul.net services are all bundled into a single
binary (`qaul-hubd`) that communicate in memory to be more efficient.
But this doesn't have to be the case for others.
This page outlines some of the core concepts of the RPC layer, while
sub-pages go into more technical details, if you are interested in
working on a new feature for the RPC system.
## Registering a service
The rpc-broker keeps track of services that have registered themselves
on the system, and the capabilities they provide.
......@@ -6,3 +6,4 @@ authors = ["Kaiden Fey <kookie@spacekookie.de>"]
edition = "2018"
[dependencies]
capnp = "*"
\ No newline at end of file
......@@ -17,3 +17,8 @@ functions, and type serialisation data.
Your app UI Deserialise types
```
You can find more information about this layer in the [contributors
guide][guide].
[guide]: https://docs.qaul.net/contributors/technical
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
//! # qaul rpc sdk
//!
//! This library provides the basic capabilities of interacting with a
//! qrpc-broker, and other qaul services. These docs outline API
//! usage and concrete types. For an overview of concepts, consult
//! the [contributors manual][manual]
//!
//! [manual]: https://docs.qaul.net/contributors/technical/rpc-layer
//!
//! ## Using this sdk
//!
//! In order to interact with a running qrpc-broker instance your
//! service needs to register itself and it's capabilities. This
//! mechanism is handled by this sdk.
//!
//! If you want other third-party services to be able to depend on you
//! service you may want to split it into two parts: one part contains
//! the service logic, the other type and RPC interface information.
//! This way a third-party service can include your services' type
//! library (usually called `<service name>-rpc`), and gain access to
//! all public RPC functions.
[package]
name = "rpc-broker"
description = "Provide a generic RPC server to connect qaul services together"
version = "0.1.0"
authors = ["Kaiden Fey <kookie@spacekookie.de>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
qrpc-sdk = { path = "../qrpc-sdk" }
capnp = "*"
\ No newline at end of file
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
//! # qaul rpc-broker
//!
//! An extensible rpc message broker for the libqaul ecosystem.
/// Hold the main broker state
pub struct Broker {
}
/*
Stuff I need
service -> service
service -> libqaul
libqaul -> service (reply, push/ subscription)
Each service has two parts: service core, and service client lib
service client lib:
- no logic
- defines the API and types with capn proto
service core:
- all the logic
- no types
- connects to the broker to advertise it's capabilities
Service advertisement
- name
- hash id
- capabilities
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment