Archive

Archive for March, 2011

Using MongoDB as the Audit and Log data store with a custom tracelistener

This post illustrates how one would save changes to ADO entities and other logging via the enterprise library logging application block to MongoDB. MongoDB is an open source agile document oriented nosql database that supports sharding, map-reduce, indexing on attributes, GridFS etc. MongoDB is fast to setup and fast to scale. The choice to move logging to MongoDB was to make use of running map reduce jobs on the dataset.

To be able to connect to MongoDB process you will have to download the latest C# Driver

To be able to log via the Enterprise Logging Application Block I created a custom trace listener and trace listener configuration. The trace listener configuration was to allow specifying MongoDB connection string and database name. The custom trace listener opens the connection to the MongoDB process and inserts the updates. Every attempted change to the entity is stored. Read more…

Categories: Programming Tags: ,