<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Udi Dahan - The Software Simplist &#187; Usability</title>
	<atom:link href="http://www.udidahan.com/category/usability/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com</link>
	<description>Enterprise Development Expert &#38; SOA Specialist</description>
	<lastBuildDate>Sat, 24 Jul 2010 20:06:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Search and Messaging</title>
		<link>http://www.udidahan.com/2009/11/01/search-and-messaging/</link>
		<comments>http://www.udidahan.com/2009/11/01/search-and-messaging/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 05:33:35 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1134</guid>
		<description><![CDATA[
One question that I get asked about quite a bit with relation to messaging is about search. Isn&#8217;t search inherently request/response? Doesn&#8217;t it have to return immediately? Wouldn&#8217;t messaging in this case hurt our performance?
While I tend to put search in the query camp in the when keeping the responsibility of commands and queries separate, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/search.png" width="200" height="204" style="float:right; margin-left:10px; margin-bottom:10px;" alt="search" title="search" /><br />
One question that I get asked about quite a bit with relation to messaging is about search. Isn&#8217;t search inherently request/response? Doesn&#8217;t it have to return immediately? Wouldn&#8217;t messaging in this case hurt our performance?</p>
<p>While I tend to put search in the query camp in the when keeping the responsibility of commands and queries separate, and often recommend that those queries be done without messaging, there are certain types of search where messaging does make sense.</p>
<p>In this post, I&#8217;ll describe certain properties of the problem domain that make messaging a good candidate for a solution.</p>
<h3>Searching is besides the point &#8211; Finding is what it&#8217;s all about</h3>
<p>Remember that search is only a means to an end in the eyes of the user &#8211; they want to find something. One of the difficulties we users have is expressing what we want to find in ways that machines can understand.</p>
<p>In thinking about how we build systems to interact with users, we need to take this fuzziness into account. The more data that we have, the less homogeneous it is, the harder this problem becomes.</p>
<p>When talking about speed, while users are sensitive to the technical interactivity, the thing that matters most is the total time it takes for them to find what they want. If the result of each search screen pops up in 100ms, but the user hasn&#8217;t found what they&#8217;re looking for after clicking through 20 screens, the search function is ultimately broken.</p>
<p>Notice that the finding process isn&#8217;t perceived as &#8220;immediate&#8221; in the eyes of the user &#8211; the evaluation they do in their heads of the search results is as much a part of finding as the search itself.</p>
<p>Also, if the user needs to refine their search terms in order to find what they want, we&#8217;re now talking about a multi-request/multi-response process. There is nothing in the problem domain which indicates that finding is inherently request/response.</p>
<h3>Relationships in the data</h3>
<p>When bringing back data as the result of a search, what we&#8217;re saying is that there is a property which is the same across the result elements. But there may be more than one such property. For example, if we search for &#8220;blue&#8221; on Google Images, we get back pictures of the sky, birds, flowers, and more. Obvious so far &#8211; but let&#8217;s exploit the obvious a bit.</p>
<p>When the user sees that too many irrelevant results come back, they&#8217;ll want to refine their search. One way they can do that is to perform a new search and put in a more specific search phrase &#8211; like &#8220;blue sky&#8221;. Another way is for them to indicate this is by selecting an image and saying &#8220;not like this&#8221; or &#8220;more of these&#8221;. Then we can use the additional properties we know about those images to further refine the result group &#8211; either adding more images of one kind, or removing images of another.</p>
<p>Here&#8217;s something else that&#8217;s obvious:</p>
<p>Users often click or change their search before the entire result screen is shown. </p>
<p>It&#8217;s beginning to sound like users are already interacting with search in an asynchronous manner. What if we actually designed a system that played to that kind of interaction model?</p>
<h3>Data-space partitioning</h3>
<p>Once we accept the fact that the user is willing to have more results appear in increments, we can talk about having multiple servers processing the search in parallel. For large data spaces, it is unlikely for us to be able to store all the required meta data for search on one server anyway.</p>
<p>All we really need is a way to index these independent result-sets so that the user can access them. This can be done simply by allocating a GUID/UUID for the search request and storing the result-sets along with that ID.</p>
<h3>Browser interaction</h3>
<p>When the browser calls a server with the search request the first time, that server allocates an ID to that request, returns a URL containing that ID to the browser, and publishes an event containing the search term and the ID. Each of our processing nodes is subscribed to that event, performs the search on its part of the data-space, and writes its results (likely to a distributed cache) along with that ID. </p>
<p>The browser polls the above URL, which queries the cache (give me everything with this ID), and the browser sees which resources have been added since the last time it polled, and shows them to the user.</p>
<p>If the user clicks &#8220;more of these&#8221;, that initiates a new search request to the server, which follows the same pattern as before, just that the system is able to pull more relevant information. When implementing &#8220;not like this&#8221;, this performs a similar search but, instead of adding to the list of items shown, we&#8217;re removing items from the list shown based on the response from the server.</p>
<p>In this kind of user-system interaction model, having the user page through the result set doesn&#8217;t make very much sense as we&#8217;re not capturing the intent of the user, which is &#8220;you&#8217;re not showing me what I want&#8221;. By making it easy for the user to fine tune the result set, we get them closer to finding what they want. By performing work in parallel in a non-blocking manner on smaller sets of data, we greatly decrease the &#8220;time to first byte&#8221; as well as the time when the user can refine their search.</p>
<h3>But Google doesn&#8217;t work like that</h3>
<p>I know that this isn&#8217;t like the search UI we&#8217;ve all grown used to.</p>
<p>But then again, the search that you&#8217;re providing your users is more specific &#8211; not just pages on the web. If you&#8217;re a retailer allowing your users to search for a gift, this kind of &#8220;more like this, less like that&#8221; model is how users would interact with a real sales-person when shopping in a store. Why not model your system after the ways that people behave in the real world?</p>
<h3>In closing</h3>
<p>If we were to try to make use of messaging underneath &#8220;classical&#8221; search interaction models, it probably wouldn&#8217;t have been the greatest fit. If all we&#8217;re doing at a logical level is blocking RPC, then messaging would probably make the system slower. The real power that you get from messaging is being able to technically do things in parallel &#8211; that&#8217;s how it makes things faster. If you can find ways to see that parallelism in your problem domain, not only will messaging make sense technically &#8211; it will really be the only way to build that kind of system.</p>
<p>Learning how to disconnect from seeing the world through the RPC-tinted glasses of our technical past takes time. Focusing on the problem domain, seeing it from the user&#8217;s perspective without any technical constraints &#8211; that&#8217;s the key to finding elegant solutions. More often than not, you&#8217;ll see that the real world is non-blocking and parallel, and then you&#8217;ll be able to make the best use of messaging and other related patterns.</p>
<p>What are your thought? Post a comment and let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2009/11/01/search-and-messaging/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Object/Relational Mapping and Scalability</title>
		<link>http://www.udidahan.com/2007/04/21/objectrelational-mapping-and-scalability/</link>
		<comments>http://www.udidahan.com/2007/04/21/objectrelational-mapping-and-scalability/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 14:19:56 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Data Access]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Smart Client]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2007/04/21/objectrelational-mapping-and-scalability/</guid>
		<description><![CDATA[&#8220;How come there is no talk about scaling these ORMs?&#8221;.
The answer is simple.
You don&#8217;t have to.
Or, if you think you do, you&#8217;re probably using them wrong.
An O/R mapper should NOT live in its own tier.
Object/Relational Mappers never stand alone. They are used to provide persistence for something else &#8211; either for the Domain Model Pattern [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://codeliability.blogspot.com/2007/04/orm-and-when-query-plans-go-bad.html">&ldquo;How come there is no talk about scaling these ORMs?&rdquo;</a>.</p>
<p>The answer is simple.</p>
<p>You don&rsquo;t have to.</p>
<p>Or, if you think you do, you&rsquo;re probably using them wrong.</p>
<p>An O/R mapper should NOT live in its own <a href="http://udidahan.weblogs.us/2007/03/24/fear-those-tiers-iasa/">tier</a>.</p>
<p><a href="http://udidahan.weblogs.us/category/nhibernate/">Object/Relational Mappers</a> never stand alone. They are used to provide persistence for something else &ndash; either for the <a href="http://udidahan.weblogs.us/2007/04/21/domain-model-pattern/">Domain Model Pattern</a> or for the Active Record pattern.</p>
<p>In terms of <a href="http://udidahan.weblogs.us/category/scalability/">scalability</a>, again these patterns usually don&rsquo;t stand by themselves, but rather are hosted by something else. When used on the client side, say in a <a href="http://udidahan.weblogs.us/category/smart-client/">smart client</a> application, then scalability isn&rsquo;t often considered. There are some kinds of smart clients where hitting the database on most <a href="http://udidahan.weblogs.us/category/usability/">user interactions</a> will bring the system to its knees, but that&rsquo;s again an issue of database scalability. The common solution is some kind of client-side <a href="http://udidahan.weblogs.us/category/caching/">caching</a>.</p>
<p>Anyway, the two main parameters you need to look at for your common and high-load scenarios when using an O/R mapper are these:</p>
<ul>
<li>How many times do you hit the DB per business action.</li>
<li>How many objects/records/rows/columns do you bring into memory per business action.</li>
</ul>
<p>You should be looking at appropriate uses of <a href="http://udidahan.weblogs.us/2007/04/15/lazy-loading-and-how-messaging-fixes-everything-again/">Lazy Loading</a> for both of them.</p>
<p>Finally, keep in mind that O/R mappers are only part of your solution. Measure and optimize wisely.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/04/21/objectrelational-mapping-and-scalability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts about usability</title>
		<link>http://www.udidahan.com/2007/01/16/thoughts-about-usability/</link>
		<comments>http://www.udidahan.com/2007/01/16/thoughts-about-usability/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 18:29:50 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/archives/364</guid>
		<description><![CDATA[After reading “What about Usability”, Jeremy’s latest installment of his “Better Software Development” series (my words, not his) I got flooded with a bunch of thoughts. Mostly things that I’ve wanted to blog about before but didn’t. So please pardon the disjointed nature of the following notes.
 
Since I’m writing this while on the plane to [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="EN-US"><font face="Times New Roman" size="3">After reading “</font><a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/01/14/What-about-Usability_3F00_.aspx"><font face="Times New Roman" size="3">What about Usability</font></a><font size="3"><font face="Times New Roman">”, Jeremy’s latest installment of his “Better Software Development” series (my words, not his) I got flooded with a bunch of thoughts. Mostly things that I’ve wanted to blog about before but didn’t. So please pardon the disjointed nature of the following notes.<br />
</font></font></span><span lang="EN-US"><font face="Times New Roman" size="3"> </font></p>
<p></span><span lang="EN-US"><font size="3"><font face="Times New Roman">Since I’m writing this while on the plane to the Software Architecture Workshop in Switzerland, I’m reminded of a discussion I had with Arjen Poutsma at this same workshop last year. I think that the original topic had to do with Web Services, but it meandered around quite a bit. I think it started by me saying that services should not expose CRUD style operations. Arjen countered by mentioning that most user interfaces in line-of-business applications exposed the same model to the user by having them fill out data in grids. My retort to that was that while humans can get used to almost anything as long as its consistent, that doesn’t mean that it is a good solution. In the systems that I work on there is usually an HCI (human-computer interaction) person on the project who designs the UI, mostly around the tasks they perform. These tasks often corresponded very well to the coarse-grained messages we employed in terms of SOA. We finally agreed that the successor of SOA would be TOA (Task-Oriented Architecture) in its aggregation of client-side aspects to the already server-centric principles of SOA.<br />
</font></font></span><span lang="EN-US"><font face="Times New Roman" size="3"> </font></p>
<p></span><span lang="EN-US"><font size="3"><font face="Times New Roman">A different topic that came up in a recent meeting in one of the projects I’m consulting was how long users expect to wait for a response from the system. What made the HCI person rethink his design was my suggestion that certain algorithms could be deployed client-side and since their performance for the kinds of work the user would do most of the time was on the order of a couple of hundered millis, we could run them “interactively” – as in, on every mouse-click. This input eventually brought about a greatly simplified and much more interactive experience for these expert users. I’m no HCI expert, but I’ve learned a thing or two over the years, and one of the important ones was the need for synergy between architecture and HCI design.<br />
</font></font></span><span lang="EN-US"><font face="Times New Roman" size="3"> </font></p>
<p></span><span lang="EN-US"><font size="3"><font face="Times New Roman">Finally, code that supports highly interactive user interfaces is non-trivial to say the least. Jeremy brought this point up and suggested using design patterns like MVP with a healthy dose of unit tests. I couldn’t agree more, well, yes I could. Even if you use the next generation patterns of Passive View and Supervising Controller, the Dependency Injection development style, and the Command Object pattern, it will not be enough! I’m seeing, in real time, what happens to a project that utilizes all the appropriate patterns, manage their dependencies well, decouple fervently with events, and keep their code clean at all times but doesn’t require/encourage developers to write unit tests. It is a stability nightmare. If you have a complex system to build with intricate logic as to what can be activated when, or any long list of detailed requirements in terms of user interaction, ignore unit tests at your peril. Having a testable design is a great first step, but if you don’t go and test, you’ve negated quite a lot of its benefits.<br />
</font></font></span><span lang="EN-US"><font face="Times New Roman" size="3"> </font></p>
<p></span><span lang="EN-US"><font size="3"><font face="Times New Roman">I hope that that didn’t amount to just a bunch of over-tired, jet-lagged, incoherent babbling, but I’ve been waiting to get it off my chest and now seemed like just the time to do so.<br />
</font></font></span></p>
<p><span lang="EN-US"><font size="3"><font face="Times New Roman">More information:</p>
<p><a href="http://www.codinghorror.com/blog/archives/000836.html"><br />
Usability is Timeless, and things that are still broken with usability today.<br />
</a><br />
</font></font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/01/16/thoughts-about-usability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
