Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 05 14:43
    @typelevel-bot banned @jdegoes
  • Jan 31 21:17
    codecov-io commented #484
  • Jan 31 21:08
    scala-steward opened #484
  • Jan 31 18:19
    andywhite37 commented #189
  • Jan 31 02:41
    kamilongus starred typelevel/cats-effect
  • Jan 30 00:01
    codecov-io commented #483
  • Jan 29 23:51
    deniszjukow opened #483
  • Jan 29 23:37
  • Jan 29 23:22
  • Jan 29 20:26
    Rui-L starred typelevel/cats-effect
  • Jan 29 18:01
    jdegoes commented #480
  • Jan 29 17:04
    thomaav starred typelevel/cats-effect
  • Jan 28 17:43
    asachdeva starred typelevel/cats-effect
  • Jan 28 07:12
    alexandru commented #480
  • Jan 28 05:45
    codecov-io commented #482
  • Jan 28 05:35
    daron666 opened #482
  • Jan 27 13:56
    codecov-io commented #481
  • Jan 27 13:46
    lrodero opened #481
  • Jan 27 05:47
    codecov-io commented #460
  • Jan 27 05:37
    codecov-io commented #460
Jakub Kozłowski
@kubukoz
hmm
Concurrent of what? IO?
Gavin Bisesi
@Daenyth
The F of Transactor
Transactor#uncancelable as today would take Async but cancelable would take Concurrent instead
Jakub Kozłowski
@kubukoz
IO then. I don't see how Concurrent helps me, frankly. Unless it's something like the ReaderT thing I mentioned
Gavin Bisesi
@Daenyth
it just allows your underlying to be polymorphic`
I don't see anything wrong with the way you're using Ref there
you just need something that can do onCancel
that's what Concurrent gives you
Jakub Kozłowski
@kubukoz
onCancel is on Bracket :)
Gavin Bisesi
@Daenyth
oh
hm
yeah that part of the hierarchy is rather weird
Jakub Kozłowski
@kubukoz
it's just an alias for bracketCase that no-ops in other cases
Gavin Bisesi
@Daenyth
stepping back.. what's the problem with the Ref one? Does it not work in some cases? Force an awkward constraint? Feels bad?
Jakub Kozłowski
@kubukoz
it feels super weird to ask users to pass underlying: DBIO ~> IO, insertBoundary: DBIO ~> DBIO
ideally you'd pass nothing and get a DBIO ~> DBIO back
Gavin Bisesi
@Daenyth
how does this surface to the user?
Would it not work to internalize this to Transactor? That's what I thought you were going for
Jakub Kozłowski
@kubukoz
I guess I could hide it as deep as possible :sweat_smile:
I still feel dirty going back and forth between these effects
Gavin Bisesi
@Daenyth
it's definitely awkward but I think it's safe
nafg
@nafg
What http client do people here recommend?
Ryan Peters
@sloshy
Generally I hear recommendations for the http4s wrappers for async-http-client or the jdk-11 client
Colt Frederickson
@coltfred
@nafg Even after the 0.20.14 release we're having problems with SSL on JDK 11 in the blaze client so I'd steer clear of that one if you're on jdk11.
nafg
@nafg
I might be
Does that have to do with blaze or ahc somehow?
what is it about jdk 11, did they drop support for older ssl modes?
Gavin Bisesi
@Daenyth
@nafg I think the consensus is "not blaze-client, async-http is a safe default"
nafg
@nafg
I saw other issues mentioned about blaze in the http4s room IIRC
So http4s client with ahc backend?
Gavin Bisesi
@Daenyth
yeah
nafg
@nafg
what's the sbt dependency for that
Gavin Bisesi
@Daenyth
Good question
"org.http4s" %% "http4s-async-http-client" % "0.21.0-M6"
nafg
@nafg
Thanks
I'm already using http4s server so I guess I'll use the same version that I have
Gavin Bisesi
@Daenyth
yes, you absolutely want to use the same version
val http4sV = "0.21.0-M6"
libraryDependencies ++= Seq(
  "org.http4s" %% "http4s-async-http-client" % http4sV,
  "org.http4s" %% "http4s-server" % http4sV
)
something like that
Daniel Spiewak
@djspiewak
I can confirm that the blaze client does some strange stuff
it's relatively fast, but it appears to have a few resource leaks that are hard to pin down, and it doesn't respect proxy settings
davecromberge
@davecromberge
Any thoughts on the http4s okhttp-client?
I noticed that it has built in leak detection, and is meant to be fast, but I haven’t really benchmarked it.
Daniel Spiewak
@djspiewak
you could try it; I never have. I know that okhttp itself is slower than ahc (I benchmarked that a few years ago)
or at least, it was slower for my use-cases
I'm not sure that runtime leak detection is all that valuable given the resource-safe model of cats-effect. It basically would just detect bugs in the client itself (like the resource leak issue in the blaze client)
davecromberge
@davecromberge
Interesting, thanks for the details Daniel, that is helpful. We had switched to the http4s okhttp client to evaluate it, and warnings at runtime did indeed crop up in the logs which may have been related to a client middleware that we had written to add tracing.
There is an interesting warning about draining responses, and I thought these may have been related. I realise this is more http4s related than cats effect, but I thought your comment on resource safety is helpful.