My TechDays 2011 presentations – something old, something borrowed, something new and something blue

My TechDays 2011 presentations – something old, something borrowed, something new and something blue

This is bordering on being somewhat old news (but don’t blame me for that). I attended the Swedish TechDays as a speaker, user group leader and ask the experts answerer. Now as far as the first one goes my two sessions “Windows Azure AppFabric – Middleware i molnet” (Middleware in the cloud) and “.NET utvecklare – ut%u00f6ka verktygsl%u00e5dan med BizTalk Server” (expand your toolkit with BizTalk Server) are now available online (unfortunately there is no direct links since they are hidden away inside a Silverlight player application). However note that they are in Swedish. My presentation slides should be available alongside them shortly, and those are (at least mostly) in English. I’ll give you a preview

BizTalk for NET Devs 1BizTalk for NET Devs 2

The site makes those available as pdf’s. If you ask me nicely though, I might let you get your hands on the pptx’s 😉 I am however not shy to borrow from previous presentations held by Microsoft or other luminaries if those are made available online an encouraged to be (re-)used. And since I have been doing BizTalk presentations for quite some time I do have some of my my favorite slides in there, so if you have seen a presentation by me before, chances are you will recognize a slide or two, even if most of what I communicate is still new. Thus you will find “something old, something new, something borrowed and something blue” (since the theme for this years TechDays was blue on a black background). Enjoy.

emailsignature


Blog Post by: Johan Hedberg

The 70-595 exam and the first rule of fight club

The 70-595 exam and the first rule of fight club

I’ve had a not-so-few asks to blog about the 70-595 exam. I’m answering those calls with this post.

The exam launched on march 30th. I actually tried taking it on the 7th of April, though due to technical difficulties, on Prometric and the testing sites behalf, I had to leave without getting a chance to do it after waiting 90 minute for the issue to be resolved (see my twitter history if you want more on that story). I found the time to come back a week later though, on the 14th, and manage to successfully pass the exam.

70-595 is the Developing Business Process and Integration Solutions using BizTalk Server 2010 exam. Its coverage includes core BizTalk functionality as well as extended capabilities. The excerpt from the exams Microsoft learning page is:

Configuring a Messaging Architecture (20 percent)
Developing BizTalk Artifacts (20 percent)
Debugging and Exception Handling (17 percent)
Integrating Web Services and Windows Communication Foundation (WCF) Services (14 percent)
Implementing Extended Capabilities (13 percent)
Deploying, Tracking, and Supporting a BizTalk Solution (16 percent)

Which brings me to the first rule of fight club, and why Tyler Durden would be a good MCP (therefore not claiming that we (MCPs) are all insomnia cursed paranoid schizophrenics in any way ;).  But, “You don’t talk about fight club”, as in “You don’t talk about the contents of certification exams”. In fact you actually agree to an NDA about the contents of the exam – not that that stops any of the cheat sheet providers out there or the people that use them, but it does me. Therefore, you will not find any details as to what kind of questions or what specific areas were covered. All I’m going to say about the contents of the exam is that it pretty much mirrored that division into areas.  So let’s delve into that

and rephrase those percentages in another way:
Core functionality (like messaging, development, debugging, deploying, tracking and troubleshooting) make up roughly 90%, and BAM, BRE, RFID and EDI make up the other 10 percent.

Since the test is 50 questions, that would mean that on an average 45 question would be on the core functionality and 5 questions on the rest.

Following on with the math lesson that means that you are very likely to make the passing score of 700 (out of 1000), without any deeper knowledge on the “extended capabilities”. Which I know will be a soothing thought for a lot of people. No guarantees though, because it’s not always a 1 question =  1000/50 points kind of thing.

If you want to truly ace the test, you’ll really need to know all of your BizTalk, including reading into things like RFID. I did not ace the test (as in a perfect 1000), though I did reasonably well; close enough for me to be pleased and well within the margin.

How did I prepare is a question that often follow along with the ask to write a post on the subject. Others might compose a prep guide. I won’t. Not in this post anyway. I do have a simple answer with two sides to it for you though. One the one side – I didn’t. On the other – I prepared working in real BizTalk projects over the course of 6 years, 5 version of the product and took the two exams that came before this one. What I am saying is – if that sounds anything like you you are likely to just as I did just go take the test, and you’ll likely be fine. If it doesn’t – well, you know yourself best – perhaps you need to study?

On the note of previous tests, I found this to be about the same level of difficulty as the 2006 exam, though easier then the 2006 R2 exam. I don’t know about the 2004 exam – I never did that – you’ll have to ask someone like Jan or Thiago about that comparison.

Anyway, I encourage you to go take the exam, and if you do – best of luck to you!


Blog Post by: Johan Hedberg

WCF: Questions for studying and interview: Discovery

WCF: Questions for studying and interview: Discovery

Q&A: WCF, Discovery
%u00b7 When the WS-Discovery standard gets approval first time?
%u00b7 Is the WS-Discovery using the XML format for messages?
%u00b7 Is the WS-Discovery using the SOAP format for messages?
%u00b7 What are the versions of the WS_Discovery protocol?
%u00b7 What version is the default version?
%u00b7 What is a difference between the Add-hoc and Managed modes? What are the Pro and Cons?
%u00b7 Describe the message exchange sequences of the Discovery protocol.
%u00b7 What are the message exchange sequences in the Add-hoc and Managed modes?
%u00b7 Can the Add-hoc and Managed modes be switched dynamically?
%u00b7 What messages are multicast and what are unicast?
%u00b7 What is the Discovery Proxy service?
%u00b7 It there a default Discovery Proxy service?
%u00b7 What is the difference between the Probe and Resolve requests?
%u00b7 What are the response messages for the Probe and Resolve requests?
%u00b7 What are the response messages for the Probe and Resolve requests if there is no match?
%u00b7 Who sends the announcement message, service or client?
%u00b7 What announcement messages are used?
%u00b7 Is announcement using a Special endpoint?
%u00b7 Is announcement optional or mandatory?
%u00b7 How to make a Web-hosted service discoverable? What two options do we have? How AppFabric or Discovery Proxy service is used to help with it?
%u00b7 What is a FindCriteria class? What are the Search criteria?
%u00b7 How long a client is waiting the results from the discovery request?
%u00b7 What happens if a discovery request didn’t get you any service endpoint?
%u00b7 Can we use different versions together on a single service host?
%u00b7 What endpoints are used for the Discovery?
%u00b7 What is a difference between the DiscoveryEndpoint and the DynamicEndpoint? Do we have to use a DynamicEndpoint with a DiscoveryClient?
%u00b7 What Discovery endpoints are the system endpoints?
%u00b7 How to make a custom endpoint discoverable?
%u00b7 Why the UPD protocol is used for discovery? What pros and cons?
%u00b7 How to use the Discovery Client Channel? What are alternatives?
%u00b7 What are the pros and cons using the Discovery Client Channel?
%u00b7 How to create a DiscoveryEndpoint on demand?
%u00b7 Can you compare the WS-Discovery and the UDDI?


Easier Async Programming Coming to C#/VB soon

Easier Async Programming Coming to C#/VB soon

Hi folks, I thought I’d share something that captivated me on this rainy Easter day
and that was

Visual Studio Asynchronous Programming – http://msdn.microsoft.com/en-au/vstudio/async

(you’ll need VS2010 + SP1 before you grab the CTP)
There’s a new improved compiler + an extended library for us.

Hands up who’s done async programming in either VB.NET or C#??? It’s a pain! Thread
management, Main UI threads can only update certain objects, passing values between
main + background threads, determining whether a thread has completed its tasks and
so on

Basically all these ’issues’ keep us from delving further into the world of asynchronous
programming cause it very rapidly becomes complex just managing the two worlds – sync
+ async.

Today I was pleasantly surprised!!!

About a year ago I saw a great presentation on F# and I was amazed at how if they
wanted to run a bit of code async it was simple an extra character as in:

set results = ..   <-sync

set results! = .  <- run this async

(don’t quote me on the above, but it’s something like that – let’s call it pseudo
code)

Why are we interested in this? – that’s always the first question
to ask when investigating. Too many times we here ’this is really cool’ and ’check
this cool software out’ etc but the real reason of WHY do we want to go down this
road is never answered.

On a ’developers machine’ looking at 5 items, running a single test client – you’d
have to say “works on my machine” and you’d have no need to async
anything. True. Let’s move beyond our beloved developer box and think about UAT/PROD
environments and what your code is doing.

What happens if 4 concurrent requests come along – how is your code going to perform?
(As developers we’d be thinking ’it’s in the hands of IIS, not my issue’ 🙂 )
(I recently was presented with a solution that ran across 20 odd servers, the answer
to everything was get more hardware to make the app more performant, scalable etc
– couldnt be the code.)

So as the requests start to build (don’t know an exact number but let’s say 100/sec),
what is happening to your code? how often do we sit down with profiling tools on our
code in this space? must be the disks..slowand as always we have definitive proof works
on my machine
says the developer!

It’s not until we see our code running under load that we get an appreciation for
where things could be improved and are causing grief for not only IIS but other systems
as well.

Scalability, performance and scalability – single threaded app/service
vs multi-threaded. Multi-threaded tend to win all the time.

Let me give you a couple of suggestions where this stuff is great:

  1. As part of a WF/WCF/Class where you want to ’push’ some processing into the background
    – critical things can be done upfront, and you can push some of the ’other stuff’
    into the background.
  2. Take advantage of some of the great multi-core/multi-cpu Servers out there – single
    threaded tend to run on the same core on the same CPU (known as thread affinity)

Anyway enough jabbering from me and let’s see some of the hidden gems

Async Programming Framework

Let me show you a couple of examples (from my set):

1. Fetching a webpage

image

Here I go off to twitter and search for all the BizTalk items.

Couple of things to notice

Async is added to the end of routines for convention, indicating
that these are Async callable routines.
– not a single IAsyncResult to be seen, no StateObject and
no Callback routines!

– line 104 the async keyword indicating that this routine itself
can be called async if desired (more for the compiler)
– line 108 the await keyword is used in the Async framework to ’wait
for the async task to complete’  then move onto the next line.
– line 108 WebRequest.Create().GetResponseAsync – it’s the GetResponseAsync that
is the async method, no Begin or ..OnEnd calls! Just write it as you read it.
– line 109 We get a reference to the response stream (I should check for the existence
of data etc – demo code, demo code :))
– line 112 await stm.ReadAsync() – reads the response stream into
a buffer on a background thread and we wait there until this completes (await keyword).
By all means there’s many other ways to program this, as in we don’t need to wait,
we could run this guy in the background quite happy and then check on him periodically.

That’s it! Not too tough at all, multi-threaded goodness right there. You can have
blocking and non-blocking calls etc.

2. What about a Chunk of CPU based code

NO Async Example – as per normal, doing some cpu things.

image

Written in Async.

image

Points to notice:
– line 63 async Task<int[]> to the Async framework the async
methods are wrapped within a Task class. We must ’wrap’ anything
we return from our routines within a Task<..> – here I’m returning
an int[]
-line 66 = TaskEx.Run(something to run in a background thread). As
we’re dealing with a block of code, there’s a Task Extension class
that allows us to run that bit of code Async.
-line 79 await matrix – this line ensures that our async routine
has indeed completed (or errored) before we move onto the next line.

Too easy if you’ve lived in the other world.

As always remember this is CTP so I wouldn’t go rolling out into Prod just yet. The
perf numbers I get are pretty much identical to rolling all of this by hand with ThreadPool.QueueWorkItem()
and IAsyncResult etc.

Well done MS!

Enjoy and here’s my VS.NET Sample Solutions – I had great fun! Oh – this is also applicable
to Silverlight + WP7 apps 🙂


Blog Post by: Mick Badran

Speaking at Dallas ASP.NET User Group

Speaking at Dallas ASP.NET User Group

 

For those who may be interested, I will be speaking at the Dallas ASP.NET User Group on Tuesday night, covering an Intro to MVC 3.
 
The talk will cover the purposes of Model, View and Controller, a basic pass through Razor, Editor and Display templates and a few other things.
 
If you’re interested in attending, please register at : http://dallasaspapr2011.eventbrite.com
 


Blog Post by: The Admin

How to survive the XmlDisassembler

How to survive the XmlDisassembler

The XmlDisassembler pipeline component in BizTalk Server basically does three things: promoting properties (including the message type) validating incoming documents (if turned on) disassemble batches into body messages Sometimes situations can occur where you want to process an envelope message but you don’t want to have it disassembled into separate body messages. For example when […]
Blog Post by: Randal van Splunteren