Tuesday, October 21, 2008

Presenting at Christchurch Code Camp 2008

I'm presenting at the Christchurch Code Camp on 1 November.

I'm presenting on LINQ-to-SQL and also on my open source project, ActiveSharp. If you were coming to a presentation on either of those topics, what would you like to hear? (This is your chance to shape the presentations, because I haven't finished writing them yet ;-)

At the moment, the abstracts for the two presentations look like this:

Title: Extending LINQ to SQL

Abstract: How to build on LINQ to SQL to add extra capabilities and work around the product’s limitations. The presentation will share techniques we’ve used at Optimation to "push the envelope" when using LINQ to SQL. I’ll outline the base techniques, how we’ve applied them, and the minor limitations that remain unresolved. For those new to LINQ to SQL, the presentation will begin with a whirlwind introduction to the product. It will conclude with some thoughts on how LINQ fits into the "big picture" of .NET ORM tools.


Title: Low-Level .NET – a look at ActiveSharp

Abstract: How to get started on working with MSIL, the low-level "assembly" language for .NET. The presentation is based on my experiences writing ActiveSharp, a library which parses MSIL at runtime and also emits its own runtime-generated methods. I’ll introduce the key concepts, cover some techniques to help you "cheat" while you learn, and include examples from the ActiveSharp codebase.

What do you think? Am I focusing on the right points? Are there other aspects of these subjects which you'd prefer me to cover instead? All suggestions welcome...

Saturday, October 04, 2008

How eBoostr Works

I'm using eBoostr to speed up compile times in Visual Studio.

My only complaint with the product was the lack of documentation on what it caches and when. You can view the list of all the files that it is caching, but I couldn't find any documentation on how it actually chooses which files to cache. So, I emailed eBoostr technical support, and they sent back a very helpful and informative reply - which they kindly allowed me to quote in this post.

eBoostr works as follows:
  1. It monitors all read/write requests to the hard disk, and gathers statistics on the most frequently-read files
  2. By default it will "update cache contents each hour during computer idle time automatically". You can also manually request a cache rebuild (if your computer has no idle time(!), or you just want the cache to reflect your most recent usage patterns).
  3. It doesn't mess with write operations. Each write goes straight to the real disk. If the file was cached, the cached copy is invalidated. The cached copy will not become valid again until the next cache rebuild.
  4. If you are using both RAM and USB caching, RAM "has the highest priority" (so gets the most frequently used files, I presume). Files in RAM are not cached on USB.
At first, the algorithm struck me as a little crude. But on reflection I realised that it makes sense. By rebuilding the cache in batch mode (either automatically or manually) eBooster can make sure that the cache reflects the most commonly-used files. Contrast that with the other approach, which would be to move a file into the cache as soon as it is read - possibly meaning that an infrequently-read file, which maybe you are only going to read once, will bump a more frequently-used file out of the cache.

Subjectively, eBoostr seems to be working well for me. And as I've mentioned previously, it seems to be getting very high cache hit ratios in my typical daily usage.