Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for redis in 0.5.0 #1471

Closed
rmeissner opened this issue Nov 8, 2020 · 3 comments
Closed

Support for redis in 0.5.0 #1471

rmeissner opened this issue Nov 8, 2020 · 3 comments
Labels
enhancement A minor feature request request Request for new functionality

Comments

@rmeissner
Copy link

rmeissner commented Nov 8, 2020

Questions

Hey, I have a question related to 0.5.0. Looking at commit 949b01c I see that redis support was removed and there is no issue in the milestone for 0.5.0 to add support again.

I am not 100% sure what The latest version of 'redis' is async and implements its own connection retrieval. means, but as redis is a core part of our service structure we could not upgrade without support for it.

So my question is: Will there be support for redis in the final verison of 0.5.0 or will you have any docs/ examples how to use redis with 0.5.0?

We really would love to switch to 0.5.0 once it is released to be able to use stable rust :)

@jebrosen
Copy link
Collaborator

Some libraries are being swapped out and upgraded in the transition to async/await; database pools are one of the areas impacted harder than others since most are heavy on network I/O. #[database] has been reworked as a wrapper around some database libraries that are commonly used with rocket but don't have a great async equivalent yet. The latest version of redis is async, though, so the wrapper is unnecessary for it.

So my question is: Will there be support for redis in the final verison of 0.5.0 or will you have any docs/ examples how to use redis with 0.5.0?

#1117 is the "async #[database]" tracking issue. I don't know if it will make it immediately into 0.5, or if it might start out as a separate crate on crates.io first or be added in a minor update to rocket_contrib.

Another example was posted at https://www.reddit.com/r/rust/comments/e9n6mx/creating_and_using_a_postgres_database_pool_is/ a while back. That code should work with deadpool-redis with a few adaptations to the different connection configuration for the database drivers.

@jebrosen jebrosen added enhancement A minor feature request request Request for new functionality labels Nov 11, 2020
@rmeissner
Copy link
Author

rmeissner commented Nov 16, 2020

Thank you for the explainer and the link to the postgres example :) I will try to look into it.

Edit: the postgres example looks very nice :D

@SergioBenitez
Copy link
Member

Looks like the only thing left to do here is #1117. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A minor feature request request Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants