# Gatio _(**G**rouped **A**sync **T**ask **I**/**O**)_
**No releases yet, this is placeholder crate. _(in active development)_**
Async task runtime for [Rust](https://rust-lang.org/) that is optimized for [io_uring(7)](https://man7.org/linux/man-pages/man7/io_uring.7.html).
**_Linux only_**, now and in the future.
# Core idea
Gatio runtime is build upon the core idea that
program is split upon seperate *Thread Pool Contexts (`TPC`)*
based on the number of NUMA-nodes in that computer.
_(For most computers this is will account to just one `TPC`)_
Each `TPC` owns it's own heap memory and CPU-core range.
Work inside `TPC`s happens inside `GatioDriver`s.
One CPU-core will be mapped to one `GatioDriver` which will run on a single OS-thread.
With _"driver-per-core"_ manner.
A driver can either be responsible for only `I/O` processing, task execution or both _(with hyper-threading)_.
The drivers used may vary between `TPC`'s and single `TPC` can support multiple different `GatioDriver` types.
Asyncronous code execution will be given to `GatioDriver` that has functionality to schedule tasks.
This can be done either directly to the driver or by using the `TPC` to select the best driver for the task depending
on the current workload on the drivers or other parameters. _(priority, cpu-cache optimized, etc.)_
# Serverside Networking _(or other kinds of static I/O interruptions.)_
_(Relatively simple, but very different from the standard way of doing serverside networking, please view examples.)_
Networking is internally handled by creating multishot *submission queue entries (`SQE`s)* within [io_uring(7)](https://man7.org/linux/man-pages/man7/io_uring.7.html).
That are then processed by `gatio-net` according on the supported transport protocols per port.
Gatio ensures that every driver handling a given port uses an identical configuration at startup.
This enforcement still allows different transport protocols, such as UDP and TCP,
to be separated onto seperate dedicated drivers.