<commit_before># Meteor Smart Collections [![Build Status](https://travis-ci.org/arunoda/meteor-smart-collections.png?branch=master)](https://travis-ci.org/arunoda/meteor-smart-collections)

This is a complete re-write of the MongoDB Collection implementation for Meteor. Designed with following 3 areas in mind

* Speed
* Effieciency (Memory & CPU)
* Scalability

> This is not a toy project! But a complete Collection replacement with a [well tested](https://github.com/arunoda/meteor-smart-collections/blob/master/test_cases.todo) source code. Still we **might** have bugs :)

### [Click here for implementation details of Smart Collections](http://meteorhacks.com/introducing-smart-collections.html)

## Install

Install Smart Collections from Atmosphere
    
    mrt add smart-collections

Install From Git (If you are not using Meteorite)

    mkdir -p packages
    #make sure you created the packages folder
    git submodule add https://github.com/arunoda/meteor-smart-collections.git packages/smart-collections

## Usage

Replace `Meteor.Collection` with `Meteor.SmartCollection`. Just that!

eg:-

    //old code
    Posts = new Meteor.Collection('posts');

    //with smart collections
    Posts = new Meteor.SmartCollection('posts');

## Compatibility

* Almost compatible with exiting `Collection` [API](http://docs.meteor.com/#collections)
* But server side `Cursor.observe()` does not exists
* `_id` must be a `String` (will support `ObjectID` and `numbers` soon)

## Scalability

* Designed to be scaled with mongodb [`oplog`](http://docs.mongodb.org/manual/core/replica-set-oplog/)
* Not implemented yet! (will start after we've fixed most critical bugs)<commit_msg>updated with scaling information<commit_after># Meteor Smart Collections [![Build Status](https://travis-ci.org/arunoda/meteor-smart-collections.png?branch=master)](https://travis-ci.org/arunoda/meteor-smart-collections)

This is a complete re-write of the MongoDB Collection implementation for Meteor. Designed with following 3 areas in mind

* Speed
* Effieciency (Memory & CPU)
* Scalability

> This is not a toy project! But a complete Collection replacement with a [well tested](https://github.com/arunoda/meteor-smart-collections/blob/master/test_cases.todo) source code. Still we **might** have bugs :)

### [Click here for implementation details of Smart Collections](http://meteorhacks.com/introducing-smart-collections.html)

## Install

Install Smart Collections from Atmosphere
    
    mrt add smart-collections

Install From Git (If you are not using Meteorite)

    mkdir -p packages
    #make sure you created the packages folder
    git submodule add https://github.com/arunoda/meteor-smart-collections.git packages/smart-collections

## Usage

Replace `Meteor.Collection` with `Meteor.SmartCollection`. Just that!

eg:-

    //old code
    Posts = new Meteor.Collection('posts');

    //with smart collections
    Posts = new Meteor.SmartCollection('posts');

## Compatibility

* Almost compatible with exiting `Collection` [API](http://docs.meteor.com/#collections)
* But server side `Cursor.observe()` does not exists
* `_id` must be a `String` (will support `ObjectID` and `numbers` soon)

## Scalability

* Can be easily scaled with mongodb [`oplog`](http://docs.mongodb.org/manual/core/replica-set-oplog/)
* Follow this guide on how to [scale meteor](http://meteorhacks.com/lets-scale-meteor.html) with Smart Collections.
{'fraction_non_alphanumeric': 0.11234315728042019, 'fraction_numerical': 0.0005836008170411438, 'mean_word_length': 4.546925566343042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5022555', 'n_tokens_mistral': 1061, 'n_tokens_neox': 992, 'n_words': 314}