# Wednesday, December 08, 2004

I just listened to Microsoft’s web cast on the new Web Services features in Yukon, and I have to say I’m pretty skeptical.  I think it’s yet another case of Microsoft building support for “open standards” and then making them really only work practically if you’re running Windows on both ends. 

The biggest thing that concerns me is their authentication scheme.  They have disallowed anonymous connections, meaning that your HTTP connection must be authenticated using Basic, Digest, or Integrated Authentication.  That means on non-Windows platforms, you’ll be limited to Basic.  But wait.  They also decided that if you allow Basic auth, you must use SSL.  Furthermore, using Basic auth means that you have to use SQL Auth on your SQL server.  How do you send your SQL Auth credentials?, you might ask.  WS-Security Username tokens.  But WS-Security isn’t supported for either encryption or digital sigs. 

Plus, you have to use a separate SOAP header to carry session information so that you can maintain your context inside SQL server.  (OK, that bit’s pretty clever.)

So if I want to use Web Services to talk to SQL server from a non-Windows platform, I have to use Basic authentication over SSL, and provide a WS-Security header and a session header.  These seem to me like pretty heavy requirements.  Much of this was explained away with “WSE supports all this stuff”.  OK, great, but that’s not going to help my clients who are using Ruby under Linux. 

The guy giving the demo didn’t give us a look at the WSDL that SQL server generates, so I have no idea how complex or otherwise it might be.  Given that it’s hard to judge how hard it would be to deal with the data coming back from SQL Server.  In the plus column, they’ve provided hooks so that you can write your own WSDL if you don’t like the way they do it.

Besides the above issues, I think their implementation and support for Web Services is pretty dang clever.  They’ve thought about a lot of issues. 

What I don’t get is if my Web Services clients only work best under Windows, why do I need Web Services?

Wednesday, December 08, 2004 2:54:24 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 

That’s just plain cool… 

Paper Enigma Machine

This machine is compatible with the original 3-rotor German Enigma used during World War II. For simplicity it omits the "ring settings" and plug board, but the primary workings of the machine are captured in this model. Great as an educational tool, or just for fun!

[via hackaday]

Wednesday, December 08, 2004 9:57:18 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, December 07, 2004

The following is the final I gave my Web Services Applied class last night.  I was hoping to come up with a project that exposed the interesting things about developing a web service, and a client to access that service, with out getting bogged down in implementing what the service was supposed to do.  At the same time, I wanted something less trivial than Hello World!

The class had three hours to complete the project, and to my surprise only one person finished before the end of that time limit.  Is this too hard?  Do you think it’s asking too much?  I’m not used to teaching in an academic setting, so I’m still trying to gauge the difficulty of this kind of thing.  It’s a senior seminar, so it shouldn’t be too easy.  I’d be interested to hear people’s opinions.

Final Exam

Monday, December 6th.

Your final involves creating both a Web Service, and a client to exercise that Web Service. You will need to create a web service which matches the following UML.

The service has three methods: Remember, which takes a string, Forget, and Regurgitate. Remember will cause the service to store a string value, and keep track of the time it remembered that string. Forget will clear the stored memory entirely. Regurgitate will return an array of RememberedThing objects, which combine the string remembered with the time it was remembered.

You will also need to construct a WinForms client application that will allow a user to remember a string using the service, forget all the remembered strings, or display a list of regurgitated strings and times. You will need to call the web service asynchronously so that the WinForms application doesn't block.

You will need to turn in:

  • The complete code for client and server.

  • The WSDL and XmlSchema documents that describe the service.

Criteria for success:

The whole final is worth 100 points devided as follows:

  • Web Service interface – 30pts. (including WSDL and XSD)

  • Web Service functionality – 30pts.

  • Client functionality – 30pts.

  • Asynchronously calling web service – 10pts.

Tuesday, December 07, 2004 3:22:18 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 

Maybe everybody knew this but me, but it’s been totally bugging me personally.  For my recent Web Services Applied class, when they set up the lab machines someone goofed up the permissions.  For reason or reasons I don’t understand (I’m guessing some kind of domain policy) there didn’t seem to be any way to get a web service running under IIS to allow anonymous access.  Everything worked fine with Integrated Authentication set, as long as the client knew what it was doing, which meant that WebServicesStudio worked just fine, you could hit the web service with IE and get the default page back.  But as soon as you tried to hit the web service from C# client code, you’d invariably get back HTTP 401.1 Unauthorized.  I tried changing every set of IIS and file system permissions I could think of, to no avail.  Crap.  Luckily, at long last Google once again came to the rescue.  I still don’t know why anonymous access doesn’t work, but I do know how to make the client problem go away.


        static void Main(string[] args)


            localhost.Service1 serv = new ConsoleApplication2.localhost.Service1();

            serv.Credentials = System.Net.CredentialCache.DefaultCredentials;




Setting the credentials on the proxy allows Integrated Authentication to work the way it’s supposed to, and everything works just fine.  Unfortunately I didn’t figure this out until my class was about half way through their final last night, but at least that’s better than not figuring it out at all. :-)

Tuesday, December 07, 2004 11:18:26 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [2]  | 
# Monday, December 06, 2004
I’ll be teaching again next term at OIT (at CAPITAL Center in Beaverton), this time “Enterprise Web Services”.  We’ll be looking at what it takes to build a real-world enterprise application using web services, including such topics as asynchronous messaging, security, reliable messaging and a host of others. We’ll walk through all the stages of building an enterprise-level WS application, using .NET and WSE 2.0 to do the heavy lifting.  Required is a firm grasp of programming in C#, and a basic understanding of Web Services fundamentals such as XML, SOAP, and WSDL.
Monday, December 06, 2004 1:18:30 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

I just finished Neal Stephenson’s Cryptonomicon, and what a ride it was!  Snow Crash is one of my favorite books ever, but I was pretty underwhelmed by The Diamond Age, so I’ve put off reading Cryptonomicon.  I now see that was a mistake.  I enjoyed the whole book, and couldn’t put it down for the last 100 or so pages. 

Stephenson employs the fabulously wacky use of language that he did in Snow Crash, but along slightly less absurdist lines.  Snow Crash was cool, but definitely felt fictional (although not that far off from where we are today, frankly).  Cryptonomicon, on the other hand, is a bit more down to earth in it’s subject matter, even though it’s certainly fanciful.

I thought he did a great job of capturing modern nerd culture, and was gratified to see that Randy the geek turns out to be the hero of the tale in the end.  A great read.  Now I’ll have to start the Baroque Cycle…

Monday, December 06, 2004 1:04:38 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
Check out the ever-well-informed-and-entertaining Stuart Celarier this Thursday at CAPITAL center in Beaverton.  Should be a good talk.  If you ask nicely he might even juggle.  :-)
Monday, December 06, 2004 10:38:27 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, November 30, 2004

We’ve recently switched to the latest version of CruiseControl.NET (0.7) and my favorite new feature is the ability of ccnet to deal with CVS directly.  Previously we had to include code in our NAnt build file to do a CVS update at the beginning of the build, then do the CVS tag (so we can tag all the files with the build version) at the end of the build if it was successful. 

The new ccnet will do the update and the label for us, but…

It only supports one format for the labels, which it to allow you to specify a prefix, like “1.0.” and it will increment a number and append it, so you get “ver-1.0.1”, “ver-1.0.2”, etc.  That number resets to 1 every time you restart the ccnet executable.  Hmmm.  What we wanted was to use our previous scheme, which involved the version number we use for our .NET executables (e.g.  We used the version task from NAntContrib to create that version number on the formula (x.y.monthday.secondssincemidnight). 

Luckily, ccnet .7 provides an interface for the labeling, so you can write your own scheme.  Ours now looks like this…


    public class OurLabeller : ILabeller


        public OurLabeller()




        private string majorMinor = "2.0";

        [ReflectorProperty("majorminor", Required=false)]

        public string MajorMinor




                return majorMinor;




                majorMinor = value;



        #region ILabeller Members


        public string Generate(IIntegrationResult previousLabel)


            string ver = string.Format("{0}.{1}.{2}",majorMinor,getMonthDay(),calculateSecondsSinceMidnight());

            return ver.Replace(".","_");//it's a label, so no dots...





        #region ITask Members


        public void Run(IIntegrationResult result)


            result.Label = Generate(result);




        private int calculateSecondsSinceMidnight()


            DateTime today = DateTime.Now;

            return (today.Hour * 3600 + today.Minute * 60 + today.Second) / 10;



        public int getMonthDay()


            DateTime time = DateTime.Now;

            string timeString = string.Format("{0}{1}",time.Month,time.Day);

            return Convert.ToInt32(timeString);




So now ccnet will now use our labeling scheme, as long was we stick our new class in an assembly called ccnet.*.plugin.dll.  The config file bit looks like

  <labeller type="ourlabeller">

We want the version of the assemblies to match the new generated label, so we need to read it in our NAnt buildfile.  CCNET stuffs the label in a property that gets passed to NAnt called ccnet.label, so we can read that in our NAnt build…

  <if propertyexists="ccnet.label">
   <script language="C#">
    public static void ScriptMain(Project project) {
     //Shorten the project string (like, to 1.3.4)
     string projectVersion = project.Properties["ccnet.label"];
     project.Properties["project.version"] = projectVersion.Replace("_",".");

Tuesday, November 30, 2004 4:22:47 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, November 09, 2004

The Hollywood Foreign Press Association has announced that it won't consider Michael Moore's Fahrenheit 9/11 for any Golden Globe awards because they don't give awards for "documentaries". 

Apparently they haven't actually watched the film.  (I finally saw it last week.)  Whether or not you agree with Moore, you can hardly call F 9/11 a "documentary".  It's clearly political theater, and anyone who claims it's a documentary is missing the point.  A lot of criticism that came out against the film centered on the fact that it was biased and didn't give both sides equal time.  Of course it was biased.  It's theater.  Documentarians don't pull stunts like Moore does.  Political satirists do. 

Anyway, agree with Moore or not, I think it's a bit disingenuous of the HFPA to claim that they won't consider it because it's a "documentary".

Tuesday, November 09, 2004 3:32:13 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [2]  | 
# Monday, November 08, 2004

Our CTO, Chris, recently turned me on to Ruby.  I've been playing around with it a bit over the last few weeks, and I've got so say I'm pretty impressed.  I really appreciate that it was designed, as they say, according to the “Principal of Least Surprise”.  Which means that it basically works the way you would think. 

Ruby has a lot in common with Smalltalk, in that “everything is an object” kinda way, but since Ruby's syntax seems more (to me at least) like Python or Boo, it seems more natural than Smalltalk.  Sure, you don't get the wizzy browser, but that's pretty much OK.  When you apply the idea that everything is an object, and you're just sending them messages to ask them (please) to do what you want, you get some amazingly flexible code.  Sure, it's a bit squishy, and for code I was going to put into production I still like compile time type safety, but for scripting or quick tasks, Ruby seems like a very productive way to go.

Possibly more impressive was the fact that the Ruby installer for Windows set up everything exactly the way I would have thought (”least surprise” again) including adding the ruby interpreter into the path (kudos) and setting up the right file extension associations so that everything “just worked”.  Very nice.

The reason Chris actually brought it to my attention was to point me at Rails, which is a very impressive MVC framework for writing web applications in Ruby.  Because Ruby is so squishily late-bound, it can do some really amazing things with database accessors.  Check out the “ActiveRecord” in Rails for some really neat DAL ideas. 

I'm assuming that that same flexibility makes for some pretty groovy Web Services clients, but I haven't had a chance to check any out yet.  Anyone have any experience with SOAP and Ruby?

Monday, November 08, 2004 6:48:14 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |