Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cats io support #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Cats io support #26

wants to merge 3 commits into from

Conversation

stankoua
Copy link
Collaborator

@stankoua stankoua commented Jan 16, 2019

Pull Request Checklist

  • Have you read through the contributor guide?
  • Have you added tests for any changed functionality?

Purpose

Currently we are supporting the translation of our DB operations to Future. Future is actually eager so the DB operations will be executed during the translations process. It might be useful to add support for a lazy asynchronous datatype. We choose to add support for the IO type provided by cats-effect.

Why choosing cats-effect or not zio?
cats-effect come with typeclasses which formalize operations (think of Async, Sync).
For people using zio, they will have to use a bridge project between the two.

/**
* Heavily inspired from work done by @cchantep in Acolyte (see acolyte.reactivemongo.ComposeWithCompletion)
*/
trait LiftAsync[F[_], M[_], A] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantic is always async ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes (but no in term of cats-effect's Async typeclass), since the essence of this typeclass is to wrap the computation in an async context (Future or IO). Maybe it can be confusing, so feel free to suggest any name which could express it better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task ? Effect ?

@guilgaly guilgaly removed their request for review May 5, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants