Monger is an idiomatic Clojure MongoDB driver with sane defaults, batteries included, well documented, low overhead
Find a file
Baishampayan Ghose 43cddbcf57 Remove redundant invocation of to-db-object on top of as-field-selector.
`as-field-selector` already returns a DBObject, so there is no need to call `to-db-object` on top of the return value.
2012-05-12 11:00:33 +05:30
bin/ci Introduce monger.core/authenticate 2012-02-02 09:53:26 +04:00
examples Fixing examples 2012-02-26 18:45:32 +01:00
src/monger Remove redundant invocation of to-db-object on top of as-field-selector. 2012-05-12 11:00:33 +05:30
test Add monger.collection/find-and-modify and associated tests. 2012-05-12 09:02:19 +05:30
.gitignore Ignore doc/* 2012-01-29 22:06:56 +04:00
.travis.yml Try excluding the test that drops databases from CI 2012-04-16 00:41:43 +04:00
ChangeLog.md Change log update, copyright header update 2012-05-12 07:44:40 +04:00
project.clj Deprecate monger.js (moved to clojurewerkz.support.js) 2012-05-03 01:06:41 +04:00
README.md Link to clojurewerkz.org, correct a typo 2012-05-01 15:50:32 +04:00

Monger, a modern Clojure MongoDB Driver

Monger is an idiomatic Clojure MongoDB driver for a more civilized age.

It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and . Monger is built from the ground up for Clojure 1.3+ and sits on top of the official MongoDB Java driver.

Project Goals

There is one MongoDB client for Clojure that has been around since 2009. So, why create another one? Monger authors wanted a client that will

  • Support most of MongoDB 2.0+ features but only those that really matter. Grouping the way it is done today, for example, does not (it is easier to just use Map/Reduce directly).
  • Be well documented.
  • Be well tested.
  • Be maintained, do not carry technical debt from 2009 forever.
  • Target Clojure 1.3.0 and later from the ground up.
  • Integrate with libraries like clojure.data.json and Joda Time.
  • Provide support for unit testing: factories/fixtures DSL, collection cleaner functions, clojure.test integration and so on.
  • Support URI connections to be friendly to Heroku and other PaaS providers.
  • Learn from other clients like the Java and Ruby ones.
  • Integrate usage of JavaScript files and ClojureScript (as soon as the compiler gets artifact it is possible to depend on for easy embedding).

Community

Monger has a mailing list. Feel free to join it and ask any questions you may have.

To subscribe for announcements of releases, important changes and so on, please follow @ClojureWerkz on Twitter.

Artifacts

The Most Recent Release

With Leiningen:

[com.novemberain/monger "1.0.0-beta5"]

With Maven:

<dependency>
  <groupId>com.novemberain</groupId>
  <artifactId>monger</artifactId>
  <version>1.0.0-beta5</version>
</dependency>

Snapshots

If you are comfortable with using snapshots, snapshot artifacts are released to Clojars every 24 hours.

With Leiningen:

[com.novemberain/monger "1.0.0-SNAPSHOT"]

With Maven:

<dependency>
  <groupId>com.novemberain</groupId>
  <artifactId>monger</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</dependency>

Getting Started

Please refer to our Getting Started guide. Don't hesitate to join our mailing list and ask questions, too!

Documentation & Examples

Please visit our documentation site. Our test suite also has many code examples.

Supported Clojure versions

Monger is built from the ground up for Clojure 1.3 and up.

Continuous Integration Status

Continuous Integration status

Write Performance

Monger insert operations are efficient and have very little overhead compared to the underlying Java driver. Here are some numbers on a MacBook Pro from fall 2010 with Core i7 and an Intel SSD drive:

Testing monger.test.stress
Inserting  1000  documents...
"Elapsed time: 25.699 msecs"
Inserting  10000  documents...
"Elapsed time: 135.069 msecs"
Inserting  100000  documents...
"Elapsed time: 515.969 msecs"

With the SAFE write concern, it takes roughly 0.5 second to insert 100,000 documents with Clojure 1.3.0.

Monger Is a ClojureWerkz Project

Monger is part of the group of Clojure libraries known as ClojureWerkz, together with Neocons, Langohr, Elastisch, Welle, Quartzite and several others.

Development

Monger uses Leiningen 2. Make sure you have it installed and then run tests against supported Clojure versions using

lein2 all test

Then create a branch and make your changes on it. Once you are done with your changes and all tests pass, submit a pull request on Github.

License

Copyright (C) 2011-2012 Michael S. Klishin

Distributed under the Eclipse Public License, the same as Clojure.