foursquare / fsqio

A monorepo that holds all of Foursquare's opensource projects
Apache License 2.0
252 stars 54 forks source link

Update Rogue to use asynchronous Scala driver #36

Open joeboyscout04 opened 7 years ago

joeboyscout04 commented 7 years ago

Now that MongoDB has an officially supported scala driver (https://github.com/mongodb/mongo-scala-driver), it would be great to see Rogue support this driver so we can use asynchronous and non-blocking database queries.

jvandew commented 7 years ago

Thanks for the note! I've actually spec'ed out the work to integrate the new async client into Rogue internally, and my plan is to get started on that next week. Stay tuned.

We do not currently have any plans to move away from the java driver to the new scala driver however. It's possible that may change in the future, but it would be a major undertaking and thus far no one has looked into doing so.

joeboyscout04 commented 7 years ago

That sounds great! Is the hesitation with the scala driver due to the Lift dependency?

jvandew commented 7 years ago

Lift does have a dependency on the mongo-java-driver, but I don't think that is really a blocker. The bigger issue for us is needing to qualify the scala driver for new failure modes or performance regressions relative to the java version. The java driver is pretty battle tested in those regards, and I think we'd just need some time with the scala driver before we were comfortable replacing such a core component of our stack.

I agree the idea of a more idiomatic driver does sound appealing though, and we will keep it on our radar.