Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, Perseus doesn't do
async
well at all. There are some blocking I/O operations deep in the core, and any libraries that people want to pull into their builders that require a full runtime like Tokio will not work at all, because everything comes down to afutures::executor::block_on
at present.This PR solves that issue by bringing in Tokio at the top level and making all core operations (particularly in the stores and translations manager systems) fully asynchronous. This should allow using more complex libraries and code in builder functions, and should also enable potentially large performance gains for apps that build many pages from a single template (as that is now all done in parallel). Additionally, this makes the Perseus server far more resilient and logical.
Astoundingly, none of this actually constitutes a breaking change, though plugin developers will have to ensure that their systems are
Send
able (which shouldn't pose a problem for most, and there's only one publicly available plugin in existence at present).