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

Introduce conduits as potential replacement of cursors #81

Open
VictorDenisov opened this issue Jul 11, 2017 · 3 comments
Open

Introduce conduits as potential replacement of cursors #81

VictorDenisov opened this issue Jul 11, 2017 · 3 comments
Assignees
Milestone

Comments

@VictorDenisov
Copy link
Member

Conduits are more natural abstraction for haskell.

@VictorDenisov VictorDenisov self-assigned this Jul 11, 2017
@VictorDenisov VictorDenisov added this to the 2.3.1 milestone Jul 11, 2017
@VictorDenisov VictorDenisov changed the title Replace cursors with conduits Introduce conduits as potential replacement of cursors Jul 11, 2017
@Yuras
Copy link
Contributor

Yuras commented Jul 11, 2017

Can it be done in a separate package?

Reasons not to include it into the main package: conduits is a new dependency; other people may prefer other strraming solutions; cursors are dead simple compared to streaming libraries, newcommers don't have to study one to use cursors.

@gregwebs
Copy link
Contributor

I would not worry about the additional dependency of plain conduits: it is a very light-weight package in terms of dependencies it brings in.

persistent-mongoDB has an implementation of a conduit source already:
https://github.com/yesodweb/persistent/blob/master/persistent-mongoDB/Database/Persist/MongoDB.hs#L728
https://github.com/yesodweb/persistent/blob/master/persistent-mongoDB/Database/Persist/MongoDB.hs#L756

So it might be possible to bring that in to the package and present both the existing cursor interface and a conduit interface.

@VictorDenisov
Copy link
Member Author

I'm actually thinking about not plain conduits, but concurrent conduits. At the moment working with cursors is a little cumbersome. So, probably removing cursors completely is not a right idea. I need to think about what @Yuras said. Maybe it makes sense to ship something like mongodb-extras where we provide convenience functions for working with mongodb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants