Wednesday, September 10, 2008

Peformance Testing with BizUnit and Load Gen

I was creating Automated performance testing to implement for my client, with tools like loadgen and BizUnit.

Tools used for Testing

LoadGen (BizTalk Server 2004 Load Generation Tool) - I am using the earlier version of LoadGen 2007 as the assemblies supplied for 2007 are not strong named.

BizUnit - To automate the test.

Nunit - Framework to run the test that created in BizUnit.

Performance Monitor (perfmon) - to analyse the log created in the testing.


LoadGen is a load generating tool. which can used for test the performance of integration Application

There were three components in loadgen
Load generators are responsible for transmitting messages via a particular transportCurrently it supports the following transport (In-Box)
File,HTTP,MQSeries
MSMQLarge,MSMQ,SOAP,
Web Services Enhancements (WSE),
Windows SharePoint Services (WSS),
Windows Communication Foundation (WCF) (LoadGen 2007 Version has)

Now a Question comes up can we extend to other transports ? the answer is YES you can

Message creators are an optional component that can be used when you need to
generate messages that contain unique data.

Throttle controllers ensure that messages are transmitted at a steady rate by
governing the load generators

you can find more details here

Performance Monitor(PerfMon) will be used as an anlysis tool . which can read the performance log file and give us a nice view on performance.

BizUnit is an framework to automate the test used to automate the test.
- Initialise the test like restarting the service, clearing the
message box in BizTalk.
- call the loadgen to create the load for the system.
- Invoke the performance monitor and log the details.
- Wait for all the message got processed and stop the test.
- Cleanup the system like stoping the monitor, remove any messages from the transport etc.


for more details on BizUnit check out in
http://www.codeplex.com/bizunit

NUnit is a tool to invoke the BizUnit tests.
For more on NUnit
http://www.nunit.org/index.php

I hope I have given a berief introduction, Let try out small scenario

Its a Simple File To File Scenario, where BizTalk receive file from a File location and Send it to another File location



Size of the file is 10 KB
Number of Message to send is 1000. I dont have any expected performance, Just want to know how my bizTalk Server Perform


Step 1 Construction of LoadGen Config File
We need to define
LoadGenerator - Here it is File transport, need to tell what is the lot size and total message
Message Creator - I dont need to invoke the component,as I am gonna replicate the same message
Throttle controller - I have used file monitor such that the thresholdrange is 40-50 Files.
Sample Configuration

<LoadGenFramework>
<CommonSection>
<LoadGenVersion>2</LoadGenVersion>
<OptimizeLimitFileSize>204800</OptimizeLimitFileSize>
<NumThreadsPerSection>5</NumThreadsPerSection>
<SleepInterval>200</SleepInterval>
<LotSizePerInterval>5</LotSizePerInterval>
<RetryInterval>10000</RetryInterval>
<StopMode Mode="Files">
<NumFiles>1000</NumFiles>
<TotalTime>3600</TotalTime>
</StopMode>
<Transport Name="FILE">
<Assembly>C:\Program Files\LoadGen\Bins\FileTransport.dll/FileTransport.FileTransport</Assembly>
</Transport>
<ThrottleController Mode="Custom">
<Monitor Name="File">
<Assembly>C:\Program Files\LoadGen\Bins\FileMonitor.dll/DropLocationFileMonitor.DropLocationFileMonitor</Assembly>
<ThresholdRange>40-50</ThresholdRange>
<SleepInterval>1000</SleepInterval>
<Parameters>C:\Picloc</Parameters>
</Monitor>
<ThrottleCondition>File</ThrottleCondition>
</ThrottleController>
</CommonSection>
<Section Name="FileSection">
<SrcFilePath>C:\TestData\test001.txt</SrcFilePath>
<DstLocation>
<Parameters>
<DstFilePath>C:\Picloc</DstFilePath>
</Parameters>
</DstLocation>
</Section>
</LoadGenFramework>
Step 2: Incorporating in BizUnit
Requirement is you need to run the test automatically, generate a log and analyse the result Whenever required.
As you now Performance Monitor(Perfmon) will help you to achieve this.
01. Restart the required host instance and messagebox
02. create the Location where you want to log the file
03. use PerfmonCountersStep to start the performance monitor and log the result the location mentioned
04. use LoadGenExecuteStep to run LoadGen tests
05 Stop the test when all the message has been sent. use PerfMonCounterMonitorStep to monitor the handler which send the message till it hit the target number of message
Step 04. Run the Test using Nunit
Step 05. Analyse the Result


My BizTalk Server performance on this scenario 
In an average it receive  4.993 Message/Sec and Send 4.993 Message/Sec

You have lot of other counters are there for you to select and analyse... for more on this toplic click here


Monday, September 08, 2008

BizTalk Server 2009 - The Future release

Microsoft has updated the Roadmap on BizTalk Server last week. There is no BizTalk 2006 R3 instead it is BizTalk Server 2009. It is expected to release in first half yearly of 2009.

Please find the RoadMap
http://www.microsoft.com/biztalk/en/us/roadmap.aspx

Friday, August 08, 2008

Exploring Activity Relationship in BizTalk BAM

I was exploring and evaluating activity relationship in BizTalk BAM to use the feature for my Client . I have taken a simple scenario, where my BizTalk application send Purchase order to a supplier and receive PO Progress and Invoice (There may be n number of other message related to the PO from the supplier with no patterns). Requirement is to find the status of the each Purchase Order and related activity. It should not affect the existing Client Integration Services


First question in my mind can we tackle the whole scenario as a single activity like PO Process or a muliple activity. But I have the following constraint

  • l There is no pattern in receiving the message from supplier
  • l BizTalk is not handling the business process and it is used only for integration
  • l Orchestrating in a single activity , will consume lot of resource
    
    I need to keep the Orchestration instance live till the whole business process is over, It will directly impact my Disaster Recovery(DR) story
    
    I Should re-think about my capacity management to handle .

So I decided to handle the situation as multiple activity and by tracking the sending and receiving message on each activity (Not handling the business process)

I have created a messaging solution for sending and receiving the PO and Other documents. And track the each message. (The Integration Architecture is more of messaging solution)


Step 1

For tracking the PO and other activity using BAM, I have created the 3 Activity as given below

in the Excel

Activity Name Fields

POACTIVITY ------------------------- POID, PODATE...

INVOICEACTIVITY ------------------------ INVOICEID, POID, INVDATE...

PROGRESSACTIVITY ------------------------ PROGRESSID, POID, PROGRESSDATE...


The POID represent the Purchase Order ID, Which will uniquely represent the purchase Order


Step 2

Create a View will all the three activity (say InvoicePOView) using the excel and deploy to the BizTalk

You will be able to see the view in the BAM Portal as given below










Note: Activity Relationship can be done only within the same view.


Step 3 Tracking Profile – Implementing the Relation ship

For each activity Message Payload has been used for tracking

· POID has been used as the unique key to create Activity relation PO, PO Progress and Invoice

POActivity Tracking
















Invoice Activity Tracking

Right Click on InvoiceActivity, Click on New Relationship and Rename as POActivity
















Progress Activity Tracking

Right Click on InvoiceActivity, Click on New Relationship and Rename as POActivity















Deploy the TPE in BizTalk and test the tracking you can view the result as given below

Views and Results











The Activity Status Page for PO Activity Show as above

The PO (POID: 1000001 have 3 Invoice activities and 2 Progress Activity which are related the PO Activity)
















On click on one of the InvoiceActivity we can find the details of the invoice

I have limited to show the capability of creating relationship using TPE Tool. You can also create relationship using custom code using addrelatedactivty method (refer http://msdn.microsoft.com/en-us/library/microsoft....)


Wednesday, April 23, 2008

Microsoft virtual techdays

I have attended Virtual Techdays - Online version of techEd. which happened on 9th and 10th Apr 2008. There were sessions on

- Windows 2008
- SQL Server 2008
- .Net 3.5 Visual Studio 2008

I have attended all the session in Visual Studio 2008. I have got overview and whats new about the product. But Only worry is the Visual Studio 2008 cannot be used for BizTalk Application development, Still microsoft has not supplied with a plugin for the same :(. Expecting for the release ...

The Most glamorous part of the event is Mandra Bedi Hosted the whole event. She is awesome and made the event too hot :)

Other than the above products there were discussion about Silver Light, Moon Light and Mashup

I know about Silver light before even attending the session. I like to share about Silver Light, Moon Light and Mashup ...Ofcourse about Visual studio 2008


Microsoft SilverLight

Microsoft SilverLight is a Technology which will provide very rich UI for your website. It is a Plugin for the browser.

We can say it is competing product to Adobe Flash, Adobe Shock wave Etc ... The good thing is the plugin is compatible to all the Web browser running in windows Mac OS X

You can read more on the below link
http://en.wikipedia.org/wiki/Microsoft_Silverlight

http://www.microsoft.com/silverlight/

Moonlight
A Project from Microsoft to make the silver light to be compatible with linux platform

Read more
http://www.mono-project.com/Moonlight

Mashup
Mashup is a web application, which mix information/data from various source and provide you a integrated view or a function.

You can read more on Mashup
http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)

There were three types of Mashup
Business
Data
Consumer

Like to experience a consumer mashup login to
www.popfly.com and play with it


Some feature about Visual Studio 2008.(listed only few)

- Can run VS 2005 side by side
- Multi Targeting on VS 2008
Can choose different .Net Frameworks like 2.0, 3.0, 3.5 for the development
- Introduced Javascript intellisense & Debugging
- The Major one is LINQ (Language Integrated Query) which has 100% Backward compatibility.
- Lot of improvements in the view like split view for web application.
- Now Ajax extension comes in the Tool box of VS 2008

Improvements in C#
- Object initialiser
- Collection Initialiser
- Anonyimous Type
- Extension Method
- Lamdas
- Query Expression

There were lot of improvements in the Team Foundation Server. Like improved in the Automatic Build, Integration with share point.
The complete list of feature
http://blogs.msdn.com/bharry/archive/2007/08/08/final-tfs-2008-feature-list.aspx



virtual techdays Link
Www.virtualtechdays.com