Geeks With Blogs

News This is the *old* blog. The new one is at
Elton Stoneman
This is the *old* blog. The new one is at
December 2013 Entries
The concurrency shoot-out: SQL Server versus MongoDB (part 2)
Following up on The concurrency shoot-out: SQL Server versus MongoDB (part 1), I extended my performance tests with some variations to look at the options for performance and reliability, and see how they affected the results. Variant 1: reuse the database context In the first version of my performance tests, I used a new database context for each part of the workflow (instantiating a new EntityContext in EF, or a new MongoCollection in Mongo for parts 2, 3 and 4 of the workflow). Realistically, ......

Posted On Wednesday, December 18, 2013 4:24 PM

C# Extension Methods
My latest Pluralsight course, C# Extension Methods has just gone live. It’s an in-depth look at extension methods, which have been around since .NET 3.5. They’re the power behind LINQ and ASP.NET MVC’s HtmlHelper, but don’t tend to be used widely outside of the framework methods. Which is a shame. Extension methods are a powerful language feature which can add a lot to your own solution. To start with, as an enabler for some key scenarios, like: extending a 3rd-party codebase adding to a hierarchy ......

Posted On Monday, December 16, 2013 5:16 PM

The concurrency shoot-out: SQL Server versus MongoDB (part 1)
One of the biggest performance issues with the solution we’re building at the moment has been contention in SQL Server. We have NServiceBus processing workflows and we’re distributing the load across multiple queues and multiple host processes, each with multiple threads. At high load we have something like 200 threads running concurrently, all trying to read and write data in the same tables. For each step in the workflow we record an event against the main entity, which gives us an audit trail ......

Posted On Friday, December 13, 2013 10:10 PM

How to setup and teardown integration test dependencies
For automated integration tests, you often have external dependencies that you need to start up before the test run, and teardown after the test run. If you’re firing up a stub service, deploying a database, or starting a bunch of NServiceBus hosts, that can be expensive. You don’t want to do it in the test setup, as it’ll make all the tests longer to run. Ideally you want to run the startup once before any test starts, and then run the teardown once after all tests have finished. Visual Studio doesn’t ......

Posted On Wednesday, December 11, 2013 5:15 PM

Batching up memory-intensive parallel tasks
It’s surprising how easily you can bring down a .NET app. We’ll be starting the new year with a bulk load of data into the system we’re building, and now we’re load testing and verifying everything gets processed as expected. We’re fortunate that we have a snapshot of the expected data load, which contains around 70,000 incoming messages. We rely heavily on a separate system providing static data to enrich each message and we want to be sure that system has data for all the entities we’ll be pushing ......

Posted On Monday, December 9, 2013 4:44 PM

Copyright © Elton Stoneman | Powered by: