tokio-rs / rdbc

Rust DataBase Connectivity (RDBC) :: Common Rust API for database drivers
Apache License 2.0
568 stars 25 forks source link

How can we support async drivers? #18

Open andygrove opened 4 years ago

rumatoest commented 4 years ago

What if there will be no traits API for sync drivers ? As I understand you can wrap async driver and make it sync. Thus wrapper should not be an issue. But if there will be possibility to not write async drivers it could end up like JDBC - it synchronous by default and probably it would never be fixed.

95th commented 4 years ago

@rumatoest JDBC is getting "fixed" by loom. As for rust, as you said the sync wrapper works for rust-postgres (wrapper over tokio-postgres).

rumatoest commented 4 years ago

JDBC is getting "fixed" by loom.

Was it fixed in some LTS JDK or it would be fixed someday? In other words "we all hope that in a 10 years all major frameworks would support async JDBC"

Ecosystem updates are very slow. Thus it is very crucial to have all required major core features at the beginning.

95th commented 4 years ago

Not yet released. the works is still in progress (although EA build is available for testing). But this is getting off-topic.

Ecosystem updates are very slow. Thus it is very crucial to have all required major core features at the beginning.

Agree.