selectel / mongoDB-haskell

MongoDB driver for Haskell
http://hackage.haskell.org/package/mongoDB
Apache License 2.0
21 stars 11 forks source link

Simplification of types, easier interop with other libraries #20

Closed snoyberg closed 10 years ago

snoyberg commented 10 years ago

I've been working on a simplified approach to setting up types and classes in persistent. In this process, I realized that the current setup of the mongoDB package will make such a rewrite impossible, since mongoDB forces usage of the Action transformer without exposing its internals.

I've worked on a fairly substantial overhaul of the types, which doesn't really change the inner operations or the user-facing API in a significant way. Some of the ideas behind this are described in my not-yet-published blog post on the subject:

https://www.fpcomplete.com/tutorial-preview/2896/z9jwaCGLzb

I'm not sure if all of the changes I've made here will be acceptable to you for merging, but I'd like to discuss two changes in particular:

Pinging @gregwebs.

gregwebs commented 10 years ago

looks good to me. Append a ?w=q to avoid looking at all the indentation changes

gregwebs commented 10 years ago

sorry, I meant ?w=1

snoyberg commented 10 years ago

Bumping this issue. persistent 2.0 will require some form of different API to make a mongoDB backend, I'd like to move ahead on figuring out how we can make that happen.

gregwebs commented 10 years ago

@superbobry @knsd @selectel can you take a look?

si14 commented 10 years ago

@superbobry @knsd please take a look, +1

superbobry commented 10 years ago

Michael, I like the proposal, so +1 for merging this.

Me and @knsd are working on the new MongoDB driver, so now is the right time to discuss the bad parts in the existing API.

gregwebs commented 10 years ago

I would like to help test the new driver. The only bad part for me is the delay mentioned in #18. And the only thing I really want to add is #14 an understanding of how to auto reconnect.

knsd commented 10 years ago

Hello @snoyberg, sorry for delay. I agree with your ideas, and I've just merged your PR, unfortunately it contains some backward incompatible changes, so we need to update documentation and usage examples and release new version after that.

snoyberg commented 10 years ago

Awesome, thanks!