RickGaribay.NET

.NET, WCF, SOA, Phoenix Connected Systems User Group, and miscellaneous discussions on software engineering, process and practices.
posts - 132, comments - 63, trackbacks - 1

Saturday, September 27, 2008

Paul Newman Jan 26, 1925 - Sept 26, 2008

I very seldom write on personal topics here, but I am very saddened to make an exception today.

Paul Newman was a remarkable human being that I have admired as long as I can remember. His wit, charm, kindness and humility are traits that I have always looked up to him for (OK, he was very, very cool too).

In addition to being a fantastic actor, starring in some of my favorite films such as "Butch Cassidy and the Sundance Kid", "Cool Hand Luke" and "The Sting" (if you haven't seen these, I highly recommend you do one day), he was an avid philanthropist, founding The Newman's Own Foundation in 1982. The Newman's Own Foundation oversees the "Newman's Own" product line which donates every dime of profit to charity, with donations in excess of $250 million. He also founded the "Hole in the Wall Camps", which offers a respite for very ill children who can go to camp to forget about their illness and just be kids for a few days.

I remember watching an interview on Letterman a couple of years ago. David was asking him about some of his passions, which included automobile racing and beer. In that interview, Paul referred to beer as "the common man's drink". This is what always impressed me the most about Paul Newman. Despite his tremendous success as an actor in the hay day of Hollywood, he never lost touch with himself, his family or his place on this earth. He had this keen awareness that in addition to very hard work, success can be attributed to luck just as much as one's own efforts.

So today, with great sadness, I raise a pint to celebrate the life and light of Paul Newman who despite being deeply missed, has left a lasting impression in my life and a legacy that will continue to give for years to come. 

posted @ Saturday, September 27, 2008 8:53 AM | Feedback (0) | Filed Under [ Misc. ]

Friday, September 26, 2008

Using PowerShell to Manage Network Interfaces and Windows Services

PowerShell is a new scripting language that allows you to interact with applications, services and objects as objects. It is a .NET application which shells commands out on your behalf. This is very powerful, because it allows you to leverage the strengths of an object oriented model within your scripting tasks with a very terse, yet simple scripting language. Because it is written in .NET, you can access .NET types, objects and WMI objects from a command prompt.

My current workstation runs Windows Server 2008 Standard Edition with Hyper-V. I use the host/parent partition as my office, and have a number of child partitions that are integrated into a Windows Server 2008 Domain. Needless to say, this configuration gives me everything I need to develop, test and integrate multiple Server OS', platforms and technologies, and is my environment of choice for developing production code. It still amazes me how far we've come in such a short period of time. Not too long ago, I remember setting up similar lab environments at home running Windows NT 4 and Windows Server 2000 on dedicated physical machines.

Anyway, I have to say that I am absolutely delighted with my environment, but it took me some time and effort to learn how to tune Server 2008, and this is all well documented in previous posts. One of the the things that I do to keep performance high is that I only have the 3 services required for Hyper-V running when I need them. In other words, if I am only working with email and writing documents or design drawings, I don't need to have the Hyper-V services running because they are resource intensive. In addition, I only want my loopback adapter (that provides me with a virtual LAN for all of the child partitions on my domain to communicate) enabled when I need it to be. One reason for this, is that if I leave my loopback on and reboot, boot times can take up to 10 minutes because the loopback is configured to use my domain controller as the primary DNS server, which is a VM. Because the DNS Server only runs when my Domain Controller VM  is up and running, the VM will only come up when I start it. As a result, Windows tries and tries to reach the DNS server for the Loopback adapter until it finally gives up (If anyone knows how to change this timeout, please shoot me a note or post a comment).

So, I only want Hyper-V services running when I need to work in my development environment, and I don't want my loopback enabled unless it needs to be. For a while, I was managing this as follows...

First, I set the following services to "Manual", so that they do not start automatically:

  • vmms: Hyper-V Virtual Machine Management
  • vhdsvc: Hyper-V Image Management Service
  • nvspwmi: Hyper-V Networking Management Service

The service names are a bit obscure, but the "friendly" names are pretty self explanatory. When I need to start my development environment, I would go into Server Manager, and start each service one by one.

Next, I would enable my loopback adapter so that my child partitions can communicate with each other.

All together, this resulted in a number of clicks, which was somewhat mundane to do every time. Worse, once I enabled the loopback, I often would forget to disable it before shutting down (remember, servers running Hyper-V do not support hibernation). For a while, I thought about writing myself a sticky note and posting it to my forehead so that I would not forget to disable the loopback, and finally, I decided to create an easy button for starting and stopping my development environment.

This is where Powershell comes in.

Using PowerShell to Query and Manage Network Adapters

The first thing I did was figure out how to talk to my network adapters so that I could enable and disable my loopback as needed. It turns out that Microsoft provides a WMI object called Win32_NetworkAdapter. The object exposes a bunch of properties for working with an instance of a Win32_NetworkAdapter:

image

In addition, there are 4 public methods that are exposed, and well documented as shown below:

image

To enumerate all network adapters on my host/parent partition, I issued the following command:

   1: Get-wmiobject win32_NetworkAdapter | format-table 

PowerShell lists each adapter and certain properties in a tabular format because I added a pipe and format-table parameter:

image

To identify the instance that corresponds to my loopback, I simply need to find the "Internal VLAN" instance above, which has a DeviceID of 17:

image

Next, I want to retrieve an instance of the adapter with a DeviceId of 17, so I issue the following statement:

   1: Get-WmiObject win32_networkadapter | where {$_.DeviceId -eq 17}

The where keyword uses a bracketed expression to evaluate the condition. The "$" is a temporary variable, which is similar to the "this" keyword in C#, which provides context for the current instance. The "-eq" operator is the equality operator in PowerShell. So, we are querying all adapters for the adapter with a DeviceID equal to 17. The above command returns the following:

image

Notice that each property is an actual documented property of the WIN32_NetworkAdapter object. If we have access to properties, it would be helpful to determine if the adapter is enabled or disabled. To do this, I assign the adapter to a variable called $adapter as shown below, and then I get the value of the Availability property:

image

The value of the Availability property is 3. Referring to the WIN32_NetworkAdapter documentation, I can see that a status of 3 indicates that adapter is on, and running on full power.

image

Are you getting the hang of it yet? Hopefully, the interaction with PowerShell should feel object-oriented because it is! We are getting a reference to the WMI shell of the adapter and then using it's get accessors to get the value of the public properties. So, if we can get a reference to the adapter, get properties, we should be able to call methods on it, right?

To disable the adapter, I simply call the Disable() method on my $adapter variable:

image

Now, to confirm that the adapter is disabled, you can look at Network Connections and you will see that the Status is in fact Disabled. To do this programmatically via PowerShell, you can use the ConfigManagerErrorCode property which is also documented. Get a new instance of the adapter, and call the ConfigManagerErrorCode property on it as shown below:

image

A return code of 22 can be matched to the table in the MSDN documentation:

image

Now, enable the adapter by calling the Enable() method:

image

A return code of 0 indicates that the adapter is enabled, and working properly:

image

As you can see, PowerShell is a very easy to use, yet powerful tool for managing system objects in an object-oriented manner. You don't need to worry about writing VBScript or C# to accomplish simple administrative tasks such as enabling and disabling a network adapter. As you might imagine, the real power comes in being able to run a series of PowerShell commands in a batch, perhaps at the click of the button. This is exactly what I'll cover next.

Using PowerShell to Query and Manage Windows Services

You'll recall that I only want the 3 Hyper-V services to run when I need them, so what I want to do is create an "easy button" to toeggle my development environment on and off.

The "On" should:

  • Enable my Internal VLAN Adapter
  • Start the Hyper-V Virtual Machine Management
  • Start the Hyper-V Image Management Service
  • Start the Hyper-V Networking Management Service
  • Get me a cup of Starbucks coffee

The "Off" Button should:

  • Disable my Internal VLAN Adapter
  • Disable the Hyper-V Virtual Machine Management
  • Disable the Hyper-V Image Management Service
  • Disable the Hyper-V Networking Management Service

     

    I've already covered how to manage network adapters using PowerShell as a primer, so I'll jump right into working with Windows Services. As with any program, sometimes it is helpful to group commands into a subroutine. In PowerShell, these functions are referred to as cmdlets (prounounced "commandlets"). You may not realize this, but you've already been working with cmdlets if you've tried the commands I covered above on your own machine. The get-wmiobject command is actually a cmdlet that provides a reference to the WMI object specified as the parameter. You could accomplish this without the cmdlet, but why would you want to?

  • Fortunately, a cmdlet is also available for working with Windows Services: get-service.

    To get information about a particular service, simply call get-service with the service name. The actual service name of the Hyper-V Virtual Machine Management service is "vmms", so issuing the get-service vmms command returns a few properties including the Name, DisplayName and Status of the service.

    image

    Starting and stopping the Hyper-V Virtual Machine Management service is as simple as calling the appropriate method: Stop() to stop the service and Start() to start it. While you could use a variable called $service to store the reference to the service object, an abbreviated way to accomplish this is shown below:

       1: (get-service vmms).Stop()

     

    Now, when you issue the get-service vmms command, you can see that the Status property is "Stopped":

    image

    Starting the service back up is as simple as calling Start() on the cmdlet expression:

    image 

    Building the "Easy Buttons"

    There may very well be a more sophisticated way to do this, but I created two batch files, one called "Start.bat" and the other called "Stop.bat" and placed them in my documents folder. Each file contains the appropriate PowerShell syntax as shown below:

    image

    Note, to re-use variables across PowerShell sessions, you must first configure a PowerShell profile: http://msdn.microsoft.com/en-us/library/bb613488(VS.85).aspx

    Next I created two desktop shortcuts, appropriately named "Start" and "Stop" and set the target to each corresponding file.

    Now, I have two "Easy Buttons" for toggling my development environment on and off. While I can't guarantee that I won't forget to press the "off  button" before shutting down, it is a heck of a lot easier than going through the contortions manually.

    One last note. If anyone finds or builds a cmdlet that runs to Startbucks and picks up a medium drip with 1.5 Sweet & Low and delivers it to my client site, please let me know :-)

  • posted @ Friday, September 26, 2008 3:02 PM | Feedback (0) | Filed Under [ Misc. .NET 3.5 ]

    Friday, September 19, 2008

    Comparing WCF Binary Encoding to .NET Serialization

    A common question that I get from folks at my talks as well as clients is how binary performance of WCF stacks up against .NET Remoting. To quickly level-set, the lingua franca for all messages that WCF exchanges is SOAP/XML. However, out of the box, WCF provides 3 means for representing the message payload on the wire:

    • Binary
    • Text
    • MTOM

    Of the encodings above, only Text and MTOM are interoperable (and I'll cover these in upcoming posts), but sometimes, in a .NET to .NET messaging scenario, encoding the message in a binary representation will yield smaller payloads and thus more efficient message transfer (especially when pairing a binary message with TCP). It is important to note that regardless of the encoding used to serialize the message, the message itself is SOAP and thus can be de-serialized according to the SOAP standard in use on the client and server stack.

    It is widely documented that the System.Runtime.Serialization assembly introduces an optimized byte representation for packaging XML/SOAP via the XmlDictonaryWriter which can be found in the System.Xml namespace within the System.Runtime.Serialization.dll.

    In short, WCF leverages the XmlDictionaryWriter which provides a factory method for getting a binary writer which is capable of taking an XML document and serializing it to a proprietary binary format:

    XmlDocument doc = new XmlDocument(); 
    doc.Load(from); 
    
    FileStream stream = new FileStream(to, FileMode.OpenOrCreate); 
    
    XmlDictionaryWriter binaryWriter = XmlDictionaryWriter.CreateBinaryWriter(stream); 
    doc.WriteContentTo(binaryWriter); 
    
    binaryWriter.Flush();

    The code above takes a file containing the following XML and loads it into an instance of the XmlDocument:

    image

    Then, using the binary encoder, the stream is written to a file called "CustomerWCF.bin" on disk, which when opened looks like this:

    image

    Similarly, if I want to use the "legacy" BinaryFormatter, which ships in the System.Runtime.Serialization.Formatters namespace of mscorlib, I can write the following code which loads and serializes the same Customer.xml file:

    XmlDocument doc = new XmlDocument(); 
    doc.Load(from); 
    
    FileStream stream = new FileStream(to, FileMode.OpenOrCreate); 
    
    BinaryFormatter formatter = new BinaryFormatter(); 
    formatter.Serialize(stream, doc.InnerXml);

     

    This time, the contents is written to a file called CustomerNET.bin which resembles the following:

    image

    Of course, both of these files are encoded in binary, so when you open them in notepad or some other tool (in this case I am using Visual Studio) you will see some semblance of the original message with corresponding octal representation for each byte of data. It is evident, in just looking at the octal representation that the CustomerNET.bin is larger.

    In fact, it turns out that the CustomerWCF.bin file has a size of 98 bytes, compared to the CustomerNET.bin file that has a size of 205 bytes.

    Customer.WCF.bin:

    image

    CustomerNET.bin:

    image

    Given this very simple example, you could say that the WCF binary encoder produces a payload that is roughly half the size of the BinaryFormatter!

    It is important to note that the these are different binary representations, that are each proprietary and therefore not interoperable outside of the .NET Framework. In fact, the WCF version of the Customer.xml contents is only supported within .NET 3.0 and later, and is naturally the encoder that is used when exchanging binary messages with WCF. The cool thing is that you can leverage this encoding outside of WCF, provided you have .NET 3.0+ on both sides of the wire.

    Forthcoming: Exploring Text and MTOM message representations.

    posted @ Friday, September 19, 2008 7:42 AM | Feedback (0) | Filed Under [ WCF .NET 3.5 ]

    Monday, September 08, 2008

    Comprehensive Series on WCF & REST

    My friend Rob Bagby has done an excellent job putting together a series of primers on REST with WCF.

    REST is gaining more and more attention recently as a great way to expose services over HTTP that do not require WS-* features. I think if you spend some time with REST, you will not only learn an alternate way of working with services, but you will also learn or re-learn the fundamentals of the HTTP protocol, which will be helpful regardless of what approach you take to building Web Services.


    Rob's blog series can be found below:

     

    Rob has also put together a series of screen casts on the subject which can be viewed here:

  • endpoint.tv - Controlling the URI in RESTful WCF with Rob Bagby
  • deCast - Creating a HI-REST GET Service with WCF 3.5
  • deCast - Consuming a HI-REST GET Service From Silverlight 2 (Beta 2)
  • endpoint.tv - Caching and Conditional Get with Rob Bagby
  •  

    To catch up with Rob, be sure to check out his upcoming live events here: http://blogs.msdn.com/bags

    posted @ Monday, September 08, 2008 11:35 AM | Feedback (0) | Filed Under [ WCF SOA ]

    Friday, September 05, 2008

    Hyper-V Parent Partition Filesytem Access Not Working?

    With Hyper-v, if you want to access the parent partition (host) file system, or attached USB drives, the only way to do so is through a UNC or IP connection from the child partition (guest) to the parent (host). To do so, you will have to create a network and bind it. You can read about how to setup an Internal Network in a previous post.

    At times, you may find that despite being able to ping the parent from the child, and even resolve DNS names, you get a networking error:

    image

    For whatever reason, I have found that restarting the "Server" service on the parent resolves the issue. As you might imagine, the Server service is responsible for managing file sharing, among other things.  What is strange is that it is already running, but every time I run into this issue, restarting the service is the fix.

    Hope this helps someone out who could otherwise spend hours pulling their hair out debugging networking issues.

    posted @ Friday, September 05, 2008 9:30 AM | Feedback (0) | Filed Under [ Hardware Misc. ]

    Microsoft BizTalk Server 2009 Announcement

     

    On April 24th, I blogged about Microsoft's announcement of BizTalk Server 2006 R3. Today, Microsoft is announcing plans for BizTalk Server 2009, which will replace original plans for the R3 release. You can read Steven Martin's official announcement here: http://blogs.msdn.com/stevemar image

    As with BizTalk Server 2006 R3's original list of new features and enhancements, the focus on BizTalk Server 2009 is enhanced platform support, SOA and Web Services, including:

    • New web service registry capabilities with support for UDDI (Universal Description Discovery and Integration) version 3.0
    • Low-latency messaging enhancements and ESB Guidance
    • Enhanced service enablement of applications (through new and enhanced adapters for LOB applications, databases, and legacy/host systems)
    • Enhanced service enablement of "edge" devices through BizTalk RFID Mobile
    • SOA patterns and best practices guidance to assist our customer's implementations

    This announcement, and corresponding (non-comprehensive) feature set is significant in my opinion for two reasons. First, it reflects a continued commitment on behalf of Microsoft Connected Systems Division (CSD) to the BizTalk Server platform. This is important for businesses and developers who have made significant investments in BizTalk Server and are looking beyond the next 3 to 5 year horizon in making strategic architectural decisions that will have a lasting effect.

    Second, it reflects an emergent approach to simplifying application integration, SOA enablement and adoption which ensures that by staying up the date and following platform patterns and best practices, a gradual yet consistent readiness for upcoming technologies and platform enhancements is provided.

    I believe that BTS 2009 will be a step forward in lubricating the adoption of more model-driven technologies through a stronger, more connected alignment with the .NET Framework, Windows Communication Foundation and Windows Workflow.I have talked a bit about the Connected Systems Technology curve here.

    To summarize, The .NET Framework cross cuts the entire Microsoft stack, from the user interface to the database, and this is certainly true within  Windows Communication Foundation, Windows Workflow Foundation and BizTalk Server. However, moving from pure .NET to WCF is non-trivial because it requires an image evolution in thinking beyond traditional development and into contract-first development and SOA. In my career, I recall the struggle I had in moving from writing procedural code to thinking in terms of object orientation, and I don’t have to look too far back to remember the shift in thinking in moving from white-box-reuse-based objects to black-box component programming. While the WCF developer likely has a system/middle-tier background, the evolution to workflow and modeling will prove just as challenging because strong .NET system developers tend to be much more comfortable working imperatively. BizTalk developers, on the other hand, have been benefiting from the maturity in tools, modeling of workflow and message-based communication for several years. For the BizTalk developer and architect, the transition to WCF, and especially WF is nearly seamless because with the fundamentals in place, the declarative and model-based design experience that WCF and WF introduce respectively become second nature and so does the rate of adoption.

     

     

     

     

    While there has been no official change to release plans, a CTP update is planned for Q4 of CY08. Microsoft will use this broad feedback from customers and partners to help us validate the features and readiness of the product.

    posted @ Friday, September 05, 2008 6:17 AM | Feedback (0) | Filed Under [ SOA BTS ]

    Thursday, September 04, 2008

    Stay Tuned...

    Stay tuned for a very special announcement from Microsoft CSD first thing tomorrow am...

    posted @ Thursday, September 04, 2008 5:58 PM | Feedback (0) |

    Friday, August 22, 2008

    Hyper-V Internal Virtual Network- The New Loopback

    In Virtual PC and Virtual Server, one way to build a private network of VMs was to create a loopack adapter using the Microsoft Loopback Adapter. This allowed you to specify an internal IP address (such as 192.168.1.1) and as long as the IP and subnet mask on the VMs were configured properly, you could communicate from one VM to another. This is such a common scenario, that I often wondered why one had to go through the contortion of creating a loopback adapter. I am not a Virtual PC/Server or Hyper-V expert, but the need for this seems to be quite common.

    Well, leave it to Microsoft to eventually comooditize key user stories.

    With Hyper-V, creating a network of VMs is as simple as creating an Internal Virtual Network and binding it to each of the child partitions. When you do this, an internal virtual NIC is created on the parent partition which you can then configure with the appropriate subnet. Match the settings to each child partition in your network, and viola, you are golden.

    To create an Internal Virtual Network, click on "Virtual Network Manager" in Hyper-V manager.

    In Virtual Network Manager, select Internal in the list of network types and click Add:

    image 

    Give the new Virtual Network a name and click OK.

    image

    That's it. You're done.

    Of course, you must bind the new Virtual Network to your Virtual Machine. To do so, select the Virtual Machine within Hyper-V Manager, click Settings, and select the name of the network you just created.

    On a side note, I learned about this by unlearning what I had already learned with Virtual PC. I had actually gone through the process of creating a loopback adapter when I realized that I get one for free by creating an Internal Virtual Network. It is amazing how so often, to get the most out of new technology, you must first unlearn old tricks.

    posted @ Friday, August 22, 2008 10:36 PM | Feedback (0) | Filed Under [ Hardware Misc. ]

    Friday, August 15, 2008

    Merging Differencing Disks with Hyper-V

    A differencing disk is a disk that is a child of a parent disk. Differencing disks are very helpful in keeping disk images small, manageable and consistent, because you can create a base parent disk- such as a Windows 2008 Standard base image- and use it as the foundation for all other guest virtual machines and disks that will be based on Windows Server 2008. For example, I have a Windows Server 2008 guest that I use exclusively as sandbox for development. I am in the process of building out another guest based on Windows Server 2008 that will be for some TFS 2008 demos that I am working on for an upcoming series of talks. Rather than copy the Windows Server 2008 guest VPC over and over again, I can simply create one differencing disk for my development environment role and one for my TFS role. The result is a VHD that represents the intersection of the base/parent disk (in this case, a barebones install of Windows Server 2008 Standard) and any additional software I've installed or configuration changes I have made. This not only conserves disk space, but also saves me a lot of time in copying hefty giga-some-odd vhds around.

    Sometimes it is necessary to merge a differencing disk back to it's parent or into a new disk. For example, you may be moving VHDs around as I did recently to a new, high speed E-SATA drive. My old drive hosted a vhd that I used as my development sandbox that used a parent on the old disk. I certainly don't want to depend on my clunky old USB 2.0 drive for the parent (the IO cost alone would be just silly), and at a minimum, there is state on the differenced guest OS that I do not want to lose. 

    The first thing to do is copy over the parent VHD, create a new differencing disk based on the same parent, but in the new location.

    Next, since the differenced guest VHD has state that you want to move over (lest you lose it), it is necessary to merge the state of the "old" differenced guest VHD with the new copy. To do so, under Server Manager, in the Hyper-V Manager, click "Edit Disk", and locate the disk that you want to merge into a new differenced disk:

    image

    On the next screen, under Action, select "Merge":

    image 

    Select "To a new virtual disk", and choose a name and path for the new disk that you created in the initial copy:

    image

    The "old" differenced disk, which is based on the original parent disk plus state from the "old" differenced disk is merged into the new disk on the drive you specified:

    image

    That's all there is to it. Differencing is a powerful feature in virtualization, and there is very nice support for migration of differenced disks right within the Server Manager.

    posted @ Friday, August 15, 2008 11:26 PM | Feedback (0) | Filed Under [ Hardware Misc. ]

    Friday, July 25, 2008

    Windows Server 2008 Update

    OK. Honeymoon is over. I have been experiencing some degradation in performance/responsiveness recently, so started looking for optimizations which have had a positive result.

    Here is what I have done:

    1. Set any non-essential services to "Manual" and stop them. This has been somewhat of a trial and error exercise, but I've been able to free up some memory and CPU utilization in the process.
    2. Adjust Visual Effects for Best Performance. This can be accomplished by going to to System Settings->Advanced ->Performance Tab->Settings Button-> Visual Effects. The only visual effect that I couldn't live without was smooth fonts, so I turned it on.
    3. Uninstalled Trillian. This thing does not seem to play well with Windows Server 2008 64-bit as it was constantly churning CPU and memory. I noticed a marked improvement in CPU utilization when I turned it off, and have since removed it thanks to this post which pointed me to a previous version of Windows Live Messenger which installed just fine.
    4. I also enabled "Superfetch" per this post.

    I am also finding that my USB 2.0 hardrive is becoming a bottleneck since I use it to store all of my VHD files. I might go out and get an ESATA drive this weekend and see if I notice a difference.

    I will report back in a few days with an update.

    posted @ Friday, July 25, 2008 8:46 AM | Feedback (0) | Filed Under [ Hardware Misc. ]

    Friday, July 18, 2008

    Windows Server 2008 Standard x64 Mobile Workstation Edition

    I've been running Windows Server 2008 Standard on my Dell Latitude D830 laptop for about 4 weeks now. I originally got the idea from Kathrin Lord at Microsoft. While there was recently an article published in Windows IT Pro in June by Mark Minasi talking about how Windows Server 2008 Standard may be the ultimate desktop replacement for Windows Vista, I think it is rather silly to suggest that Vista is so sub par that you would replace it with a server product, especially when most complaints about Vista regard sluggish performance (perceived or otherwise) which usually is a result of under-capable hardware.

    Case in point: I run Vista Ultimate on my home machine which is a custom built dual-core AMD 2.0 Ghz+ box with 2 GB DDR RAM and 2 SATA drives in RAID 0 mode and the machine hums.  My wife just bought a new SOHO Dell Inspiron 1525, which is about as PIC-0404 (2) commoditized of a machine that you get from the Dell laptop product line, and Vista Ultimate runs just fine on it too. So, I am not about to recommend Windows Server 2008 as a replacement for Vista. If you like Vista on your PC run it. If you don't, stick with XP. I do believe that the adoption issue we are seeing with Vista is one of averseness to change, much like the MS-DOS camp back in the early 90's wondered why you would want to be slowed down by using a mouse and clicking on windows when the keyboard, well, seemed faster.

    I am not here to argue about Vista. Instead, I will talk about why I chose Windows Server 2008 Standard to replace Windows XP on my work laptop, what few challenges I encountered along the way, and some alternatives and work-arounds to overcome them in hopes that this might save some anyone some time and/or anxiety if they are thinking about going this route.

     PIC-0403 (2)First and foremost, I don't consider myself a typical desktop user, and if you are reading this, there is a good chance you aren't either. I spend 8 to 12 hours a day on my machine, working on it at home, in the office, at the client site and when doing public speaking. I am careful to keep my development-centric work completely separate from my other work. My approach is one my good friend Todd Sussman taught me 2 years ago: I keep my laptop as my office and virtualize everything else. In the past, when running Windows XP Professional, I accomplished this by using Virtual PC to run my development and lab environments. Virtual PC has been a decent solution for me for several years, but what really compelled me to install Windows Server 2008 was Hyper-Visor. image There is plenty of literature on Hyper-V on the web so I won't repeat any of it here. In a nutshell though, Hyper-V is Virtual PC and Virtual Server on steroids, umkay?

    As I mentioned before, virtualization is a huge part of my work as I am often working with isolated, client-specific or role-specific images. Add to the mix a steady stream of volatile futures bits and I honestly don't think I could work and be nearly as effective any other way.

    The entire process has been relatively straightforward, and my focus in this article is to talk about what works, what doesn't and what, if any workarounds exist that I've found to save you some time if you plan to do the same. I also hope that for the very small number of issues I have not been able to solve, someone else has a solution that they are willing to share.

    To be honest, it wasn't installing a server product on a laptop that concerned me. As I cover in my discussion about hardware, my employer has taken good care of me when it comes to my machine. The clincher is that Hyper-V is only supported on 64-bit edition, and as I found, this has been the main cause of the problems I've had that are on a very short list of issues.

    Hardware & Installation

    Installation was a breeze. The installer was kind enough to put my old documents and program files in a folder aptly called "Windows.Old" which was a nice added piece of mind in addition to my ruthless backup ceremony in the week leading up to my decision to blow my office away over a weekend. Speaking of which, I was so ruthless that I took a Ghost image of my Windows XP install just in case I couldn't get things up and running before Monday morning.

    From a hardware perspective, my laptop like most ships with stock components. It is a Dell Latitude D830 and I am overall pretty happy with it. While full specs are available on the Dell website, below is a snapshot of basic hardware specifications so that at first glance, you can get a glimpse at the main components.

    Hardware Specifications

    CPU Intel Core 2 Duo 2.20 Ghz (T7500)
    Memory 4 GB DDR 2
    Video Card Stock NVidia Quadro NVS 135M
    Sound Stock Sigmatel High Definition Audio
    Network Adapter Stock
    Wireless Adapter Stock Broadcom 802.11g
    Smart Phone Modem HTC 8125 Modem (BlackJack 2)

     

    As you can see, this isn't a rocket ship, but it is an above average workhorse designed for business. Although I favor AMD chips (yes, I am a die hard AMD guy),the dual-core Core 2 Duo performs as expected, and I don't have too much more to say about it as dual cores are pretty much standard these days. For memory, I have 4 GB of DDR-2 RAM which is absolutely critical for the way I work.image I leave 2GB alone for my office and divvy up the remaining 2GB for my virtual machines. I really should keep machines singular, because unless I need to emulate a separate machine (such as a DC), I typically only have a single instance running. Recently, I've been working a lot more with IIS 7 and Windows Process Activation Services, so having (at least) 2 GB of RAM available to divvy up across  guest roles running Windows Server 2008 is pretty much required for any kind of usable (and demo-able) experience. Video, sound and NICs are stock.  Since I am not a designer or audio engineer, I wouldn't notice anything better. I don't want to bore you in talking about network adapters, but needless to say I need both wired and wireless, and when I can't find a WIFI hotspot, I revert to tethering my Windows Mobile Smartphone. I was overall pleased with the fact that most drivers were available on the Windows Server 2008 installation disk. With the exception of the wireless adapter and cell phone modem, all drivers that were not on disk were available on the Dell website. I had to go driver diving to finally get my hands on a driver that worked, and if I can remember where I finally did find it, I will update this post with the URL. I still haven't found a driver that will allow me to tether my cell phone again. If anyone has found one or a work around, please let me know.

    Start Up Time

    Productivity is very important to me as it seems like I am always short on time, and even little things like boot up times make a difference. Over the years I have been absolutely hooked on the Hibernate feature which is a great way to put my desktop and state right back as it was before I shut my machine down. Below are some very un-scientific benchmarks which are intended only to point out that if you are a big fan of hibernation and are used to blazing fast boot-up times with Windows XP, you will notice the difference.

    Start Up

    Boot to login ~60 seconds
    Login to desktop ~30 seconds
    Desktop usable ~60 seconds

     

    While I miss hibernation support, and it has taken a while to get used to 2.5 minute waits before I get busy, to me Hyper-V is worth it. Your mileage may vary.

    Power Management

    Although I keep my laptop plugged in most of the time, mobility is key as I move from work area to work area or meeting room to meeting room at various client sites. One of the things I feared would take a beating with a server OS is battery life, but I have been pleased to find that I can get up 3.5 hours of charge provided I put the laptop in Power saver mode. image Again, the only annoyance with Windows Server 2008 and Hyper-V is that I can't use hibernate to restore cold boots which can be a pain on a plane when I want to restore my workspace after take off for example.

    Application Support

    I didn't have any major concerns around application support. I fully expected all of my productivity applications, email client and Windows Live Messenger to work, even on x64. While most of them do, I was surprised to find that Windows Live Messenger flat out won't install. I am not sure if this is a flag that is being checked at install time or a true compatibility issue, but this one really disappointed me. It would seem to me that Windows Live should just work, and this brings me to an important point. There are some Win32 applications that just won't work on Vista, Longhorn x86 or x64. I remember this when I upgraded from Windows 98 to Windows 2000. Eventually, new versions came out or old versions were patched to work. Fortunately, .NET eliminates all of this as is the case for two applications that I can't live without: Windows Live Writer and TimeSnapper. Even though these apps were not built for 64 bit OS', they just work. This is the magic of the managed framework, and I suspect that if Windows Live Messenger was a .NET application, I would be running it right now instead of Trillian. The point here is not to throw stones at Microsoft for not supporting Windows Live Messenger on Longhorn x64 (feature backlogs probably ranked Windows Live Messenger support for Longhorn 64-bit fairly low), but to highlight the interoperability across OS versions that .NET provides. As .NET is now nearing it's 6th release, and Vista was the first client OS to ship with .NET (3.0, release 4), I suspect (and hope) that Microsoft will keep dog-fooding .NET for more and more applications so that like Windows Live Writer and TimeSnapper, they just work. This is important for customers, companies and developers who make significant investments in products and want to see them outlive the next Windows release.

    Applications

    Microsoft Office 2007 Yes
    Microsoft Visio 2007 Yes
    Windows Live Messenger No*
    Windows Live Writer Yes*
    TechSmith SnagIt Yes
    TimeSnapper Professional Yes
    Microsoft Virtual PC 2007 Yes
    Microsoft ActiveSync (Microsoft Sync Center) Yes
    CutePDF Yes
    WinDirStat Yes
    Microsoft SyncToy 2.0 Yes

     

    The apps with an asterisk denote applications that did not get past the installer. As I mentioned, I replaced Windows Live Messenger with Trillian, and although Windows Live Writer installer would not install using the installer, I just grabbed the application from the Windows.Old root and dropped it in Program Files, added a short cut to my task menu and I was up. In fact, I am using Live Writer for this very post. Timesnapper, the other .NET application I use everyday installed just fine, so I suspect that some apps, like Windows Live Writer check OS versions before installing as a quality control measure. Now, in this list above, there are some native x86 apps like SnagIt, VPC 2007 and Visio 2007 that install and work just fine. They are installed in "C:\Program Files (x86)" and I am not sure what determines 32-bit compatibility on Longhorn 64. I'd love to better understand this though, so if you do, please comment!

    Vista/Longhorn Features

    image There are a number of features that I have really grown to love that are available both with Vista and Longhorn. The search integration in the start menu is phenomenal, and I've found that I am using it more and more instead of navigating through fimageolder hierarchies or using Outlook search. On my XP machine, I had been using Windows Desktop Search which did the same thing, including indexing Outlook email, and folders/files that I specify. What is nice about search in Longhorn is that it feels very natural to go to the Start menu to do a search. Speaking of folder navigation, I really like the new path tooling around file explorer which allows you to drill into sub folders in the context of the full path. This is a nice time saver and makes working with folder structures easier and more intuitive.

    For a true desktop feel, installing the Desktop Experience feature brings many expected features to the otherwise no-frill server environment including:

    • Windows Calendar
    • Windows Mail
    • Windows Media Player
    • Windows Aero and other desktop themes
    • Video for Windows (AVI support) 
    • Windows Photo Gallery
    • Windows SideShow
    • Windows Defender
    • Disk Cleanup
    • Sync Center
    • Sound Recorder
    • Character Map

    One of the major features in Longhorn that matters most to me as as WCF nut is IIS 7 and Windows Process Activation Services (WAS) which allows you to host a WCF service in IIS using any transport (TCP, IPC, MSMQ, HTTP). While I don't have it enabled on my host machine, it is great to be able to pop right into a virtual machine and have a fully functional (and very, very responsive) Longhorn development environment at my fingertips.

    Summary

    Overall, I am very pleased with Windows Server 2008 Standard on my laptop. While I definitely miss hibernation and being able to tether my cell phone to my laptop when I am on the road, the incredible performance of Hyper-V virtual machines is a fair compromise. I hope that Windows Live Messenger support for Windows Server x64 is coming and that a future service pack will re-enable hibernation. When this happens, I will have to say that this will be the best workstation OS I have ever used.

    posted @ Friday, July 18, 2008 9:39 PM | Feedback (0) |

    Phoenix INETA Heroes Community Launch a Success!

    Sorry it took me so long to post pictures, but after preparing for and giving 5 talks in the months of May and June, I had some serious catch up to do at work and at home.

    With that said, we had a blast at the Heroes launch. We had about 15 attendees and some incredible speakers who shared some of the coolest features in the 2008 product launch line up. The smaller group size really allowed for some great interaction and I think everyone got a lot out of the sessions.

    Speaking of sessions, we had  6 back to back sessions is rapid-fire format which never left for a dull moment. 327

    John Bierman, Senior Consultant with Neudesic kicked off the event with a great discussion on the power and flexibility of Lambda Expressions. John is a great public speaker who brought his passion and energy for C# to the room and I think everyone learned how Lambda is really a shortcut syntax for delegates.

    336Lorin Thwaits, who is a tremendous thought leader, influencer and champion for the Phoenix .NET community gave a great glimpse at how powerful Windows Presentation Foundation is for delivering rich, next generation user experiences to the desktop. Lorin also covered how the XML Browser Application (XBAP)  feature can be used to serve up rich clients to internet/intranet users on Windows machines.

    And what .NET 3.5 launch event would be complete without coverage of LINQ? Ish Singh, President of AkallTech, a local Microsoft ISV which builds frameworks for 345helping developers build multi-tiered, object-relational applications provided an in-depth look at how to extend the Language Integrated Query language which provides great flexibility and productivity for dealing with lists and collections.

    Kathrin Lord, SQL Server Technical Specialist with Microsoft did a great job sharing all of the new features that are just around the corner with SQL Server 2008. Kathrin did all of her demos of SQL Server 2008 on her laptop which was running Hyper-V on Windows Server 2008348. Not only was her session was packed with great information on SQL Server 2008, but she showed how practical Hyper-Visor technology is for hosting multiple virtual machines, even on a laptop.

    We wrapped up with a look at new features in Visual Studio 2008 for Windows Communication Foundation, and I showed new features that make hosting, configuring and testing WCF services even easier. With full integration into the Visual Studio IDE, WCF project templates are now first-class citizens, and the ability to cross-target between .NET 2.0, 3.0 and 3.5 makes Visual Studio 2008 the best IDE for working with .NET and WCF, period.

    Last but not least, we had some great giveways, including full NFR copies of Windows Vista Ultimate,1 year evaluation versions of Windows Server 2008, full versions of Visual Studio 2008 Standard Edition, discount Microsoft certification vouchers, free subscriptions to TechNet, books and more. Suffice it to say that no one walked away empty handed! As always, a big thanks to Rob Bagby, Developer Evangelist for the Phoenix market for all of his support around community activities such as these.

    I'd like to thank everyone for coming as well as our speakers for taking time out of their Saturday morning and afternoon to help share their excitement and knowledge around Windows Server 2008, Visual Studio 2008 and .NET 3.5, and SQL Server 2008.

    posted @ Friday, July 18, 2008 8:15 PM | Feedback (0) |

    Tuesday, July 01, 2008

    PCSUG Meeting - Thursday, July 3rd

    Join us for our first meeting to learn about the group and influence the topics and scenario selection for upcoming meetings!

    More info at: www.azgroups.org

    About PCSUG:
    The goal of the Phoenix Connected Systems User Group is to educate, evangelize and inform the community about the direction in which the Microsoft Connected Systems Division (and software engineering) is going, and how developers and architects of various, yet intersecting disciplines can start to prepare for what is ahead while serving the community through knowledge sharing and evangelism of current shipping technologies.

    posted @ Tuesday, July 01, 2008 8:48 PM | Feedback (0) | Filed Under [ Speaking Events ]

    Wednesday, June 11, 2008

    Heroes Community Launch Schedule - This Saturday

    Its final. Here is the schedule (click thumbnail):

    Phoenix Heroes Launch

    We will be getting started at 10:00 am and will have bagels, fruit and coffee.

    We have lots of great stuff to give away including:

    • Windows Vista Ultimate - Full NFR Version
    • Windows Server 2008 Enterprise edition – 1 Year Evaluation Version
    • Visual Studio 2008 Standard
    • Visual Studio Team System 2008 - 90 Day Trial Version
    • SQL Server 2008 Standard NFR Voucher upon RTM

    See you there!

     

    P.S. Please note that there is no registration required. Just show up!

    posted @ Wednesday, June 11, 2008 7:45 AM | Feedback (0) |

    Friday, May 23, 2008

    Heroes Community Launch - Call for Speakers

    We are currently looking for additional speakers for the event, which will be held on Saturday, June 14th at the University of Advancing Technology in Tempe, Arizona. 

    There are about 4 slots remaining for the rapid-fire 20 minute sessions running from 10:00 AM to 1:00 PM. 

    Talks can be all code/demos and can also include a deck, although slides are not mandatory.  The only requirement is that you cover a new feature that is part of the 2008 products (Visual Studio 2008 & .NET 3.5, SQL Server 2008, Windows Server 2008) with an actual demo and keep the talk to 20 minutes. 

    So far, we have speakers on:

    • Lambda Expressions with Visual Studio 2008
    • New Features in Visual Studio 2008 for Windows Communication Foundation
    • Hosting WCF Services in IIS 7 and Windows Activation Services
    • and others...

    This is a great opportunity to have an impact on the Phoenix Microsoft community. If you would like to speak at this event, please contact me.

    posted @ Friday, May 23, 2008 12:14 PM | Feedback (0) |

    Powered by: