Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which library is the best to use for MongoDB with Scala? [closed]

Tags:

mongodb

scala

I want to use MongoDB with Scala. I found 2 libraries for it.

  1. lift-mongo
  2. mongo-scala-driver

Could you please tell me which library is the best to use? And please tell me other one if you know.

like image 954
hito_asa Avatar asked Jan 19 '11 14:01

hito_asa


1 Answers

You should take a close look at Casbah, which is the official(and fully supported ) MongoDB Scala driver:

http://api.mongodb.org/scala/casbah/latest

Im admittedly biased as the creator and maintainer of the project but the official support brings a lot of benefit including the fact that there is a fulltime developer behind it. There are solid type conversion wrappers built in for common Scala types and Scala collections style implementations of DBObject which are much better than the default Java objects many of the other drivers use. There is also a full query dsl which maps to Mongo query syntax.

I like the Lift stuff as well and have recently started working w/ the Lift team to help improve it. Foursquare just released a query dsl for lift-mongo-record called Rogue which drives their own Scala+MongoDB system:

http://GitHub.com/foursquare/rogue

I have found most people are using either Lift or Casbah, but YMMV. Feel free to ping me if you need more help.

like image 99
Brendan W. McAdams Avatar answered Oct 06 '22 02:10

Brendan W. McAdams