<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0"><channel><title>Dru Sellers</title><link>http://codebetter.com/blogs/dru.sellers/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/drusellers" type="application/rss+xml" /><item><title>dropkick - an idea for deployments</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/05/29/dropkick-an-idea-for-deployments.aspx</link><pubDate>Fri, 29 May 2009 12:01:46 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:241168</guid><dc:creator>drusellers</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=241168</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/05/29/dropkick-an-idea-for-deployments.aspx#comments</comments><description>&lt;p&gt;Still very rough, but I have the DSL compiling and looking at making file copy work. This is more than anything an exercise in building a framework that uses the same structure as the &lt;a href="http://blog.phatboyg.com/2009/04/07/declarative-workflow-with-masstransit/"&gt;MassTransit Sagas&lt;/a&gt;.&lt;/p&gt;

&lt;pre name="code" class="c-sharp"&gt;
    public class TestDeployment :
        Deployment&amp;lt;TestDeployment&amp;gt;
    {
        public static Part Web { get; set; }
        public static Part Db { get; set; }
        public static Part Service { get; set; }

        //dropkick r:role(web,db,service | full)
        static TestDeployment()
        {
            Define(() =&amp;gt;
                {
                    During(Web, (p) =&amp;gt;
                        {
                            p.OnServer(&amp;quot;WebServer&amp;quot;)
                                .IisSite(&amp;quot;Apps&amp;quot;)
                                .VirtualDirectory(&amp;quot;dashboard&amp;quot;)
                                .Verify()
                                .CreateIfItDoesntExist();

                            p.OnServer(&amp;quot;SrvTopeka19&amp;quot;)
                                .Msmq()
                                .PrivateQueueNamed(&amp;quot;mt_subscriptions&amp;quot;)
                                .CreateIfItDoesntExist();

                            p.CopyFrom(@&amp;quot;.\code_drop\dashboard\**\*.*&amp;quot;).To(@&amp;quot;\\webserver\apps\dashboard\&amp;quot;)
                                .And((f) =&amp;gt;
                                    {
                                        f.WebConfig
                                            .ReplaceIdentityTokensWithPrompt()
                                            .EncryptIdentity();
                                    });
                        });

                    During(Db, (p) =&amp;gt;
                        {
                            p.OnServer(&amp;quot;sql&amp;quot;)
                                .SqlInstance(&amp;quot;.&amp;quot;)
                                .Database(&amp;quot;dashboard&amp;quot;)
                                .Verify()
                                .BackupWithLightspeedTo(@&amp;quot;\\sql\\backsups\&amp;quot;)
                                .RunTarantinoOn(@&amp;quot;.\code_drop\dashboard\sql&amp;quot;);
                        });

                    During(Service, (p) =&amp;gt;
                        {
                            p.OnServer(&amp;quot;WebServer&amp;quot;)
                                .WinService(&amp;quot;dashboard service&amp;quot;)
                                .Verify()
                                .Do(() =&amp;gt;   //auto-stop
                                    {
                                        p.CopyFrom(@&amp;quot;.\code_drop\dashboard&amp;quot;).To(@&amp;quot;\\webserver\apps\dashboard-service&amp;quot;)
                                            .And((f) =&amp;gt;
                                                {
                                                    f.AppConfig
                                                        .ReplaceIdentityTokensWithPrompt()
                                                        .EncryptIdentity();
                                                });
                                    });        //auto-start
                        });

                });
        }
    }
&lt;/pre&gt;



&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=241168" width="1" height="1"&gt;</description></item><item><title>Why messaging #5 - Bus vs Broker</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/05/29/why-messaging-5-bus-vs-broker.aspx</link><pubDate>Fri, 29 May 2009 11:53:38 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:241160</guid><dc:creator>drusellers</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=241160</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/05/29/why-messaging-5-bus-vs-broker.aspx#comments</comments><description>&lt;p&gt;I have in the past gotten in a tizzy about message brokers and message busses. I pretty much say, busses rule and brokers drool. This stems from the fact that I view them as filling the same role, the intermediary between applications. Because of this view point, I see the broker as being a central point of failure and I see the bus as being a distributed equivalent, that overcomes much of the problems of centralization. I often dismiss the simplicity of centralization in this area from an academic snobbery vibe, which is just not the right way to go about it. So I decided to do something about it.&lt;/p&gt;

&lt;p&gt;It was while rereading EIP for this series I realized that the authors actually classified the two patterns into two different categories (they do not fill the same role!). The bus is a channel for message sending and the broker is a message routing mechanism (well crap, I have to abandon my old assumptions). With this realization, what does that mean for my previous assumptions?&lt;/p&gt;

&lt;p&gt;So, just how does the EIP define these two patterns?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Message Broker&lt;/strong&gt; - a means to decouple the destination of a message from the sender and maintain central control over the flow of messages (inside cover of EIP).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Message Bus&lt;/strong&gt; - enables separate application  to work together but in a decoupled fashion such that applications can be easily added or removed without affecting others. (inside cover of EIP).&lt;/p&gt;

&lt;p&gt;Well, hmmmm? Could it be that its possible for a software package to be both? It seems like it. Lets review. While working on MassTransit I feel that I have successfully accomplished the message bus pattern, but the broker pattern? Decouple the destination of a message from the sender and maintain central control over the flow. Well we have decoupled the sender from the receiver by following the publish / subscribe model, but the central control of flow? Well no, but do I want that? ... Centralization == single point of failure. hmmmm.... &amp;quot;the message broker pattern only tells us to develop a single entity that performs routing. It does not prescribe how many instances of this entity we deploy in a system at deployment time.&amp;quot; (EIP, pg 324) So does mean that the MassTransit SubscriptionService and Client are a broker pattern built for a more distributed system? It certainly seems possible. The Subscription Service lets you control in one point where messages go (the flow). Ok, well slap my biscuits looks like I am a fan of the broker model. That&amp;#39;s what I get for basing my snobbery on a one time read. ;)&lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=241160" width="1" height="1"&gt;</description></item><item><title>Why Messaging #4 - So hows it going?</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/05/14/why-messaging-4-so-hows-it-going.aspx</link><pubDate>Thu, 14 May 2009 14:40:27 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:225016</guid><dc:creator>drusellers</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=225016</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/05/14/why-messaging-4-so-hows-it-going.aspx#comments</comments><description>&lt;p&gt;Its been over a year since I went down the messaging path and how has it been? What have a learned? What has sucked? The following are some thoughts on my experiences with deploying MassTransit&lt;/p&gt;

&lt;p&gt;Although explaining the benefits of a messaging based system has been easy, trying to apply some of the new paradigms that Udi and Greg Young have been trying to pound into my skull has not been so easy. This includes a slew of things like message idempotence, worrying about message timeout (and elevating its importance in the whole system), what to do when a message doesn&amp;#39;t get where its supposed to go, figuring out how to rerun a messaging system, and others has been a bit of a mind warp. And figuring out how to test a messaging system...that took a while too. My team has pushed pretty hard in these areas and although it took a little while I think we are starting to see the seeds of our effort. I guess the take away here is that its just going to take time&lt;/p&gt;

&lt;p&gt;I know that I am still in the early stages of use for this pattern / style of development and further more as a developer of the framework I can get a bit excited about using it, but at times I think I am treating the tool a bit like a &amp;#39;hammer and that everything is a nail&amp;#39; but its hard to know when it makes sense and when it doesn&amp;#39;t. My hope is that I continue to experience more and more use, that I can find that line sooner rather than later. Its like, oh that could be a useful event that the accounting system is closed. Then we build it up as an event and broadcast the account totals out to our systems that are interested. Right now we have just one system and my coworkers and I kinda stand back and say &amp;quot;Really?&amp;quot; that could have just been a file transfer. I know though as soon as we get that second system we will be very happy.&lt;/p&gt;

&lt;p&gt;Another thing that seems to be happening is that I am writing an awful lot of windows services. One to broadcast the message and one to receive the message. Not really sure if this is good or bad or anything, but it did allow me to sit back and create Topshelf an OSS library for writing windows services (imagine that), and from what I have heard it seems to be working out quite well for people. But its something that is new to me, and I just don&amp;#39;t have the experience writing that kind of code. But it seems to be going well, it just adds a lot of stuff that I am not used to watching. Thankfully log4net is quickly becoming a very near and dear friend.&lt;/p&gt;

&lt;p&gt;As I imagine writing all of these services, so that I can integrate all of my organization I am also starting to wonder about how in the heck I am going to manage this multitude of services. Documentation will help alot, but I am lazy and don&amp;#39;t want to write documentation. So how can I expose information about our systems with out having to keep it in sync with the word docs? This is where I have started to look into the concept of metadata. Basically, i want an MT service to tell me something about itself. Where is it installed, how many messages is it handling per minute, error count, etc. I feel that if I can get this baked into MT and exposed to us in some sort of dashboard, managing this beast will get a lot easier.&lt;/p&gt;

&lt;p&gt;Well, I hope this was helpful. I will try to write another one when it seems to make sense.&lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;


&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=225016" width="1" height="1"&gt;</description></item><item><title>Why Messaging #3 - What did I read?</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/05/02/why-messaging-3-what-did-i-read.aspx</link><pubDate>Sat, 02 May 2009 16:03:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:210877</guid><dc:creator>drusellers</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=210877</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/05/02/why-messaging-3-what-did-i-read.aspx#comments</comments><description>&lt;p&gt;I just finished presenting at the &lt;a href="http://www.iowacodecamp.com"&gt;Iowa Code Camp&lt;/a&gt; and one of the little change ups that I did in this presentation was talk about the various books that I have read. So, if you have decided to pursue messaging as an architectural style to use, here are some reads for your next steps. These sources are also usually going to be the source of information for the following posts. Please leave additional resources you like in the comments. :)&lt;/p&gt;
&lt;p&gt;-d&lt;/p&gt;
&lt;p&gt;

Books
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Addison-Wesley/dp/0321200683/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1241279329&amp;amp;sr=1-1"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Enterprise-Service-Bus-David-Chappell/dp/0596006756/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1241279353&amp;amp;sr=1-1"&gt;Enterprise Service Bus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a&gt;SOA Patterns&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Pattern-Oriented-Software-Architecture-Distributed-Computing/dp/0470059028/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1241279302&amp;amp;sr=8-1"&gt;POSA #4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Power-Events-Introduction-Processing-Distributed/dp/0201727897/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1241279386&amp;amp;sr=1-1"&gt;Power of Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Event-Based-Programming-Taking-Events-Limit/dp/1590596439/ref=pd_sim_b_1"&gt;Event-Based Programming&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
People
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Udi Dahan
		
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.udidahan.com/first-time-here/"&gt;His Best Hits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.udidahan.com/2007/11/09/podcast-versioning-and-soa-there-is-no-idog2/"&gt;There is no IDog2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Arnon
		
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.rgoarchitects.com/nblog/default.aspx"&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Ayende
		
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://ayende.com/Blog/category/554.aspx"&gt;on Rhino.ServiceBus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ayende.com/Blog/category/555.aspx"&gt;on Rhino.DHT&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=210877" width="1" height="1"&gt;</description></item><item><title>Why Messaging #2 - What is a message</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/04/30/why-messaging-2-what-is-a-message.aspx</link><pubDate>Fri, 01 May 2009 03:07:11 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:208900</guid><dc:creator>drusellers</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=208900</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/04/30/why-messaging-2-what-is-a-message.aspx#comments</comments><description>&lt;p&gt;So what is a message? &lt;/p&gt;

&lt;p&gt;A message is an atomic unit of work. It should contain all of the data needed for the receiver to do its job. Ok, well that&amp;#39;s great but what is it? Its really pretty simple:&lt;/p&gt;

XML

&lt;pre&gt;
&amp;lt;order&amp;gt;
	&amp;lt;item no=&amp;quot;22&amp;quot; /&amp;gt;
	&amp;lt;name&amp;gt;billy&amp;lt;/name&amp;gt;
&amp;lt;order&amp;gt;
&lt;/pre&gt;

or

JSON
&lt;pre&gt;
{ order: { no:22; name:&amp;quot;billy&amp;quot;; } }
&lt;/pre&gt;
or 

Binary
&lt;pre&gt;10111000110100111011100010101001101101101&lt;/pre&gt;

&lt;p&gt;It is state that is defined much in the same way a feed file would be prepared, and it has the intent of being sent to another party. Not including key values (database keys) (thereby assuming the source system can just look up the values associated) is also an important point. With messaging, unlike text files, it tends to be one item per message because one of the goals again of the message over file transfer is speed of delivery. Rather than wait for a bunch to accumulate you send them when the occur. Of course, as Udi would tell me, it all depends on the actual system need. :)&lt;/p&gt;

&lt;p&gt;And that is how I think of a message.&lt;/p&gt;

-d&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=208900" width="1" height="1"&gt;</description></item><item><title>Why Messaging #1 - Intro</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/04/27/why-messaging-1-intro.aspx</link><pubDate>Tue, 28 Apr 2009 02:36:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:203258</guid><dc:creator>drusellers</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=203258</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/04/27/why-messaging-1-intro.aspx#comments</comments><description>&lt;p&gt;So, why messaging?&lt;/p&gt;
&lt;p&gt;For me it started when I was tasked with integrating several systems at my current employer. Our goal was to build a data warehousing solution that would take the stress of historical analysis off of our transactional systems. With that goal in mind I set about asking several of my friends how I should go about doing this. The overwhelming response at the time was to read &lt;a href="http://astore.amazon.com/drusel-20/detail/0321200683"&gt;Enterprise Integration Patterns (EIP)&lt;/a&gt;, and it was there that I discovered messaging as a solution to my problems.&lt;/p&gt;
&lt;p&gt;So, again, why messaging? Well I had some goals: integration of bank systems, provide a means that would not turn the overall system into what &lt;a href="http://www.rgoarchitects.com/nblog/2008/12/16/SOAAntiPatternTheKnot.aspx"&gt;Arnon calls a Knot&lt;/a&gt; (actually so does EIP pg 52), and it should be easy to use. Ophhhhhda! It is my hope that this series of posts will help you to understand the use of messaging and whether its a fit for you or not.&lt;/p&gt;
&lt;p&gt;To begin with lets summarize the four basic types of integration according to EIP: file transfer, shared databases, remote procedure invocation, and messaging.&lt;/p&gt;
&lt;p&gt;First we have file transfers, the worlds workhorse of integration. We write some data out to a file and then put it someplace the other application can get to. Everything can read them and everything can write them. This makes them simple and effective. However as you environment gets more complex you can start to run into issues around enforcing data standards, when to produce them, archiving them, which applications need them? Thankfully though .Net at least makes it easy to read/write XML (well sort of) and we have the wonderful &lt;a href="http://www.filehelpers.com/"&gt;FileHelpers&lt;/a&gt; project for other formats.&lt;/p&gt;
&lt;p&gt;Second, we have the good ol&amp;#39; shared database. Its faster than File Transfers, and it has schema around the data that helps to conform the data. The updates are instant versus the File Transfers batch orientation which is a plus as well. Another boon, like file transfers is that they are pretty simple as well and your application is probably already using SQL anyways. Of course we start to get issues as applications abuse the schema (multiple applications want to use the schema in different ways), or start to put load on the database itself (maybe on a contentious table). But I think the biggest thing is that we have broken encapsulation at a pretty low level. Application A now knows about the internal state of Application B. I think my feelings about this though are best summerized by &lt;a href="http://twitter.com/jeremydmiller/statuses/1604071343"&gt;Jeremy Miller&lt;/a&gt;.
&lt;/p&gt;
&lt;blockquote&gt;
I mean, it&amp;#39;s like drug addicts sharing needles. It&amp;#39;s the most insidious form of coupling you can possibly come up with
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Third, we have remote procedure invocation. This includes things like REST, WS-*, .Net Remoting, WCF and more. This method allows us to share behavior and state something don&amp;#39;t have with files and databases, it better encapsulates the data and for most programmers is easy to grok. The key issue for me though is that the network isn&amp;#39;t reliable. It also opens us up to Arnon&amp;#39;s Knot mentioned earlier. Think of a system where you have a web service calling a web services calling a .... and you will get the picture. So how can we share some state, and some behavior with out getting all tangled up?&lt;/p&gt;
&lt;p&gt;Enter messaging. Its data format is really as simple as the file transfer, in fact EIP refers to it as like micro file transfers, with the behavior aspect of RPI but you gain the offline async nature of the messaging systems. Both systems don&amp;#39;t have to be up (like file transfers or shored database), there are ways to intercept and transform messages that you don&amp;#39;t get with RPI (but you can with File Transfers), and most importantly it starts to make you think about non-optimal scenarios. So this is great and all but what am I sacrificing? You lose the call stack, debugging across multiple services / machines is a pain (welcome back to the world of logging), and well, it warps your brain...&lt;/p&gt;
&lt;p&gt;This concludes my very short, very contrived overview of the integration options.&lt;/p&gt;
&lt;p&gt;Next time, we will discuss what a message is.&lt;/p&gt;
&lt;p&gt;-d&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=203258" width="1" height="1"&gt;</description></item><item><title>MassTransit Routing</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/04/18/masstransit-routing.aspx</link><pubDate>Sat, 18 Apr 2009 23:27:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:197529</guid><dc:creator>drusellers</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=197529</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/04/18/masstransit-routing.aspx#comments</comments><description>&lt;p&gt;From time to time, I get &lt;a href="http://groups.google.com/group/masstransit-discuss/browse_thread/thread/61a87c6fea7a528f"&gt;requests for routing&lt;/a&gt; in &lt;a href="http://masstransit.googlecode.com/"&gt;MassTransit&lt;/a&gt;. We want to identify and configure, at design time, where a given message is going to be sent. &amp;quot;I want all BuyWidget messages to go to msmq://localhost/widget_buyer&amp;quot;. While this really isn&amp;#39;t the way that I like to think about things from a SOA / EDA perspective, I felt this was a valid feature request and decided to go ahead and add it today. This is what it looks like.&lt;/p&gt;


&lt;pre name="code" class="c-sharp"&gt;
IServiceBus bus = ServiceBusConfigurator.New(b =&amp;gt;
{
  b.ReceiveFrom(&amp;quot;msmq://localhost/mt_client&amp;quot;);
  b.ConfigureService&amp;lt;RoutingConfigurator&amp;gt;(rs =&amp;gt;
  {
    rs.Route&amp;lt;BuyWidget&amp;gt;().To(&amp;quot;msmq://localhost/widget_buyer&amp;quot;);
  });
});
&lt;/pre&gt;

&lt;p&gt;You should now be able to use the pub/sub semantic without actually having the subscription service installed and running. If you find you need to configure the routing more dynamically, like if you start thinking about driving this process from a database, I would recommend you take another look at the subscription service.&lt;/p&gt;

&lt;p&gt;Currently you can only do this in code, but it should be easy enough to extend into some xml config if you are so inclined. This the first pass at this functionality so let me know what you think.&lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=197529" width="1" height="1"&gt;</description></item><item><title>What's the difference between a message and an event</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/03/30/what-s-the-difference-between-a-message-and-an-event.aspx</link><pubDate>Tue, 31 Mar 2009 02:26:09 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:189904</guid><dc:creator>drusellers</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=189904</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/03/30/what-s-the-difference-between-a-message-and-an-event.aspx#comments</comments><description>&lt;p style="border:2px solid #dd0;background:#ffa;padding:5px;"&gt;&lt;a href="http://blog.phatboyg.com/2009/03/30/masstransit-06-release-candidate/"&gt;MassTransit has hit 0.6 RC1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the &lt;a href="http://elegantcode.com/2009/03/18/code-cast-25-masstransit/"&gt;Elegant Code Cast&lt;/a&gt;, I was asked what the difference was between a message and an event, and I really wasn&amp;#39;t happy with my answer. Well as luck would have it I recently started reading &lt;a href="http://astore.amazon.com/drusel-20/detail/0201727897"&gt;&amp;#39;The Power of Events&amp;#39;&lt;/a&gt; in which the author gives a very good explanation (Below is a brief summation).&lt;/p&gt;

&lt;p&gt;A message is just a structure. This structure could be as simple as the string &amp;#39;BUY&amp;#39; or &amp;#39;SELL&amp;#39; or it could be a complex structure like an object graph serialized to JSON. This is the message.&lt;/p&gt;

&lt;p&gt;An event adds the components of &amp;#39;significance&amp;#39; and &amp;#39;relativity&amp;#39;. Significance in this case is that the &amp;#39;message&amp;#39; signifies some activity. The event&amp;#39;s form (again the message part) should contain data describing the event it signifies. Relativity is that it is related to other activities by time, causality and aggregation. Ok, so that introduces some other concepts. Time is easy, it happened on 12/31/2008. Causality is asking what caused this message. In &lt;a href="http://code.google.com/p/masstransit/"&gt;MassTransit&lt;/a&gt; (MT), I am thinking of implementing this by placing the name of the message that is currently active in the message headers if you published any messages. Lastly, we have aggregation, if event A signifies the activity of the set of events B&lt;span class="sub"&gt;1&lt;/span&gt;, B&lt;span class="sub"&gt;2&lt;/span&gt;, B&lt;span class="sub"&gt;3&lt;/span&gt;... then A is an aggregation of the events B&lt;span class="sub"&gt;i&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;I look forward to finding ways to apply the thoughts and patterns in the book to MT in the near future. As for now though, &lt;a href="http://blog.phatboyg.com/2009/03/30/masstransit-06-release-candidate/"&gt;0.6 has hit RC status&lt;/a&gt;, and we are looking for feedback. So please pull the code down and run the samples. Let me know what you find and/or think. &lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=189904" width="1" height="1"&gt;</description></item><item><title>Whew, pile of productivity this weekend.</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/03/22/whew-pile-of-productivity-this-weekend.aspx</link><pubDate>Mon, 23 Mar 2009 02:54:42 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:189611</guid><dc:creator>drusellers</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=189611</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/03/22/whew-pile-of-productivity-this-weekend.aspx#comments</comments><description>&lt;p&gt;Well we are getting closer and closer to MassTransit 0.6 release.&lt;/p&gt;

&lt;p&gt;Features to look forward to include:
&lt;ul&gt;
&lt;li&gt;Improved Saga support (now using Magnum StateMachine)&lt;/li&gt;
&lt;li&gt;auto consumer for sagas as well&lt;/li&gt;
&lt;li&gt;New outbound pipeline increases performance&lt;/li&gt;
&lt;li&gt;A concept of BusServices&lt;/li&gt;
&lt;li&gt;Now sitting on the Topshelf
	&lt;ul&gt;
		&lt;li&gt;topshelf to get appdomain isolated services (well its there but untested)&lt;/li&gt;
		&lt;li&gt;no longer using ServiceLocator.Current&lt;/li&gt;
		&lt;li&gt;will soon have a new command line RunAs&lt;/li&gt;
	&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Removed the XML configuration for this release to allow the configuration DSL to flurish&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;Played with git, did my first branch, work, pull (to merge) and push back to origin. I really like the .gitignore file, simple concept, super helpful. I am also enjoying the branch merge stuff, need to try it out with two people on one project but think its going to be good. Also need to hook Beyond Compare up to it.&lt;/p&gt;

&lt;p&gt;Started to build a small application &amp;#39;&lt;a href="https://github.com/drusellers/biblioteca/tree"&gt;biblioteca&lt;/a&gt;&amp;#39; to see how fubumvc works. I am liking what I see, but its a bit of a pain to set up. Hopefully they will get something to help out in this area, but I am looking forward to using FubuMVC on the project now that I have it up and running.&lt;/p&gt;

&lt;p&gt;watched Ze Frank &amp;#39;&lt;a href="http://www.zefrank.com/theshow/archives/2006/09/092006.html"&gt;bust your cycle&lt;/a&gt;&amp;#39; via &lt;a href="http://twitter.com/TimBarcz/status/1370901350"&gt;Tim&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;dinked with:
	&lt;ul&gt;
		&lt;li&gt;FluentNHibernate, i really want to bring some of that convention love to MT&lt;/li&gt;
		&lt;li&gt;FubuMVC, want to bring some of the policy/convention thoughts to MT&lt;/li&gt;
		&lt;li&gt;Ninject, watching to see where nate takes his extensibility model.&lt;/li&gt;
	&lt;/ul&gt;
&lt;p&gt;

&lt;p&gt;read http://bradfordcross.blogspot.com/2009/03/dsls-in-trading-domain.html yup. need to be able to evolve in production.&lt;/p&gt;

&lt;p&gt;and I got a haircut. &lt;/p&gt;

-d&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=189611" width="1" height="1"&gt;</description></item><item><title>PhatBoyG and me on Elegant Code</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/03/19/phatboyg-and-me-on-elegant-code.aspx</link><pubDate>Fri, 20 Mar 2009 01:27:03 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:189522</guid><dc:creator>drusellers</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=189522</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/03/19/phatboyg-and-me-on-elegant-code.aspx#comments</comments><description>&lt;p&gt;Just over a week ago, &lt;a href="http://phatboyg.com/"&gt;Chris Patterson&lt;/a&gt; and I recorded a podcast with &lt;a href="http://elegantcode.com/"&gt;Elegant Code&lt;/a&gt;rs &lt;a href="http://elegantcode.com/about/jarod-ferguson/"&gt;Jarod Ferguson&lt;/a&gt; and &lt;a href="http://elegantcode.com/about/david-starr/"&gt;David Starr&lt;/a&gt;. We spent a couple of hours discussing &lt;a href="http://en.wikipedia.org/wiki/Event_Driven_Architecture"&gt;event driven architecture&lt;/a&gt; (EDA), messaging, and &lt;a href="http://code.google.com/p/masstransit/"&gt;MassTransit&lt;/a&gt;. Through the magic of editing, they managed to end up with a coherent eighty minutes (not sure how that happen as the &lt;a href="http://www.urbandictionary.com/define.php?term=G"&gt;G&lt;/a&gt; and I were wired to the hilt with caffiene). &lt;/p&gt;
&lt;p&gt;&lt;a href="http://elegantcode.com/2009/03/18/code-cast-25-masstransit/"&gt;Check it out on their web site&lt;/a&gt; (where you can listen, or subscribe via iTunes/PodCastRSS).&lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=189522" width="1" height="1"&gt;</description></item><item><title>Topshelf Isolated Services</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/03/18/topshelf-isolated-services.aspx</link><pubDate>Wed, 18 Mar 2009 10:42:12 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:189460</guid><dc:creator>drusellers</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=189460</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/03/18/topshelf-isolated-services.aspx#comments</comments><description>&lt;p&gt;As I mentioned in the previous post, I have a need for Topshelf services to run in separate application domains. This is a feature I have wanted for a little while, but had no idea how to do it. Thanks to some help from &lt;a href="http://www.ayende.com/"&gt;Oren&lt;/a&gt; I now have a first pass at an &amp;#39;Isolated Service&amp;#39;. You can try them out your self by configuring your service like:&lt;/p&gt;

&lt;pre&gt;
RunnerConfigurator.New(x =&amp;gt;
            {
                x.SetDisplayName(&amp;quot;chris&amp;quot;);
                x.SetServiceName(&amp;quot;chris&amp;quot;);
                x.SetDescription(&amp;quot;chris&amp;#39;s pants&amp;quot;);

                x.ConfigureServiceInIsolation(c=&amp;gt;
                      {
                          c.WithName(&amp;quot;my_service&amp;quot;);
                          c.WhenStarted(s =&amp;gt; s.Start());
                          c.WhenStopped(s =&amp;gt; s.Stop());
                          c.WhenPaused(s =&amp;gt; { });
                          c.WhenContinued(s =&amp;gt; { });
                      });
            });
&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; the &amp;#39;WithName&amp;#39; which used to be for display purposes has been repurposed to be the services IoC handle. Since this is a required thing I am thinking I will put it up in the method parameter list for ConfigureServiceInIsolation. I had realized that I was using ServiceLocator.GetInstance() which could make it very hard to get the one specific instance you want so I changed it to ServiceLocator.GetInstance(name) to make it easier. I am not super happy with this at the moment and would love some feedback on it.&lt;/p&gt;

&lt;p&gt;This is my first time doing AppDomain programming so any thoughts would be very much appreciated (just search for the word &amp;#39;Isolated&amp;#39; in the code base).&lt;/p&gt;

-d&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=189460" width="1" height="1"&gt;</description></item><item><title>When is one container (IoC) not enough?</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/03/18/when-is-one-container-ioc-not-enough.aspx</link><pubDate>Wed, 18 Mar 2009 10:38:22 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:189459</guid><dc:creator>drusellers</dc:creator><slash:comments>7</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=189459</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/03/18/when-is-one-container-ioc-not-enough.aspx#comments</comments><description>&lt;p&gt;Recently, Chris and I have been working on the next release of MassTransit (MT) and in the process of getting everything all nice and shiny we ran smack into an issue that neither of us have really had the chance to think about before. At what point does an application need more than one IoC container?&lt;/p&gt;

&lt;p&gt;The situation is this. In order to make the samples easy in MT, we have built the MT Gui which hosts the subscription service, health service, and timeout service in one .Net process and is displayed via a Win Form which communicates with these via its own bus. Until recently this hadn&amp;#39;t been an issue as they all communicated over the same address. However, that isn&amp;#39;t what we would expect to see in production so we started move each service to its own queue address. One queue per service also means one ServiceBus instance per service, At this point we had four service buses for four services in one .net process space (yikes!). In production these would all run in their own win services, with their own containers. Whereas, this one WinForm app has 4 instances of IServiceBus running around in its container. Well this makes it pretty hard to say give me IServiceBus in the constructor of the various sub-components and get the right instance.&lt;/p&gt;

&lt;p&gt;Well crap, what are we going to do? We kinda had it figured out with StructureMap by using its lambda support, but that doesn&amp;#39;t work with windsor at all (its also not a good answer). After discussing it some more we started ask ourselves questions like &amp;quot;Do you really want one container per bus?&amp;quot;, &amp;quot;Should we embed the container in the bus and then just support the one internal one?&amp;quot;, ultimately, we decided that having one container per service bus actually made a lot more sense. The fact that we made it easy on ourselves to cram a bunch of stuff in one service process, didn&amp;#39;t excuse that we really needed to be configuring one container per service.&lt;/p&gt;

&lt;p&gt;We came up with the following next actions:&lt;/p&gt;
&lt;p&gt;1. Topshelf services need to be able to run in their own appdomain (and thread for that matter). This should help me to not be lazy as I will have to have one container per appdomain. After all, why should Service A be able to grab a dependency from Service B? By drawing a harder line it should make it easier to not screw up unintentionally, of course we will keep the old mode available for you scissor runners. ;) -done (rev 29) and ready for review&lt;/p&gt;
&lt;p&gt;2. Topshelf services need to use the IServiceLocator instead of the ServiceLocator.Current. The use of static ServiceLocator.Current or ObjectFactory type doohickeys are probably not the best idea when you are trying to cram 8,000 completely different services into one hosted process (which is probably not the best idea either).&lt;/p&gt;
&lt;p&gt;3. We hope that most people don&amp;#39;t run into this issue. I would think that for most applications you would really only need one (maybe two) instances of IServiceBus, one for the control channel and one for the data channel. To make this a bit easier we now have an interface called IControlBus which you can use if you want your component to talk over the control channel and you would use IServiceBus as you data channel.&lt;/p&gt;

&lt;p&gt;Although its been frustrating trying to come to this conclusion, I think that this makes the most sense for this case. &lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;


&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=189459" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/dru.sellers/archive/tags/MassTransit/default.aspx">MassTransit</category></item><item><title>Windows 2008 Symbolic Links</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/02/10/windows-2008-symbolic-links.aspx</link><pubDate>Tue, 10 Feb 2009 12:54:29 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:188253</guid><dc:creator>drusellers</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=188253</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/02/10/windows-2008-symbolic-links.aspx#comments</comments><description>&lt;p&gt;
While doing some research into &lt;a href="http://www.capify.org/"&gt;Capistrano&lt;/a&gt;, I stumbled upon a term I hadn&amp;#39;t heard before, symbolic links. After doing some research it looks like this is a &amp;quot;new feature&amp;quot; for windows server 2008 (previously there were &lt;a href="http://en.wikipedia.org/wiki/NTFS_junction_point"&gt;junction points&lt;/a&gt;, which are like symbolic links, but can only point to directories on the local machine).
&lt;/p&gt;

&lt;p&gt;
I am wanting to use this feature to&lt;a href="http://www.capify.org/getting-started/from-the-beginning"&gt; achieve what they do in capistrano (see Deployment Directory Structure)&lt;/a&gt;.

&lt;pre&gt;
[deploy here]/releases/20090210064623/(files here)
[deploy here]/current [symlink to 20090210064623]
&lt;/pre&gt;

With this in place it becomes very easy to install new versions of applications with out destroying the old installation, and if there is an error, in order to rollback all you have to do is change the symlink.
&lt;/p&gt;

&lt;p&gt;
So here is how you make a symbolic link (if you know how to do it in the GUI let me know). Note: You have to be an admin to do this.

&lt;pre&gt;
mklink /d .\fake .\real
symbolic link created for .\fake &amp;lt;&amp;lt;===&amp;gt;&amp;gt; .\real
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;
Here is what it looks like on the command line with &amp;#39;dir&amp;#39;
&lt;pre&gt;
02/09/2009  07:28 PM    &amp;lt;DIR&amp;gt;          real
02/09/2009  07:30 PM    &amp;lt;SYMLINKD&amp;gt;     fake [.\real]
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;
and here is what it looks like in the explorer
&lt;img src="http://drusellers.com/images/symlink.png" style="display:block;" alt="" /&gt;
&lt;/p&gt;

&lt;p&gt;
There is no rmlink, you just rmdir or use explorer and delete it. I like that quite a bit, makes things simple. Now I just need to add this to either nant or nant-contrib.
&lt;/p&gt;

-d&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=188253" width="1" height="1"&gt;</description></item><item><title>Topshelf logo</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/02/09/topshelf-logo.aspx</link><pubDate>Tue, 10 Feb 2009 03:06:30 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:188237</guid><dc:creator>drusellers</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=188237</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/02/09/topshelf-logo.aspx#comments</comments><description>&lt;p&gt;
&lt;img src="http://www.phatboyg.com/top-shelf-3-small.png" style="float:left;" alt="" /&gt; So the last post, I was talking about &lt;a href="http://topshelf.googlecode.com/"&gt;topshelf&lt;/a&gt; a simple framework for hosting windows services. I have had a lot of fun working on it, and I wanted to give it a kick ass logo, well I am now happy to say that the logo for the project is complete.
&lt;/p&gt;
&lt;br style="clear:both;" /&gt;
&lt;p&gt;Pretty sweet, huh?&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://theagilebadger.com/images/portfolio-images/1967-chevelle.png" style="width:25%;float:right;" alt="" /&gt;The man behind the madness is Curt Shontz. Although, he usually draws gnarly hotrods and what not, I think he really captured what I had in my head. A really cool follow up was that Curt actually &lt;a href="http://theagilebadger.blogspot.com/2009/02/two-new-cool-tools.html"&gt;blogged about creating it&lt;/a&gt;! If you want to see more of his work take a trip to &lt;a href="http://theagilebadger.com/"&gt;his site&lt;/a&gt; where has some pretty sweet pics of those hotrods I was talking about earlier.
&lt;/p&gt;
&lt;br style="clear:both;" /&gt;
&lt;p&gt;
&lt;img src="http://www.phatboyg.com/mt-logo.png" style="float:left;" alt="" /&gt; For those paying attention, yes this is the same gentleman that did the rocking MassTransit logo.

&lt;/p&gt;

-d
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=188237" width="1" height="1"&gt;</description></item><item><title>Topshelf</title><link>http://codebetter.com/blogs/dru.sellers/archive/2009/01/11/topshelf.aspx</link><pubDate>Sun, 11 Jan 2009 23:27:58 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:187211</guid><dc:creator>drusellers</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://codebetter.com/blogs/dru.sellers/rsscomments.aspx?PostID=187211</wfw:commentRss><comments>http://codebetter.com/blogs/dru.sellers/archive/2009/01/11/topshelf.aspx#comments</comments><description>&lt;p&gt;So this is my quasi-new project. It is essentially the MassTransit.Host ripped out and in its own project. It is also the embodiment of my lessons learned about building services (daemons) on the windows platform.&lt;/p&gt;

Sample Code
&lt;pre name="code" class="c-sharp"&gt;
var cfg = RunnerConfigurator.New(x =&amp;gt;
    {
       x.SetDisplayName(&amp;quot;Timeout Service&amp;quot;);
       x.SetServiceName(&amp;quot;mt_timeout&amp;quot;);
       x.SetDescription(&amp;quot;Runs the MassTransit Timeout Service&amp;quot;);
           
       x.ConfigureService&amp;lt;TestService&amp;gt;(c=&amp;gt;
           {
               c.WithName(&amp;quot;my_service&amp;quot;); //this defaults to type name
               c.WhenStarted(s =&amp;gt; s.Start());
               c.WhenStopped(s =&amp;gt; s.Stop());
               c.WhenPaused(s =&amp;gt; { });
               c.WhenContinued(s =&amp;gt; { });
           });
       x.ConfigureService&amp;lt;TestService&amp;gt;(); //defaults (still working on this)

       //By default the service is set to start automatically
       x.DoNotStartAutomatically();

       //several different runas options
       x.RunAs(&amp;quot;dru&amp;quot;, &amp;quot;pass&amp;quot;);
       x.RunAsLocalSystem();
       //x.RunAs(AppConfig(&amp;quot;username&amp;quot;), AppConfig(&amp;quot;password&amp;quot;));
       x.RunAsFromInteractive();

       //set service dependencies
       x.DependsOn(&amp;quot;ServiceName&amp;quot;);
       x.DependencyOnMsmq();
       x.DependencyOnMsSql();
   });

Runner.Host(cfg, args)
&lt;/pre&gt;

&lt;p&gt;This code would be in a .Net console application and would be executed like:
&lt;pre&gt;
timeoutservice.exe            #Runs as a console
timeoutservice.exe /install   #installs the service
timeoutservice.exe /uninstall #uninstalls the service
timeoutservice.exe /gui       #runs the default winform (must be in container)
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;So, here are some of the things it provides: start/stop individually hosted services; run the service in console, service, or winform hosts; self service installing; delayed container setup for faster install/uninstall; POCO and some things it will provide soon: services start/stop won&amp;#39;t effect other services, WMI integration.&lt;/p&gt;

&lt;p&gt;I don&amp;#39;t see this as a game changing project, more than it is a place to harvest my education, and share with others. So if you write winservice code take a look and see if there is anything you can pass along yourself, if you don&amp;#39;t write winservice code but need to this can go a long way to helping that out.&lt;/p&gt;

&lt;p&gt;Topshelf requires you to use an IoC container, which has made writing this project so much easier as I can focus on the service aspects and less on the object creation. I am using the Common Service Locator so you can use whatever container you want. I am also directly using the log4net framework at the moment and that is about all that their is for dependencies.&lt;/p&gt;

&lt;p&gt;The big win for me is that I can now start my app as a console, test it, and then when happy run it as a service knowing its running in exactly the same way.&lt;/p&gt;

&lt;p&gt;The project also provides hooks into some of the more esoteric error events so that we can log the more odd errors.&lt;/p&gt;

&lt;p&gt;Its hosted at &lt;a href="http://topshelf.googlecode.com/"&gt;http://topshelf.googlecode.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also want to take a minute to throw out some props to &lt;a href="http://phatboyg.com"&gt;Chris Patterson&lt;/a&gt; my partner in crime and &lt;a href="http://codebetter.com/blogs/jeremy.miller/"&gt;Jeremy Miller&lt;/a&gt; for the mad FI skills I keep ripping off from StructureMap.&lt;/p&gt;

&lt;p&gt;-d&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=187211" width="1" height="1"&gt;</description></item></channel></rss>
