Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gjongenelen/eh-mongodb

Improved MongoDB driver for Event Horizon
https://github.com/gjongenelen/eh-mongodb

Last synced: 3 months ago
JSON representation

Improved MongoDB driver for Event Horizon

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.com/gjongenelen/eh-mongodb.svg?branch=master)](https://travis-ci.com/gjongenelen/eh-mongodb)
[![codecov](https://codecov.io/gh/gjongenelen/eh-mongodb/branch/master/graph/badge.svg)](https://codecov.io/gh/gjongenelen/eh-mongodb)
[![GoDoc](https://godoc.org/github.com/gjongenelen/eh-mongodb?status.svg)](https://godoc.org/github.com/gjongenelen/eh-mongodb)
[![Go Report Card](https://goreportcard.com/badge/github.com/gjongenelen/eh-mongodb)](https://goreportcard.com/report/github.com/gjongenelen/eh-mongodb)

# eh-mongodb

This package is based on the default mongo-driver in [EventHorizon](https://github.com/looplab/eventhorizon).
Mongo has a [document limit of 16MB](https://docs.mongodb.com/manual/reference/limits/) which can easily be reached in big projects, resulting in aggregates with many events not being saved.

The default mongo-driver in EventHorizon stores an aggregate with its events in one single document, increasing the size of the document on each event. This driver creates a new document per event, preventing documents from growing and reaching the limit mentioned above.