mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-11 13:25:04 +00:00
common/service
This commit is contained in:
parent
7ae2e5e5b4
commit
88f5869fbd
2 changed files with 12 additions and 2 deletions
|
@ -1 +1,12 @@
|
||||||
# 🟢 tower::Service
|
# tower::Service
|
||||||
|
Both [`cuprate_blockchain`](https://doc.cuprate.org/cuprate_blockchain)
|
||||||
|
and [`cuprate_txpool`](https://doc.cuprate.org/cuprate_txpool) provide
|
||||||
|
[`tower::Service`](https://docs.rs/tower)s that define how other outside
|
||||||
|
Cuprate crates access the database.
|
||||||
|
|
||||||
|
There are 2 `tower::Service`s:
|
||||||
|
1. A read service which is backed by a [`rayon::ThreadPool`](https://docs.rs/rayon)
|
||||||
|
1. A write service which spawns a single thread to handle write requests
|
||||||
|
|
||||||
|
As this behavior is the same across all users of [`cuprate_database`](https://doc.cuprate.org/cuprate_database),
|
||||||
|
it is extracted into its own crate: [`cuprate_database_service`](https://doc.cuprate.org/cuprate_database_service).
|
|
@ -1 +0,0 @@
|
||||||
# 🟢 Thread model
|
|
Loading…
Reference in a new issue