Why are effects better for retries than Future?

This page summarizes the projects mentioned and recommended in the original post on /r/scala

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • sbt-tpolecat

    scalac options for the enlightened

  • Note that this assumes that non-Unit values are silently thrown away, which you should always configure scalac, preferably via sbt-tpolecat, not to allow.

  • cats-retry

  • To try to answer the top-level question "Why are effects better for retries than Future?" I would say "because the effect types rest on a runtime that supports cancellation and error-handling with rigorous algebraic semantics." If we look at cats-retry, for example, we find implementations that require a Monad and a Sleep instance or a MonadError and a Sleep instance. The Sleep typeclass, probably unsurprisingly, just exposes a sleep effect. But look at the companion object: the only instance of the typeclass it provides is for type constructors with a cats-effect Temporal instance. IO has such an instance. Future does not, and cannot.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts