Archive for January, 2012

Git Source Control Plugin for Visual Studio

January 24th, 2012

If you are a big user of GitHub, and  a growing number of people are, and you also use Visual Studio and you like the convenience of doing everything inside of visual studio, I have found a nice little extension for visual studio.  The Extension is called  the Git Source Control Provider and can be found HERE.  It’s basically the exact same thing as the Visual SVN plugin that integrates into Visual Studio which works with the SVN source control library, all the instructions are there to show you how to install it to your particular version of Visual Studio.  Please note that you will need to install msysgit, Git Extensions and TortoiseGit if you want all the relevant context menus in Visual Studio.  I could not get the push/pull/add commands in there but if you do a sync it will have all the command in the window for you.  I especially like the commit screen where it shows you what you are about to commit, this screen also allows you to open the .gitignore file and edit it on the fly, allowing you to ignore the files you want, pretty sweet:

Similarities between Replication and Event or Message Bus

January 24th, 2012

A key component to many distributed software systems is the concept of a Message or Event Bus.  Any good Messaging architecture should be able to accomplish some basic things when it comes to transporting your messages, I have outlined them below:

  • Publish-Subscribe: Modules may subscribe to certain message types. Whenever a module publishes a message to the bus, it will be delivered to all modules that subscribed to its message type.
  • Broadcast: The message will be delivered to all (other) modules.
  • Point-to-point: The message has one and only one recipient.

In doing my research into distributed systems I keep wanting to do a comparison of these two techniques of transporting messages around in a distributed system.  At its very basic usage, replication takes care of the Broadcast scenario very easily, right out of the box, that is the very definition of replication.  The other two types Publish-Subscribe and Point-to-Point were simply not possible up until this point without a lot of application level logic, that just simply doesn’t make much sense.

Although CouchDB with its introduction of selective replication seems to accomplish this, I don’t want to focus this on Couch, I just want to pose Selective Replication as an alternative to using a message bus and I would like to see what the pros-cons are for each.  This is what prompted me to write the CouchDB admin tool, because when you have selective replication, you have a need to administer those replication documents and filters to tell the databases where the documents need to go.  I think that the admin tool is a drawback to using Selective Replication but on the flipside you will have a lot of code or configuration in the event bus system, particularly in the writing/maintenance of the many modules you need to get the publishers/subscribers in place.

I think a large pro in favor of Selective or Full Replication is how easy it is to make backups or replicas of your data, instead of having to pass your messages through the bus in the Message Bus system with replication you just bring your db online and it will do the replication for you, so there is a significant performance advantage in replication.

As far as Publisher-Subscriber messaging, this is where Filtered or Selective Replication comes into play, you have the ability to set up sets of filters that tells your database where to send the documents to and exactly which ones.  The Point-to-Point scenario is accomplished via this method as well, you just have a single point of replication, whether you choose to filter the documents is up to you.

I hope this document can be of use to somebody, I just wanted to get this out there for anybody else looking into options for building their next distributed systems.  I think both technologies have their advantages/disadvantages and should be used when they fit.

NCQRS Fork on GitHub

January 23rd, 2012

I noticed that the NCQRS project was missing a CouchDB event store example, so I created a project in the master NCQRS project that shows how you can hook into it using CouchDB, check out my fork at the address below.

Update on CouchDB Admin Tool

January 20th, 2012

I have included some screenshots of my new and improved version of the couchdb admin tool.  Upon further research I have noticed that CouchDB will only run a replicator document per target and source, meaning once you make one replicator document, if you make another and assign it the same target and source, it won’t ever kick that second one off until you change either the target or source.

In this new version I have busted out the UI into more tabs so it makes more sense.  I also created a DocTypeViewModel to model the replication documents you create over to the UI.  The code has been updated at

Fix Adobe Acrobat Licensing issue

January 18th, 2012
The other day I had a problem with my TurboTax software that I recently purchased in regards to using it on Windows 7 Ultimate 64 bit version, it just wouldn’t work.  In the process of trial and error of things I was trying on my machine to get TurboTax, I went into MSConfig and turned off all the microsoft services as part of my troubleshooting steps.  Apparently doing that also turned off something in the Adobe Acrobat licensing and was creating an error that looked like this:

I found that error online and its exactly like the one I am getting except the error code at the bottom there is 148:3 at the bottom, either way, this link is a link to a download tool that will take care of this problem:

Is CQRS a fad?

January 17th, 2012

If you follow a lot of the .net development world, there is a new term being thrown around a lot called CQRS, it stands for Command and Query Responsibility Segregation.  There are a few key players in this up and coming pattern of development if you want to know more, I have provided links below to some of the guys I have read up on.  At the heart of this pattern is the idea of event sourcing, or the ability to create a series of commands and events that will create your objects in your system.  This is the key feature of the pattern in my opinion and I think this is why there is an argument that the pattern or the little community that is growing is considered a fad.

As for the rest of the pattern, if you look into it much, the community will tell you that the bits and pieces are “An implementation detail” and not really a big deal.  I think this is where the rub comes in for a lot of folks looking into using this pattern for their next distributed project.  When it all boils down to it, what are you trying to get accomplished with a distributed system?  You are trying to get data from point A to point B.  I guess if you want to stick a name on it, then CQRS could be one, or we could just call it a distributed system, doesn’t really matter to me.  I know that the java and ruby guys have been doing systems like this for quite a while now and they do not have a term for it besides “distributed”.  Anyways, just thought I would throw this out there for anybody doing research into writing their next distributed app, references below.

Greg Young – Seems to be go to guy for CQRS
Rinat Abdullin – Another guy right on par with Greg
Udi Dahan – the creator of NServiceBus
Mark Nijhof
Jonathan Oliver – Creator of a very good Event Store for a variety of Durable Storage mechanisms.

TurboTax 2011 will not install on Windows 7 Ultimate 64 bit

January 17th, 2012

I sat down tonight to get ready to do my taxes for 2011 and started installing my copy of Intuit’s TurboTax for the 2011 tax year.  The software installed just fine, went off without a hitch, the problem was when I actually tried to launch the software, it just loads the splash screen and then disappears.  Well, anytime a piece of software does something like this to me I see it as a personal challenge and I must say that this challenge got the best of me, I cannot for the life of me figure out what to make this work.  I have tried uninstalling and reinstalling with no virus scanner and as administrator to no avail and I have downloaded their latest updates to the software and that didn’t phase it.  They have a long list of things that you can try but none of these items seem to work.  I was finally able to get it installed on a Windows XP Virtual PC that I had and it installed without a hitch.  I have noticed that several users of TurboTax are complaining out there about this problem, that it could have been going on for 2 years now although my last years copy of TurboTax installed without a hitch so I have no idea what they have changed this year.  I did notice that they depend on the .net runtimes so I thought that was kinda cool that a large software product uses .net.

The big problem here is that the software didn’t report anything back to me, the user.  I would have appreciated an error code, something, anything, instead I had nothing to go on.  I had to just go off to google and start doing random searches and hope I could land on something that could help me, but I found very little.  If you know of a fix out there, please comment on this post and we can hopefully help other poor souls that are in this predicament.

CouchDB Replication Admin Tool

January 16th, 2012

I whipped up this admin tool in WPF to show how you can manage users along with replication of your documents.  You will have to have the couchbase server installed before you can run the example tho, you can download that HERE   The code is pretty simple, the key is the redbranch-hammock library that I have been working with and modifying to my needs.  At this point the project is a WPF project, it would probably be better implemented as an site but I come from a desktop background and I was working with a local copy of couch on my machine so I went with a WPF project for now.  I will probably port it over to some sort of web project down the road later.   Here is the link to the google code SVN repository:

Filtered Replication Scenario for distributed systems.

January 10th, 2012

As you may know, I have been studying couchdb, specifically its ability to replicate your data and trying to get  a better understanding of how all this works.   I have modeled out the basic data flow for selective, or filtered replication of the data and I have attached the diagram below.  I will give a little bit of an explanation of what is going on here to hopefully make more sense of how things are going to work.

We have an admin tool that would most likely reside on a web server somewhere that will have the ability to do the standard CRUD operations on users as well as the standard CRUD operations on the couchdb documents for filtering the data.  Those changes will all go into a database that is housed on the main server on a per organization basis, say its your local store and the Master DB is your HQ.  That is the admin piece, now on to the server side..

The server, or Master DB will just be the central repository of data, the filters in my current idea will all sit in the Filtered DBs and we will let those filtered DBs make all the decisions on where the data goes when it comes to the server.

The client will have the full ability to create all the documents on the local or client side for simplicity at this point.  (I am defining the client as an actual application that will reside on the desktop, mobile device, whatever)  The Filtered DB will grab all the data from the client and hold it for filtered replication to the server later, this would seem to be a nice way to have a backup of your local data.  The idea at this point is to have the client side create the filtered DB on the server side which is simple enough via couchdb.

That pretty much sums it up, I have the diagram below.

CouchDB presentation @ StrangeLoop

January 9th, 2012

Here is a good little video of a presentation that Benjamin Young with CouchBase gave at the StrangeLoop conference.  If you are considering writing a couchDB app or migrating a current application you have to couch, I recommend watching this video, he gives a good rundown of the features of the NoSQL engine.