HyperTrends performs a massive Mongo Rewrite to accommodate new C# Driver

Anup MarwadiMongoDBLeave a Comment

Mongo Aggregation Pipeline Example

A HyperTrends customer sees immediate benefits of migrating to the new MongoDB C# Driver


HyperTrends, a leading Software Development Agency in San Diego servicing customers all over Southern California just finished performing a massive upgrade to rewrite all MongoDB code to work with the new C# Driver.

The legacy MongoDB C# driver had a serious production issue that caused “Socket Exceptions” at random thereby causing application failures.
In mission critical environments, this quickly started becoming a problem. It was even harder to convince customers that the problem wasn’t code related.

The old MongoDB/C# driver did not provide an async operations either. The new driver provided improvements over almost all aspects of MongoDB.

It took HT about 300 hours of effort to revamp the entire application on to the new MongoDB driver. The task was even more sophisticated due to the fact that the MongoDB driver was not backward compatible.

As soon as the new changes were implemented, HT and the customer noticed the following important changes:

Over 300 hours of rewrite

It took HT over 300hrs of code rewrite from the legacy MongoDB driver to the new one. The effort required some serious thoroughness in Unit as well as Integration Testing efforts in tandem to development efforts.

MongoDB Driver Benefits

The customer saw a 100% drop in random Socket Connection errors.

Async operations almost doubled the Server handling capacity.

Application performance increased and praise from customers was immediate.

Here are some of the snapshots from real-code that was utilized in the rewrite. Notice the clear separation of queries from the actual Mongo code.

Notice the usage of Singleton for MongoDB Context as well as the strong typing of various collections to avoid code duplication or contextual errors.

Learn More About MongoDB Driver

To learn more about the new MongoDB Driver and the advantages it provides over the old legacy driver, go here.

Pluralsight MongoDB course

Leave a Reply

Your email address will not be published. Required fields are marked *