<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Efficient transactional processing</title>
	<atom:link href="http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Sun, 19 May 2013 03:22:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Vasilio Ruzanni</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3529</link>
		<dc:creator>Vasilio Ruzanni</dc:creator>
		<pubDate>Sun, 26 Jun 2011 13:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3529</guid>
		<description>Totally agreed on differentiation between clearly OLTP-scenarios and batch-processing of data.</description>
		<content:encoded><![CDATA[<p>Totally agreed on differentiation between clearly OLTP-scenarios and batch-processing of data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3353</link>
		<dc:creator>Charlie</dc:creator>
		<pubDate>Tue, 03 May 2011 19:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3353</guid>
		<description>We have implemented a solution like this that processes 25k card payments at the end of every month. We run a query against the database to get the 25k requests and push them into a queue. We then set the number of threads on our message handler to match the number of available channels on our 3rd party&#039;s web service. We plan to introduce a distributor to load balance across two physical servers for fault-tolerance.</description>
		<content:encoded><![CDATA[<p>We have implemented a solution like this that processes 25k card payments at the end of every month. We run a query against the database to get the 25k requests and push them into a queue. We then set the number of threads on our message handler to match the number of available channels on our 3rd party&#8217;s web service. We plan to introduce a distributor to load balance across two physical servers for fault-tolerance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scooletz</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3336</link>
		<dc:creator>Scooletz</dc:creator>
		<pubDate>Sat, 23 Apr 2011 06:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3336</guid>
		<description>Have you considered using sagas and timeouts for each of the subscriptions? Then, there&#039;d be no need of the mentioned query.</description>
		<content:encoded><![CDATA[<p>Have you considered using sagas and timeouts for each of the subscriptions? Then, there&#8217;d be no need of the mentioned query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Ribas</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3335</link>
		<dc:creator>Carlos Ribas</dc:creator>
		<pubDate>Fri, 22 Apr 2011 18:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3335</guid>
		<description>Well I was thinking along the lines of the original problem -- it is calling out to some kind of credit card processing system.  Problems beyond data manipulation (which, if done against a set, often can be done at the database, especially in a system where projecting from SQL to DTOs/bypassing the entity&#039;s behavior for reads is deemed safe/acceptable) can&#039;t be reduced to doing it at the SQL level.

Definitely agree with the cleanliness of a unit-based approach.  And doing that on top of a message architecture is typically a good idea because it gives you flexibility.  But the original point was about performance, so I was just calling out that maybe an in-process threading approach (where each worker is still just doing one aggregate) would make more sense since with a high unit cost (1 second) the host machine would be doing a lot of waiting anyway...

The part about multiple entities being updated at the same time is NH-related implementation detail, right?</description>
		<content:encoded><![CDATA[<p>Well I was thinking along the lines of the original problem &#8212; it is calling out to some kind of credit card processing system.  Problems beyond data manipulation (which, if done against a set, often can be done at the database, especially in a system where projecting from SQL to DTOs/bypassing the entity&#8217;s behavior for reads is deemed safe/acceptable) can&#8217;t be reduced to doing it at the SQL level.</p>
<p>Definitely agree with the cleanliness of a unit-based approach.  And doing that on top of a message architecture is typically a good idea because it gives you flexibility.  But the original point was about performance, so I was just calling out that maybe an in-process threading approach (where each worker is still just doing one aggregate) would make more sense since with a high unit cost (1 second) the host machine would be doing a lot of waiting anyway&#8230;</p>
<p>The part about multiple entities being updated at the same time is NH-related implementation detail, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Stone</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3334</link>
		<dc:creator>Josh Stone</dc:creator>
		<pubDate>Fri, 22 Apr 2011 17:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3334</guid>
		<description>I should mention, in our case the number of aggregates we needed to process was suitable for a single server. But triggering processing via a new published message is a good approach since it treats the processing as a new use case, with a new request, transaction, etc.</description>
		<content:encoded><![CDATA[<p>I should mention, in our case the number of aggregates we needed to process was suitable for a single server. But triggering processing via a new published message is a good approach since it treats the processing as a new use case, with a new request, transaction, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Stone</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3333</link>
		<dc:creator>Josh Stone</dc:creator>
		<pubDate>Fri, 22 Apr 2011 16:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3333</guid>
		<description>I actually dealt with a scenario like this recently. One transaction per aggregate is indeed the way we went, though it doesn&#039;t need to be distributed. Our solution just involved a thread pool does the processing for each aggregate in turn, each with its own transaction.</description>
		<content:encoded><![CDATA[<p>I actually dealt with a scenario like this recently. One transaction per aggregate is indeed the way we went, though it doesn&#8217;t need to be distributed. Our solution just involved a thread pool does the processing for each aggregate in turn, each with its own transaction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3332</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 22 Apr 2011 16:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3332</guid>
		<description>No, you&#039;re right. The other valid option I see is a set-based approach, doing this at the SQL level. But looping through more than one aggregate root to do work - I don&#039;t see that as a real valid option any more.

We might still do this synchronously, through in-process handlers, but still have the process generate messages.

I don&#039;t even think that it&#039;s a performance question - separating into separate handlers reduces complexity, since I&#039;m only dealing with one operation at a time against one aggregate root, and not having to worry about a unit of work with multiple entities getting updated at the same time.</description>
		<content:encoded><![CDATA[<p>No, you&#8217;re right. The other valid option I see is a set-based approach, doing this at the SQL level. But looping through more than one aggregate root to do work &#8211; I don&#8217;t see that as a real valid option any more.</p>
<p>We might still do this synchronously, through in-process handlers, but still have the process generate messages.</p>
<p>I don&#8217;t even think that it&#8217;s a performance question &#8211; separating into separate handlers reduces complexity, since I&#8217;m only dealing with one operation at a time against one aggregate root, and not having to worry about a unit of work with multiple entities getting updated at the same time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Ribas</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3331</link>
		<dc:creator>Carlos Ribas</dc:creator>
		<pubDate>Fri, 22 Apr 2011 16:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3331</guid>
		<description>Sometimes comparing the overhead of the messaging system vs. the work unit cost makes it worthwhile to do in-process concurrency through some flavor of multi-threading.  Handling failure does become complex, but often failure is expected to be very rare and thus the performance trade-off against that added complexity becomes worthwhile if the goal is truly focused around performance.

This example case from Ayende (with a whopping 1 second per unit cost) is well-suited for your proposed solution, but certainly folks should not get the impression that using a message/bus architecture is a one-size-fits-all solution to problems in this space.</description>
		<content:encoded><![CDATA[<p>Sometimes comparing the overhead of the messaging system vs. the work unit cost makes it worthwhile to do in-process concurrency through some flavor of multi-threading.  Handling failure does become complex, but often failure is expected to be very rare and thus the performance trade-off against that added complexity becomes worthwhile if the goal is truly focused around performance.</p>
<p>This example case from Ayende (with a whopping 1 second per unit cost) is well-suited for your proposed solution, but certainly folks should not get the impression that using a message/bus architecture is a one-size-fits-all solution to problems in this space.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3330</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 22 Apr 2011 15:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3330</guid>
		<description>In that case, I&#039;d have a saga coordinating the processing of all of those child operations, with compensating actions in case of failures.

Or, if this is really a set-based operation and not transactional processing, a simple UPDATE statement would work too.</description>
		<content:encoded><![CDATA[<p>In that case, I&#8217;d have a saga coordinating the processing of all of those child operations, with compensating actions in case of failures.</p>
<p>Or, if this is really a set-based operation and not transactional processing, a simple UPDATE statement would work too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3329</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 22 Apr 2011 15:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/04/22/efficient-transactional-processing/#comment-3329</guid>
		<description>So if there are 1M items to process, the last in line gets processed quite slow. Messaging decouples that for me.</description>
		<content:encoded><![CDATA[<p>So if there are 1M items to process, the last in line gets processed quite slow. Messaging decouples that for me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
