monger/README.md

135 lines
4.5 KiB
Markdown
Raw Normal View History

2012-04-29 14:23:28 +00:00
# Monger, a modern Clojure MongoDB Driver
2011-08-04 12:01:26 +00:00
2012-04-29 14:23:28 +00:00
Monger is an idiomatic Clojure MongoDB driver for a more civilized age.
2011-08-04 12:01:26 +00:00
2012-06-14 12:56:10 +00:00
It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and has sane defaults. Monger is built from the
2012-04-29 14:23:28 +00:00
ground up for Clojure 1.3+ and sits on top of the official MongoDB Java driver.
2012-01-30 22:36:09 +00:00
2011-09-10 16:28:13 +00:00
2011-10-19 15:32:55 +00:00
## 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).
2012-05-14 06:19:17 +00:00
* Be [well documented](http://clojuremongodb.info).
2011-10-19 15:32:55 +00:00
* Be well tested.
2012-01-30 22:36:43 +00:00
* Be maintained, do not carry technical debt from 2009 forever.
2012-04-10 21:42:07 +00:00
* Target Clojure 1.3.0 and later from the ground up.
* Integrate with libraries like clojure.data.json, Joda Time, [Ragtime](https://github.com/weavejester/ragtime).
2012-03-07 06:42:08 +00:00
* Provide support for unit testing: factories/fixtures DSL, collection cleaner functions, clojure.test integration and so on.
2012-04-10 21:42:07 +00:00
* Support URI connections to be friendly to Heroku and other PaaS providers.
2011-10-19 15:41:49 +00:00
* Learn from other clients like the Java and Ruby ones.
2012-04-10 21:42:07 +00:00
* Integrate usage of JavaScript files and ClojureScript (as soon as the compiler gets artifact it is possible to depend on for easy embedding).
2011-10-19 15:32:55 +00:00
2011-12-31 00:39:58 +00:00
## Community
2012-01-30 23:05:14 +00:00
2012-05-28 05:52:25 +00:00
[Monger has a mailing list](https://groups.google.com/forum/#!forum/clojure-mongodb). Feel free to join it and ask any questions you may have.
2012-01-30 23:05:14 +00:00
To subscribe for announcements of releases, important changes and so on, please follow [@ClojureWerkz](https://twitter.com/#!/clojurewerkz) on Twitter.
2012-05-21 11:46:08 +00:00
## Project Maturity
2012-06-26 09:41:19 +00:00
Monger is not a young project: it will be 1 year old around July 2012, with active production use from week 1.
2012-05-21 11:46:08 +00:00
## Artifacts
2012-06-09 08:12:37 +00:00
Monger artifacts are [released to Clojars](https://clojars.org/com.novemberain/monger). If you are using Maven, add the following repository
definition to your `pom.xml`:
2012-02-11 05:57:58 +00:00
2012-06-09 08:12:37 +00:00
``` xml
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
```
2012-02-11 05:57:58 +00:00
2012-06-09 08:12:37 +00:00
### The Most Recent Release
With Leiningen:
2012-06-26 09:41:19 +00:00
[com.novemberain/monger "1.0.0"]
With Maven:
<dependency>
<groupId>com.novemberain</groupId>
<artifactId>monger</artifactId>
2012-06-26 09:41:19 +00:00
<version>1.0.0</version>
</dependency>
2012-06-09 08:12:37 +00:00
2012-04-29 14:23:28 +00:00
## Getting Started
2012-01-30 22:32:50 +00:00
2012-05-27 17:48:21 +00:00
Please refer to our [Getting Started guide](http://clojuremongodb.info/articles/getting_started.html). Don't hesitate to join our [mailing list](https://groups.google.com/forum/#!forum/clojure-mongodb) and ask questions, too!
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
## Documentation & Examples
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
Please visit our [documentation site](http://clojuremongodb.info/). Our [test suite](https://github.com/michaelklishin/monger/tree/master/test/monger/test) also has many code examples.
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
## Supported Clojure versions
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
Monger is built from the ground up for Clojure 1.3 and up.
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
## Continuous Integration Status
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
[![Continuous Integration status](https://secure.travis-ci.org/michaelklishin/monger.png)](http://travis-ci.org/michaelklishin/monger)
2012-01-30 22:32:50 +00:00
### 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...
2012-04-11 17:01:18 +00:00
"Elapsed time: 25.699 msecs"
Inserting 10000 documents...
"Elapsed time: 135.069 msecs"
Inserting 100000 documents...
"Elapsed time: 515.969 msecs"
2012-01-30 22:32:50 +00:00
```
2012-04-11 17:01:18 +00:00
With the `SAFE` write concern, it takes roughly 0.5 second to insert 100,000 documents with Clojure 1.3.0.
2012-01-30 22:32:50 +00:00
2012-02-25 14:37:46 +00:00
## Monger Is a ClojureWerkz Project
Monger is part of the [group of Clojure libraries known as ClojureWerkz](http://clojurewerkz.org), together with
[Neocons](https://github.com/michaelklishin/neocons), [Langohr](https://github.com/michaelklishin/langohr), [Elastisch](https://github.com/clojurewerkz/elastisch), [Welle](https://github.com/michaelklishin/welle), [Quartzite](https://github.com/michaelklishin/quartzite) and several others.
2012-02-25 14:37:46 +00:00
## Development
2012-03-13 17:38:42 +00:00
Monger uses [Leiningen 2](https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md). Make sure you have it installed and then run tests against
2012-04-10 12:15:05 +00:00
supported Clojure versions using
2011-09-10 16:28:13 +00:00
2012-03-13 17:38:42 +00:00
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.
2011-09-08 20:27:49 +00:00
2011-08-04 12:01:26 +00:00
## License
2012-02-25 14:37:46 +00:00
Copyright (C) 2011-2012 Michael S. Klishin
2011-08-04 12:01:26 +00:00
2011-10-16 13:03:14 +00:00
Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.