Friday, May 25, 2012

How To Get Started With CQRS

I’m reading about Autofac – another IoC framework that we use at work. Reading on the autofac page, I found out about CQRS and the more I read about it the more I like it. Being passionate about high scale services, the main concepts of CQRS really resonated with me :

CQRS separates commands (that change the data) from the queries (that read the data).

The design and architecture of a read only service and read-write service are different when it comes to scalability. With read-only services, you can add caching layer to improve hot reads. With read-write services, you have to think about consistency, where caching could turn out to be difficult, depending on the number of machines your services are working on.

More about CQRS – read here.

Thursday, May 24, 2012

HOWTO: Determine the current Powershell version

Today me and one of my coworkers were investigating a problem related to configuration of a new server machine. We have an batch script which automates tasks like configuring the new OS, pulling from Git repos, building locally and setting up the local Web apps. At one of the steps, the script failed where it was executing a Powershell script. That could be due to mismatch of Powershell version. So here are my findings:

1. On Windows 7 and Windows 2008 Server R2 (and newer), Powershell 2.0 comes with the OS. On Vista, Windows 2008 Server, you have to manually install it

2. If you want to make sure what is your current PS version, open up a Powershell window and type “$Host.Version” at the prompt. You will see the following output showing the version number – in this case 2.0:

image