47erbot on sbt-scalajs-1.13.0
47erbot on main
Update sbt-scalajs, scalajs-com… (compare)
47erbot on sbt-scalajs-1.13.0
Update sbt-scalajs, scalajs-com… (compare)
47erbot on scalafmt-core-3.7.1
47erbot on main
Update scalafmt-core to 3.7.1 (compare)
47erbot on scalafmt-core-3.7.1
Update scalafmt-core to 3.7.1 (compare)
47erbot on main
Update scalafmt-core to 3.7.0 (compare)
47erbot on scalafmt-core-3.7.0
47erbot on scalafmt-core-3.7.0
Update scalafmt-core to 3.7.0 (compare)
47erbot on cats-effect-3.4.5
47erbot on main
Update cats-effect to 3.4.5 (compare)
47erbot on main
Update http4s-circe to 0.23.18 (compare)
47erbot on http4s-circe-0.23.18
The benefits aren't as big as when fetching data I think.
The main benefit with Fetch (and other libraries inspired by the Haxl paper) is that you can just specify the data you need to use without thinking how to get it (efficiently).
If part A
, part B
and part C
all independently need foo
you don't need to think about where to get foo
so you only request it once.
If parts A
, B
and C
are combined in one Fetch[Result]
, foo
will automatically be fetched only once.
Posting data can also be a lot more complex because posts can influence each other.
For example what do you do with two parallel posts with the same id but different data?
I am interested to know if you have a use case in mind or if it is just a general question.
A quote from the Haxl paper :
When the business logic is only concerned with reading data
from external sources and not writing, the programmer doesn’t
care about the order in which data accesses happen, since there
are no side-effects that could make the result different when the
order changes. So in this case the programmer would be entirely
happy with not having to specify either ordering or concurrency,
and letting the system perform data access in the most efficient way
possible.
Exception in thread "main" java.lang.NoClassDefFoundError: cats/FunctorFilter
libraryDependencies += "org.typelevel" %% "cats-core" % "1.0.0-MF"
libraryDependencies += "com.47deg" %% "fetch" % "0.6.3"
cats 0.9.0
which had the FunctorFilter there. We are currently working towards moving it to 1.0.0-MF
and FunctorFilter has moved to FunctorEmpty
in a new lib cats-mtl
. @peterneyens do you know how close are we to release Fetch
for cats 1.0.0-MF
?
@eranmiz132
The only way Fetch can reach out to external sources is through the fetchOne
and fetchMany
methods of DataSource
.
Can you give an example what you want to accomplish?
For the second point, there was some discussion in the posts above about just that (starting at https://gitter.im/47deg/fetch?at=599de37042d2f61025897618).
Summary: For the moment Fetch only supports fetching data