Archive for August, 2008

What Does an Architect Do?

Great pointer from Mike Walker yesterday to an IASA blog post highlighting their Architect Taxonomy and what it means to be an architect.  Reading things like this are always a reminder to me that I’m not remotely great at my job yet.

The author of the IASA post, Paul Preiss, first links to the list of “Certified Architect” requirements from Microsoft which focus on five broad competency areas:

  • Leadership.  Are you providing thought leadership, mentoring and able to build consensus for important ideas and standards?
  • Communication.  Can you effectively share your ideas both orally and in the written word, and do so for a variety of audiences? 
  • Organizational dynamics.  Do you have a feel for your company’s key decision makers and can you work through these organizational structures to get things done?
  • Strategy.  Can your knowledge of technology help your organizational position itself favorably for the future while also applying the frameworks and principles to make you successful today?
  • Process and Tactics.  Are you able to navigate the project lifecycle and efficiently work through system requirements, design, prototyping, documentation and deployment?
  • Technology Breadth.   Do you have a grasp on a wide range of technologies and concepts that may comprise a complete organizational solution? 
  • Technology Depth.  Are you a thought leader within your organization on specific topics?

The IASA taxonomy is even more in depth than what Microsoft provided.   They bunch up their expected skill set into five buckets:

  • IT Environment
  • Business-Technology Strategy
  • Design Skills
  • Quality Attributes
  • Human Dynamics

I really liked their breakdown of each category and the specifics listed under each.  After calling out the core skill buckets, they go into the expectations for a number of different flavors of architect: software architect, infrastructure architect, and business architect.

Very useful to read, if nothing else, than to help plan a roadmap for things to strengthen in the upcoming years.  Also, this is a great cheat-sheet for coming up with questions during an architecture interview!

Technorati Tags: Architecture

Odds and Ends

A couple things to share on this glorious Wednesday. 

First, one of our BizTalk developers came across an odd scenario, and I just learned that everyone’s favorite Dahan (Yossi Dahan) wrote about it a couple years ago.  Our issue was that an orchestration needed to consume a service with a multi-part input, but the complex type parameter wouldn’t show up as message for mapping.  After a quick poke around, I see that Yossi explained how multi-part messages that have a mix of complex parts and simple type parts cannot be used in a map.  I tried it out, and sure enough, if you create a multi-part orchestration message that does not have all parts set as schema types, then that message isn’t available as a map input or output.  Odd and unappreciated.

Secondly, my company is looking for a simple AS2 solution for integration with a business partner, and was evaluating some available choices.  If (and when) we formally upgrade to BizTalk 2006 R2, we’ll obviously get that capability for free.  In the meantime, we’re also considering either the full AS2 adapter from our buddies at /n software, or the free single-partner AS2 solution also offered by /n software.  I only mention all this because I got a healthy chuckle out of the unconventional FAQ page on the http://www.freeas2.com site.  I’m easily amused, so this was right up my alley.

That’s all.  Carry on.

Technorati Tags: BizTalk

Impact of Database Availability on BizTalk Web Services

My buddy Victor asked me the other day about the relationship between IIS and the BizTalk databases.  That is, if we restart the SQL Server service or server, what happens to messages that are still submitted to the BizTalk web services on an active IIS server?

So, I put together a really quick application where I tested four scenarios: downstream host unavailable, IIS unavailable, receive location offline, and SQL Server unavailable.

Also, to legitimately gauge service behavior, I exposed both classic ASMX services and WCF services for my BizTalk application.  Both services were built as one-way HTTP services hosted in IIS.  The published data is then routed to a single FILE send port via message-type routing.


Scenario: Processing Host is Unavailable

For this scenario, I simply disabled the in-process host that runs the send port subscribing to messages published by the services.

Result: Messages are published with no problem, and everything is queued up until the in-process host comes online.  No message loss and no errors to the service callers.


Scenario: IIS is Unavailable

Here I turned off the IIS website hosting the services.

Result: As expected, both the ASMX and WCF services returned errors to the client application.  The ASMX service returned an error saying:

error: System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:80

The WCF service returned the following error:

error: System.ServiceModel.EndpointNotFoundException: Could not connect to http://myserver/Blog.Biztalk.AvailabilityTestWCF/ContractService.svc. TCP error code 10061: No connection could be made because the target machine actively refused it 192.168.131.65:80.  —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.131.65:80

So the client gets an error, no message is submitted to BizTalk by either service, and the client will be expected to try again later.


Scenario: Receive Location is Offline

Now I’ve turned off the actual receive locations.  The website is up and running, but the BizTalk receive locations aren’t listening for the inbound messages.

Result:  The ASMX service returns a success message (HTTP 202), even though no message is published to BizTalk.  There is an error in the System Event log stating:

The Messaging Engine could not find the receive location for URI:”/Blog.Biztalk.AvailabilityTest/ContractService.asmx”.\
Please verify the receive location exists and is enabled.

However, the client does NOT get an error even though no message was published (or suspended) by BizTalk.

The WCF service returns an HTTP error and the following message to the client:

error: System.ServiceModel.ServiceActivationException: The requested service, ‘http://myserver/Blog.Biztalk.AvailabilityTestWCF/ContractService.svc’ could not be activated. See the server’s diagnostic trace logs for more information.

In this case again, no message is published, BUT, at least the client knows that a problem occurred.  Much better than the ASMX behavior.


Scenario: SQL Server is Offline

In this case, I’ve shut down the SQL Server service and the in-process hosts that are running.

Result: The ASMX service continued to return HTTP success messages, even though it could not publish to the MessageBox.  The IsolatedHost (which runs the Message Agent) can’t connect, but the client isn’t told this.

The WCF service, however, returns the same error it did on the previous scenario.  So it did not publish the message either, but, again, it returned a proper exception to the client.

Looking at the IIS logs, I wanted to confirm the service response.  For the ASMX service call when the database was offline, I can see the following entry:

POST /Blog.Biztalk.AvailabilityTest/ContractService.asmx – 80 – 127.0.0.1 202 0 0

Notice the HTTP 202 returned to the client.  The next entry in the log file represents my call to the WCF service while the database was still down:

POST /Blog.Biztalk.AvailabilityTestWCF/ContractService.svc – 80 – 192.168.131.65 – 500 0 0

Notice the HTTP 500 error which represents an internal server error returned to the caller.


Summary

So, we can conclude that ASMX services do a lousy job of reporting what actually happens after it tries to publish messages to the BizTalk bus.  Unless the IIS server is explicitly taken down during database server maintenance or restarts, you run the real risk of losing messages without the client being aware of it.  For WCF services, we see much better handling of message publishing problems.   This is probably due to the fact that the BizTalk WCF service host relies heavily on the BizTalk configuration database and receive location availability to complete its operations.  While it still can’t save the inbound requests, it at least tells the caller that something went wrong.

Anyone else have different experiences than the ones I demonstrated above?

Technorati Tags: , BizTalk

Trying *Real* Contract First Development With BizTalk Server

A while back on my old MSDN blog, I demonstrated the concept of “contract first” development in BizTalk through the publishing of schema-only web services using the Web Services Publishing Wizard.  However, Paul Petrov rightly pointed out later that my summary didn’t truly reflect a contract-first development style.

Recently my manager had asked me about contract-first development in WCF, and casually asked if we had ever identified that pattern for BizTalk-based development.  So, I thought I’d revisit this topic, but start with the WSDL this time.  I’m in the UK this week on business, so what better use of my depressing awake-way-to-early mornings than writing BizTalk posts?

So like Paul had mentioned in his post, a true service contract isn’t just the schema, but contains all sort of characteristics that may often be found in a WSDL file.  In many cases (including my company), a service is designed first using tools that generate WSDLs and XSDs. Then, those artifacts are shared with service developers who build services that either conform to that service (if exposing an endpoint) or consume it from other applications.

I’ll start with a simple WSDL file that contains a schema definition and a request/response operation called HelloWorld.  The schema contains a few constraints such as maxOccurs and minOccurs, and a length restriction on one of the fields.

What I’d like to do is have BizTalk consume the WSDL, and then generate a service that respects that WSDL.  How does BizTalk eat a WSDL?  Through the use of the dark and mysterious BPEL Import BizTalk project type.

After choosing this project type, a wizard pops up and asks you for the artifacts that make up the service.  In my case, I just pointed it to the WSDL which had an embedded schema definition.

After an “import succeeded” message, I’m left with a new project and three files which represent my schema (and base types), and an orchestration that includes the auto-generated port types and schemas.

For simplicity’s sake, I’ll just build out the provided orchestration, with the goal of exposing it as a web service.  First, I add a new configured port to the orchestration design surface, careful to choose the generated port type provided to me.

 

I’m not sure why, but my generated multi-part message isn’t configured right, and I had to manually choose the correct schema type for the message part.

Next, I built two messages (request and response) which used the generated multi-part message types.

Finally, I added send/receive shapes (and a construct) in order to complete the simple orchestration.

I’ll show what happens when using the ASMX Web Publishing Wizard, but first, let’s be forward thinking and use the WCF Service Publishing Wizard.  I chose a WCF-BasicHTTP endpoint with metadata so that I can inspect the WSDL generated by my service and compare it against the original.  You’ll notice that the “service name” of the service is a combination of the orchestration type name and namespace, and, the “service port” is the name of the orchestration port.  Feel free to change those.

I then had to change the target namespace value to reflect the target namespace I used in the original WSDL file.

After completing the wizard (and build a receive location so that my service could be hosted and activated), I compared the WSDL generated by BizTalk with my original one.  While all of the schema attributes were successfully preserved (including original restrictions), the rest of the base WSDL attributes did not transfer.  Specifically, things like the SOAP action and service name were different, not to mention all the other attribute names.

I went back and repeated this process with the ASMX Web Publishing Wizard, and there were differences.  First, the wizard actually kept my original target namespace (probably by reading the Module XML Target Namespace property of the generated orchestration) and also allowed manual choice of “bare” or “wrapped” services.  The actual generated WSDL wasn’t much better than the WCF wizard (SOAPAction still not right), and worse, the schema definition was stripped of important restriction characteristics.  This is a known problem, but, annoying nonetheless.

At this point, you can argue that this is a moo point since I can take advantage of the ExternalMetadataLocation property on the Metadata Behavior in my generated configuration file.  What this does is allow me to point to any WSDL and use IT as the external facing contract definition.  This doesn’t change my service implementation, but, would allow me to use the original WSDL file.  If I set that configuration attribute, then browsing my BizTalk-generated service’s metadata returns the base WSDL.

One of the key things to remember here is that the SOAPAction value you use is the value set in the BizTalk “MethodName” context attribute.  This value is used to match inbound messages to their orchestration subscription (when bound to a SOAP port).  If these don’t line up, you get “subscription not found” errors when you call this service.  So, if I generate my WCF contract using the original WSDL, and submit that message to my WCF endpoint, the message context looks like this:

And remember that my orchestration port’s generated “operation” property was “HelloWorld” and thus my MessageBox subscription is:

So, if you plan on using an external WSDL, make sure you line these values up.  Also note that the orchestration port’s “operation” property doesn’t accept an “http://xxx” style value, so pick something else ;)

I plan on including this topic in the upcoming book, but didn’t feel like squirreling it away until then.   It’s an interesting topic, and I’d be curious as to other’s attempts and getting BizTalk to conform to existing service contracts.

Technorati Tags: , BizTalk

Interview Series: Four Questions With … Tomas Restrepo

There are a plethora of great technologists in the “connected systems” space, and I thought it would be fun to interview a different one each month.  These are short, four question interviews where I ask about experiences with technology.  The last question will always be a fairly stupid, silly question that might only amuse me.  So be it.  I used to do these sorts of interviews when I wrote newsletters for Avanade and Microsoft, so if I happen to reuse a previously asked stupid question, it’s because I liked it, and assume that most of my current readers never saw those old newsletters.  I’m a cheater like that.

To start things off, let’s have a chat with Tomas Restrepo.  Blogger extraordinaire , Microsoft MVP, and all around good guy.

Q: Tomas, you’ve consistently been out in front of many Connected Systems technologies such as BizTalk Server and WCF.  What Microsoft technologies are on your “to do” list, why, and how do you plan to learn them?

A:  That’s really a tough question to answer. There’s just so much stuff coming out of Redmond these days, and, to be honest, it’s still to early to tell yet how much of it is going to “stick” and what might be abandoned down the road in favor of something else.

Sometimes learning a new technology in depth can be quite time consuming, so you want to be careful when choosing what to invest your time in. What I’m currently trying to do is follow a few rules:

  • Try to be aware of “what’s out there” and at least know what it does and what it is good for.
  • Figure out which things are interesting enough (or show enough potential) to dig into a bit deeper. Not enough to master them, but enough to know the big concepts behind them and how to apply them.
    These are stuff you play with a little bit, and would consider good enough to start a POC with them if the need arises and then dig into them big time when you start a project with them.
  • Stuff that’s really important that you want to really spend a lot of time tinkering with them and mastering them.

I think there are some interesting things out there worth keeping an eye on. For example, I don’t do much web development these days, but if I had to, I’d immediate dig deeper into the ASP.NET MVC framework. I’m already familiar with Castle’s monorail and somewhat with rails and other similar technologies, so it should be easier to get started.

I’m also definitely looking forward to some of the stuff in Oslo. Obviously the core framework and WCF stuff is going to be pretty interesting there. I’ve been keeping an eye on the cloud services (BizTalk Services) stuff as well, but I’m really waiting there for a project idea that really demands those capabilities before spending more time with them.

Certainly there’s a lot of things that will be coming out in the next one-two years such as the updates to the big products (SQL, Visual Studio and so on), and those will get their fair share of time when the time comes.

Q: In your experience, what is your criteria for deciding between either using (a) a broker such as BizTalk Server between systems or (b) directly consuming interfaces/services between systems?

A:  I think this is one case where there are both technical and non-technical reasons for making this decision.

On the technical side I very much try to start questioning whether any kind of mediation is required/desired and whether BizTalk is the right kind of tool for that job. In particularly, I’d look into the latency and performance requirements, the protocols being used for the services and the amount of data that needs to be transferred between systems.

Part of this is looking to see if, for example, the project is in a low-latency scenario or perhaps if it’s really a set of bulk data processes more suitable to something like SSIS.

Another thing to look for is whether you need the kind of capabilities that BizTalk offers. For example, would the interface be better served with Pub/Sub support? Would the Pub/Sub support in BizTalk be enough, or does it require heavier duty pub/sub with thousands of subscribers and possibly transient (non-persistent) subscriptions?

BizTalk has some great support for some kind of messaging scenarios, but it also has limitations that can constrain your solution heavily. Sometimes you can clobber your project needs into BizTalk by extending the product in different ways (thank goodness for its extensibility!), but it’s not always the best option available.

On the non-technical side, a few aspects that matter are: Does the client already own a BizTalk license they can use? If not, can the project/client budget take assume that cost? Sometimes it can be negotiated, but other times it’s just not an option. Besides the raw cost of licensing, there are of course knowledge aspects, like, does the company have people already familiar with the technology?

In other words, I’ve found that the non-technical aspects of the use/don’t use BizTalk aren’t too different from the kind of aspects you’d consider for acquisition of any new technology. That said, BizTalk does pose it’s own challenges on an organization because of it’s complexity.

That said, I do try to be very careful to avoid looking at the world with technology-tainted glasses. It’s important to approach a new project with an open mind and figure out what the best technology to solve the client needs are, instead of starting with a given technology (BizTalk, in this case) and try to cram the project requirements into it whatever the cost. Sometimes the non-technical aspects of the project might suggest/impose a technology decision on you, but even in that case it’s important to take a step back, breath deeply and make sure it’s the best option available to you.

Q: You’ve been working with a variety of non-Microsoft technologies lately.  What are some of the interoperability considerations you’ve come across recently?  Share any “gotchas” you’ve encountered while getting different platforms to play nicely together.

A:  No matter how you look at it, interoperability isn’t easy, and you can’t take it for granted. It’s something you need to keep very much in check every step of the way and verify it time and time again.

Certainly Web Services (of both the SOAP and REST varieties) have helped here somewhat, but not all interoperability issues come from the lower-level transport protocols; sometimes the application / service interface design can have a bit impact on interoperability.

One rule I try to follow is to design for interoperability. For example, if I’m designing a new service interface, I want to know who my clients are going to be; what technology they are going to be using and what constrains they might have.

Sometimes, the best option you can take is to stick to the basics: simple works. That’s actually one of the beauties of REST architectures. As long as you’ve got an XML parser and an HTTP client, you’re in business, and HTTP is known well enough (and has such a good tooling around it for development and diagnosis) that it really helps a lot.

Basic SOAP is also pretty good nowadays, if used correctly. The WS-* specs, like WS-Security and friends are pretty important in some scenarios. They are published standards, yes, but getting interoperability isn’t as easy as with plain SOAP and rest, because they are very complex specifications.

For example, if you’re using message-level encryption, and you run into trouble, then raw protocol level interception won’t help you at all to diagnose the issue; you really need tooling support on your SOAP stack for this (WCF’s is pretty good).

Once you get into using X.509 certificates for encryption/signing or even just for raw authentication, things can get hairy pretty quickly. Mostly this is because a lot of people don’t quite understand how X.509 certificate validation works, and common problems arise from invalid certificates, certificates installed to the wrong store, or just because someone forgot to deploy the entire certificate trust chain.

By themselves, they are not though problems to solve, but diagnosing them can be very challenging at times because the tooling isn’t always very good at reporting the right reasons for failure. Anyone who has been stuck with a “Error validating server identity” kind of error can attest to that :)

WS-Security specs also have the pose another challenge, and it’s that there are multiple versions of those specs out there, and sometimes you find yourself using one version with your partner using another. You have to be very careful in specifying and validating the right protocol version.

Q [stupid question]:  Everyone has that one secret pet peeve that makes them crazy.  I’ll admit that mine is “mysterious stickiness.”  I shudder at the thought of touching a surface and coming away with a unwanted adhesive.  Ugh.  Tell us, what is something that really drives you nuts?

A: Cockroaches. I hate cockroaches. They give me the creeps.

Seriously speaking, though, I think that my main problem is that I can be very impatient about the little things. Stuff like getting short delays from things can drive me crazy (a stuck keyboard or mouse can really go out of this world).

Hope you all find these interviews a bit interesting or at least mildly amusing.

Technorati Tags: ,


Disclaimer

Entries and comments here do not necessarily reflect the opinions, attitudes, and statements of my employer, my friends, or anyone associated with me.

Syndication

Publications

Order my new book SOA Patterns with BizTalk Server 2009 (Amazon.com, Packt Publishing)

Contact Me

Categories

Twitter Feed

Blog Stats

  • 222,963