Less restrictive DataSource effect implicits
See original GitHub issueCurrently the methods that fetch data in DataSource
require an effect type F
with Par[F]
and ConcurrentEffect[F]
.
Par
is required due to the DataSource#batch
implementation defaulting to running individual fetches in parallel. If we move away from it, Data sources that don’t implement batching will run their fetches sequentially. Par[F]
will still be required when creating or running a fetch to F
, since is used when running multiple batches in parallel.
ConcurrentEffect
is perhaps too restrictive, since we may not need the cancellation semantics that Concurrent
provides. We could use Effect
here, thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Less restrictive DataSource effect implicits · Issue #163
Par is required due to the DataSource#batch implementation defaulting to running individual fetches in parallel. If we move away from it, Data ......
Read more >Indexer troubleshooting guidance - Azure Cognitive Search
Currently, indexers can access restricted data sources behind an IP ... Azure Cognitive Search has an implicit dependency on Azure Cosmos DB ...
Read more >IBM Data Server Driver for JDBC and SQLJ
The effect of fullyMaterializeLobData depends on whether the data source supports progressive streaming, which is also known as dynamic data format: If the...
Read more >4. Risks and challenges of data access and sharing
Digital security risks and confidentiality breaches in particular · Digital security risks of more data openness · Increasing impact of (personal) data breaches....
Read more >Continuous Availability - MAA Checklist for Applications for ...
effects or callbacks, or have an application that uses state such as temp tables ... service as this cannot be disabled, relocated, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would you feel any different about Par if cats-par was officially endorsed by typelevel?
Here are all the reasons I found not to require Concurrent:
parTraverse
for which Parallel/Par is enoughdelay
,async
,cancelable
and friends; which is the main reason why it’s usually a good idea to use it sparingly and hide the details like calls torace
behind algebras that’ll be implemented with Concurrentrun
part (in whichMonadError[F, Throwable]
would probably suffice)Id
orEither
and not a full blownIO
that may or may not consist of asynchronous blocksFYI ContextShift is completely unused in the code for fetch, too, so the only thing that remains is Clock, usage of which could be superseded by a custom algebra for measuring time (allowing custom implementations that’d simply return a dumb value for tests).
I think I disagree know with what I said almost 6 months ago as well, and I agree that we should look if we can’t get by with just
Concurrent
(instead ofConcurrentEffect
).