2009
11.25

Overview

I am working in the domain of distributing computing and I am looking into the Microsoft HPC Server platform as a possible option.  One of the most important aspects is the development experience, and to test that I will need to create a suitable development environment.

The environment will consist of a network of virtual machines with the following “Roles”:

  • Domain Controller / DNS Host
  • HPC Server Head Node.
  • ‘N’ number of Child nodes.

So numerous headaches and a ServerFault Question later (Domain Controller / DNS Issue – Creating Network of Virtual Machines for Development), I’ve thrown together this rough guide which should hopefully aid some other poor developer get up and running developing against a Microsoft HPC Cluster.

BEFORE YOU CONTINUE NOTE:

  • I am a developer, NOT an IT Professional, and my actions will reflect that.
  • This is a network of virtual machines I am using for testing purposes.
  • These are running on a SECURE LAN, working on a Private network.
  • With little to no security in place.

So in a nutshell if you are trying to install a cluster of machines in an enterprise environment get a professional and DO NOT use this guide.

Creating the Domain Controller & DNS

For this I followed this great guide: Build a Windows Server 2008 R2 Domain Controller.

Configuring machines to join Domain

This is where the first real headache started.  I followed the usual steps to add a machine to the domain, but realised that the machine was point at my router (thinking it was the Domain Name Server (DNS) ).

Step Zero: Add machine to Domain

0-AddToDomain

Error: “Domain Controller for the domain <Your Domain> could not be contacted”

1-Error

Full Error Message

Note: This information is intended for a network administrator.  If you are not your network’s administrator, notify the administrator that you received this information, which has been recorded in the file C:\Windows\debug\dcdiag.txt.
The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller for domain 17B.CO.UK:
The error was: “DNS name does not exist.”
(error code 0×0000232B RCODE_NAME_ERROR)
The query was for the SRV record for _ldap._tcp.dc._msdcs.17B.CO.UK
Common causes of this error include the following:
- The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses:
192.168.1.1
- One or more of the following zones do not include delegation to its child zone:
17B.CO.UK
CO.UK
UK
. (the root zone)
For information about correcting this problem, click Help.

Resolution: Configure Network Card To Point at DNS Server

Go to: Network Connections > ‘Properties (of your network connection) > IPv4 > Properties > Advanced..

image

Then: > DNS tab > Add > “Enter the IP of the DNS machine (which is also you Domain Controller).

image

(Disable & Enable) Your Network Connection. Now you should be able to add the machine to the domain.

You will be prompted to Authenticate

2-Authenticate

If all is well you should see this screen

3-Success

Finally Restart Your machine and it will have been successfully added to the Domain

4-Complete

Note: This step will need to be repeated for each machine you wish to add to the domain.

Installing and Configuring HPC Machines

For this I followed this guide  Installing HPC Server 2008 by (Parallel Programming Guru) Daniel Moth.

Conclusion

That was how I got up and running developing on the HPC Platform, hope this was helpful. (Wish I had it when I started).

2009
11.23

I have been blogging recently about a few commands I have found useful in setting up generic Server Core installations.  I am using these to for a prototyping environment for my research into distributed computing.  I thought it only responsible to let people know about Remote Server Administration Tools for Windows to save them from excessive cmd line hacking.

Windows Server 2008 is all about the Roles and Features.  Remote Server Admin Tools allows this to be handled remotely.

Remote Server Administration Tools for Windows® 7 enables IT administrators to manage roles and features that are installed on computers that are running Windows Server® 2008 R2, Windows Server® 2008, or Windows Server® 2003, from a remote computer that is running Windows 7. Microsoft.com

  1. You can download the tools from here.
  2. Guide to setting up Remote Server Administration Tools for Windows here.
2009
11.23

You may wish to disable the firewall on the server core machine (not recommended if your machine is not in a private LAN), this can be achieved with the following command:

netsh advfirewall set allprofiles state off

 

Reference: http://blogs.techrepublic.com.com/datacenter/?p=480

2009
11.23

To add your Server Core instance to a workgroup use the following command:

Wmic computersystem where name="%computername%" call joindomainorworkgroup
name="[new workgroup name]"

e.g.

Wmic computersystem where name="WIN08-00" call joindomainorworkgroup
name="WORKGROUP”

Then Restart you machine:

shutdown /r

Simple (When you know how its done =/ ).

References:

http://www.mail-archive.com/ntsysadmin@lyris.sunbelt-software.com/msg27669.html

2009
11.23

I am currently working with many instances of Windows Server 2008 R2.

I decided to go down the path of using the “Server Core” installation as it is more light weight.

“A Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles.

In Windows Server 2008, Server Core installation does not include the traditional full graphical user interface (GUI).” Petri IT Knowledge

This is sure to sharpen my command line skills… so I’ll blog about the things I find most useful in working with a server core installation.

Getting Started

When you log in for the first time you will be faced with a cmd prompt.  Remember “help” is your friend!

Get the machine name

The machine will be named something random like “WIN-542FGEOER9”. You will need to find what the current name of the machine is.  You can do this by using the command:

systeminfo

image

Renaming a Server Core Machine

netdom renamecomputer <CurrentComputerName> /newname:<NewComputerName>


image
 

Rebooting Your Machine

Now you will need to restart your machine which can be done by using one of the following command:

shutdown /r

image
 

The next step will be to add you machine to the domain.

The are solutions out there for controlling “Server Core” installations remotely as well as automating changes to large groups of machines at once via Power Shell.

I will touch on these topics as I am faced with them.

Update:  I have found a brilliant article on Microsoft’s TechNet, by a better person than I, on the topic which mirrors what I have discussed in this post and then some!  Well worth checking out: http://technet.microsoft.com/en-us/magazine/2009.02.geekofalltrades.aspx?pr=blog#id0080012

2009
11.23

Download and Get up to Speed

Get the Rx Framework libs now from here!

Watch the PDC Session

Rx: Reactive Extensions for .NET

Want more? Watch some Channel 9

Rx Video Listing

Some Early Thoughts

This is a game changer!  I can’t wait to get playing with / applying it to my daily .NET life!  I’ll be blogging more on the topic when I have a better grasp of it all and something more interesting to say.

Complex Event Processing

“Complex event processing, or CEP, is primarily an event processing concept that deals with the task of processing multiple events with the goal of identifying the meaningful events within the event cloud.” Wikipedia

I really hope Rx Framework can be applied to complex event processing (CEP)..  *fingers crossed*.   You can see how Rx might relate to “processing multiple events” as its a push model that you can run LINQ over!

Update: Microsoft’s StreamInsight!

StreamInsight takes advantage of the Rx Framework to allow for high performance CEP.

This is how Microsoft describe their CEP offering:

Microsoft StreamInsight is a powerful platform that you can use to develop and deploy complex event processing (CEP) applications. Its high-throughput stream processing architecture and the Microsoft .NET Framework-based development platform enable you to quickly implement robust and highly efficient event processing applications.

By using StreamInsight to develop CEP applications, you can achieve the following tactical and strategic goals for your business:

  • Monitor your data from multiple sources for meaningful patterns, trends, exceptions, and opportunities.
    Analyze and correlate data incrementally while the data is in-flight — that is, without first storing it–yielding very low latency. Aggregate seemingly unrelated events from multiple sources and perform highly complex analyses over time.
  • Manage your business by performing low-latency analytics on the events and triggering response actions that are defined on your business key performance indicators (KPIs).
    Respond quickly to areas of opportunity or threat by incorporating your KPI definitions into the logic of the CEP application, thereby improving operational efficiency and your ability to respond quickly to business opportunities.
  • Mine events for new business KPIs.
  • Move toward a predictive business model by mining historical data to continuously refine and improve your KPI definitions.

Nice!  Good times ahead on the .NET platform.

2009
11.19

I have made two improvements to my blog over the last couple of days.

Apple mobile Device Support

I have added css to target the iPod Touch and iPhone platforms.  What this gives is a nice user experience when reading my blog on one of these devices.

IMG_0005 IMG_0006 IMG_0007

IMG_0013 IMG_0014 IMG_0015

Gotcha: Scrolling Across the Code Samples

As code samples can be wide this is quite an important thing to note:

USE TWO FINGERS TO DRAG ACROSS THE CODE SAMPLE. This gesture allow user to scroll across the code sample.

The theme still needs tweaked but I’ll get round to that hopefully within the next week.

IMG_0008 IMG_0009

IMG_0012 IMG_0016

OpenID Support

I have finally rolled out OpenID support in my blog.  This means users do not have to register with my blog now in order to leave a comment.

Simply enter your OpenID in the login screen and bobs your uncle.

image

clip_image001

Note: There seems to be an issue whereby using the link at the bottom of the page to sign in incorrectly redirects and gives a “404 page not found”. 

clip_image001[7]

I will address this in due course so in the mean time use the “Log in” link to the right of the page.

clip_image001[9]

Gotcha: Signing in with your Google Account

You may or may not know but you can use your Google account to log in via OpenID.

Simply enter [ https://www.google.com/accounts/o8/id ] like so:

image

If you are already signed into the Google account you will be asked to confirm, else you will be prompted to sign in.

Hope these improvements come in useful!

2009
11.13

I thought as I study this topic that I would post links to resources that I have found particularly useful or interesting.  I will update post periodically as I find more articles, posts, wikis and examples of interest on the topic and bang on my two pennies worth regarding my opinion of said resource.

Wikipedia: Fluent Interface 

  • always a good place to start.  Very Simple examples in many languages.

Scott Hanselman’s Post: Weekly Source Code Fluent Interface Edition 

  • Another good place to start. Overview of what a fluent interface is, how they came to be, discussion of the ambiguity in terminology and examples in C#, Ruby and Python. 

Martin Fowler’s Post on Fluent Interfaces 

  • Martin discusses how fluent interfaces can be used to create a internal DSL. He makes reference to Eric Evans’ “Time And Money” Library as a good example. 
  • A noteworthy point I gained from this post (even it is not explicitly discussed) was the concept of overloading methods named “with”.
2009
11.13

I’m getting sick of the argument:

"Should private fields in a class be prefixed with an ‘_’?"

So I’m going to try and crack this nut once and for all!

Example:

private double _price;	//Using “_”
 
public double Price
{
    get { return _price; }
    private set { _price = value; }
}
private double price; 	//Not using “_”
 
public double Price
{
    get { return price; }
    private set { price = value; }
}

Note:  I am well aware I could use an automatic property here, but so not the point =].

So what do Microsoft say? Well here is their Naming Convention section of MSDN.  They don’t want to touch this topic it seems as there is no guidance on how to name a private field.  When they discuss property naming conventions here this is all we get:

public int Color
{
	get {// Insert code here.}
	set {// Insert code here.}
}

Hmm that was helpful =/.

I got my hands on the iDesign C# coding conventions which you can download from here.

They go down the road of prefixing private fields with “m_”  D= ! That is a barrel of worms right there so I’m going to leave it at that!

Arguments AGAINST prefixing with an underscore:

  1. In intellisense the property of said name and its backing field will appear together.clip_image001[8]
  2. C# is case sensitive therefore there seems to be no need for an ‘_’.
  3. If you wish to differentiate between fields from your local variables / parameters use the “this” keyword to indicate a field from a local variable like so:
    public void WithDiscount(int price)
    {
        this.price = price;
    }
  4. “StyleCop will call you a son of a whore if you use underscores” @blowdart

If you can think of anymore please leave a comment.

Arguments FOR prefixing private fields with an underscore:

  1. When I got my C# Certification I was taught to use an "_".
  2. You do not need to put “this” in your code before private fields.
  3. If you don’t wish to use “this” everywhere you have to get creative with naming.
  4. You don’t need to think about what a variable is, “_” prefix makes it quite clear.
  5. All private fields with be grouped together in intellisense:
  6. clip_image001

  7. “..it allows for the same naming convention to span C# and VB.NET” @csharphacker
  8. R# by default says so!
  9. I said so >.<!

Again If you can think of anymore please leave a comment.

Conclusion

What sells the “_” for me is the fact I don’t have to put this everywhere in my code  when working with private variables nor do I have to think about alternate naming for local variables or parameters to avoid using this.

What is you opinion?  Let the battle rage on..!