Enterprise Service Buses, Brokers, Message Queues, Oh My!

Continuing on my theme of message-oriented, I thought I’d get into a bit of detail about the various middleware options and some details about these options. Regardless of what type of middleware is chosen, one thing is common to all types of message-oriented middleware—the fact that they broker messages from producers to consumers. Impetus Before I get too far into the options, let’s look at a couple of the common reasons behind moving to a message-oriented architecture. One impetus towards MOM is to integrate various legacy or third-party systems into a new or exiting enterprise system.  This type of MOM … Continue reading Enterprise Service Buses, Brokers, Message Queues, Oh My!

Message-Oriented Architecture is a Misleading Term

I recently blogged about Message-Oriented Architecture (and Message-Oriented Middleware, MOM).  The technology leads to extremely flexible and scalable applications; but it really distracts from the system.  It’s like calling a standard single-process application as Control-Unit Oriented Architecture.  Sure, the application is divided into instructions that eventually make their way to the control unit of the CPU; but that’s not only a implementation detail of the application; it’s an essential implementation detail. It’s pretty hard to write an application that doesn’t eventually distil down to instructions given to a control unit of a CPU. And that’s kind of the problem with … Continue reading Message-Oriented Architecture is a Misleading Term

Message-oriented Architectures (Updated)

I’ve had a few people ask me about message-oriented architectures and my knowledge and experience of it has evolved over time; so, I figured it would be a good idea to collect and publish some information about it.  It’s not one of those topics on the Internet that has gotten a lot of content, so I’ll try and change that. A Message-Oriented Architecture is sometimes called Message-Oriented Middleware or MOM because there’s a middle tier or middleware that acts as the broker to relay messages from producers to consumers.  At the most succinct definition MOM is simply an architecture that … Continue reading Message-oriented Architectures (Updated)

Criteria for Success

I was having a  conversation with a client recently and the topic of “11th hour” came up.  He seemed to think it wasn’t possible to deliver a software project without some sort of “11th hour” panic.  I disagreed I disagree because I’ve done it on small and large projects.  Don’t get me wrong; it’s very easy to lose sight of things and easily get a project into a state where “11th hour” panic is inevitable.  But, it’s not something that can’t be avoided. One of the problems with software projects, it seems, (and with other projects, I suppose) is losing … Continue reading Criteria for Success

Mapping to Your Database is a Private Affair

Your mapping to your database is generally coupled to the design of the data and the mapping provider’s ability to implement a relational or non-relational model.  This means your ORM influences the design of your mapped classes and/or the design of system that uses these mapped classes.  i.e. your design can be limited in certain aspects by how the mapper is implemented. Because of these idiosyncrasies, your choice of ORM becomes an implementation detail; so, you want to keep any of its details and generated classes out of your interfaces.  You want to keep your ORM’s classes and the classes … Continue reading Mapping to Your Database is a Private Affair

Developing Windows Services in Visual Studio

Inevitably distributed systems often need a Windows service or two for certain tasks.  The creation of a Windows service project and hooking up a project installer to the service is fairly straightforward; so, I’m not going to get into much detail about that stuff. The stuff that I find that isn’t well understood is how to debug and deploy these services in a development environment. First off, debugging.  A service is just an executable that is started up by the Windows service manager.  From a native application standpoint, it has some entry points in it that the service manager looks … Continue reading Developing Windows Services in Visual Studio

Unbind a Visual Studio 2010 Solution from Source Code Control

I was working with a solution that I got from someone else the other day.  When I loaded it up, Visual Studio 2010 informed me that it could not connect to a TFS server at some URL and will open the solution in offline mode (or something to that effect).  Of course, I have no access to this TFS server, so, I’m going to get this message every time I open this solution.  That’s going to get annoying pretty fast. So, I had a quick search on the Internet about removing source code control from a Visual Studio 2010.  I … Continue reading Unbind a Visual Studio 2010 Solution from Source Code Control

Fluent Builders, Part 1

I’ve seen some conversations about fluent builders as of late, and I’d thought I’d post some information about fluent builders, the principles behind them, the problems they address, and how to implement them. Fluent Builder is a combination of the builder pattern and a fluent API. The builder pattern is similar to the factory pattern in that it’s intended to abstract the creation of other objects.  This is often meant to abstract the fact that many objects need to be created (ala the composite pattern).  It’s often intended to hide the fact that the creation of one object is dependant … Continue reading Fluent Builders, Part 1

Testing Strategies Involving Async Functions

Some things to keep in mind when writing units tests for code that use async methods: You’re not trying to test the framework’s “awaitability” and you’re not trying to test framework methods that are “awaitable”.  You want to test your code in certain isolation contexts.  One context, of course, is independent of asynchronicity–do individual units of code that don’t depend on asynchronous invocation “work”…  e.g. “Task<string> MyMethodAsync()”, you want to have a unit test that make sure this method does what it’s supposed to do (one being it returns a “valid” Task<string> object, the other being that individual side-effects occur, … Continue reading Testing Strategies Involving Async Functions

A New Asynchronicity Awaits You

The languages team at Microsoft have just announced that both VB and C# are giving first-class citizenship to asynchronous operations. At long last we can cleanly program for asynchronous operations without cluttering up the code with imperative artefacts relating to how the asynchronous operation is being performed. Let’s have a quick look at how we had you might perform an asynchronous operation in .NET 1.x: byte[] readbuffer = new byte[1024]; public void Button1_Click() { WebRequest webRequest = WebRequest.Create(“http://msdn.com”); webRequest.BeginGetResponse(new AsyncCallback(BeginGetResponseCallback), webRequest); } private void BeginGetResponseCallback(IAsyncResult asyncResult) { WebRequest webRequest = (WebRequest)asyncResult.AsyncState; WebResponse webResponse = webRequest.EndGetResponse(asyncResult); Stream stream = webResponse.GetResponseStream(); stream.BeginRead(readbuffer, … Continue reading A New Asynchronicity Awaits You