slick
slick copied to clipboard
cats.IO supports
Hi Slick team I have a question regarding to https://github.com/typelevel/cats-effect support. Do you plan in the future to support Cats.IO?
Thanks
Hi @softshipper!
Slick is currently being maintained by its users who fix bugs and develop features that they need or want. As such, we don't have a roadmap or plans. If you want to start working on Cats.IO support, I'm sure you will find support for your efforts and even other developers who can help.
There are plenty of companion libraries that can be used to integrate Slick (Scala Futures based) with other effect systems like Cats-Effects and Zio. Examples include:
- https://github.com/kubukoz/slick-effect
- https://github.com/RMSone/slick-cats
- https://github.com/ScalaConsultants/zio-slick-interop
https://github.com/RMSone/slick-cats is forked under the slick
organization.
Does anyone know who owns it though?
But it's not for cats IO. For cats IO use kubukoz/slick-effect
I would say the correct way to go would be to rip Futures away from Slick. I did analyze the thing a few years back and it wouldn't be such a big change.
👋
That would be great, and is one of the things we can look into after Scala 3 support ships.
But what does your vision look like exactly?
I don't have a vision other than a complete rewrite of https://github.com/slick/slick/blob/main/slick/src/main/scala/slick/basic/BasicBackend.scala
Basically Slick needs asynchronous processing for three tings:
- waiting for a connection from a connection pool
- executing the query asynchronously
- mixing in user provided asynchronous actions
Currently we have a bad design when it comes to the connection pool management (as witnessed by the many issues posted regarding deadlocks, etc). Whether we stick with Future or go for cats.IO, we should make the connection pool use that abstraction as well.
There's a lot more Future usage than that file
On Fri Sep 16, 2022, 10:30 AM GMT, Heikki Vesalainen @.***> wrote:
I don't have a vision other than a complete rewrite of https://github.com/slick/slick/blob/main/slick/src/main/scala/slick/basic/BasicBackend.scala https://github.com/slick/slick/blob/main/slick/src/main/scala/slick/basic/BasicBackend.scala Basically Slick needs asynchronous processing for three tings:
- waiting for a connection from a connection pool
- executing the query asynchronously
- mixing in user provided asynchronous actions Currently we have a bad design when it comes to the connection pool management (as witnessed by the many issues posted regarding deadlocks, etc). Whether we stick with Future or go for cats.IO, we should make the connection pool use that abstraction as well. — Reply to this email directly, view it on GitHub https://github.com/slick/slick/issues/2126#issuecomment-1249201907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYAUFXRGXSVICYLPWFGRDV6RD3TANCNFSM4QAJFSQA. You are receiving this because you commented.Message ID: @.***>
Yes, but that file is the only place where Futures are being created, I think.
Sure, but it would be a much bigger change than that.
Do you want to have a chat about it?
@frosforever are you around?
I'm not sure I have much say in this discussion. I'm no longer an active user/maintainer of slick or slick-cats.
@frosforever who owns slick-cats?