<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Scott's Breeze Blog - RFID, BizTalk  - BizTalk RFID</title>
    <link>http://blogs.breeze.net/scotts/</link>
    <description>...and everything in between</description>
    <language>en-us</language>
    <copyright>Breeze Training</copyright>
    <lastBuildDate>Fri, 02 Jul 2010 13:21:47 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>scotts@breezetraining.com.au</managingEditor>
    <webMaster>scotts@breezetraining.com.au</webMaster>
    <item>
      <trackback:ping>http://blogs.breeze.net/scotts/Trackback.aspx?guid=befda151-af93-4136-b79c-19fdea22f5bb</trackback:ping>
      <pingback:server>http://blogs.breeze.net/scotts/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/scotts/PermaLink,guid,befda151-af93-4136-b79c-19fdea22f5bb.aspx</pingback:target>
      <dc:creator>Scott Scovell</dc:creator>
      <wfw:comment>http://blogs.breeze.net/scotts/CommentView,guid,befda151-af93-4136-b79c-19fdea22f5bb.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/scotts/SyndicationService.asmx/GetEntryCommentsRss?guid=befda151-af93-4136-b79c-19fdea22f5bb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just lost a couple of hours I will never get back… 
</p>
        <p>
I am in the process of upgrading one of our RFID applications to 2010 beta. The upgrade
went through without a hitch and I found myself the proud owner (or at least caretaker)
of a brand-spanking new BizTalk RFID Server 2010.
</p>
        <p>
          <a href="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%202010_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rfid manager 2010" border="0" alt="rfid manager 2010" src="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%202010_thumb.png" width="404" height="286" />
          </a>
        </p>
        <p>
(No visible differences to BizTalk RFID Server 2009 – except for the icon)
</p>
        <p>
I then proceeded to upgrade my Visual Studio 2008 projects to VS 2010. WOW!!! Build
succeeded first time…I am on a roll baby!
</p>
        <p>
So I imported my Process into RFID Manager and fired her up…
</p>
        <p>
          <a href="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%202010%20error%20starting%20process_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rfid 2010 error starting process" border="0" alt="rfid 2010 error starting process" src="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%202010%20error%20starting%20process_thumb_2.png" width="404" height="152" />
          </a>
        </p>
        <p>
The WCF service was not responding. So I open up IIS Manager (my VM is Windows Server
2008 so I’m running IIS 7) and try to browse to the hosting.svc under my RFID process
VD and I get a http 401.3 error. Where do I start to hunt this down. I have installed
.NET Framework 4.0, VS 2010, BizTalk RFID Server 2010 (plus Silverlight 4, Windows
Azure platform AppFabric 1.0, … ).
</p>
        <p>
So I check:
</p>
        <ul>
          <li>
Application pool identities are correct – Tick 
</li>
          <li>
Application pool framework version – v4.0 Classic mode 
</li>
          <li>
Authentication set to Anonymous – Tick 
</li>
          <li>
Anonymous user set to application pool identity - Tick 
</li>
          <li>
NTFS permissions on the VD - Tick 
</li>
          <li>
Test Pass-through authentication – Green Lights 
</li>
          <li>
IISRESET (last desperate attempts of a beaten Sco)</li>
        </ul>
        <p>
Still no go. I get on the “bat-phone” to <a href="http://blogs.breeze.net/mickb" target="_blank">Ninja
Mick</a> and explain what's happening. He just laughs…”What! Another 401 error. That’s
about the sixth this week”. He points me off to a KB <a href="http://support.microsoft.com/kb/896861" target="_blank">article</a> about
disabling the loopback check (I am using host headers on my RFID Services site). Still
no go but it hinted at the problem…host headers.
</p>
        <p>
Back into RFID Manager and look at the Advanced Server Properties
</p>
        <p>
          <a href="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%20advanced%20props_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rfid manager advanced props" border="0" alt="rfid manager advanced props" src="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%20advanced%20props_thumb.png" width="404" height="311" />
          </a>
        </p>
        <p>
Even though these settings are technically correct and BizTalk RFID Server creates
the provider and process services without error, I needed to set the Host IP address
to the host header name I am using. This appears to have changed between either BizTalk
RFID Server 2009 &gt; 2010 or a change to IIS, Windows Update, .NET 4.0 … your guess
is as good as mine?
</p>
        <p>
After setting this to the host header name all worked fine and I’m back to sending
my tag read events into BizTalk RFID Server 2010
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/scotts/aggbug.ashx?id=befda151-af93-4136-b79c-19fdea22f5bb" />
      </body>
      <title>BizTalk RFID Server 2010 – Process failed to start and HTTP 401 error</title>
      <guid isPermaLink="false">http://blogs.breeze.net/scotts/PermaLink,guid,befda151-af93-4136-b79c-19fdea22f5bb.aspx</guid>
      <link>http://blogs.breeze.net/scotts/2010/07/02/BizTalkRFIDServer2010ProcessFailedToStartAndHTTP401Error.aspx</link>
      <pubDate>Fri, 02 Jul 2010 13:21:47 GMT</pubDate>
      <description>&lt;p&gt;
Just lost a couple of hours I will never get back… 
&lt;/p&gt;
&lt;p&gt;
I am in the process of upgrading one of our RFID applications to 2010 beta. The upgrade
went through without a hitch and I found myself the proud owner (or at least caretaker)
of a brand-spanking new BizTalk RFID Server 2010.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%202010_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rfid manager 2010" border="0" alt="rfid manager 2010" src="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%202010_thumb.png" width="404" height="286"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
(No visible differences to BizTalk RFID Server 2009 – except for the icon)
&lt;/p&gt;
&lt;p&gt;
I then proceeded to upgrade my Visual Studio 2008 projects to VS 2010. WOW!!! Build
succeeded first time…I am on a roll baby!
&lt;/p&gt;
&lt;p&gt;
So I imported my Process into RFID Manager and fired her up…
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%202010%20error%20starting%20process_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rfid 2010 error starting process" border="0" alt="rfid 2010 error starting process" src="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%202010%20error%20starting%20process_thumb_2.png" width="404" height="152"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The WCF service was not responding. So I open up IIS Manager (my VM is Windows Server
2008 so I’m running IIS 7) and try to browse to the hosting.svc under my RFID process
VD and I get a http 401.3 error. Where do I start to hunt this down. I have installed
.NET Framework 4.0, VS 2010, BizTalk RFID Server 2010 (plus Silverlight 4, Windows
Azure platform AppFabric 1.0, … ).
&lt;/p&gt;
&lt;p&gt;
So I check:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Application pool identities are correct – Tick 
&lt;li&gt;
Application pool framework version – v4.0 Classic mode 
&lt;li&gt;
Authentication set to Anonymous – Tick 
&lt;li&gt;
Anonymous user set to application pool identity - Tick 
&lt;li&gt;
NTFS permissions on the VD - Tick 
&lt;li&gt;
Test Pass-through authentication – Green Lights 
&lt;li&gt;
IISRESET (last desperate attempts of a beaten Sco)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Still no go. I get on the “bat-phone” to &lt;a href="http://blogs.breeze.net/mickb" target="_blank"&gt;Ninja
Mick&lt;/a&gt; and explain what's happening. He just laughs…”What! Another 401 error. That’s
about the sixth this week”. He points me off to a KB &lt;a href="http://support.microsoft.com/kb/896861" target="_blank"&gt;article&lt;/a&gt; about
disabling the loopback check (I am using host headers on my RFID Services site). Still
no go but it hinted at the problem…host headers.
&lt;/p&gt;
&lt;p&gt;
Back into RFID Manager and look at the Advanced Server Properties
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%20advanced%20props_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rfid manager advanced props" border="0" alt="rfid manager advanced props" src="http://blogs.breeze.net/scotts/content/binary/WindowsLiveWriter/BizTalkRFIDServer2010Processfaile.3error_14721/rfid%20manager%20advanced%20props_thumb.png" width="404" height="311"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Even though these settings are technically correct and BizTalk RFID Server creates
the provider and process services without error, I needed to set the Host IP address
to the host header name I am using. This appears to have changed between either BizTalk
RFID Server 2009 &amp;gt; 2010 or a change to IIS, Windows Update, .NET 4.0 … your guess
is as good as mine?
&lt;/p&gt;
&lt;p&gt;
After setting this to the host header name all worked fine and I’m back to sending
my tag read events into BizTalk RFID Server 2010
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/scotts/aggbug.ashx?id=befda151-af93-4136-b79c-19fdea22f5bb" /&gt;</description>
      <comments>http://blogs.breeze.net/scotts/CommentView,guid,befda151-af93-4136-b79c-19fdea22f5bb.aspx</comments>
      <category>BizTalk RFID</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/scotts/Trackback.aspx?guid=e7095759-adeb-498e-a9b5-d0740e76660a</trackback:ping>
      <pingback:server>http://blogs.breeze.net/scotts/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/scotts/PermaLink,guid,e7095759-adeb-498e-a9b5-d0740e76660a.aspx</pingback:target>
      <dc:creator>Scott Scovell</dc:creator>
      <wfw:comment>http://blogs.breeze.net/scotts/CommentView,guid,e7095759-adeb-498e-a9b5-d0740e76660a.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/scotts/SyndicationService.asmx/GetEntryCommentsRss?guid=e7095759-adeb-498e-a9b5-d0740e76660a</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This week the Breeze RFID Team will be show casing an innovative RFID Document Management
solution at <a href="http://www.cebit.com.au" target="_blank">CeBit</a>. We have teamed
up with <a href="http://www.magellan-rfid.com" target="_blank">Magellan Technologies</a> to
develop a hardcopy (paper) document workflow solution built on the Microsoft SharePoint
platform. The solution allows printed documents to participate in document management
workflow in the same way as traditional electronic documents. 
</p>
        <p>
          <a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/CeBitDemo.png">
            <img style="border-right: 0px; border-top: 0px; margin: 10px; border-left: 0px; border-bottom: 0px" height="331" alt="CeBit Demo" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/CeBitDemo_thumb.png" width="496" border="0" />
          </a>
        </p>
        <p>
Our partners, Magellan, have some very cool RFID gear on show including their RFID
Document Tray Reader and their RFID Bookshelf Reader that we use in the demo.
</p>
        <p>
          <a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/MagellanRFIDDocumentTray.png">
            <img style="border-right: 0px; border-top: 0px; margin: 10px; border-left: 0px; border-bottom: 0px" height="312" alt="Magellan RFID Document Tray" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/MagellanRFIDDocumentTray_thumb.png" width="499" border="0" />
          </a>
        </p>
        <p>
So if you're at the show, pop in and say hi to the team.
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/scotts/aggbug.ashx?id=e7095759-adeb-498e-a9b5-d0740e76660a" />
      </body>
      <title>See Breeze at CeBit</title>
      <guid isPermaLink="false">http://blogs.breeze.net/scotts/PermaLink,guid,e7095759-adeb-498e-a9b5-d0740e76660a.aspx</guid>
      <link>http://blogs.breeze.net/scotts/2009/05/10/SeeBreezeAtCeBit.aspx</link>
      <pubDate>Sun, 10 May 2009 23:09:11 GMT</pubDate>
      <description>&lt;p&gt;
This week the Breeze RFID Team will be show casing an innovative RFID Document Management
solution at &lt;a href="http://www.cebit.com.au" target="_blank"&gt;CeBit&lt;/a&gt;. We have teamed
up with &lt;a href="http://www.magellan-rfid.com" target="_blank"&gt;Magellan Technologies&lt;/a&gt; to
develop a hardcopy (paper) document workflow solution built on the Microsoft SharePoint
platform. The solution allows printed documents to participate in document management
workflow in the same way as traditional electronic documents. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/CeBitDemo.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; margin: 10px; border-left: 0px; border-bottom: 0px" height="331" alt="CeBit Demo" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/CeBitDemo_thumb.png" width="496" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Our partners, Magellan, have some very cool RFID gear on show including their RFID
Document Tray Reader and their RFID Bookshelf Reader that we use in the demo.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/MagellanRFIDDocumentTray.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; margin: 10px; border-left: 0px; border-bottom: 0px" height="312" alt="Magellan RFID Document Tray" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/SeeBreezeatCeBit_8093/MagellanRFIDDocumentTray_thumb.png" width="499" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So if you're at the show, pop in and say hi to the team.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/scotts/aggbug.ashx?id=e7095759-adeb-498e-a9b5-d0740e76660a" /&gt;</description>
      <comments>http://blogs.breeze.net/scotts/CommentView,guid,e7095759-adeb-498e-a9b5-d0740e76660a.aspx</comments>
      <category>BizTalk RFID</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/scotts/Trackback.aspx?guid=dc47ccf7-4577-4f56-ace3-ad02ae634a1f</trackback:ping>
      <pingback:server>http://blogs.breeze.net/scotts/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/scotts/PermaLink,guid,dc47ccf7-4577-4f56-ace3-ad02ae634a1f.aspx</pingback:target>
      <dc:creator>Scott Scovell</dc:creator>
      <wfw:comment>http://blogs.breeze.net/scotts/CommentView,guid,dc47ccf7-4577-4f56-ace3-ad02ae634a1f.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/scotts/SyndicationService.asmx/GetEntryCommentsRss?guid=dc47ccf7-4577-4f56-ace3-ad02ae634a1f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
When developing applications, at some point in the dev cycle we want to know how the
system will perform under load. In BizTalk RFID land it is no different. In fact,
in BizTalk RFID implementations we often deal with devices capable of raising hundreds
of reads every second. So how do we go about testing these?
</p>
        <p>
I'm a big fan of using physical devices during development rather than device emulation,
but when it comes to load testing we need to present hundreds of tags to the reader
and no matter what I try I just can't get the work experience kid to act fast enough!
But instead of using a emulated device, what if we could raise tag read events programmatically
and have our RFID Process consume them? Surely then we could get enough events to
constitute a decent load test.
</p>
        <p>
So how do we go about pushing tag read events through our RFID process in code?
</p>
        <p>
We do this using the BizTalk RFID management API's, namely the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sensorservices.rfid.management.processmanagerproxy.aspx" target="_blank">ProcessManagerProxy</a>.
In just a few lines of code we can connect to the RFID process we want to test and
"submit" a tag read event to the event pipeline. To get up and running with this you
will need to add the following references to your project: (all can be found in %RFIDINSTALLDIR%\bin)
</p>
        <ul>
          <li>
Microsoft.Rfid.Design.dll</li>
          <li>
Microsoft.Rfid.ManagementWebServiceProxies.dll</li>
          <li>
Microsoft.Rfid.SpiSdk.dll</li>
          <li>
Microsoft.Rfid.Util.dll</li>
        </ul>
        <p>
Then, in three lines of code you can create your tag read event, connect to your process,
and submit your event for processing;
</p>
        <blockquote>
          <pre class="csharpcode">
            <span class="rem">// Create the tag read event
to submit</span>
            <font color="#008080">TagReadEvent</font> tag = <span class="kwrd">new</span><font color="#008080">TagReadEvent</font>( <font color="#008080">HexUtilities</font>.HexDecode(strTagID), <font color="#008080">TagType</font>.EpcClass1Gen2, <font color="#008080">HexUtilities</font>.HexDecode(strTagData),
strTagSource, <font color="#008080">DateTime</font>.Now, <span class="kwrd">null</span>, <span class="kwrd">null</span> ); <span class="rem">//
Connect to the local RFID server</span><font color="#008080">ProcessManagerProxy</font> proxy
= <span class="kwrd">new</span><font color="#008080">ProcessManagerProxy</font>(<span class="str">"localhost"</span>); <span class="rem">//
Submit event to the event pipeline</span> proxy.AddEventToProcessPipeline( strRfidProcessName,
tag, strLogicalDeviceName); </pre>
          <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        </blockquote>
        <p>
And that's it.
</p>
        <p>
For my needs, I created a quick Win forms app that retrieved a list of registered
tag id's from a SQL DB and submitted them to my RFID process at configured intervals:
</p>
        <p>
          <a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/rfidprocesstester.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="174" alt="rfid process tester" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/rfidprocesstester_thumb.png" width="632" border="0" />
          </a>
        </p>
        <p>
I added a few variables to adjust the interval between tag read events, the number
of events to submit each interval, and the number of duplicates to send for each tag
id. These variables (used when looping through the set of tag id's) combine to give
me a good approximation to a real, high volume environment.
</p>
        <p>
Firing up good old <em>perfmon</em> and adding the <em>RFID:Process</em> counters,
I ran through a number of test configurations to make sure my RFID process performs
well under high load. (Note: the RFID process you are monitoring must be running before
you can add the counters). Of most interest is the <em>Tags In Queue</em> counter.
This tells me when my process is not performing well and tags are being queued up
waiting to be processed (not good in real-time processing systems). We want this to
be flat-lined most of the time.
</p>
        <p>
          <a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/perfmon.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="332" alt="perfmon" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/perfmon_thumb.png" width="628" border="0" />
          </a>
        </p>
        <p>
Another good idea is to use the SQL Sink EH component while testing. After running
your tests you can simply and easily calculate event processing latency by executing
the following T-SQL query against the <em>tagevents</em> table in the <em>RfidSink</em> DB.
</p>
        <blockquote>
          <pre class="csharpcode">
            <span class="kwrd">SELECT</span>
            <span class="kwrd">
              <font color="#ff00ff">AVG</font>
            </span>(<font color="#ff00ff">DATEDIFF</font>(ms,
sinktime, tagtime)) <span class="kwrd">FROM</span> tagevents;</pre>
          <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        </blockquote>
        <p>
A while back, <a href="http://blogs.breezetraining.com.au/mickb/" target="_blank">Mick</a><a href="http://blogs.breezetraining.com.au/mickb/2008/05/21/BizTalkRFIDHowToClusteringForHighAvailability.aspx" target="_blank">posted</a> about
a great article on MSDN around performance and capacity planning for BizTalk RFID.
Some goodness in that article so check it out as well.
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/scotts/aggbug.ashx?id=dc47ccf7-4577-4f56-ace3-ad02ae634a1f" />
      </body>
      <title>Testing BizTalk RFID Processes</title>
      <guid isPermaLink="false">http://blogs.breeze.net/scotts/PermaLink,guid,dc47ccf7-4577-4f56-ace3-ad02ae634a1f.aspx</guid>
      <link>http://blogs.breeze.net/scotts/2008/07/17/TestingBizTalkRFIDProcesses.aspx</link>
      <pubDate>Thu, 17 Jul 2008 13:23:12 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
When developing applications, at some point in the dev cycle we want to know how the
system will perform under load. In BizTalk RFID land it is no different. In fact,
in BizTalk RFID implementations we often deal with devices capable of raising hundreds
of reads every second. So how do we go about testing these?
&lt;/p&gt;
&lt;p&gt;
I'm a big fan of using physical devices during development rather than device emulation,
but when it comes to load testing we need to present hundreds of tags to the reader
and no matter what I try I just can't get the work experience kid to act fast enough!
But instead of using a emulated device, what if we could raise tag read events programmatically
and have our RFID Process consume them? Surely then we could get enough events to
constitute a decent load test.
&lt;/p&gt;
&lt;p&gt;
So how do we go about pushing tag read events through our RFID process in code?
&lt;/p&gt;
&lt;p&gt;
We do this using the BizTalk RFID management API's, namely the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sensorservices.rfid.management.processmanagerproxy.aspx" target="_blank"&gt;ProcessManagerProxy&lt;/a&gt;.
In just a few lines of code we can connect to the RFID process we want to test and
"submit" a tag read event to the event pipeline. To get up and running with this you
will need to add the following references to your project: (all can be found in %RFIDINSTALLDIR%\bin)
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Microsoft.Rfid.Design.dll&lt;/li&gt;
&lt;li&gt;
Microsoft.Rfid.ManagementWebServiceProxies.dll&lt;/li&gt;
&lt;li&gt;
Microsoft.Rfid.SpiSdk.dll&lt;/li&gt;
&lt;li&gt;
Microsoft.Rfid.Util.dll&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Then, in three lines of code you can create your tag read event, connect to your process,
and submit your event for processing;
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Create the tag read event
to submit&lt;/span&gt; &lt;font color="#008080"&gt;TagReadEvent&lt;/font&gt; tag = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;font color="#008080"&gt;TagReadEvent&lt;/font&gt;( &lt;font color="#008080"&gt;HexUtilities&lt;/font&gt;.HexDecode(strTagID), &lt;font color="#008080"&gt;TagType&lt;/font&gt;.EpcClass1Gen2, &lt;font color="#008080"&gt;HexUtilities&lt;/font&gt;.HexDecode(strTagData),
strTagSource, &lt;font color="#008080"&gt;DateTime&lt;/font&gt;.Now, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt; ); &lt;span class="rem"&gt;//
Connect to the local RFID server&lt;/span&gt; &lt;font color="#008080"&gt;ProcessManagerProxy&lt;/font&gt; proxy
= &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;font color="#008080"&gt;ProcessManagerProxy&lt;/font&gt;(&lt;span class="str"&gt;"localhost"&lt;/span&gt;); &lt;span class="rem"&gt;//
Submit event to the event pipeline&lt;/span&gt; proxy.AddEventToProcessPipeline( strRfidProcessName,
tag, strLogicalDeviceName); &lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
And that's it.
&lt;/p&gt;
&lt;p&gt;
For my needs, I created a quick Win forms app that retrieved a list of registered
tag id's from a SQL DB and submitted them to my RFID process at configured intervals:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/rfidprocesstester.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="174" alt="rfid process tester" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/rfidprocesstester_thumb.png" width="632" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I added a few variables to adjust the interval between tag read events, the number
of events to submit each interval, and the number of duplicates to send for each tag
id. These variables (used when looping through the set of tag id's) combine to give
me a good approximation to a real, high volume environment.
&lt;/p&gt;
&lt;p&gt;
Firing up good old &lt;em&gt;perfmon&lt;/em&gt; and adding the &lt;em&gt;RFID:Process&lt;/em&gt; counters,
I ran through a number of test configurations to make sure my RFID process performs
well under high load. (Note: the RFID process you are monitoring must be running before
you can add the counters). Of most interest is the &lt;em&gt;Tags In Queue&lt;/em&gt; counter.
This tells me when my process is not performing well and tags are being queued up
waiting to be processed (not good in real-time processing systems). We want this to
be flat-lined most of the time.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/perfmon.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="332" alt="perfmon" src="http://www.breezetraining.com.au/blogs/scotts/content/binary/TestingBizTalkRFIDProcesses_FC9D/perfmon_thumb.png" width="628" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Another good idea is to use the SQL Sink EH component while testing. After running
your tests you can simply and easily calculate event processing latency by executing
the following T-SQL query against the &lt;em&gt;tagevents&lt;/em&gt; table in the &lt;em&gt;RfidSink&lt;/em&gt; DB.
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;span class="kwrd"&gt;&lt;font color="#ff00ff"&gt;AVG&lt;/font&gt;&lt;/span&gt;(&lt;font color="#ff00ff"&gt;DATEDIFF&lt;/font&gt;(ms,
sinktime, tagtime)) &lt;span class="kwrd"&gt;FROM&lt;/span&gt; tagevents;&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
A while back, &lt;a href="http://blogs.breezetraining.com.au/mickb/" target="_blank"&gt;Mick&lt;/a&gt; &lt;a href="http://blogs.breezetraining.com.au/mickb/2008/05/21/BizTalkRFIDHowToClusteringForHighAvailability.aspx" target="_blank"&gt;posted&lt;/a&gt; about
a great article on MSDN around performance and capacity planning for BizTalk RFID.
Some goodness in that article so check it out as well.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/scotts/aggbug.ashx?id=dc47ccf7-4577-4f56-ace3-ad02ae634a1f" /&gt;</description>
      <comments>http://blogs.breeze.net/scotts/CommentView,guid,dc47ccf7-4577-4f56-ace3-ad02ae634a1f.aspx</comments>
      <category>BizTalk RFID</category>
    </item>
  </channel>
</rss>