A cacophony of ramblings from my potpourri of notes
 Wednesday, March 30, 2005
Missing: Guidance for fixing architecture without re-writing

Last night I participated in a Distributed Architecture birds-of-a-feather session with Steve Swartz. During the talks Clemens Vasters discussed how the architect of today needs to plan for data being distributed across multiple data sources and the data component on top of these data sources should take care of splitting and re-joining the data across these data sources. Steve mentioned how all major sites (eBay, Amazon, etc) are built this way. My participation centered on how business apps just aren't built this way today and that the major Internet sites are the exception. Even major business apps like popular ERP and CRM systems are not constructed that way. Steve responded that he didn't get my point. (Since I hadn't made one yet this was understandable.) 

I responded as that architects we can't rely on just giving correct architecture. Re-writing a system to support the right architecture is seldom an option except for new software. As architects we need to provide a migration plan, one that doesn't require a big bang change. Interestingly there aren't architecture books or even articles on migrating architecture. You won’t find a book that describes how to take the Microsoft recommended DNA architecture of the 1990s (which many .NET apps used due to the lack of architecture guidance when .NET emerged) to the SOA of the mid-to-late 2000s.  Hmmm....  Microsoft’s Practices and Patterns team is tackling the communication of architecture.  They too, however, seldom touch on the topic of migrating from poorly performing architecture to right architecture.  

I wonder if such guidance exists for fixing structural problems in buildings?


Wednesday, March 30, 2005 11:23:22 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Computer Related | .Net

 Friday, March 25, 2005
The Message by Eugene H. Peterson

Towards the end of January I began reading The Message (by Eugene H. Peterson) in my quite times each day.  By no means would I recommend that someone use this paraphrase for Bible Study, however, I am repeatedly struck by Eugene's phrasing.  It is different enough that it provides a fresh understanding to passages that many of us have read frequently enough to relegate to rote. 

Below is an example I read this morning from Romans 12:9-16 (italics and line feeds mine):

Love from the center of who you are; don't fake it.
Run for dear life from evil; hold on for dear life to good.
Be good friends who love deeply; practice playing second fiddle.
Don't burn out; keep yourselves fueled and aflame.
Be alert servants of the Master, cheerfully expectant.
Don't quit in hard times; pray all the harder.
Help needy Christians; be inventive in hospitality.
Bless your enemies; no cursing under your breath.
Laugh with your happy friends when they're happy;
share tears when they're down.
Get along with each other; don't be stuck-up.
Make friends with nobodies; don't be the great somebody. 
Don't hit back;
discover beauty in everyone.

For contrast see the NIV


Friday, March 25, 2005 7:21:47 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Personal | In Pursuit of God

 Thursday, March 24, 2005
Low cost redundancy for your backup

As the backup device for our central server has crashed, I have decided to have two hard-copies of all the documents...  To view the image go to http://images.google.com/images?q=tbn:EeE0T2eo7-YJ:members.tripod.com/cartoon_station/toons/apr00/k139.GIF

Update 3-24-05

It appears that linking to the full image doesn't work cleanly so here is a thumbnail form from Google.  The caption on the image is:

As the backup device for our central server has crashed, I have decided to have two hard-copies of all the documents...

The full image along with other cartoons can be accessed here.


Thursday, March 24, 2005 2:18:13 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  Computer Related | Miscellaneous

 Wednesday, March 23, 2005
Calling web services using basic authentication

I recently made a web services call into WebMethods using basic authentication.  This authentication meant that we needed to modify the WSDL generated classes to handle the authentication. 

Here’s how it works.  I add a reference to the Web Service (Visual Studio generates the client code for calling the web service).  To this generated class I need to add the following method:

protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
    HttpWebRequest request;
    request = (HttpWebRequest)base.GetWebRequest(uri);

    if (PreAuthenticate)
    {
        NetworkCredential networkCredentials =
            Credentials.GetCredential(uri, "Basic");

        if (networkCredentials != null)
        {
            byte[] credentialBuffer = new UTF8Encoding().GetBytes(
                networkCredentials.UserName + ":" +
                networkCredentials.Password);
            request.Headers["Authorization"] =
                "Basic" + Convert.ToBase64String(credentialBuffer);
        }
        else
        {
            throw new ApplicationException("No network credentials");
        }
    }
    return request;
}

 This overrides the GetWebRequest() method of the System.Web.Services.Protocols.SoapHttpClientProtocol class that the web service client code derived from.

With Visual Studio 2005 the generated code code is a C# 2.0 partial classes.  As a result, regenerating the web services client code does not over-write the additional method.  To enable this, add a class file to your project and give it the same namespace and name as the generated System.Web.Services.Protocols.SoapHttpClientProtocol derived class.  The key is to use the partial modifier on the class header so that the GetWebRequest() method is added to the generated class.  (partial class Michaelis.MockService{…})

Regardless of using Visual Studio.NET 2005 or earlier, the client code requires that the network credentials are set and the PreAuthenticate property is assigned true.  Here is a sample client call:

Michaelis.MockService service = new Michaelis.MockService();

// Create the network credentials and assign
// them to the service credentials
NetworkCredential netCredential = new NetworkCredential("Inigo.Montoya", "Ykmfptd");
Uri uri = new Uri(service.Url);
ICredentials credentials = netCredential.GetCredential(uri, "Basic");
service.Credentials = credentials;

// Be sure to set PreAuthenticate to true or else
// authentication will not be sent.
service.PreAuthenticate = true;

// Make the web service call.
service.Method();

UPDATE - 4/14/2005

Comments on the post raised the question, "Why cant you just say request.Credentials = new NetworkCredential(username,password)."

The reason relates to interoperating with WebMethods specifically.  When just setting Credentials, the HTTP header looks like this:

POST /soap/rpc HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50113.0)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: <servername>:<port>
Content-Length: 779
Expect: 100-continue
Accept-Encoding: gzip

Notice, there is no Authentication item even though PreAuthenticate is set to true.

The reply back from WebMethods is as follows:

HTTP/1.0 500 Internal Server Error
Set-Cookie: ssnid=11747k5Rwchr3vW0s23vcaCP1wCA2NDc=555590; path=/;
Content-Type: text/xml;charset=utf-8
Connection: Keep-Alive
Content-Length: 849

The problem is that .NET is expecting a challenge response from WebMethods, specifically a 401 error of "Invalid credentials."  However, if the client’s credentials are not specified (there is not Authentication part to the header) then WebMethods returns an HTTP 500 status code (Internal Server Error) indicating that the request could not be fulfilled.

To fix the problem you can either change the .NET client or else the WebMethods server.  In my original posting, I demonstrated how to control the .NET client.  The result was an HTTP header that includes the Authentication portion as shown below:

POST /soap/rpc HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50113.0)
Authorization: BasicbGRwcm86bGRwcm8=
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: spo-wm-py-srvr:5555
Content-Length: 779
Expect: 100-continue
Accept-Encoding: gzip

However, it is also possible to change the WebMethods side (assuming you control that side) by creating an access controlled SOAP processor that checks the credentials for each client request against a specified ACL and returns an HTTP 401 status code even if there are no credentials passed.

By the way, the tool I use for tracing HTTP is YATT.


Wednesday, March 23, 2005 11:41:30 AM (Pacific Standard Time, UTC-08:00)  #    Comments [26]  Computer Related | .Net

 Sunday, March 20, 2005
Towards a Growing Marriage Conference with Gary Chapman

Last week Elisabeth an I attended another marriage conference.  We try to do this once a year and find it to be a very valuable experience.  This time we attended a day long conference by Gary Chapman (Author of The Five Love Languages) called “Towards a Growing Marriage” (based on his book by the same title).

It was well worth the time and we came away with the following take-a-ways:

  • Limit Criticism to 26–52 times per year
    Many marriages are filled with criticism each day.  Virtually none, however, could claim that the criticisms have any positive affect.  What if you could get your spouse to change 52 things in a year; how ‘bout just 26?  Most of us would argue that this would make for a fantastic marriage.  How about limiting yourselves to one criticism a week.  Or, better yet, alternating who gets the criticism from week to week.  In not too much time you may even find yourself passing up on your turn.  Wouldn’t that be a radical improvement on your marriage?
  • Rate opinions from 1–10
    Rather than ask your spouse if X or Y is okay, have them rank the option on a scale of 1–10.  That way you can get a more accurate view of what acceptable means.  A spouse may agree to a request or a suggestion.  When asked to rate it, however, the spouse would assign a rank of 2 and a different option would be pursued.
  • Use family discussion starters
    Consider using  Love Talks and Love Talks for Families (both by Raemon Presson and the prolific Gary Chapman) to encourage daily discussions within the family.  Similarly, don’t ask “How was your day.”  Instead try something like “describe your day’s hi and low.”
  • Some things your spouse is incapable or unwilling to change – accept them
    Gary Chapman gives the example of closing cupboards and drawers.  He tried for years to get his wife to do this but one day his daughter got injured near her eye because of an open drawer.  Even then his wife didn’t change.  He went out to think through the problem alone.  He came up with three possible solutions:  1) Leave the marriage, 2) Continue on with the status quo in which he became more and more frustrated with the lack of improvement, or 3) accept his wife’s drawer and cupboard imperfection.  Obviously 1. was not the preferred solution and he had already tried 2. and that wasn’t working.  In the end, he resigned himself to the fact that his wife was either incapable (genetic defect) or unwilling to change, even on an item that he was obviously in the right with.  He accepted her for who she was and, to this day, he goes home and considers it a joy to enter the home and close what is left open.
  • Naked story of dealing with impatience
    Each week the husband goes down to the car and honks the horn to hurry his wife along so they can leave.  Finally, the wife becomes so irritated with the situation that she gets into the car completely naked.  Never again did the husband honk for his wife to hurry-up.  True story!

Elisabeth and I have tried the criticism thing gone an entire week without any (they can’t be rolled over.)  Wow!  The only discussion that has arisen is what falls in the category of criticism.  Regardless, criticism has been reduced.

The rating system seems like a great idea.  I think it would be well applied in other areas as well.  “How are you?” for example.


Sunday, March 20, 2005 10:28:26 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Personal | My Family

 Thursday, March 17, 2005
More Fun with Benjamin's Last Name

Today we had another naming funny with Benjamin's last name.  I taught Benjamin how to spell his first name by making it his password for logging on to the computer.  A few weeks ago, I changed the password to be his last name so he could learn to spell that.  (It works very well.)

Recently Elisabeth had him read his full name off something.  First he read his first name and then when prompted about whether his last name was there or not he said, "No."  Elisabeth corrected him and pointed out "Michaelis."  He corrected her, however, and said it was his password, not his last name.  Hmmm....?


Thursday, March 17, 2005 5:48:40 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  Personal | My Family

 Wednesday, March 02, 2005
Compassion Is a One-At-A-Time Activity and Love Should be the Supreme Value

The amount of pain and suffering that goes on in the world every day is overwhelming if you take the time to think about it (unfortunately many of us don't).  But we can't bury our heads in the sand and ignore it simply because we can't fix it all.  Consider the following well known fable:

A man was walking along the beach at sunset when he saw a young girl in the distance. She was repeatedly bending down, picking something up, and throwing it out into the water.  As he approached, he saw that the girl was picking up starfish that had been washed up on the beach. She was throwing them back into the water, one at a time.  Puzzled, he approached her and said,

“Good evening. I was wondering what you're doing.”

She replied,

“I'm throwing starfish back into the ocean. You see, it’s low tide and they have been washed up onto the shore. If I don't throw them back into the ocean, they'll die.”

“But, there must be thousands of starfish on this beach. You can't possibly get to all of them. And don’t you realize this is probably happening on hundreds of beaches all up and down this coast. You can’t possibly make a difference?”

The girl bent down and picked up yet another starfish and threw it back into the ocean. With a smile she replied,

“It made a difference to that one!”

Compassion is like that.  Compassion isn't about becoming famous because of how much help you bring to lots of people at large or how you can make the world a better place.  In fact, consider world leaders with lots of power.  Few, if any of them, are characterized as compassionate even though they have the ability, and sometimes even act on the ability, to make better the lives of thousands.  Compassion is a one at a time activity:

  • People are a born one at a time
  • People suffer one at a time
  • People die one at a time
  • As you care for people, compassion is what you give to one person at a time

1 Corinthians 13 describes the importance of love and how it is the supreme value, it is above all other values.  Even if you are a world leader and have the power to move mountains or change climates, even if you become a martyr or give away everything you have to the poor - if you have not love - you gain nothing.  It is not just what you do, but that you do it out of love and compassion.

Lord, may my life be characterized by love and compassion.


Wednesday, March 02, 2005 3:48:28 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Personal | In Pursuit of God

 Tuesday, March 01, 2005
Minor Notables on Windows 2003 (SP1)

I follow the perhaps unusual practice of running Windows 2003 as my primary operating system on my IBM T40p laptop.  Over the past couple months I ran across two curious notables.

  1. Windows 2003 SP 1 includes Windows Media Player 10.  Presumably few people running this on a server would notice or care but when using it as a workstation this is a nice to have.
  2. MSN Desktop Search/Toolbar Suite doesn't install on Windows 2003.  This leaves me with no choice but to choose the Google Desktop.  What's up with that Microsoft?

UPDATE - 3/22/05

There is a way to install the MSN Desktop Search/Toolbar Suite on Windows 2003 as mentioned by Brandon Paddock here.  The commands are "setup.exe /c /t:" followed by "msiexec /i MsnToolbarSuite.msi TBSDEVCODE=1."  For other applications, the Windows Application Compatibility toolkit may help.  However, I tried to use this for installing the Microsoft Plus! Digital Media Edition (I wanted to use the Analog Recorder) onto Windows 2003 and couldn't get it to work.

Running Windows 2003 as a workstation presents other issues as well.  How to convert your Windows Server 2003 to a Workstation provides good step-by-step (not unattended) instructions for doing this.


Tuesday, March 01, 2005 9:47:21 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Computer Related | Miscellaneous