Logging Ideas

I’ve been thinking lately about logging, specifically in C#/.NET. In fact, every few months, I joke around with others at work that I’m going to end up writing my own logging framework. There are a few things I want from a logging subsytem - Fast Highly configurable with sane defaults Well-tested Documented Extensible Benchmarked Runtime configurability Instrumented Best effort Integration with .NET logging framework In this post, I’ll expand on these.
Read more →

Object Pool - Proxying calls

Note: This is the second post in a series about an object pooling pattern. You can follow along with code in this repo on Github. The repo will be steps ahead of this series, so don’t worry if there’s things in there I haven’t explained. Dynamic Proxy Why a Dynamic Proxy Proxy generator Wrapper Combining the wrapper and the interceptor Summary Dynamic Proxy For our proxy object, we’re going to use Dynamic Proxy from the Castle Project.
Read more →

Object Pool - An Introduction

Note: This is the first post in a series about an object pooling pattern. You can follow along with code in this repo on Github. The repo will be steps ahead of this series, so don’t worry if there’s things in there I haven’t explained. Overview Real world examples Microsoft SqlClient Ldaptive Components of a pool Object Pool Object Proxy Object Factory Summary Overview An Object pool is a pattern used to maintain a pool of objects (natch) that is useful in situations where initialization of those objects is expensive, such as database connections or network connections in general.
Read more →