common/service

This commit is contained in:
hinto.janai 2024-09-04 16:26:04 -04:00
parent 7ae2e5e5b4
commit 88f5869fbd
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 12 additions and 2 deletions

View file

@ -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).

View file

@ -1 +0,0 @@
# 🟢 Thread model