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

Bump deps #209

Merged
merged 7 commits into from
Sep 23, 2020
Merged

Bump deps #209

merged 7 commits into from
Sep 23, 2020

Conversation

lnicola
Copy link
Contributor

@lnicola lnicola commented Sep 23, 2020

The major changes here are actix-web and postgres, with the latter being especially painful.

A couple of noteworthy things here:

  • we no longer use cached prepared statements; they're gone from postgres because you're supposed to cache them externally, but they're probably bound to a connection but we use a connection per request, so I doubt they worked even before
  • postgres now uses a tokio runtime for each blocking, leading to panics (you can't start a run-time from another); I added some actix_web::web::block calls to dispatch those on a thread pool, but that's a good idea anyway since it leaves the reactor threads free for network transfer. Ideally, we'd use the async Postgres client instead, but the datasets are not async yet.
  • r2d2_postgres is annoying

@pka pka merged commit 60d306a into t-rex-tileserver:master Sep 23, 2020
@lnicola lnicola deleted the bump-deps branch September 23, 2020 18:36
@lnicola
Copy link
Contributor Author

lnicola commented Sep 23, 2020

PS: I'm not sure about TLS support -- I haven't tested it, and I don't know whether the system certificate store is imported automatically or not. But that didn't seem to happen before, in any case.

@pka
Copy link
Member

pka commented Sep 23, 2020

Thanks a lot for this PR, @lnicola !
The actix-web update was on my todo list. Seems you have been more successful with upgrading Postgres than me (https://github.com/t-rex-tileserver/t-rex/tree/pg17)! Would be nice to chat about async PG things. Maybe you look into the GeoRust discord once?

@lnicola
Copy link
Contributor Author

lnicola commented Sep 23, 2020

I'll try to join the Discord, but not that I've never used any Rust Postgres client until this PR, so no promises in that direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants