Readings in distributed systems and DDD

Since I can't seem to find the time to write an in-depth article these days, I'll cheat for once and just link to others. These are posts that I've come across recently on distributed systems and DDD, the two main areas I'm interested in at the moment. They are all well worth your time reading if you haven't already. Distributed Systems Large-scale cluster management at Google with Borg This was of particular interest to me as I was designing a somewhat similar system at work when I came across this paper. It's a great read for anyone interested in distributed systems. The paper is well-written and is packed with insights. The authors are also very candid about what worked and what didn't work so well with Borg. Omega, and what it means for Kubernetes: a Q&A about cluster scheduling If you liked the Borg paper, you'll love this. … [+]
Read more

DbContextScope now available as a nuget package

The DbContextScope library for Entity Framework is now available as a nuget package. Thanks to Tieson Trowbridge for putting it together! … [+]
Read more

DbContextScope source code now available on GitHub

The source for the DbContextScope component I presented in the previous post is now on GitHub. As usual, work got in the way and it took me longer than I would have liked to put this up. The good news is that DbContextScope has now been battle-tested for two months in production in a large scale application and has worked beautifully so far. … [+]
Read more

Managing DbContext the right way with Entity Framework 6: an in-depth guide

UPDATE: the source code for DbContextScope is now available on GitHub: DbContextScope on GitHub. A bit of context This isn't the first post that has been written about managing the DbContext lifetime in Entity Framework-based applications. In fact, there is no shortage of articles discussing this topic. For many applications, the solutions presented in those articles (which generally revolve around using a DI container to inject DbContext instances with a PerWebRequest lifetime) will work just fine. They also have the merit of being very simple - at least at first sight. For certain types of applications however, the inherent limitations of these approaches pose problems. To the point that certain features become impossible to implement or require to resort to increasingly complex structures or increasingly ugly hacks to work around the way the DbContext instances are created and managed. Here is for example an overview of the real-world application that … [+]
Read more

From NHibernate to Entity Framework 6 - Part 1: the mapping story

This is the first part of an n-part series on using Entity Framework 6 coming from an NHibernate background . Although this series is primarily aimed at NHibernate veterans making the transition to Entity Framework 6, any developer new to EF will probably find most of this information helpful too. Introduction After having used NHibernate quite extensively for the past few years, I've just completed my first 6 months in the Entity Framework world. I had actually already given Entity Framework a try back in the EF4 days. I quickly abandonned it as it became clear very quickly that it wasn't ready for prime time. But I have to say that Entity Framework has come a long way since then. EF6 has become not just a usable but a very capable ORM. It's definitely now a very credible alternative to NHibernate. The transition from NH to EF6 was fairly smooth as … [+]
Read more

Generating HTML emails with RazorEngine - Part 04 - Taking a step back: behind the scenes of Razor and RazorEngine

This is the fourth part of a 10-part blog series. You'll find a list of all the posts in this series in the introductory post. Make sure to review the Before we start section in the introductory post. All the source code is on GitHub. Comment? Bug? Open an issue on GitHub. Before diving any deeper into RazorEngine, it's worth spending a few minutes getting a good grasp of what Razor and RazorEngine really are and of how they work under the hood. It will save a lot of time and frustration when trying to customize or understand RazorEngine's behaviour. This is a very quick and deliberately simplified overview of Razor. What is Razor? Razor is a language that lets you create document templates mixing static markup and code. Typically, the static markup is HTML and the code is C# or VB.NET. But it doesn't have to be. Razor … [+]
Read more