redis-async-rs
A Rust client for Redis, using Tokio (by benashford)
async-tungstenite
Async binding for Tungstenite, the Lightweight stream-based WebSocket implementation (by sdroege)
redis-async-rs | async-tungstenite | |
---|---|---|
1 | 1 | |
248 | 382 | |
- | - | |
5.8 | 6.9 | |
about 1 month ago | about 1 month ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
redis-async-rs
Posts with mentions or reviews of redis-async-rs.
We have used some of these posts to build our list of alternatives
and similar projects.
-
How should I do token-based authentication with Rocket?
My strategy for simple web apps is to create a random string as a session cookie. Then, you store this string in redis, or a similar key-value database, as a key mapped to the user's id. I think this is the best redis client for Rust: https://github.com/benashford/redis-async-rs, at least if you use tokio. By keeping the session state in redis, you have a simple, scalable server application out of the box.
async-tungstenite
Posts with mentions or reviews of async-tungstenite.
We have used some of these posts to build our list of alternatives
and similar projects.
-
generic purpose library in rust
You can also mix them a bit. The library tungstenite is implemented like this, and allows async-tungstenite to reuse the same logic but in a non-blocking manner. You have the API of the second option, but if a write call returns WouldBlock, you return to the caller and allow them to continue when the buffer is flushed. This can get complicated saving state though (e.g. whether it's currently doing authentication, uploading a file, etc.), but see my note below about Rust's async/await.