Thursday, October 19, 2006

Virtual PC Optimizations

Tags: ,
A coworker recently sent me a link to an excellent document describing the difference between VPC and Virtual Server and how to squeeze the most performance from it. I'm not going to reproduce the entire document here for brevity but I do want to describe the settings made within the virtual system to improve performance (because I know I'll want to do this on every new VPC I start working on). You can grab the whole document here: http://blogs.msdn.com/nolansax/attachment/700992.ashx.

Configure performance settings on the Microsoft Windows XP or Microsoft Windows Server 2003 virtual machine

  1. Start Virtual PC 2004, and then start the Windows XP or Windows Server 2003 virtual machine that you want to configure.
  2. Click Start, click Run, type sysdm.cpl, and then click OK.
  3. On the Advanced tab, click Settings under Performance.
  4. On the Advanced tab, click Programs under Processor scheduling, and then click OK.
    ** Note Before you modify this setting, you must verify that the host is not running critical services in the background.
  5. On the Hardware tab, click Device Manager.
  6. Expand Disk Drives, right-click the drive that you want, and then click Properties.
  7. On the Policies tab, click to clear the Enable write-caching on the disk check box, and then click OK.
  8. On the File menu, click Exit to close Device Manager.
  9. Click Start, click Run, type desk.cpl, and then click OK.
  10. On the Settings tab, click Advanced.
  11. On the Troubleshoot tab, move the Hardware acceleration slider to Full, and then click OK two times.
  12. Click Start, click Run, type regedit.exe, and then click OK.
  13. Locate and then click the following registry subkey:
    My Computer\HKEY_CURRENT_USER\Control Panel\Desktop
  14. In the right pane, right-click MenuShowDelay, click Modify, type 400 in the Value data box, and then click OK.
  15. Quit Registry Editor.

Monday, October 16, 2006

Dropdown Engineering

Tags: , ,

In my work I do a lot of development within products or frameworks. The best example is BizTalk but others are K2.net or BIE (Bryante Integration Server). Creating business solutions within these frameworks requires a different approach to software development. How is it different? Well...

The first thing you need to do as a developer is embrace the features. Only by doing this do you fully leverage the power of the framework Why even use the product if you intend to hand roll everything? I often see new BizTalk developers concocting long and involved code in Orchestration Expression Shapes (think: code snippets). Naturally, they are complaining the whole time about how the shape dialog doesn't have intellisense or other useful coding features. I try to gently remind them that they are missing the point; expression shapes shouldn't really need more than a few lines of code. Anything more and you are likely doing something that could be done better in another way. (If the built-in features of BTS don't do what you want then at least write a helper class to encapsulate your valuable business logic). The point is that the framework gives you the flexibility to write your own code but that doesn't mean you should (or need to).

The second thing you need comes from experience with the framework (usually after 2-3 projects) and that is to know the pitfalls. Every framework has strengths and weaknesses. Part of what makes a superior Dropdown Engineer is understanding this and knowing where to invest work to shore up the weaknesses. This may be one of the single biggest advantages of using experienced engineers.

I sometimes lament the loss of creative freedom when using product frameworks but I take solace in the fact that they allow me to develop solutions faster, more reliably, and with greater feature-sets than I would be able to do on my own. In essence they (the good ones, anyway) allow me to concentrate on business value without investing heavily in the foundational work. That's a good thing, right?

Thursday, October 12, 2006

Microsoft SOA and BPM Conference: Day 4

Tags: , , ,

Last week was the conference, this week it's back to work and wow am I ever paying for spending the week away from the office. Nonetheless, the blogging must go on...

What is Federation?
During an interesting discussion about integration design patterns by an architect from Software Architects, inc. something interesting came up. He asked the audience to define 'Federation' and a couple of answers flew back but most people had trouble defining it. He provided what I believe is a very succinct definition that I will be happy to borrow and use from now on. Thanks, Mr. Architect! :)

Federation is the unification of self governing entities.


The new WCF Adapter
With the release of BizTalk 2006 R2 (tentatively scheduled for mid 2007) there will be direct support for the new Windows Communication Framework (part of .NET 3.0). From the looks of things this adapter will rapidly become our most commonly used adapter. This to me is yet more proof that WCF will have a dramatic impact on how we build applications.

WCF adapter features
  • Transactional message send/receive

  • Uses ws-* headers for routing/processing

  • Numerous security scenarios

  • In-proc hosting of non-http (netTCP, netNamedPipes, netMSMQ) endpoints


Business Rules
A very interesting seminar was held discussing business rules within your enterprise. Where to store them and how to express them. There was lots of good stuff with the usual justifications for separating business logic from code. I thought there were a couple of points in particular that were worth recording.

Deciding factors on where to keep rules

  • Volatility

  • Ownership

Reasons to manage Business Rules separately

  • Accessibility

  • Flexibility

  • Manageability


Web Services Software Factory
On a final note, there was a great seminar presented by the Patterns and Practices team which showed us some of the great work they are doing around standardizing Web Services application development. I strongly encourage everyone to go and check it out at the Web Service Software Factory Community page.

Benefits of using a software factory

  • Quality

  • Consistency

  • Performance


That's it for the conference reporting. It was a great educational experience and I feel privileged to have attended. Hopefully, next year we have the opportunity to go again!


Thursday, October 05, 2006

Microsoft SOA and BPM Conference: Day 3

Tags: , ,

Here we are in the home stretch of the conference and the gems keep on popping up.

A replacement for the SQL Adapter?
I asked my annual question about whether they will be re-writing the SQL adapter and the short anser is "no" but... a surprise during the adapter presentation was the revelation that there will be a new Oracle adapter in R2. It turns out that the new Oracle adapter is a complete rewrite based on ADO.NET. Furthermore, it was suggested that since it's based on ADO.NET that it could also include support for SQL Server. It may be the case that we see a new 'database' adapter that supports Oracle and SQL server. Let's keep our fingers crossed!


Large Messages
A common challenge with BizTalk solutions is handling large messages. A large message is defined as anything over 1-2 megabytes. A persuasive demo showed us how dramatic the performance hit can be if you do not handle large messages carefully. The general approach is to avoid pumping huge messages into the message box. Instead, store the large part of the message in a file or database and then tag the message with a reference to the storage location. This would happen in the incoming pipeline. When messages leave BizTalk an outgoing pipeline reconstructs the message by retrieving the large bit and joining back to the message.
A very impressive solution was demonstrated that actually examined the incoming message for large elements, pulled them out (and replaced them with a reference id), stored them in the database, and then reconstructed the message on the way out. The performance improvement of this approach was huge. Something like a 60% improvement.
The presenter has a blog that's a good place to seek out more information on large message handling. It can be found here: http://blogs.digineer.com/blogs/tabraham/default.aspx

Wednesday, October 04, 2006

Microsoft SOA and BPM Conference: Day 2

Today's presentations were more technical than yesterday and hit on a number of interesting topics.

My favorite presentations were about Windows Communication Foundation (WCF). First off, WCF looks like the answer to many of our solutions. Being able to implement a variety of communication transports with run time configuration is awesome. It's also going to be great to bring the WS-* protocols into the mainstream with direct support for BizTalk ports.

I picked up a few best practices that we'll have to be sure to follow:
  • Don’t plan on migrating to WCF. Plan on engineering new applications. The value of migrating is limited since existing applications ‘work’ and moving web services projects to WCF web services doesn’t really gain much.
  • When validating messages avoid ‘schema validation’ as it can be costly. Validating Data Contracts is preferable.
  • Protocols
    • BasicHTTP is for all HTTP and web services type communication except for if you need WS-*
    • WSHTTP is for WS-* web services communications
    • NetTCP is for fast, efficient communication (and is best for machine-to-machine within your .NET solution)
    • NetNamedPipes (I think it’s called) is best for service calls within the same machine
  • Add Fault Operations to the WSDL contracts
Lastly, I picked up a couple of answers to my standing questions around SOAP Faults and NULL parameter validation. On the SOAP Fault front the good news is that the WCF WSDL tools will support SOAP Faults which is a huge improvement over the current tools. With NULL parameter validation the answer seems to be to use a new group of .NET 2.0 data types within the System.Nullable namespace. These are effectively a bunch of value types that can be NULL which should bypass the fun behavior of .NET where it assigns default values for NULL parameters.

Microsoft SOA and BPM Conference: Day 1

Another year passes and here I am at the BPM conference in Redmond again.

Last year the conference was very focused on the impending release of BTS 2006 and the impact of the recently unveiled WinFX (since renamed to .Net 3.0). This year BTS seems to be taking a lesser role and is being presented more as a supporting technology for the - currently fashionable - Services Oriented Architecture (SOA). In fact, if the first day is any indicator SOA is the central theme of the conference with technologies used to support Services Oriented (SO) architectures presented as precisely that, technologies to enable SOA.

Why is SOA the focus of the conference this year?

SOA is certainly nothing new. As my colleague pointed out, 'distributed computing' has been around for many years and was an early attempt to distribute 'services'. Dave Chappelle explained in his keynote that the reason SOA is now so hot is because the communication protocol to communicate services has finally been decided. The Simple Object Access Protocol (SOAP) allows diverse computing environments to communicate in a consistent way which effectively lowers previously near-impenetrable barriers. Chappelle also pointed out that the last time this happened was with TCP/IP when it assumed the mantel of dominant networking protocol and effectively enabled the Internet to be realized by opening up all of the diverse networks and allowing them to communicate with each other. So, it seems that SOA is the focus this year because the technology has reached a critical mass.

What benefit does SOA provide?

Normally, when I explain the benefits to a customer I describe three main benefits but in a couple of the presentations yesterday I came to realize a nagging suspicion about one of the ‘benefits’ that has moved me to officially remove it from my list of SOA benefits. Here are the benefits:
1. Abstraction
2. Accessibility
3. Reusability
For a while, I’ve suspected that my argument for reusability was a bit weak and after hearing others question it yesterday I’ve come to the conclusion that it is very weak. I can think of very few real-world examples where a service has been re-used to the point where it can reasonably be described as a benefit. Usually, a service is too specialized for a business case to be shared by other processes. Other times, the owner of that service has a vested interest (i.e. data ownership) in preventing access by other parties. In fact, the only example that immediately comes to mind of successfully reusing services is with simple ones like GetActiveDirectoryProperty which is a simple service that returns a property value given an account and property name. I think this was successfully reused because the business case was very precise and the AD values were not particularly proprietary.

Anyway, more on the conference to follow…