I want to start a MongoDB database for my project and I'm a Scala user, but I couldn't find a good comparison between these two Scala frameworks for MongoDB, what are their main differences, supports and other aspects?
Asked
Active
Viewed 589 times
1 Answers
2
Well, ReactiveMongo by design is "reactive" so everything happens asynchronously and you can continue with normal flow of execution. ReactiveMongo also has macros that do BSON <--> Scala Case Class
conversion.
Casbah on the other is the officially supported Scala binding for MongoDB, so it essentially supports all the MongoDB operators.
Now if you really want to do some fancy queries on MongoDB, you may find yourself at home with Casbah, but with ReactiveMongo that is not the case.
Also note that ReactiveMongo integrates very well with Play framework.

tuxdna
- 8,257
- 4
- 43
- 61
-
2Note that using the `RawCommand` of the about-to-be-released ReactiveMongo 0.11, you can do the fancy queries which are not specifically implemented in the API, still in a reactive way. – cchantep Jun 27 '15 at 10:04
-
@cchantep that's good to know. can you share any sample link ? – tuxdna Jun 27 '15 at 11:13
-
http://reactivemongo.org/releases/0.11.0/documentation/advanced-topics/commands.html – cchantep Jun 27 '15 at 18:50
-
@cchantep, the simple Count example at the beginning of your link seems to refer to the "old way", and gives a deprecation warning when used. Is there a simple way to count without going to the rawCommand described later in the document? – ticofab Jun 29 '15 at 15:22
-
For count try `reactivemongo.api.commands.Count`. About the doc, the last example is using `rawCommand`. – cchantep Jun 29 '15 at 18:35
-
@cchantep The link is broken. For someone like me who really concern using native mongo query syntax, check the below link http://reactivemongo.org/releases/0.11/documentation/advanced-topics/commands.html – LoGary Dec 16 '15 at 15:19
-
@tuxdna can we use casbah for Async calls? – vdep Nov 07 '16 at 06:31