<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Scalability Notes</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/csliu/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/csliu/feed.xml</link>
    <description>[Read -&amp;gt; Think -&amp;gt; Write]</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:20:26 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Parallel Database for OLTP and OLAP</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/parallel-database-for-oltp-and-olap</link>
      <pubDate>Tue, 21 Dec 2010 11:01:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/12/21/parallel-database-for-oltp-and-olap/</guid>
      <description><![CDATA[Parallel Database for OLTP and OLAP


Just a 
survey article on materials on parallel database...]]></description>
      <content:encoded><![CDATA[<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2010/12/parallel-database-for-oltp-and-olap.html">Parallel Database for OLTP and OLAP</a>
</h3>
<p>
<span style="font-size: large;"><span style="font-size: small;">Just a 
survey article on materials on parallel database products and 
technologies for OLTP/OLAP applications. It mainly covers major 
commercial/academic efforts on developing parallel dbms to solve the 
ever growing large amount of relational data processing problem.</span></span><br />
<span style="font-size: large;"><span style="font-size: small;">&nbsp;</span><b> </b></span><br />
<span style="font-size: large;"><b>Part I - Parallel DBMSs</b></span><br />
<br />
<span style="font-weight: bold;">1.1 Parallel Database for OLAP (Shared-Nothing/MPP)</span><br />
<br />
TeraData<br />
- <a href="https://www.teradata.com/">TeraData Home</a><br />
- <a href="https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;arnumber=183180&amp;userType=inst">Teradata DBC/1012 Paper</a><br />
- <a href="https://www.teradatawarehouse.com/t/white-papers/Exadata-the-Sequel-Exadata-V2-is-Still-Oracle/?type=WP">NCR Teradata VS Oracle Exadata</a> (Teradata's perspective)<br />
<br />
Vertica<br />
- <span id="goog_1727796562"></span><a href="https://www.blogger.com/">Vertica Home</a><br />
- The original research project: <a href="https://db.csail.mit.edu/projects/cstore/">C-Strore</a><br />
<br />
Paraccel<br />
- <a href="https://paraccel.com/%20">Paraccel Home</a><br />
- <a href="https://paraccel.com/technology/massively-parallel-processing-mpp/">MPP Based Architecture</a><br />
- <a href="https://paraccel.com/technology/columnar-data-storage/">Columnar Based Storage</a> <br />
- Flash Based Storage<br />
<br />
DataLlegro(now MS Madison)<br />
- <a href="https://www.monash.com/DATAllegro-V3.pdf">Design Choices in MPP Data Warehousing Lessons from DATAllegro V3</a><br />
- <a href="https://www.microsoft.com/sqlserver/2008/en/us/parallel-data-warehouse.aspx">Microsoft SQL Server Parallel Data Warehousing</a> <br />
<br />
Netezza<br />
- <a href="https://www.netezza.com/">Netezza Home</a><br />
- <a href="https://www-03.ibm.com/press/us/en/pressrelease/32955.wss">Acquired by IBM</a><br />
- Hadoop &amp; Netezza: Synergy in Data Analytics (<a href="https://www.enzeecommunity.com/blogs/nzblog/2010/07/22/hadoop-netezza-synergy-in-data-analytics-part-2">Part 1</a>, <a href="https://www.enzeecommunity.com/blogs/nzblog/2010/07/20/hadoop-netezza-synergy-in-data-analytics-results-in-new-customer-deployment-trends-part-1">Part 2</a>)&nbsp; <br />
- Netezza Twinfin VS Oracle Exadata (<a href="https://www.netezza.com/exadata-netezza-compared/">eBook</a>, <a href="https://www.enzeecommunity.com/blogs/nzblog/2010/08/04/four-fundamental-differences-between-twinfin-and-exadata">Blog</a>, Netezza's perspective)<br />
<br />
GreenPlum:<br />
- <a href="https://www.greenplum.com/">GreenPlum Home</a> <br />
- Combined: PostGreSQL/ZFS/MapReduce <br />
- <a href="https://deals.venturebeat.com/2010/07/06/emc-greenplum-acquisition/">Acquired by EMC</a><br />
<br />
Oracle ExaData:<br />
- <a href="https://www.oracle.com/us/products/database/database-machine/index.htmlhttps://www.oracle.com/us/products/database/database-machine/index.html">ExaData Home</a> (<a href="https://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/128045.pdf">Technical Overview</a>, <a href="https://www.oracle.com/technetwork/database/exadata/exadata-technical-whitepaper-134575.pdf">White Paper</a>)<br />&gt;&gt; - OLTP &amp; OLAP Hybrid Orientation<br />
&gt;&gt; - 1 * RAC + N * Exadata Cells (Storage Node) + Infiniband Network<br />
&gt;&gt; - Exadata Cell: Flash Cache + Disk Array + Data Filtering Logic (partial SQL execution)<br />- <a href="https://structureddata.org/2010/08/10/oracle-exadata-and-netezza-twinfin-compared-%E2%80%93-an-engineer%E2%80%99s-analysis/">Oracle Exadata VS Netezza TwinFin</a> (Oracle Engineer's perspective)<br />
<br />
IBM DB2 Data Partitioning Feature (can work with both OLAP/OLTP)<br />
- formerly known as <a href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.5815">DB2 Parallel Edition</a> (<a href="https://delivery.acm.org/10.1145/230000/223876/p460-baru.pdf">An Shorter Overview</a>)<br />
- <a href="https://www.ibmpressbooks.com/articles/article.asp?p=375537&amp;seqNum=6">DB2 At a Glance - Data Partitioning Feature</a><br />
- <a href="https://www.ibm.com/developerworks/data/library/techarticle/0203lurie/0203lurie.html">Simulating Massively Parallel Database Processing on Linux</a><br />
<br />
AsterData: <br />
- <a href="https://www.asterdata.com/product/embedded-app.php%20">Supercharging Analytics with SQL-MapReduce</a><br />
- <a href="https://www.securitypark.co.uk/security_article263885.html">Aster Data brings Applications inside an MPP Database&nbsp;</a><br />
<br />
Misc Articles:<br />
- <a href="https://whatis.techtarget.com/definition/0,,sid9_gci214085,00.html">What's MPP?</a> <br />
- <a href="https://space.itpub.net/673608/viewspace-620367">Comparison of Oracle to IBM DB2 UDB and NCR Teradata for Data Warehousing</a><br />
- <a href="https://www.information-management.com/issues/20020501/5129-1.html">SMP or MPP for Data Warehouse</a><br />
- <a href="https://www.dbms2.com/2008/09/05/mpp-data-warehouse-nodes/">Dividing the data Warehousing work among MPP Nodes</a><br />
- <a href="https://www.dbms2.com/2008/09/06/sans-vs-das-in-mpp-data-warehousing/">SANs vs. DAS in MPP data Warehousing</a><br />
- <a href="https://www.dbms2.com/2007/10/12/three-ways-oracle-and-microsoft-could-go-mpp/">Three ways Oracle or Microsoft could go MPP</a><br />
<br />
<span style="font-weight: bold;">1.2 Parallel Database for OLTP (Shared-Disk/SMP)</span><br />
<br />
Oracle Real Application Cluster<br />
- <a href="https://download.oracle.com/docs/cd/B10501_01/rac.920/a96597.pdf">Oracle RAC Concepts</a><br />
- <a href="https://download.oracle.com/docs/cd/A87860_01/doc/paraserv.817/a76968.pdf">Oracle Parallel Database Server Concepts</a><br />
- <a href="https://download.oracle.com/owsf_2003/OOW2003_PPT_36700.pdf">Oracle RAC Case Study on 16-Node Linux Cluster</a><br />
<br />
IBM DB2 for z/OS (with <a href="https://en.wikipedia.org/wiki/IBM_Parallel_Sysplex">Sysplex Technology</a>)<br />
- <a href="https://www.sswug.org/articles/viewarticle.aspx?id=29395">Share Disk and Share Nothing for IBM DB2</a><br />
- <a href="https://catterallconsulting.blogspot.com/2008/06/what-is-db2-data-sharing.html">What's DB2 Data Sharing?</a><br />
<br />
IBM DB2 for LUW (with <a href="https://www.openfabrics.org/archives/spring2010sonoma/Monday/10.30%20Steve%20Rees%20DB2/DB2%20pureScale%20OpenFabrics%20Rees.pdf">pureScale Technology</a>)<br />
- <a href="https://www.databasejournal.com/features/db2/article.php/3894636/IBM-DB2-pureScale-The-Next-Big-Thing-or-a-Solution-Looking-for-a-Problem.htm">IBM DB2 pureScale: The Next Big Thing or a Solution Looking for a Problem?</a><br />
- <a href="https://www.ibm.com/developerworks/data/library/dmmag/DBMag_2010_Issue1/DBMag_Issue109_pureScale/">What is DB2 pureScale?</a><br />
- DB2 pureScale Scalability (<a href="https://it.toolbox.com/blogs/db2luw/db2-purescale-scalability-part-1-35173">section 1</a>, <a href="https://it.toolbox.com/blogs/db2luw/db2-purescale-scalability-part-2-35413">section 2</a>)<br />
<br />
<span style="font-weight: bold;"><span style="font-size: large;">Part II - Academic Readings</span></span><br />
<br />
<span style="font-weight: bold;">2.1 Overview</span><br />
<span style="font-weight: bold;"> </span>1). <a href="https://pages.cs.wisc.edu/%7Edewitt/includes/paralleldb/cacm.pdf">Parallel Database System: The Future of High Performance Database Processing</a><br />
2). <a href="https://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf%20">Survey of Architecture of Parallel Database System</a><br />
3). <a href="https://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBMQFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.58.5370%26rep%3Drep1%26type%3Dpdf&amp;rct=j&amp;q=The%20Case%20for%20Shared%20Nothing&amp;ei=r_QQTe2wIM7KrAfgwqzDCw&amp;usg=AFQjCNFA7BOgsoEjRi88bL1LJgtWUGiuNg&amp;sig2=jevJuVTZ1LrzMF6wQ9zkUg&amp;cad=rja">The Case for Shared Nothing</a><br />
4). <a href="https://portal.acm.org/citation.cfm?id=234892">Much Ado About Shared-Nothing</a><b>&nbsp;</b><br />
<br />
<b>2.2 Research System</b><br />
1). <a href="https://www.google.com/#sclient=psy&amp;hl=en&amp;q=XPS:+A+High+Performance+Parallel+Database+Server&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=&amp;pbx=1&amp;fp=9bef8cda26d1a6ec">XPS: A High Performance Parallel Database Server</a><br />
2). <a href="https://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBcQFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.99.7911%26rep%3Drep1%26type%3Dpdf&amp;rct=j&amp;q=The%20Design%20of%20XPRS&amp;ei=ZfUQTaD5JsWHrAet-MjZCw&amp;usg=AFQjCNFqzEmyoyd76ScdYidaCs1xp1PjRQ&amp;sig2=v9HCIFjxLaR6xjkDnzaz_A&amp;cad=rja">The Design of XPRS</a><br />
3). <a href="https://portal.acm.org/citation.cfm?id=627396">Prototyping Buuba, H High Parallel Database System</a><br />
4). <a href="https://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBMQFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.113.6798%26rep%3Drep1%26type%3Dpdf&amp;rct=j&amp;q=The%20Gamma%20Database%20Machine%20Project&amp;ei=lvUQTZnGEsrtrQfhwfiCDA&amp;usg=AFQjCNGHkaEH__8TJGnHc9VTkE0R3KL4WQ&amp;sig2=GZDk7r5tPxOBqe89DdM1vw&amp;cad=rja">The Gamma Database Machine Project</a><br />
5). <a href="https://www.hpl.hp.com/techreports/tandem/TR-87.4.pdf%20">NonStop SQL, A Distributed, High-Performance, High-Availability Implementation of SQL</a><br />
6). <a href="https://portal.acm.org/citation.cfm?id=166649">Parallel Query Processing in Shared Disk Database System</a><br />
7). <a href="https://ieeexplore.ieee.org/iel2/378/4716/00183179.pdf">Architecture of SDC, the Super Database Computer </a><br />
<br />
<b>2.3 Commercial System</b><br />
1). <a href="https://www.springerlink.com/index/yr2503131v2r1410.pdf">A Study of A Parallel Database Machine and Its Performance</a> - The NCR/TERADATA DBC/1012<br />
2). <a href="https://ieeexplore.ieee.org/xpls/abs_all.jsp?isNumber=4716&amp;arNumber=183180&amp;isnumber=4716&amp;arnumber=183180&amp;tag=1">A Practical Implementation of the Database Machine</a> - Teradata DBC/1012<br />
3). <a href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.5815%20">DB2 Parallel Edition</a><br />
4). <a href="https://portal.acm.org/citation.cfm?id=1007568.1007666%20">Parallel SQL Execution in Oracle 10g</a><br />
6). <a href="https://doi.ieeecomputersociety.org/10.1109/ICDE.2003.1260883">Shared Cache - The Future of Parallel Database</a><br />
7). <a href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.80.8779">Cache Fusion: Extending Shared-Disk Clusters with Shared Caches</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Disciplines in Microsoft Engineering Team</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/disciplines-in-microsoft-engineering-team</link>
      <pubDate>Tue, 21 Sep 2010 16:45:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/09/21/disciplines-in-microsoft-engineering-team/</guid>
      <description><![CDATA[I really want this blog to be a place to express my own
 ideas  and thoughts, but I don't refuse...]]></description>
      <content:encoded><![CDATA[<p>I really want this blog to be a place to express <span style="font-weight: bold;">my</span> <span style="font-weight: bold;">own</span>
 ideas  and thoughts, but I don't refuse reference other people's great 
ideas, especially when they are really helpful for me or potential 
readers.<br /><br />The following content is copied from a MSDN blog post named- <a target="_blank" href="../../b/prakas/archive/2008/01/27/product-development-disciplines-at-microsoft.aspx">Product Development Disciplines at Microsoft,</a> I just highlighted some lines.<br /></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">"Over
  the last several months in my role here in China, I have given talks 
at  several leading universities and met with many of the leading 
faculty  and students working on technologies related to the Data 
Platform. I&rsquo;ve  also spoken at several industry conferences, meeting 
with customers,  partners, analysts and other industry folks. There are 
many topics that  come up at these meetings &ndash; changing technology 
trends, distributed  development, the tremendous growth of Asia etc. But
 one topic that seems  to come up more than almost any other is the 
question of how we  organize and conduct our product development in 
Microsoft. I suppose  this is only natural &ndash; Microsoft is one of the 
most successful software  companies in the world, and the software 
industry here in this region is  poised for tremendous growth, so it 
makes sense that people in the  industry are eager to learn from the our
 experience over the last  quarter century.</span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">This  is actually a very big topic and <span style="font-weight: bold;">within
 Microsoft we have an  Engineering Excellence group that actually runs 
courses that can span  several days and provide an overview of 
Microsoft&rsquo;s software development  methodology, our engineering system, 
organizational structures, best  practices, tools and technologies we 
use internally ensure quality,  reliability, security etc and a variety 
of related topic.</span> By no means  would we claim that we have all 
this figured out perfectly and have a  perfect system, but there is 
indeed a lot of accumulated knowledge and  experience that we can share.
 And we do actually share this information,  in appropriate form, with 
others in our industry, worldwide and also in  this region. </span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">As
  this is indeed a large topic, I don&rsquo;t want to get too deep into this  
here, but I do want to address one aspect of our engineering system &ndash;  
the core disciplines that we organize our R&amp;D teams around and the  
particular roles that each of these disciplines plays. I want to discuss
  this because I believe Microsoft does this a little bit differently  
from the rest of the industry even in the US, and especially here in  
China there is not a good understanding of these core disciplines and  
what role each of them plays.</span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">Traditionally,   <span style="font-weight: bold;">
 the Microsoft engineering system has consisted of 3 &ldquo;core&rdquo; disciplines:
  &ldquo;Development&rdquo;, &ldquo;Test&rdquo;, and &ldquo;Program Management&rdquo;, also known as  
Dev/Test/PM for short.</span> I&rsquo;m going to touch on each of these briefly here,  but I like to introduce them in a different order:</span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;"><span><b><span style="text-decoration: underline;">PM</span>:</b> When we think of engineering disciplines, most people start with &ldquo;Dev&rdquo;. <span> </span>For
  me however, things really start with the Program Management 
discipline.  At Microsoft, &ldquo;PM&rdquo; means many different things, but for me 
the core  essence of the PM role is two things:</span></span></p>
<p style="margin: 0in 0in 0pt 0.5in;"><span><span><span style="font-size: 100%;">1.</span><span style="font: 7pt 'Times New Roman';">       </span></span></span><span style="font-size: 100%;">The first part of the PM&rsquo;s job is to <span style="font-weight: bold;">understand the customer&rsquo;s requirements and translate that into a </span><i style="font-weight: bold;">functional specification</i><span style="font-weight: bold;">  of what we should build.</span>
 This is where it all begins. If we don&rsquo;t  understand the customer, it 
is not very likely that we&rsquo;ll end up  building the right thing.</span></p>
<p style="margin: 0in 0in 10pt 0.5in;"><span><span><span style="font-size: 100%;">2.</span><span style="font: 7pt 'Times New Roman';">       </span></span></span><span style="font-size: 100%;">The  second part of the PM&rsquo;s job is to <span style="font-weight: bold;">work with Dev and Test to translate  the initial specification into a living, breathing product.</span></span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">I
  find that many people, especially here in China, think &ldquo;Project  
Management&rdquo; when they hear PM. Indeed, Project Management is part of a  
PM&rsquo;s job (under #2 above), but it is only a part of the PM&rsquo;s job. The  
real skill that a PM brings is the expertise to listen to customers,  
understand the world from their point of view, and then to design a  
solution for their problem. This does not just mean giving customers  
what they ask for literally, but to truly understand them and design a  
solution that solves their problems even if the customers could never  
imagine the solution &ndash; as the famous saying goes, if we had only  
listened to customers, we would have looked for a faster horse, not come
  up with the automobile.</span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;"><span><b><span style="text-decoration: underline;">Dev</span>: </b><span> </span>Of
  all the engineering disciplines, this one is probably the one people  
think about the most commonly. Dev is short-hand for &ldquo;Development&rdquo;, the 
 folks who responsibility it is to actually design and build the 
software  that we ship. The essential job of Dev is to <span style="font-weight: bold;">take the </span><i style="font-weight: bold;">functional specification </i><span style="font-weight: bold;">produced  by PM and translate that into an actual implementation</span>.
 In the world of  mission-critical system-level software, this 
implementation better be  extremely reliable, secure, manageable, 
scalable and high-performance.<span>  </span>And the designs and implementations Dev produces better stand the test of time and last for several versions and years to come.</span></span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;"><span><b><span style="text-decoration: underline;">Test</span></b>:<b> </b>The<span> t</span>est <span>discipline
  in Microsoft is much misunderstood, certainly externally, but 
sometimes  internally as well. When I first came to Microsoft many years
 ago, I  was (pleasantly) surprised to find that <span style="font-weight: bold;">Microsoft had almost as many, if  not more, testers as developers.</span>
 Coming from a company that had a much  less developed testing 
discipline (and where as a result, quality  assurance was considerably 
weak), it took a little while to get used to  what the essence of the 
Test discipline really is. The reality is that, <span style="font-weight: bold;">
 in Microsoft, how fast we can ship software depends on not how quickly 
 we can design and implement it but rather on how quickly we can test 
it.</span>  This is because every piece of software we ship, especially 
on the  systems-software side, has to pass an extremely high quality 
bar. The  Test discipline is really an complex area, and one where have 
learned a  lot over the years in terms of different types of testing 
that we employ  &ndash; <span style="font-weight: bold;">unit tests, 
functional test, integration tests, stress and long-haul  tests, 
performance tests, security tests, localization tests, etc.</span>  The 
set of tools and techniques we employ in test is truly some of the  most
 impressive and complex &ndash; automated test harnesses, automated test  
generators, automated test failure analyzers, automated security  
&ldquo;fuzzers&rdquo;,<span>  </span>fail-point and state-machine based testing. </span></span></span></p>
<p style="margin: 0in 0in 10pt;"><span><span style="font-size: 100%;"><span>The
  three &ldquo;core&rdquo; engineering disciplines described above are like the 3  
legs of a chair &ndash; you need all three of them, and in a balance, to have a
  proper engineering organization. No one leg can dominate the other &ndash;  
otherwise, you get an organization that may not be in touch with  
customers needs or one that does not pay enough attention to quality.  
Indeed, the three disciplines are a little bit like the branches of  
government &ndash; they form a system of checks and balances that ensures we  
understand what customers want, we design and build that with high  
quality, and we ensure that we deliver a product that meets customer  
expectations in every regard.</span></span></span></p>
<p style="margin: 0in 0in 10pt;"><span><span style="font-size: 100%;"><span>It
  is also important to emphasize that we aim to attract the best talent 
 to all three core disciplines &ndash; the bar is equally high for all the  
disciplines, it just happens to be that the passion and skill-set for  
each is a little different:<span style="font-weight: bold;"><br /> </span></span></span></span></p>
<p style="margin: 0in 0in 10pt;"><span><span style="font-size: 100%;"><span><span style="font-weight: bold;">-
 PMs usually have a passion for working with  customers, conceptualizing
 what the product should do, and then working  with their Dev and Test 
peers to coordinate all the work to make sure we  deliver exactly that.</span> <span style="font-weight: bold;"><br />         </span></span></span></span></p>
<p style="margin: 0in 0in 10pt;"><span><span style="font-size: 100%;"><span><span style="font-weight: bold;">-
 Developers have a passion for building  top-quality software &ndash; software
 that is innovative, simple, reliable,  secure, scalable, 
high-performance and stands the test of time.<br />         </span></span></span></span></p>
<p style="margin: 0in 0in 10pt;"><span><span style="font-size: 100%;"><span><span style="font-weight: bold;">- </span></span></span></span><span><span style="font-size: 100%;"><span><span style="font-weight: bold;">Testers
 are passionate about finding all kinds of ways to break software  and 
making sure making sure we find all the issues and bugs </span><i style="font-weight: bold;">before </i><span style="font-weight: bold;">we ship it to customers.</span></span></span></span><span><span style="font-size: 100%;"><span> <span style="font-weight: bold;"></span></span></span></span></p>
<p style="margin: 0in 0in 10pt;"><span><span style="font-size: 100%;"><span>When
  we interview candidates, a very important part of what we do is find  
out which discipline the person&rsquo;s talent and passion really lie in and  
directs them accordingly. Of course, over the course of one&rsquo;s career,  
one&rsquo;s passion and talent may change, and the person may change  
disciplines as a result &ndash; I myself started in the Dev discipline before 
 switching to PM. This is only natural and we actually encourage that as
 a  way to build better teams.</span></span></span></p>
<p style="margin: 0in 0in 10pt;"><b><span style="font-size: 100%;"><span>Other disciplines</span></span></b></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">It
  is also important to point out that although the three disciplines  
mentioned above are what have traditionally been considered the &ldquo;core&rdquo;  
disciplines at Microsoft, there are several other disciplines that are  
also becoming increasingly important. For example, <b>User Experience (UX)</b>
  professionals are essential to ensuring that products are intuitive 
and  natural for users to use. A great user experience can make the  
difference a product that customers love versus one they merely  
tolerate. UX is certainly very important for products aimed at end  
consumers, but it is also important for all our audiences &ndash; Developers, 
 IT Professionals, Information Workers. </span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">As
  we move into the Software+Services era, a variety of disciplines  
related to architecting, building and running extremely large-scale  
infrastructure becomes increasingly important. Again, while this has  
been true for some time for our consumer facing web properties such as  
MSN and Live, it is now becoming increasingly important for <i>all</i> our product groups as more and more of them take steps to evolve their products along the Software+Services model.</span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">Many
  candidates I talk to often want to discuss what role at Microsoft 
would  be the best fit for them and how they can grow their careers. The
 best  advice I can think of is to<span style="font-weight: bold;"> work on a technology and a role that they  are really passionate about.</span><br /></span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">As
 I mentioned above, we value all the  disciplines equally and a 
well-balanced organization needs great people  in all the different 
roles. While different disciplines appeal to people  with different 
passions and skill-sets, <span style="text-decoration: underline;">all</span> the disciplines  offer opportunities
 for innovation and great work. And all of them offer  opportunities for
 advancement and leadership. Indeed if you look across  the senior 
levels of Microsoft, there are leaders who emerged from  various 
disciplines &ndash; what they shared was a passion for what the work  they 
were doing.</span></p>
<p style="margin: 0in 0in 10pt;"><span style="font-size: 100%;">I
  hope this discussion of the different engineering disciplines at  
Microsoft and the approach we take to them shall be useful for the many 
 people who seem to be interested in this topic. If you have any  
questions or comments, feel free to post a reply to his entry."</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Lecture Notes - Evolution of Google Search Engine</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/lecture-notes-evolution-of-google-search-engine</link>
      <pubDate>Tue, 17 Aug 2010 16:47:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/08/17/lecture-notes-evolution-of-google-search-engine/</guid>
      <description><![CDATA[Jeff Dean  gave a keynote Building  Large Scale Information Retrieval Systems at WSDM 2009. It's...]]></description>
      <content:encoded><![CDATA[<p><a target="_blank" href="https://research.google.com/people/jeff/index.html">Jeff Dean</a>  gave a keynote <a target="_blank" href="https://www.wsdm2009.org/dean_abs_bio.php">Building  Large Scale Information Retrieval Systems</a> at <a target="_blank" href="https://www.wsdm2009.org/">WSDM 2009</a>. It's actually a presentation on how Google search engine evolves during the past 10 years. Here are my notes for this lecture.<br /><br /><span style="font-size: 130%;"><span style="font-weight: bold;">Part I - Overview of Search Engine Evolution: 1999 VS 2009</span></span><br /><br />Factors to Consider when Designing a Information Retrieval System:<br />1. Corpus Size(# docs to be indexed)<br />2. QPS(Query Per Second)<br />3. Freshness/Update Rate<br />4. Query Latency<br />5. Complexity/Cost of Scoring/Retrieval Algorithm<br /><br />Parameter Change 1999 -&gt; 2009:<br />1. Corpus Size: 70M -&gt; *B <span style="font-style: italic; font-weight: bold;">~100X</span><br />2. QPS: <span style="font-weight: bold; font-style: italic;">~1000X</span><br />3. Refresh: Months -&gt; Minutes <span style="font-weight: bold; font-style: italic;">~10000X</span><br />4. Latency: &lt;1s&gt; &lt;02.s style="font-weight: bold; font-style: italic;"&gt;~5X<br />5. Machine Scale: <span style="font-weight: bold; font-style: italic;">~1000X</span><br /><br /><span style="font-weight: bold; font-style: italic;">Consider 10x Growth when designing, Rewrite for 100x Growth!</span><br /><br /><span style="font-weight: bold;"><span style="font-size: 130%;">Part II -</span> </span><span style="font-size: 130%;"><span style="font-weight: bold;">Evolution of Google Search Engine</span></span><br /><br /><a target="_blank" href="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_14.480.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; width: 480px; height: 360px;" src="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_14.480.jpg" border="0" /></a><span style="font-weight: bold;">~1997 - Circa</span>, <span style="font-weight: bold;">Research Prototype</span><br /><br />- Simple Architecture and Focus on System Distributing/Partitioning<br />- Term vs Doc based Partition: Doc based Win<br />- Disk Based Index, DocID+Posting List with Position Attributes, Byte Aligned Encoding<br /><br /><a target="_blank" href="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_20.480.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; width: 480px; height: 360px;" src="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_20.480.jpg" border="0" /></a><br /><span style="font-weight: bold;">~1999 - Circa, Production</span><br /><br />- Introduced Cache<br />-- hit rate is low 30~60% due to index refresh and long tail query<br />-- very beneficial, reduce large disk i/o<br />-- hot term first priority to cache, hot and costy request<br /><br />- Replica Index Data<br />-- better performance<br />-- better availability<br /><br />Some Summary in late 1990's:<br /><br />Crawler is simple batch system<br />- start with very few urls<br />- queue it when found new urls<br />- stop when have enough docs<br /><br />Index Serving using cheap machine<br />- no failure handling<br />- added record/chunk checksum<br /><br />Index Update<br />- once/month<br />- wait traffic to low -&gt; take replica offline -&gt; do update -&gt; start serving<br /><br /><a target="_blank" href="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_43.480.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; width: 480px; height: 360px;" src="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_43.480.jpg" border="0" /></a><br /><span style="font-weight: bold;">~2000 - Dealing with Growth</span><br /><br />Situation:<br /><br />- doc size:50m -&gt; 1000m<br />- ~20% query traffic increase/month<br />- Yahoo! deal<br /><br />Solution:<br /><br />add machines constantly<br />- more index shards for larger index size<br />- more index replica for bigger query capacity<br /><br />And improve software constantly<br />- better disk scheduling<br />- better index encoding<br /><br /><a target="_blank" href="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_49.480.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; width: 480px; height: 360px;" src="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_49.480.jpg" border="0" /></a><br /><span style="font-weight: bold;">~2001 - Adding In-Memory Index</span><br /><br />- enough machine memory: holding all index in mem<br />- machine function: replica -&gt; micro shard holding<br />- balancer: cordinator<br />- availability: replicate important docs<br /><br /><br /><a target="_blank" href="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_53.480.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; width: 480px; height: 360px;" src="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_53.480.jpg" border="0" /></a><br /><span style="font-weight: bold;">~2004 - Adding Infrastructure</span><br /><br />- Generalize tree structured query flow<br />- Generalize balancer concept<br />- New index encoding: group varint encoding<br />- GFS appear in production<br /><br /><a target="_blank" href="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_64.480.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; width: 480px; height: 360px;" src="https://carbon.videolectures.net/2009/other/wsdm09_barcelona/dean_cblirs/wsdm09_dean_cblirs.zip.slides/wsdm09_dean_cblirs_Page_64.480.jpg" border="0" /></a><br /><span style="font-weight: bold;">~2007 - Universal Search<br /><br /></span>- Universal search: combine results from multiple vertical corpus<br />- Realtime search: fast url finding -&gt; crawling -&gt; indexing -&gt; serving cycle<br />-
 Experiment supporting: have idea -&gt; try it on real data offline and 
tune -&gt; live experiment on small piece -&gt; roll out and launch<br /><br /><span style="font-size: 130%;"><span style="font-weight: bold;">Part III - Future Trends</span></span><br /><br />- Cross Language Information Retrieval<br />- ACL in large IR system with huge amount of user and dynamic requirement<br />-
 Automatic Construction of Efficient IR system (one bin for realtime and
 regular web index with different parameter configuration)<br />- Info extraction from semi-structured data<br /><br /><span style="font-weight: bold;">[Reference]<br /><br /></span>1. Challenges in Building Large Scale Information Retrieval Systems[<a target="_blank" href="https://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/en//people/jeff/WSDM09-keynote.pdf">PDF</a>, <a target="_blank" href="https://www.blogger.com/Challenges%20in%20Building%20Large-Scale%20Information%20Retrieval%20Systems">Video</a>]<br />2. Notes by Another Blogger - <a target="_blank" href="https://www.searchenginecaffe.com/2009/02/jeffrey-dean-wsdm-keynote-building.html">https://www.searchenginecaffe.com/2009/02/jeffrey-dean-wsdm-keynote-building.html</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Mainstream Network Library Overview</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/mainstream-network-library-overview</link>
      <pubDate>Tue, 20 Apr 2010 16:41:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/04/20/mainstream-network-library-overview/</guid>
      <description><![CDATA[Part I - .Net Networking Briefing

All .Net networking facilities are build on top of Winsock2...]]></description>
      <content:encoded><![CDATA[<div><span style="font-weight: bold; font-size: 130%;">Part I - .Net</span><span style="font-size: 130%;"><span style="font-weight: bold;"> Networking Briefing</span></span><br /></div>
<div><br /></div>
<div>All .Net networking facilities are build on top of Winsock2 subsystem, so concepts such as <span style="font-style: italic; font-weight: bold;">non-blocking I/O</span>, <span style="font-style: italic;"><span style="font-weight: bold;">async </span></span><span style="font-style: italic; font-weight: bold;">I/O</span> and <span style="font-style: italic; font-weight: bold;">I/O multiplexing </span>can all be applied to the managed world. .Net network framework just wrapped Winsock2 and added some extra abstraction.<br /><br />Most of the wrapping stuff is done through the <a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net.sockets.socket%28VS.100%29.aspx"><span style="font-weight: bold;">System.Net.Sockets.Socket</span> </a>class.
 If you are familiar with Winsock, you will feel comfortable with this 
class. Here I will focus on the extra (OO style)abstraction that .Net 
library team has added on top of this class.<br /><br />There are 3 abstraction layers for .Net network programming:<br /><br />-<span style="font-weight: bold;">Raw Socket Layer</span><br />In
 this model, you work directly with System.Net.Socket.Sockets class, 
which is just a lightweight OO and PInvoke wrapper around native 
Winsock2 functionalities. You can do anything in Winsock2 using methods 
of this class. It's almost just method to method mapping. More info see <a target="_blank" href="https://msdn.microsoft.com/en-us/library/b6xa24z5%28VS.100%29.aspx">.Net Network Programming Using Raw Socket</a>.<br /><br />- <span style="font-weight: bold;">Tcp/Udp Layer</span><br /><span style="font-size: 100%;">.Net network framework provides three extra classes: </span><span style="font-size: 100%;"><a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient%28VS.100%29.aspx">TcpClient</a>, </span><span style="font-size: 100%;"><a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener%28VS.100%29.aspx">TcpListener</a>, </span><span style="font-size: 100%;">and </span><span style="font-size: 100%;"><a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net.sockets.udpclient%28VS.100%29.aspx">UdpClient</a>  to </span><span style="font-size: 100%;">ease
 the task of Tcp/Udp application developing. They are built on  top of 
raw socket facilities and hide detail works such as connection  
management, data buffering and parsing with the help of <a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream%28VS.100%29.aspx">NetworkStream</a> class. More info about <a target="_blank" href="https://msdn.microsoft.com/en-us/library/c19ex43h%28VS.100%29.aspx">Tcp/Udp model</a> and more specific on <a target="_blank" href="https://msdn.microsoft.com/en-us/library/k8azesy5%28VS.100%29.aspx">.Net Tcp Programming</a>, <a target="_blank" href="https://msdn.microsoft.com/en-us/library/tst0kwb1%28VS.100%29.aspx">.Net Udp Programming</a><br /></span><br /><span style="font-weight: bold;">- Request/Response </span><span style="font-weight: bold;">Layer</span><br />It's
 also known as pluggable protocol layer, in which all communication are 
simple request/response pattern using standard URI to represent internet
 resources. This abstraction is build on top of Raw Socket and Tcp/Udp 
layer and it's also extensible so you can customize it. If you just need
 to work in web world, this is a great facility. More info about <a target="_blank" href="https://msdn.microsoft.com/en-us/library/1f6c88af%28VS.100%29.aspx">programming pluggable protocols,</a> <a target="_blank" href="https://msdn.microsoft.com/en-us/library/ms229718%28VS.100%29.aspx">FTP programming</a> and <a target="_blank" href="https://msdn.microsoft.com/en-us/library/ms229718%28VS.100%29.aspx">HTTP programming</a><br /><br /><a target="_blank" href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/NetW/CsNetApp">Source code for</a><a target="_blank" href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/NetW/CsNetApp"> example</a><a target="_blank" href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/NetW/CsNetApp"> client/server application using .Net network framework.</a><br /><br />BTW,
 blocking/non-blocking/async model and the upper 3 layer concepts are 
orthogonal and can be combined arbitrarily. For example, there are both 
blocking TcpClient/TcpListener and async TcpClient/TcpListener.<br /><br /><span style="font-weight: bold;">[Reference] </span><br /><br /><span style="font-weight: bold;">1. <a target="_blank" href="https://msdn.microsoft.com/en-us/library/4as0wz7t%28VS.100%29.aspx">Network Programming Tutorial</a></span><br /><span style="font-weight: bold;">2. <a target="_blank" href="https://msdn.microsoft.com/en-us/library/ee890485%28VS.100%29.aspx">Network Programming Sample</a></span><br /><span style="font-weight: bold;">3. Core NameSpaces:</span><br />- <a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net%28VS.100%29.aspx"><span style="font-weight: bold;">System.Net</span></a><br />- <a target="_blank" href="https://msdn.microsoft.com/en-us/library/system.net.sockets%28VS.100%29.aspx"><span style="font-weight: bold;">System.Net.Socket</span></a><br /><span style="font-weight: bold;">4. Good .Net Networking Books</span><br />- <a target="_blank" href="https://cs.baylor.edu/%7Edonahoo/practical/CSockets/">Tcp/Ip Sockets in C#</a><br />- <a target="_blank" href="https://www.amazon.com/C-Network-Programming-Richard-Blum/dp/0782141765">C# Network Programming</a><br /><span style="font-weight: bold; font-size: 130%;"><br />Part II - Java</span><span style="font-size: 130%;"><span style="font-weight: bold;"> Networking Briefing</span></span><br /><br />Java has a totally different network library taxonomy.<br /><br /><span style="font-weight: bold;">1. Abstraction Layers</span><br /><br />Java
 doesn't have real raw socket facility, which is similar to BSD socket 
interface and Winsock2 interfaces. But it does contain class named as 
Socket that is used do network communication. It can be roughly divided 
into Tcp/Udp layer and URL layer.<br /><br />- <span style="font-style: italic; font-weight: bold;">Tcp/Udp Layer</span><br />You deal with Tcp/Udp concepts directly when coding at this layer. Java provides 3 core classes:<span style="font-weight: bold;">Socket</span>/<span style="font-weight: bold;">ServerSocket</span> (Connection Oriented network facility, similar to .Net's TcpClient/TcpListener), <span style="font-weight: bold;">DatagramSocket </span>(Connectionless,
 Message Oriented network facility, similar to .Net's UdpClient). These 
classes also use I/O Stream to do reading/writing operations.<br /><br />- <span style="font-weight: bold;">URL Layer</span><br />Similar
 to .Net's pluggable protocol layer, it uses URL to identify network 
resources, provides convenient methods to talk to them. <span style="font-weight: bold;">URL</span> and <span style="font-weight: bold;">URLConnection </span>are those core classes.<br /><br /><span style="font-weight: bold;">2. Network I/O Model</span><br /><br />For network I/O model, JDK provides <span style="font-style: italic; font-weight: bold;">blocking I/O</span> in Java.Net name space since Java 1.0, <span style="font-style: italic; font-weight: bold;">multiplexing(a.k.a. non-blocking) I/O</span> is available since Java 1.4 and <span style="font-weight: bold;">Async I/O</span> is added in Java 7, both in Java.Nio name space.<br /><br />Multiplexing
 I/O consists of three core concepts: SelectableChannel, Selector and 
SelectionKey.(illustrated below). Common practices using java nio 
suggests that a network server is composed of <span style="font-style: italic; font-weight: bold;">acceptor </span>to accept client connections, <span style="font-style: italic; font-weight: bold;">dispatcher </span>to monitor network ready events and dispatch them to application handler, and <span style="font-style: italic; font-weight: bold;">application handler with worker thread pool</span>, which handles application logic and generate response data to client.<br /><a target="_blank" href="https://2.bp.blogspot.com/_qN4XeajjPQ8/S4YxYufLOAI/AAAAAAAAAno/Cew5oTIbmdM/s1600-h/java_nio_core_concepts.jpg"><img style="text-align: center; margin: 0px auto 10px; width: 400px; display: block; height: 236px;" src="https://2.bp.blogspot.com/_qN4XeajjPQ8/S4YxYufLOAI/AAAAAAAAAno/Cew5oTIbmdM/s400/java_nio_core_concepts.jpg" border="0" /></a>I had write <a target="_blank" href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/NetW/NetAppJ">an time echo server using Java Nio</a> and the upper architecture.<br /><br />Java Asychronous IO(part of <a target="_blank" href="https://java.sun.com/javase/7/docs/api/java/nio/channels/AsynchronousChannel.html">NIO.2</a>)
 is relatively new and not officially released yet. But its basic idea 
is very simple: you issue the i/o request without blocking. The system 
will notify you the completion of the request by meas of:<br />- calling callback function<br />- waiting handle to wait<br />- polling flag to poll<br /><br /><span style="font-weight: bold;">[Reference]</span><br /><br />1. <a target="_blank" href="https://java.sun.com/docs/books/tutorial/networking/index.html">Official Network Tutorial</a><br />2. <a target="_blank" href="https://gee.cs.oswego.edu/dl/cpjslides/nio.pdf">Java Scalable I/O</a><br />3. <a target="_blank" href="https://today.java.net/pub/a/today/2007/02/13/architecture-of-highly-scalable-nio-server.html">NIO based Server Architecture</a><br /><br />Packages:<br />- <a target="_blank" href="https://java.sun.com/javase/7/docs/api/java/net/package-summary.html">Java.Net</a><br />- <a target="_blank" href="https://java.sun.com/javase/7/docs/api/java/nio/package-summary.html">Java.NIO</a><br /></div>
<div><br /></div>
<div>Good Java Networking Books:<br />- <a target="_blank" href="https://cs.baylor.edu/%7Edonahoo/practical/JavaSockets2">Tcp/Ip Sockets in Java 2E</a><br />- <a target="_blank" href="https://oreilly.com/catalog/9780596007218">Java Network Programming 3E</a><br /><br />Other Java Network Frameworks:<br />- <a target="_blank" href="https://mina.apache.org/">Mina</a> from Apache<br />- <a target="_blank" href="https://www.jboss.org/netty.html">Netty</a> from JBoss<br />- <a target="_blank" href="https://grizzly.dev.java.net/">Grizzly</a>  from SUN<br />- <a target="_blank" href="https://xsocket.sourceforge.net/">xSocket</a> @ SF<br />[<a target="_blank" href="https://www.znetdevelopment.com/blogs/2009/04/07/scalable-nio-servers-part-1-performance/">comparison report</a>]</div>
<div><br /></div>
<div><span style="font-size: 130%;"><span style="font-weight: bold;">Part III - C/C++ Network Frameworks</span></span><br /><br /><span style="font-weight: bold;">1. LibEvent</span> - <a target="_blank" href="https://monkey.org/%7Eprovos/libevent/">https://monkey.org/~provos/libevent </a><br /><br />-
 Libevent is an event notification library not only for network 
operations but for almost all types of  i/o operations. The libevent API
 provides a mechanism to <span style="font-style: italic;">execute a  callback function</span> when a <span style="font-style: italic;">specific event</span> occurs on a file descriptor or  after a <span style="font-style: italic;">timeout</span> has been reached.<br />- It's essentially a <span style="font-style: italic;">Reactor</span> design pattern, in which readiness event is triggered and notified.<br /><br />- <a target="_blank" href="https://monkey.org/%7Eprovos/libevent/doxygen-2.0.1/">The document file for LibEvent 2.0 </a><br />- <a target="_blank" href="https://monkey.org/%7Eprovos/libevent/event-test.c">The Sample Code Using LibEvent 2.0</a><br /><br /><span style="font-weight: bold;">2. APR</span> - <a target="_blank" href="https://apr.apache.org/">https://apr.apache.org/</a><br /><br />-
 APR provides platform independent interface for OS functionalites, 
which includes some basic network i/o functions. But the interface is 
rather <span style="font-weight: bold;">basic</span>, only blocking i/o is supported. You can see the list of functions from <a target="_blank" href="https://apr.apache.org/docs/apr/1.4/group__apr__network__io.html">APR 1.4 Network I/O Doc</a>.<br /><br /><span style="font-weight: bold;">3. BOOST.ASIO</span> - <a target="_blank" href="https://think-async.com/">https://think-async.com/<br /></a><br />Boost ASIO is a scalable network framework using <span style="font-style: italic;">Proactor</span> design pattern (which essentially uses <span style="font-style: italic;">completion notification</span> mechanism, a.k.a <span style="font-style: italic;">Async </span>Network I/O).<br /><br />Here is <a target="_blank" href="https://think-async.com/Asio/boost_asio_1_3_1/doc/html/boost_asio/tutorial.html">in-depth document about Boost.Asio</a>.<br /><br /><span style="font-weight: bold;">4. ACE</span> - <a target="_blank" href="https://www.cs.wustl.edu/%7Eschmidt/ACE.html">https://www.cs.wustl.edu/~schmidt/ACE.html</a> </div>
<p><br />-
 It's a heavyweight OO communication framework but it goes beyond just 
computer proress communication. In a high level point view, it contains 
three lays:<br /><br />- <span style="font-style: italic; font-weight: bold;">OS Adapter Layer</span>:
  it abstracts the underlying native OS's services using raw C wrappers 
and provide a unified interface to upper layer components and 
application developers. The OS services include:<br /><br />　　．<b>Concurrency and Synchronization</b><br />　　．<b>Inter-Process Communication</b><br />　　．<b>Event Demultiplexing<br /></b>　　．<b>File System I/O</b><br />　　<br />- <span style="font-weight: bold; font-style: italic;">OO Facade Layer</span>:
 it wraps the OS adapter layer using OO, more specifically, the C++ 
language. Its functionalities are all the same as the adapter layer.<br /><br /><span style="font-weight: bold; font-style: italic;">- Communication Framework Layer:</span>
 it integrates and enhances the lower-level C++ wrapper facades and  
supports the dynamic configuration of concurrent distributed services 
into applications.  The framework  the following components:</p>
<p>　　．<b>Event Demultiplexing </b>- The <a target="_blank" href="https://www.cs.wustl.edu/%7Eschmidt/PDF/reactor-rules.pdf">Reactor</a> and <a target="_blank" href="https://www.cs.wustl.edu/%7Eschmidt/PDF/proactor.pdf">Proactor</a> are extensible, object-oriented demultiplexers .<b><br /></b>　　．<b>Service Initialization </b>- The <a target="_blank" href="https://www.cs.wustl.edu/%7Eschmidt/PDF/Acc-Con.pdf">Acceptor and Connector</a> components represents the active and passive initialization roles, respectively.<b><br /></b>　　．<b>Service Configuration </b>- The <a target="_blank" href="https://www.cs.wustl.edu/%7Eschmidt/PDF/O-Service-Configurator.pdf">Service Configurator</a> supports the configuration of applications dynamically.<b><br /><br />ACE </b>is
 very heavy-weighted and contains many powerful components. It is also 
the pioneer of concurrent and communication software architect. It 
invents many famous design patterns in this area, for example, Reactor 
and Proactor.<b><br /></b></p>
<div><span style="font-weight: bold;">5. ICE</span> - <a target="_blank" href="https://www.zeroc.com/ice.html">https://www.zeroc.com/ice.html</a><br /><br />ICE is a language independent RPC solution and supports Java/C#/C++/Python. It uses an IDL language called <span style="font-weight: bold;">Slice</span>(Specification Language for Ice) to define client/server interface.<br /><br />The overall high level design of ICE can be found at: <a target="_blank" href="https://www.zeroc.com/ieeeArticle.html">A New Approach to Object-Oriented Middleware</a><br /></div>
<p><br />ICE website also contains other two great articles:<br />- <a target="_blank" href="https://www.zeroc.com/documents/riseAndFallOfCorba.pdf">The Rise and Fall of CORBA</a><br />- <a target="_blank" href="https://www.zeroc.com/documents/APIDesign.pdf">API Design Matters</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Behind Avatar's Fancy Special Visual Effect</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/behind-avatars-fancy-special-visual-effect</link>
      <pubDate>Tue, 23 Feb 2010 01:59:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/02/23/behind-avatars-fancy-special-visual-effect/</guid>
      <description><![CDATA[Behind Avatar's Fancy Special Visual Effect



Since 12/18/2009, Avatar has attracted...]]></description>
      <content:encoded><![CDATA[
<div class="post hentry">
<a class="" name="2399705557331268829"></a>
<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2010/01/behind-avatars-fancy-special-visual.html">Behind Avatar's Fancy Special Visual Effect</a>
</h3>

<div class="post-body entry-content">
Since 12/18/2009, Avatar has attracted all people's eyes on this
planet. I watched a 3D IMAX version of this film some time ago. After
seeing those fancy special visual effect, I can't help wondering how
they accomplish that and what computer hardware/software they had used.<br><br>The special effect of Avatar is mainly made by <a href="https://www.wetafx.co.nz/">Weta Digital</a>(alongside with <a href="https://www.ilm.com/">ILM</a>), who had also made Lord Of The Ring, King Kong etc. <a href="https://www.datacenterknowledge.com/">Data Center Knowledge</a> and <a href="https://www.information-management.com/">Information Management</a> both have some great articles([01] - [07]) about the IT infrastructure that supports the making of Avatar.<br><br>Here,
I try to summarize core information gathered from these posts and focus
on the IT related aspects. For the making of special effect itself, see
"<a href="https://www.awn.com/articles/visual-effects/avatar-game-changer">Avatar - The Game Changer</a>" please.<br><br><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://cdn.information-management.com/media/newspics/122109avatar_fig1.gif"><img src="https://cdn.information-management.com/media/newspics/122109avatar_fig1.gif" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 440px; height: 302px;" alt="" border="0"></a><span style="font-size: 130%;"><span style="font-weight: bold;">Part I - Hardware Configuration[3][7]:</span></span><br><br><span><span style="font-style: italic; font-weight: bold;">Cluster</span><br>- <a href="https://h20338.www2.hp.com/HPC/cache/276360-0-0-0-121.html">HP </a></span><a href="https://h20338.www2.hp.com/HPC/cache/276360-0-0-0-121.html">Cluster Platform 3000BL </a><br>- 34 Water Cooled Racks(from <span><a href="https://www.rittal.com/">Rittal</a></span>), each with 4 HP BladeSystem Chassis<br>- Each Chassis consists of 16 Blade Servers<br><span style="font-style: italic; font-weight: bold;">Blade Server </span><br>- Type: <a href="https://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/3709945-3709945-3328410-241641-3722790-3707371.html">BL 2x220c</a><br>- 2 Nodes, each with 2 4-core processors<br>- totally 34 * 4 * 32 * 2 * 4 = 34, 816 cores<span style="font-style: italic; font-weight: bold;"></span><br><span style="font-style: italic; font-weight: bold;">RAM</span><br>- 104 T<br><span style="font-style: italic; font-weight: bold;">Network</span><br>- 10G Ethernet Network from <a href="https://en.wikipedia.org/wiki/Foundry_Networks">Foundry Networks</a>(now acquired by <a href="https://www.brocade.com/index.page">Brocade</a>)<br><span></span><span style="font-style: italic; font-weight: bold;"></span><span style="font-style: italic; font-weight: bold;">Storage System</span><br>- 3P Network Area Storage<br>- FAS6000 and FlexCache  from <a href="https://www.netapp.com/us/">NetApp</a><br>- Titan Server from <a href="https://www.bluearc.com/">BlueArc</a><br><span style="font-style: italic; font-weight: bold;">Space Size</span><br>- 10,000 square feet<br><span style="font-weight: bold; font-style: italic;">Cooling System</span><br>The industry standard, <span style="font-weight: bold; font-style: italic;">raised floors and forced-air cooling</span>, doesn't work because the blade server is very dense.  Weta's innovative solution consists of two parts:<br>- Enclosed, Water Cooled Racks where the hot air is sucked into a radiator and cycled back through the front of the machines.<br>- Run the Machine Warm (~25 C), which modern computer doesn't mind.<br><br><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://cdn.information-management.com/media/newspics/122109avatar_fig2.gif"><img src="https://cdn.information-management.com/media/newspics/122109avatar_fig2.gif" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 440px; height: 308px;" alt="" border="0"></a><span style="font-size: 130%;"><span style="font-weight: bold;">Part II - Movie Rendering</span></span><br><br>"The main activity in a visual effects data center is called <span style="font-weight: bold; font-style: italic;">rendering</span>,the process of turning the <span style="font-style: italic;">digital description</span> of an image into an <span style="font-style: italic;">actual image</span> that can be saved to disk and eventually written to film or another media. And the banks of computer is called <span style="font-weight: bold; font-style: italic;">render wall</span>."[01]<br><br><span style="font-weight: bold; font-style: italic;">Software</span><br>- OS: Linux<br>- Job Management: <a href="https://renderman.pixar.com/products/tools/rms-alfred.html">Pixar Alfred</a><br><br><span style="font-weight: bold; font-style: italic;">Job System</span><br>-
In HPC or MPP community, each job is huge. But when doing move
rendering, you faces with large amount of relatively small tasks. In
any single job, there might be thousands of interdependent tasks. As
soon as CPUs on the render wall are freed up, new tasks are fired at
idle processors.<br>- The queuing system is a Pixar product called
Alfred, which creates a hierarchical job structure or tree of multiple
tasks that have to run in a certain order.<br><br><span style="font-weight: bold; font-style: italic;">Work Flow</span><br>"The <span style="font-style: italic;">artist</span> shows their work, the <span style="font-style: italic;">director </span>wants more of this or that and it <span style="font-style: italic;">goes back and forth </span>many times,” says Wilkie. “It’s the <span style="font-style: italic;">review cycle</span>
that drives the way things look and that drives our job work. In that
way each tiny bit gets better and better, then perfect, and we move on
to the next item.” [01]<br><br><span style="font-style: italic; font-weight: bold;">Processing Scale</span><br>- Job Scale : 10K jobs and 1.3~1.4 M tasks per day<br>- Data Scale : 12M/Frame, 288M/Second and 17.28G/Minute ...<br>- Speed : 7~8 G/Second for about one Month<br><span style="font-size: 130%;"><br></span><span style="font-weight: bold; font-size: 130%;">[Reference</span><span style="font-size: 130%;">]</span><br><br><span style="font-weight: bold;">- Data Center Aspects</span><br><br>01. <a href="https://www.information-management.com/newsletters/avatar_data_processing-10016774-1.html">Processing Avatar</a><br>02. <a href="https://www.information-management.com/blogs/Avataar_Weta_Digital-10016799-1.html">Data Center Lessons from Avatar</a><br>03. <a href="https://www.datacenterknowledge.com/archives/2009/12/22/the-data-crunching-powerhouse-behind-avatar/">Data Crunching Powerhouse behind Avatar</a><br>04. <a href="https://www.datacenterknowledge.com/archives/2008/09/08/one-data-center-to-rule-them-all/">One Data Center to Rule Them All</a><br>05. <a href="https://www.information-management.com/issues/20_1/avatars-data-center-10016926-1.html">Overheard: Avatar's Data Center</a><br>06. <a href="https://www.computerworld.com/s/article/346361/Data_center_plays_supporting_role_in_i_Avatar_i_">Data Center Plays Supporting Role in Avatar</a><br>07. <a href="https://www.datacenterknowledge.com/archives/2010/02/08/avatar-hollywood-and-the-data-center/?utm-source=feedburner&amp;utm-medium=feed&amp;utm-campaign=Feed%3A+DataCenterKnowledge+%28Data+Center+Knowledge%29">Avatar, Hollywood and the Data Center</a><br>08. <a href="https://top500.org/site/systems/2343">Weta Digital's Cluster Ranking among Top500 systems</a><br><br><span style="font-weight: bold;">- Special Effect Aspects</span><br><br>11. <a href="https://www.awn.com/articles/visual-effects/avatar-game-changer">Avatar, the Game Changer</a><br>12. <a href="https://news.cnet.com/8301-13772_3-10419046-52.html">ILM Steps Into Making Avatar Visual Effect </a><br><span style="font-weight: bold;"><br>- Partner's News Report</span><br><br>21. HP - <a href="https://h30458.www3.hp.com/us/us/smb/911539.html">Behind the Magic of Avatar</a><br>22. NetApp - <a href="https://www.netapp.com/us/company/news/news-rel-20100203.html">Weta Digital and NetApp Bring Avatar to Life</a><br>23. BlueArc - <a href="https://www.bluearc.com/storage-news/press_releases/pr_100106-avatar.shtml">BlueArc Storage Solution Powers Visual Effects Behind Avatar</a><br><br><span style="font-weight: bold;">- HP Blade System</span><span style="font-weight: bold;"></span><br><br>31. <a href="https://h18004.www1.hp.com/products/blades/info/what-is-a-blade.html">HP - What is a Blade? </a><br>32. <a href="https://h20195.www2.hp.com/V2/GetPDF.aspx/4AA1-6160ENW.pdf">HP Cluster Platform 3000BL DataSheet </a><br>33. <a href="https://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/3709945-3709945-3328410-241641-3722790-3707371.html">HP Official Page on BL2x220c</a><br>34. <a href="https://www.youtube.com/watch?v=NIZk2cxEqnc">BL2×220c Video Introduction </a><br>35. <a href="https://bladesmadesimple.com/2009/10/hps-well-hidden-secret-blade-server/">Blog on </a><a href="https://bladesmadesimple.com/2009/10/hps-well-hidden-secret-blade-server/">Inside </a><a href="https://bladesmadesimple.com/2009/10/hps-well-hidden-secret-blade-server/">BL2X220c </a></div></div>]]></content:encoded>
    </item>
    <item>
      <title>Database Technologies for Decision Support System</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/database-technologies-for-decision-support-system</link>
      <pubDate>Fri, 05 Feb 2010 01:58:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/02/05/database-technologies-for-decision-support-system/</guid>
      <description><![CDATA[Database Technologies for Decision Support System



Database technologies can be...]]></description>
      <content:encoded><![CDATA[
<div class="post hentry">
<a class="" name="4239496396302624482"></a>
<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2010/01/database-technologies-for-decision.html">Database Technologies for Decision Support System</a>
</h3>

<div class="post-body entry-content">
Database technologies can be applied into two types of scenarios:<br>- <span style="font-weight: bold; font-style: italic;">Transaction Processing</span>(<a href="https://en.wikipedia.org/wiki/Online_transaction_processing" style="font-weight: bold; font-style: italic;">OLTP</a>)<br>- <span style="font-weight: bold; font-style: italic;">Analytic Processing</span>, using <span style="font-style: italic;">statistical</span> method(<a href="https://en.wikipedia.org/wiki/Online_analytical_processing" style="font-weight: bold; font-style: italic;">OLAP</a>) or <span style="font-style: italic;">machine/computational </span><span style="font-style: italic;">learning</span> method(<a href="https://en.wikipedia.org/wiki/Data_mining" style="font-weight: bold; font-style: italic;">Data Mining</a>)<br><br>OLTP,
which is based on E.F. Codd's relation model, is the traditional (maybe
most popular) application type of DBMS and most people are very
familiar with it. This post tries to summarize related technologies in
analytic processing, which is widely adopted in decision support
systems.<br><br><span style="font-weight: bold;">Part I - What Data to Analyze</span>?<br><br>In <a href="https://en.wikipedia.org/wiki/Decision_support_system">Decision Support</a>(or <a href="https://en.wikipedia.org/wiki/Business_intelligence">Business Intelligence</a>)
system, data to be analyzed usually comes from operational system,
i.e., OLTP relational database. These relational databases are often
located at different departments/sites, may be using different DBMS
vendor's products, using different data schema and merely contain data
within a relatively short time span.<br><br>To make a good business
decisions, it's strongly desired to hold historical data, view them in
a uniformed way and not bothering the daily operational environment.
Thus comes out the <a href="https://en.wikipedia.org/wiki/Data_warehouse"><span style="font-weight: bold;">Data Warehouse</span></a>, which is a <span style="font-weight: bold; font-style: italic;">repository</span> of an organization's electronically stored data and is designed to facilitate reporting and analysis.<br><br>Operational data (in OLTP system) is <span style="font-weight: bold; font-style: italic;">extracted</span>, <span style="font-weight: bold; font-style: italic;">transformed</span>(also cleaned) and <span style="font-weight: bold; font-style: italic;">loaded</span><span style="font-weight: bold;"></span>(by <a href="https://en.wikipedia.org/wiki/Extract,_transform,_load">ETL</a> subsystem)<span style="font-weight: bold; font-style: italic;"> </span>into
the data warehouse for further analyzing. OLAP and DM systems read
these data, analyze them, produce useful reports and present them to
end(business) users. (See diagram below)<br><br><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://1.bp.blogspot.com/_qN4XeajjPQ8/S1geLMYiITI/AAAAAAAAAnQ/vdmYdXf51Ss/s1600-h/database_whole_lifecycle.gif"><img src="https://1.bp.blogspot.com/_qN4XeajjPQ8/S1geLMYiITI/AAAAAAAAAnQ/vdmYdXf51Ss/s400/database_whole_lifecycle.gif" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 130px;" alt="" id="BLOGGER_PHOTO_ID_5429122528446652722" border="0"></a><br><div style="text-align: center;">Decision Support System Life Cycle, based on <a href="https://msdn.microsoft.com/en-us/library/aa197903%28SQL.80%29.aspx">MS SQL Tech Doc</a><br></div><br><span style="font-weight: bold;">Part II - How to Analyze?</span><br><br>There are two ways to analyze data in data warehouse:<br><br><span style="font-weight: bold;">1. Data Mining<br><br></span><span style="font-weight: bold;">Data Mining</span><span style="font-weight: bold;"> </span><span>is</span> the extraction of hidden predictive information from large databases. Someone also defines <span>it</span> as knowledge discovery process(using machine learning algorithms) in database.<br><br>Technical highlights:<br>- Typical Data Mining enabled information systems process data in terms of <span style="font-weight: bold; font-style: italic;">Record</span>(or<span style="font-weight: bold; font-style: italic;"> Case</span>).<br>- Such system also provides some <span style="font-style: italic;"><span style="font-weight: bold;">L</span></span><span style="font-weight: bold; font-style: italic;">anguage Extension</span> to facilitate composing data mining related queries. (for example, MS SQL Server provides <a href="https://msdn.microsoft.com/en-us/library/ms132058.aspx" style="font-weight: bold; font-style: italic;">DMX - Data Mining Extensions</a>)<br><br>The challenging part of  data mining is various mining algorithms. Here is a list of <a href="https://msdn.microsoft.com/en-us/library/ms175595.aspx">data mining algorithms available in MS SQL Server Analysis Service</a>.<br><br>See - <a href="https://msdn.microsoft.com/en-us/library/ms167167.aspx">A Basic Data Mining Tutorial using MS SQL Server</a><br><br><span style="font-weight: bold;">2. OnLine Analytical Processing(OLAP)</span><br><br><span style="font-weight: bold;">OLAP</span> is the processing of large scale multidimensional data using statistical based methods. A typical OLAP system provides:<br>- <a href="https://en.wikipedia.org/wiki/OLAP_cube">Multidimensional Model</a><br>- Analytical Query Language (for example, MS SQL Server provides <a href="https://msdn.microsoft.com/en-us/library/ms145506.aspx" style="font-weight: bold; font-style: italic;">MDX - Multidimensional Expression</a>)<br>- Analyzing Server(or Engine) that executes analytical queries<br><br>See - <a href="https://www.devx.com/dbzone/Article/21410">A Basic Tutorial for OLAP in MS SQL Server</a><br><br><span style="font-weight: bold;">2.1 Multidimensional Model</span><br><br>Multidimensional
model view data as as cubes that generalize spreadsheets to any number
of dimensions. It categorizes data either as numerical values(a.k.a. <span style="font-weight: bold; font-style: italic;">measures</span>) associated with some <span style="font-weight: bold; font-style: italic;">facts </span>or textual values(a.k.a. <span style="font-weight: bold; font-style: italic;">dimensions</span>) that characterize the <span style="font-weight: bold; font-style: italic;">facts</span>.<br><br><span style="font-weight: bold; font-style: italic;">Facts</span> represent the subject - the interesting event in a enterprise that need to be analyzed.<br><span style="font-weight: bold; font-style: italic;">Dimensions</span> represent context information for facts, perspectives to view facts.<br><span style="font-weight: bold; font-style: italic;">Measures </span>represent those numeric properties of facts that decision makers want to analyze.<br><br>For
example, in a shoe shop, shoe purchasing events are the facts, the
selling price is a measure attribute and the color, the size, the
manufacture and the brand are all dimension attributes.<br><br>More tutorial explanation of this model can be found in [7][8].<br><br><span style="font-weight: bold;">2.2 OLAP Server Architecture</span><br><br>There are three ways to implement multidimensional model:<br><br>- <a href="https://en.wikipedia.org/wiki/ROLAP">ROLAP</a> (Relational OLAP)<br>Fact
data is stored in relation model based storage system and some special
induces technologies may be adopted. In this architecture, measures are
derived from the records in the fact table and dimensions are derived
from the dimension tables.<br><br><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S1igwmv_pjI/AAAAAAAAAng/haUk5peyOCk/s1600-h/star_schema.jpg"><img src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S1igwmv_pjI/AAAAAAAAAng/haUk5peyOCk/s400/star_schema.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 323px;" alt="" id="BLOGGER_PHOTO_ID_5429266107691148850" border="0"></a>from <a href="https://www.ibm.com/developerworks/rational/library/07/0626_johnson/index.html">star schema example</a><br><br></div>This architecture can be further divided into two types:<br>　<a href="https://en.wikipedia.org/wiki/Star_schema">Star Schema</a><br>　<a href="https://en.wikipedia.org/wiki/Snowflake_schema">Snowflake Schema</a><br><div style="text-align: center;"><br></div> <div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://2.bp.blogspot.com/_qN4XeajjPQ8/S1ift0oo6DI/AAAAAAAAAnY/Pd8usMnpKFQ/s1600-h/snowflake_schema.gif"><img src="https://2.bp.blogspot.com/_qN4XeajjPQ8/S1ift0oo6DI/AAAAAAAAAnY/Pd8usMnpKFQ/s400/snowflake_schema.gif" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" alt="" id="BLOGGER_PHOTO_ID_5429264960367159346" border="0"></a>from <a href="https://fox.wikis.com/wc.dll?Wiki%7ESnowflakeSchema">snowflake schema example</a><br><br></div>Both
of them contains fact table and dimension table, but in star schema,
there is only one table for one dimension, while in snowflake schema,
there are usually multiple tables for one particular dimension.<br><br>- <a href="https://en.wikipedia.org/wiki/MOLAP">MOLAP</a> (Multidimensional OLAP)<br>Fact
data is stored in an optimized multi-dimensional array storage, i.e.,
the server supports the multidimensional model directly.<br>It's usually regarded to be faster but less scalable than ROLAP.<br><br>- <a href="https://en.wikipedia.org/wiki/HOLAP">HOLAP</a> (Hybrid OLAP)<br>It
is a combination of ROLAP and MOLAP. HOLAP allows storing part of the
data in a MOLAP store and another part of the data in a ROLAP store.<br><br><span style="font-weight: bold;">Part III - Other technologies</span><br><br>Other related technologies include data visualization, metadata management, analytical query parallelizting etc.<br><br>Analytical database technology is very promising and also complicated, more survey paper can be found at[5][7][8].<br><br>[<span style="font-weight: bold;">Reference</span>]<br><br><span style="font-weight: bold;">General</span><br><br>[01] <a href="https://cs.anu.edu.au/student/comp3420/slides_2009.html">Course on DM &amp; OLAP</a><span style="font-size: 100%;"><span style="text-decoration: underline;"><br></span></span>[02] <a href="https://www.iturls.com/English/TechHotspot/TH_c.asp">OLAP &amp; Data Mining Links</a><br>[03] <a href="https://www.daniel-lemire.com/OLAP/index.html">OLAP &amp; Data Warehouse Bibliography</a><br>[04] <a href="https://homepage.cs.uri.edu/faculty/hamel/pubs/hamel-197-manuscript-final.pdf">A Brief Tutorial on Data Mining and OLAP</a><br><br>[05] <a href="https://research.microsoft.com/pubs/76058/sigrecord.pdf">An Overview of Data Warehousing and OLAP technology</a><br>[06] <a href="https://www.minet.uni-jena.de/dbis/lehre/ss2005/sem_dwh/lit/Cod93.pdf">Providing OLAP to User-Analysts: An IT Mandate</a><br><br>[07]<span style="font-size: 100%;"> <a href="https://www.springerlink.com/content/vtm52r431l126417/">An Overview of Data Warehouse, OLAP and Data Mining Technology    </a></span><br>[08] <a href="https://ieeexplore.ieee.org/Xplore/login.jsp?url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F2%2F20936%2F00970558.pdf&amp;authDecision=-203">Multidimensional Database Technology</a><br><br><span style="font-weight: bold;">Data Warehousing</span><br><br>[21] <a href="https://it.toolbox.com/wiki/index.php/Data_Warehouse_Architecture">Data Warehouse Architecture</a><br>[22] <a href="https://download.oracle.com/docs/cd/B28359_01/server.111/b28313/bi.htm">Oracle Data Warehousing Guide </a><br><br><span style="font-weight: bold;">Data Mining</span><br><br>[31] <a href="https://www.information-management.com/issues/19980101/792-1.html">Data Mining FAQ</a><br>[32] <a href="https://www.thearling.com/text/dmwhite/dmwhite.htm">Data Mining Introduction </a><br>[33] <a href="https://www.statsoft.com/textbook/data-mining-techniques/">Data Mining Tech Summary </a><br><br>[34] <a href="https://download.oracle.com/docs/cd/B28359_01/datamine.111/b28129/process.htm">Oracle Data Mining Concept </a><br>[35] <a href="https://msdn.microsoft.com/en-us/library/bb510517.aspx">Microsoft SQL Server Analysis Service - Data Mining</a><br><br><span style="font-weight: bold;">OLAP</span><br><br>[41] <a href="https://www.dwreview.com/OLAP/Introduction_OLAP.html">OLAP Introduction</a><br>[42] <a href="https://cs.anu.edu.au/Student/comp3420/lec08-2009print.pdf">OLAP Overview</a><br>[43] <a href="https://www.olapcouncil.org/">OLAP Council</a><br>[44] <a href="https://olap.com/w/index.php/OLAP_Education_Wiki">OLAP Wiki</a><br><br>[45] <a href="https://download.oracle.com/docs/cd/B28359_01/olap.111/b28124/toc.htm">Oracle OLAP User Guide </a><br>[46] <a href="https://msdn.microsoft.com/en-us/library/bb522607.aspx">Microsoft SQL Server Analysis Service - OLAP</a></div></div>]]></content:encoded>
    </item>
    <item>
      <title>Parallel Programming - Using PVM</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/parallel-programming-using-pvm</link>
      <pubDate>Sat, 23 Jan 2010 01:55:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/01/23/parallel-programming-using-pvm/</guid>
      <description><![CDATA[Parallel Programming - Using PVM



PVM is an inactive direction in HPC community, but
there...]]></description>
      <content:encoded><![CDATA[<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2010/01/parallel-programming-model-pvm.html">Parallel Programming - Using PVM</a>
</h3>


PVM is an inactive direction in HPC community<span style="font-weight: bold;"><span style="font-weight: bold;">, </span></span>but
there are many lessons can be learned from its programming model, its
architecture design/implementation and how/why it failed to be the
dominate system.<span style="font-weight: bold;"><span style="font-weight: bold;"> </span><br><br>Part I - What's PVM?</span><br><br>PVM (Parallel Virtual Machine) is a software framework for  <span style="font-style: italic; font-weight: bold;">heterogeneous</span> <span style="font-weight: bold; font-style: italic;">parallel computing </span>in networked environments, which is based on <span style="font-weight: bold; font-style: italic;">message passing</span>
model. Its main focus is uniform parallel computing framework on
interconnected heterogeneous computers of varied architecture(from Unix
to Windows, from PC, Workstation to MPP).<br><br><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0mioq0a86I/AAAAAAAAAk4/3cbb3OeI4QE/s1600-h/pvm_architecture_overview.jpg"><img src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0mioq0a86I/AAAAAAAAAk4/3cbb3OeI4QE/s400/pvm_architecture_overview.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 292px; height: 400px;" alt="" id="BLOGGER_PHOTO_ID_5425046045717099426" border="0"></a>(diagram captured from [1])<br></div><br>The PVM system is composed of two parts:<br>-The first part is a <span style="font-weight: bold;">Daemon</span><a class="" name="154"></a> , called <em style="font-weight: bold;">pvmd3</em><a class="" name="156"></a>  and sometimes abbreviated <em style="font-weight: bold;">pvmd</em><a class="" name="158"></a> , that resides on all the computers making up the virtual machine.<br>- The second part of the system is <span style="font-weight: bold; font-style: italic;">a Library of PVM interface routines</span>, which contains a functionally complete primitives needed for cooperation between tasks of an application.<br><br><span style="font-weight: bold;">Part II - PVM Programming Model</span><br><br>A PVM application consists of  a collection of cooperating <i style="font-weight: bold;">tasks, </i><span style="font-weight: bold;"></span>each
of which is responsible for some workload of a big problem. Tasks can
be created/terminated across the network and it also can <span style="font-weight: bold; font-style: italic;">communicate</span> and <span style="font-weight: bold; font-style: italic;">synchronize</span> with other tasks.<br><br>Sometimes
an application is parallelized along its functions; that is, each task
performs a different function, for example, input, problem setup,
solution, output, and display. This process is often called <span style="font-weight: bold; font-style: italic;">functional parallelism</span><a class="" name="160"></a> .<br><br>A more common method of parallelizing an application is called  <span style="font-weight: bold; font-style: italic;">data parallelism</span><a class="" name="161"></a> .  In this method all the tasks are the same, but each one only knows and solves a small part of the data.<br><br><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0mijoOpFnI/AAAAAAAAAkw/6gELaatEBms/s1600-h/pvm_computing_model.jpg"><img src="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0mijoOpFnI/AAAAAAAAAkw/6gELaatEBms/s400/pvm_computing_model.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 279px; height: 400px;" alt="" id="BLOGGER_PHOTO_ID_5425045959122425458" border="0"></a>(diagram captured from [1])<br><br></div>PVM supports either or a mixture of these methods.<br><br>Parallel
applications can be viewed in another perspective, based on the
organization of the computing tasks. Roughly speaking, there are three
types:<br><br>- <a href="https://www.netlib.org/pvm3/book/node29.html#SECTION00511000000000000000">Crowd/Star Computing</a>,
a collection of closely related tasks, perform computations on
different portions of the workload, usually involving the periodic
exchange of intermediate results. A star-like parent-child task
relationship exists among the tasks.<br><br>- <a href="https://www.netlib.org/pvm3/book/node30.html#SECTION00512000000000000000">Tree Computing</a>,
tasks are spawned, usually dynamically as the computation progresses,
in a tree-like manner, thereby establishing a tree-like, parent-child
relationship.<br><br><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0m0qB8TJ4I/AAAAAAAAAlA/tHyIKDF2Fn0/s1600-h/parallel_merge_sort.jpg"><img src="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0m0qB8TJ4I/AAAAAAAAAlA/tHyIKDF2Fn0/s400/parallel_merge_sort.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 290px;" alt="" id="BLOGGER_PHOTO_ID_5425065860313327490" border="0"></a>Tree Computation Using Parallel Merge Sort (<a href="https://www.netlib.org/pvm3/book/node30.html#SECTION00512000000000000000">Detail Info</a>)<br></div><br>- Hybrid Model, combine the upper to models.<br><br>Crowd Computation typically involves three phases:<br>- Initialization<br>- Computation<br>- Result aggregation<br><br>This model can be further divided into two types:<br><br>- <span style="font-weight: bold; font-style: italic;">Master/Worker</span>,
master is responsible for process spawning, initialization, collection
and display of results, and perhaps timing of functions. The worker
programs perform the actual computation involved. Their workloads are
typically assigned by the master (statically or dynamically).<br><br>- <span style="font-weight: bold; font-style: italic;">Work Crew,  </span><span style="font-style: italic;"><span style="font-weight: bold;"></span></span>multiple
instances of a single program execute, with one tasks(typically the one
initiated manually) taking over the non-computational responsibilities
in addition to contributing to the computation itself.<br><br><span style="font-weight: bold;">Part III - PVM Features/Interface</span><br><br>- Process/Task Management<br>- Resource Management/Configuration<br>- Message Passing<br><br>Detail Interface usage doc can be found at: <a href="https://www.netlib.org/pvm3/book/node35.html">PVM User Interface</a><br>Here are some <a href="https://www.netlib.org/pvm3/book/node47.html">PVM example application source code</a><br><br><span style="font-weight: bold;">Part IV - How PVM works</span><br><br><a href="https://www.netlib.org/pvm3/book/pvm-book.html">Geist's Book</a> has a great chapter on <a href="https://www.netlib.org/pvm3/book/node60.html">the internals of PVM Design &amp; Implementation</a><br><br>The core design lies in the <span style="font-weight: bold; font-style: italic;">host table</span> and <span style="font-weight: bold; font-style: italic;">message routing</span>:<br><br>1.
Host table describes all hosts in a virtual machine. It is issued by
the master pvmd and kept synchronized across the virtual machine.<br><br><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0nEsWx3SAI/AAAAAAAAAlI/V6TQ-PJS4uI/s1600-h/pvm_host_table.jpg"><img src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0nEsWx3SAI/AAAAAAAAAlI/V6TQ-PJS4uI/s400/pvm_host_table.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 292px;" alt="" id="BLOGGER_PHOTO_ID_5425083492452485122" border="0"></a>Pvm Host Table (from[1])<br><br></div>2. Some host manipulation operations involves several hosts (for example, <a href="https://www.netlib.org/pvm3/book/node84.html">host addition</a>), so 2-phase commit/3 phase commit protocol is applied (master is the coordinator).<br><br>3.
Message routing is accomplished through Pvmds. Message contains target
task ID, which in turn encapsulates some Pvmd ID. Pvm Daemon will use
the host table to identify the target Pvm Daemon information and put
the message to the corresponding send queue.<br><br><span style="font-weight: bold;">Part V - Developing PVM Applications</span><br><br>PVM app development cycle:<br>1. A user writes one or more sequential programs in C, C++, or Fortran 77 that contain embedded calls to the PVM library.<br>2.
These programs are compiled for each architecture in the host pool, and
the resulting object files are placed at a location accessible from
machines in the host pool.<br>3. To execute an application, a user
typically starts one copy of one task (usually the "master" task) by
hand from a machine within the host pool. This process subsequently
starts other PVM tasks, eventually resulting in a collection of active
tasks that then compute locally and exchange messages with each other
to solve the problem.<br><br>Notes for PVM on Windows:<br>1. Code/Bin can be found at <a href="https://www.netlib.org/pvm3/win32/">https://www.netlib.org/pvm3/win32/</a><br>2. Don't use the InstallShiedl version, it contains many bugs, use <a href="https://www.netlib.org/pvm3/win32/pvm3.4.5+6-WIN32.tar.gz">manual install version</a><br>3.
If "[pvmd pid4604] mksocs() somepath\pvmd.xxx failed. You are required
to run on NTFS" error message shows up, check the file, delete it and
restart pvm<br>4. C/C++ pvm application needs include "pvm3.h", link libpvm.lib and ws2_32.lib (<em> also link<span style="font-weight: bold;"> </span>libgpvm3</em>.lib if group communication functions are called)<br>5. Build-in Pvm Library uses old C runtime library, you should ignore "libc.lib" in VC++ linker/Input setting<br>6.
Build-in Pvm Library only works with static C/C++ runtime library,
please change VC++ project setting: Property-&gt;C/C++-&gt;Code
Generation-&gt;Runtime Library, and choose "Multi-Threaded(/MT)"<br>7. To run your application, executable files should be put into $(PVM_ROOT)\Bin\$(PVM_ARCH) directory<br><br>I wrote <a href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/PVM/">some Pvm applications</a>, trying to build and run it will be a good start to Pvm journey.<br><br><span style="font-weight: bold;">Part VI - MPI vs PVM</span><br><br>MPI
is a pure standard or specification, but PVM can be regarded as both
standard and implementation. MPI standard is the work of MPI Forum,
which is formed by over 40 organizations, companies and individual
persons, while PVM's standard/implementation are maintained by one
project group.<br><br>Let's focus on the technical difference of the two system.<br><br><span style="font-weight: bold; font-style: italic;">Programming Model</span><br><br>Both are based on <span style="font-style: italic; font-weight: bold;">message passing model</span> and can support SPMD(Single Program Multiple Data) /MPMD(Multiple Program Multiple Data) pattern.<br><br>But MPI is treated as <span style="font-style: italic; font-weight: bold;">static model</span>, where process communication happens in static manner. For example, tasks are regarded created statically with no failures.<br><br>While PVM is thought to be <span style="font-style: italic; font-weight: bold;">dynamic model</span>,
where system resource can be configured, tasks can be create/destroyed
at runtime. And node failure is also within consideration.<br><br>What's more, PVM provides the conceptual view of <span style="font-weight: bold; font-style: italic;">virtual machine</span>, which consists of various <span style="font-weight: bold; font-style: italic;">node</span>s.
Each node is a physical machine, such as PC workstation, SMP, Cluster
or even an entire MPP system. While MPI focus more on communications
and don't have such concepts.<br><br><span style="font-weight: bold; font-style: italic;">Message Passing</span><br><br>Both
system is based on message passing model, so passing message is the
core feature of the two systems. But MPI provides more options and
richer semantic, its various implementations are considered to be
faster than that of PVM.<br><br><span style="font-weight: bold; font-style: italic;">Process Control<br><br></span>The initial MPI<span style="font-weight: bold; font-style: italic;"> </span>standard doesn't contain specifications on how to create/destroy process/tasks, later improvements(MPI 2) add related APIs.<br>PVM
considered these dynamic features from the beginning, so spawn/kill
tasks related interface is included in the initial release of the
system.<br><br><span style="font-weight: bold; font-style: italic;">Failure Handling</span><br><br>PVM
considered failure scenarios at the beginning, it provides some
(failure) event notification mechanism to let application developers to
write fault tolerant programs, although PVM itself is not fault
tolerant(for example the master PVM daemon is a single point of
failure).<br><br>MPI don't specify how to deal with failure at the
beginning and added PVM like event notification feature in later
version but still very limited(Its main purpose is to locate the root
cause of failure, not helper mechanism to write fault tolerant
application).<br>MPI3 is considering check-point based failure handling features.<br><br><span style="font-weight: bold; font-style: italic;">Summary</span><br><br>PVM is designed for <span style="font-weight: bold; font-style: italic;">heterogeneous</span> and <span style="font-weight: bold; font-style: italic;">dynamic</span> environment, it provides a virtually uniformed conceptual view.<br><br>While MPI is mainly designed for high <span style="font-weight: bold; font-style: italic;">performance</span> and source code level <span style="font-weight: bold; font-style: italic;">portability</span>.<br><br>Reference [21][24][27] are very good material on this topic.<br><br><span style="font-weight: bold;">Part VII - Why PVM Failed</span><br><br>Standing
at today's position, we can tell easily that MPI beats PVM as the
message passing standard mechanism. But why? Since PVM's feature seems
more powerful and its concept and architecture is beautiful.<br><br>Here are some of my thoughts:<br><br>1. <span style="font-weight: bold; font-style: italic;">Do One Thing and Do it Well</span><br><br>MPI
initially only focus on communication with very limited dynamic
mechanisms. But at that time, performance/portability is critical. As
node scale is relatively small and the system is special purpose super
computers, dynamic and failure handling is not that important.<br><br>PVM
involves many great features but the practical performance is not so
good, since performance optimization is not its main focus.<br><br>2. <span style="font-weight: bold; font-style: italic;">Ecosystem is Important</span><br><br>MPI
starts as an industrial/academia cooperating efforts. Various HPC
hardware vendors has the motivation to adopt this standard (to win more
costumers). HPC application developers likes to use it because there is
no more porting pains any more. Both sides are very happy.<br><br>PVM
starts as pure research project, only one team define the spec and
write the implementation. Although it can quickly response to end user
requirement, the lack of industrial vendor support is very dangerous
for its long term survival.<br><br>PVM's main focus is heterogeneous
system integration. But HPC hardware system is very expensive, how many
users will have the requirement to integrate many such system?
Industrial vendors are very reluctant to develop a system that can will
talk to other competitor's similar product.<br><br>3. <span style="font-weight: bold; font-style: italic;">Vision Driven V.S. Problem Driven</span><br><br>PVM
is fancy and elegant but MPI solves the biggest problems of HPC
application developers. PVM is a very good research project but born to
be research purpose only.<br><br>[<span style="font-weight: bold;">Reference</span>]<br><br>Tutorials<br>01. <a href="https://www.netlib.org/pvm3/book/pvm-book.html">The PVM Book</a><br>02. <a href="https://www.csm.ornl.gov/pvm/intro.html"><span style="font-size: 100%;">An Introduction to PVM Programming</span></a><br>03. <a href="https://www.csm.ornl.gov/pvm/EuroPVM97/">Advanced PVM tutorial</a><br>04. <a href="https://www.itec.uni-klu.ac.at/%7Eharald/PVM/pvm_guide.html">PVM Beginner Guide</a><br>05. <a href="https://www.linuxjournal.com/article/2258">Parallel Processing using PVM</a><br>06. <a href="https://www.csc.liv.ac.uk/%7Eigor/COMP308/ppt/Lect_22.pdf">PVM programming hands-on tutorial</a><br>07. <a href="https://www.netlib.org/pvm3/ug.ps">PVM User Manual</a><br><br>General<br>11. <a href="https://en.wikipedia.org/wiki/PVM">PVM Wiki</a><br>12. <a href="https://www.csm.ornl.gov/pvm/pvm_home.html">PVM official Home</a><br>13. <a href="https://www.netlib.org/pvm3/index.html">PVM3 Home</a><br>14. <a href="https://pvm-plus-plus.sourceforge.net/">PVM++</a><br>15. <a href="https://www.informatik.uni-trier.de/%7Eley/db/conf/pvm/index.html">PVM/MPI Conference</a><br>16. Java over PVM (<a href="https://www.cs.virginia.edu/jpvm/doc/jpvm-97-29.pdf">Paper</a>, <a href="https://www.cs.virginia.edu/jpvm/">Home</a>)<br>17. <a href="https://www.netlib.org/pvm3/ncwn.html">PVM Papers</a><br><br>MPI vs PVM<br>21. <a href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.4809">PVM and MPI: a Comparison of Features</a><br><br>22. <a href="https://www.cs.uiuc.edu/homes/wgropp/bib/papers/1997/fgcspaper.ps">PVM MPI are completely Different</a><br>23. <a href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.9126">Why are PVM/MPI so different?</a><br>24.<span style="visibility: visible;" id="main"><span style="visibility: visible;" id="search"><cite> </cite></span></span><a href="https://www.cs.uiuc.edu/homes/wgropp/bib/papers/2002/mpiandpvm.pdf">Goals Guiding Design: MPI/PVM</a><br><br>25. <a href="https://carbon.cudenver.edu/csprojects/csc5809F99/class_projects/feng_chao_yu/full_project/vs.htm">PVM vs MPI</a><a href="https://carbon.cudenver.edu/csprojects/csc5809F99/class_projects/feng_chao_yu/full_project/vs.htm"> Article</a><br>26. <a href="https://www.cs.otago.ac.nz/staffpriv/hzy/papers/pdcat03.pdf">Performance Comparison PVM, MPI and DSM</a> (<a href="https://www.cs.otago.ac.nz/staffpriv/hzy/tmp/PDCAT.ppt">ppt</a>)<br>27. <a href="https://www14.informatik.tu-muenchen.de/konferenzen/Jass04/courses/2/Papers/Comparison.pdf">PVM/MPI Comparison using Physical Applications</a><br>28. <a href="https://www.unf.edu/%7Eree/javampipvm.pdf">PVM/MPI comparison for Java HPC</a>]]></content:encoded>
    </item>
    <item>
      <title>Parallel Programming - Using MPI</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/parallel-programming-using-mpi</link>
      <pubDate>Sun, 17 Jan 2010 01:54:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/01/17/parallel-programming-using-mpi/</guid>
      <description><![CDATA[Parallel Programming - Using MPI



MPI is a message passing programming model...]]></description>
      <content:encoded><![CDATA[<div class="post hentry">
<a title="8883349491302588243" class="" name="8883349491302588243"></a>
<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2010/01/parallel-programming-model-mpi.html" mce_href="https://xcybercloud.blogspot.com/2010/01/parallel-programming-model-mpi.html">Parallel Programming - Using MPI</a>
</h3>

<div class="post-body entry-content">
<a href="https://en.wikipedia.org/wiki/Message_Passing_Interface" mce_href="https://en.wikipedia.org/wiki/Message_Passing_Interface"><span style="font-weight: bold;">MPI</span></a> is a message passing programming model <span style="font-weight: bold; font-style: italic;">standards[2]</span>, it defines various <span style="font-weight: bold; font-style: italic;">Terms/Concepts</span>, <span style="font-weight: bold; font-style: italic;">Data Structures</span> and <span style="font-weight: bold; font-style: italic;">Function Signatures</span> that are used to passing messages among computer processes.<br><br><span style="font-weight: bold;">1. Terms and Concepts</span><br><br>A MPI application consists of multiple <span style="font-weight: bold; font-style: italic;">Processes(Tasks)</span>, each has a unique identifier called <span style="font-weight: bold; font-style: italic;">Rank. </span>A Process belongs to some <span style="font-weight: bold; font-style: italic;">Group</span>s and some <span style="font-weight: bold; font-style: italic;">Communicator</span>s. Processes don't share memory or state, the only way to communicate is sending/receiving message.<br><br>Programming
Patterns - Usually, multiple Processes are needed to accomplish a task,
there are some popular patterns on how processes are cooperated:<br>- <span style="font-weight: bold;">Peer to Peer</span> (a.k.a. <span style="font-weight: bold;">Work Crew</span>) Model, each process behaves equally<br>- <span style="font-weight: bold;">Master/Slave</span> (a.k.a. <span style="font-weight: bold;">Master/Worker</span>) Model, one process acts as coordinator, others act as common labor force<br><br><span style="font-weight: bold;">2. MPI APIs</span><br><br><span style="font-weight: bold; font-style: italic;"></span>MPI APIs can be categorized as:<br>- <a href="https://www.mpi-forum.org/docs/mpi22-report/node178.htm#Node178" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node178.htm#Node178"><span style="font-weight: bold;">Environment</span> <span style="font-weight: bold;">Management</span></a><br>- <a href="https://www.mpi-forum.org/docs/mpi22-report/node68.htm#Node68" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node68.htm#Node68"><span style="font-weight: bold;">Data Type</span></a><br>- <a href="https://www.mpi-forum.org/docs/mpi22-report/node40.htm#Node40" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node40.htm#Node40"><span style="font-weight: bold;">Point-to-Point Communication</span></a><br>- <a href="https://www.mpi-forum.org/docs/mpi22-report/node86.htm#Node86" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node86.htm#Node86"><span style="font-weight: bold;">Collective Communication</span></a><br>- <a href="https://www.mpi-forum.org/docs/mpi22-report/node228.htm#Node228" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node228.htm#Node228"><span style="font-weight: bold;">One Sided Communication</span></a><br>- <span style="font-weight: bold;">Process</span> (<span style="font-weight: bold;"><a href="https://www.mpi-forum.org/docs/mpi22-report/node163.htm#Node163" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node163.htm#Node163">Topology</a>, <a href="https://www.mpi-forum.org/docs/mpi22-report/node200.htm#Node200" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node200.htm#Node200">Creation and Management</a></span>)<br>- <a href="https://www.mpi-forum.org/docs/mpi22-report/node261.htm#Node261" mce_href="https://www.mpi-forum.org/docs/mpi22-report/node261.htm#Node261"><span style="font-weight: bold;">Parallel I/O</span></a><br><br><span style="font-weight: bold; font-style: italic;">Point-to-Point communication</span> occurs between two Processes, while <span style="font-weight: bold; font-style: italic;">Collective communication</span> involves all Processes in a communicator and <span style="font-weight: bold; font-style: italic;">One-Sided communication</span> only needs on Process's participation.<br><br><span style="font-weight: bold;">3. Collective Communication Patterns</span><br><br>Typical collective communication semantics are somewhat hard to describe, Some diagrams (mainly from <a href="https://www.lcrc.anl.gov/jazz/Presentations/MPIIntro-Lusk-20030924.ppt" mce_href="https://www.lcrc.anl.gov/jazz/Presentations/MPIIntro-Lusk-20030924.ppt">Rusty Lusk</a>) are listed below to illustrate the semantic of each primitive:<br><br><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://1.bp.blogspot.com/_qN4XeajjPQ8/S0XlDyAKi4I/AAAAAAAAAkI/bkp2_-l24f0/s1600-h/mpi_ccomm_bcast.jpg" mce_href="https://1.bp.blogspot.com/_qN4XeajjPQ8/S0XlDyAKi4I/AAAAAAAAAkI/bkp2_-l24f0/s1600-h/mpi_ccomm_bcast.jpg"><img src="https://1.bp.blogspot.com/_qN4XeajjPQ8/S0XlDyAKi4I/AAAAAAAAAkI/bkp2_-l24f0/s400/mpi_ccomm_bcast.jpg" mce_src="https://1.bp.blogspot.com/_qN4XeajjPQ8/S0XlDyAKi4I/AAAAAAAAAkI/bkp2_-l24f0/s400/mpi_ccomm_bcast.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 114px;" alt="" id="BLOGGER_PHOTO_ID_5423993179362462594" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlQEc8VYI/AAAAAAAAAko/hf0tblfmxgM/s1600-h/mpi_ccomm_scatter.jpg" mce_href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlQEc8VYI/AAAAAAAAAko/hf0tblfmxgM/s1600-h/mpi_ccomm_scatter.jpg"><img src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlQEc8VYI/AAAAAAAAAko/hf0tblfmxgM/s400/mpi_ccomm_scatter.jpg" mce_src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlQEc8VYI/AAAAAAAAAko/hf0tblfmxgM/s400/mpi_ccomm_scatter.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 108px;" alt="" id="BLOGGER_PHOTO_ID_5423993390473434498" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlPYw9CwI/AAAAAAAAAkQ/afo7ktWvkZY/s1600-h/mpi_ccomm_gather.jpg" mce_href="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlPYw9CwI/AAAAAAAAAkQ/afo7ktWvkZY/s1600-h/mpi_ccomm_gather.jpg"><img src="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlPYw9CwI/AAAAAAAAAkQ/afo7ktWvkZY/s400/mpi_ccomm_gather.jpg" mce_src="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlPYw9CwI/AAAAAAAAAkQ/afo7ktWvkZY/s400/mpi_ccomm_gather.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 114px;" alt="" id="BLOGGER_PHOTO_ID_5423993378746206978" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlPpJFFXI/AAAAAAAAAkY/ztQ_4iDEmAI/s1600-h/mpi_ccomm_reduce.jpg" mce_href="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlPpJFFXI/AAAAAAAAAkY/ztQ_4iDEmAI/s1600-h/mpi_ccomm_reduce.jpg"><img src="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlPpJFFXI/AAAAAAAAAkY/ztQ_4iDEmAI/s400/mpi_ccomm_reduce.jpg" mce_src="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlPpJFFXI/AAAAAAAAAkY/ztQ_4iDEmAI/s400/mpi_ccomm_reduce.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 113px;" alt="" id="BLOGGER_PHOTO_ID_5423993383142364530" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlP9Dt4uI/AAAAAAAAAkg/qYFfbmmp540/s1600-h/mpi_ccomm_scan.jpg" mce_href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlP9Dt4uI/AAAAAAAAAkg/qYFfbmmp540/s1600-h/mpi_ccomm_scan.jpg"><img src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlP9Dt4uI/AAAAAAAAAkg/qYFfbmmp540/s400/mpi_ccomm_scan.jpg" mce_src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlP9Dt4uI/AAAAAAAAAkg/qYFfbmmp540/s400/mpi_ccomm_scan.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 106px;" alt="" id="BLOGGER_PHOTO_ID_5423993388488581858" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlDg6VYHI/AAAAAAAAAkA/HyTLwsivgW8/s1600-h/mpi_ccomm_allreduce.jpg" mce_href="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlDg6VYHI/AAAAAAAAAkA/HyTLwsivgW8/s1600-h/mpi_ccomm_allreduce.jpg"><img src="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlDg6VYHI/AAAAAAAAAkA/HyTLwsivgW8/s400/mpi_ccomm_allreduce.jpg" mce_src="https://3.bp.blogspot.com/_qN4XeajjPQ8/S0XlDg6VYHI/AAAAAAAAAkA/HyTLwsivgW8/s400/mpi_ccomm_allreduce.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 116px;" alt="" id="BLOGGER_PHOTO_ID_5423993174774603890" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlDCVa0_I/AAAAAAAAAj4/ZvwBqZ81f5I/s1600-h/mpi_ccomm_allgather.jpg" mce_href="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlDCVa0_I/AAAAAAAAAj4/ZvwBqZ81f5I/s1600-h/mpi_ccomm_allgather.jpg"><img src="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlDCVa0_I/AAAAAAAAAj4/ZvwBqZ81f5I/s400/mpi_ccomm_allgather.jpg" mce_src="https://2.bp.blogspot.com/_qN4XeajjPQ8/S0XlDCVa0_I/AAAAAAAAAj4/ZvwBqZ81f5I/s400/mpi_ccomm_allgather.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 121px;" alt="" id="BLOGGER_PHOTO_ID_5423993166566708210" border="0"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlCp4KWXI/AAAAAAAAAjw/quEo5loVBYU/s1600-h/mpi_ccomm_all2all.jpg" mce_href="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlCp4KWXI/AAAAAAAAAjw/quEo5loVBYU/s1600-h/mpi_ccomm_all2all.jpg"><img src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlCp4KWXI/AAAAAAAAAjw/quEo5loVBYU/s400/mpi_ccomm_all2all.jpg" mce_src="https://4.bp.blogspot.com/_qN4XeajjPQ8/S0XlCp4KWXI/AAAAAAAAAjw/quEo5loVBYU/s400/mpi_ccomm_all2all.jpg" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 112px;" alt="" id="BLOGGER_PHOTO_ID_5423993160001542514" border="0"></a><br></div><span style="font-weight: bold;">4. Typical MPI Program Structure</span><br><br>#include "mpi.h"<br><br>int main(int argc, char** argv)<br>{<br>　int  nProc;<br>　int  nThisRank;<br>　MPI_Init(&amp;argc, &amp;argv);<br>　MPI_Comm_size(MPI_COMM_WORLD, &amp;nProc);<br>　MPI_Comm_rank(MPI_COMM_WORLD, &amp;nThisRank);<br><br>　if (nThisRank == 0)<br>　{<br>　　//Core App Logic<br>　}<br>　else<br>　{<br>　　//Core App Logic<br>　}<br><br>　MPI_Finalize();<br>　return 0;<br>}<br><br>I had written some non-trivial MPI applicatioins:<br>- <a href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/MPI/MpiApp" mce_href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/MPI/MpiApp">Demo various collective communication semantic</a><br>- <a href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/MPI/MpiPi" mce_href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/MPI/MpiPi">Parallel Numeric PI Calculation</a><br>- <a href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/MPI/MpiWordCounter" mce_href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/MPI/MpiWordCounter">Map-Reduce-Merge over MPI</a><br><br>You can try the code to get hands on experiences.<br><br><span style="font-weight: bold;">5. Combine Message Passing with Threading</span><br><br>Typical MPI applications run <span style="font-weight: bold; font-style: italic;">one process per core</span> on a machine node. Since all cores on a node share the same physical memory, we can use a combined model, where <span style="font-weight: bold; font-style: italic;">one process per node</span> and <span style="font-weight: bold; font-style: italic;">multiple threads per process</span>(OpenMP, PThreads etc) on each node. I.E.:<br>- <span style="font-weight: bold; font-style: italic;">Threading</span> within one node<br>- <span style="font-weight: bold; font-style: italic;">Message Passing</span> cross nodes<br><br><span style="font-weight: bold;">Notes on MPI programming:</span><br><br>1.
MPI's network facilities are message oriented, not connection/stream
oriented (as in Tcp Socket programming), so before receive a message,
you'd better know how large it will be, other wise, message may be
truncated.<br><br>2. MPI can dealing communication with both fixed length and variable length data types. For <span style="font-weight: bold; font-style: italic;">variable length data types</span>, use MPI_Pack/MPI_Unpack and those MPI_xxxv(for instance, MPI_Scatterv, MPI_Gatherv, MPI_Allgatherv, MPI_Alltoallv) functions.<br>(<a href="https://www.osl.iu.edu/research/mpi.net/svn/" mce_href="https://www.osl.iu.edu/research/mpi.net/svn/">mpi.net's source</a> contains <a href="https://svn.osl.iu.edu/svn/mpi_net/trunk/MPI/Intracommunicator.cs" mce_href="https://svn.osl.iu.edu/svn/mpi_net/trunk/MPI/Intracommunicator.cs">code that leverages these *v functions</a>, it's good example to learn MPI programming)<br><br>[<span style="font-weight: bold;">Reference</span>]<br><br>0. <a href="https://www.mpi-forum.org/" mce_href="https://www.mpi-forum.org/">MPI Official Site</a><br>1. <a href="https://www.mpi-forum.org/docs/mpi22-report/mpi22-report.htm" mce_href="https://www.mpi-forum.org/docs/mpi22-report/mpi22-report.htm">MPI V2.2 Official Standard</a><br>2. <a href="https://en.wikipedia.org/wiki/Message_Passing_Interface" mce_href="https://en.wikipedia.org/wiki/Message_Passing_Interface">Message Passing Interface on wikipedia</a><br><br>3. <a href="https://www.ncsa.illinois.edu/UserInfo/Training/Workshops/Multicore/presentations/MPI_on_Multicore.ppt" mce_href="https://www.ncsa.illinois.edu/UserInfo/Training/Workshops/Multicore/presentations/MPI_on_Multicore.ppt">MPI on Multicore</a> (PPT)<br>4. <a href="https://www.pdc.kth.se/education/summer-school/handouts/lect6.pdf" mce_href="https://www.pdc.kth.se/education/summer-school/handouts/lect6.pdf">MPI and OpenMP Hybrid Model</a><br>5. <a href="https://www.ece.rutgers.edu/%7Eparashar/Classes/ece451-566/slides/openmp-mpi.pdf" mce_href="https://www.ece.rutgers.edu/%7Eparashar/Classes/ece451-566/slides/openmp-mpi.pdf">Combining MPI and OpenMP</a><br><br><span style="font-weight: bold;">Tutorials<br><br></span>11 <span style="font-weight: bold;"></span><a href="https://computing.llnl.gov/tutorials/parallel_comp/" mce_href="https://computing.llnl.gov/tutorials/parallel_comp/">Parallel Computing Introduction</a><br>12 <a href="https://computing.llnl.gov/tutorials/mpi/" mce_href="https://computing.llnl.gov/tutorials/mpi/">MPI Tutorials @ LLNL</a> (<a href="https://computing.llnl.gov/tutorials/mpi/exercise.html" mce_href="https://computing.llnl.gov/tutorials/mpi/exercise.html">Exercises</a>)<br>13 <a href="https://www.mcs.anl.gov/research/projects/mpi/tutorial/gropp/talk.html" mce_href="https://www.mcs.anl.gov/research/projects/mpi/tutorial/gropp/talk.html">Tutorial on MPI by William Gropp</a> (<a href="https://www.mcs.anl.gov/research/projects/mpi/tutorial/mpiexmpl/contents.html" mce_href="https://www.mcs.anl.gov/research/projects/mpi/tutorial/mpiexmpl/contents.html">Exercises</a>)<br>14 <a href="https://people.sc.fsu.edu/%7Eburkardt/cpp_src/mpi/mpi.html" mce_href="https://people.sc.fsu.edu/%7Eburkardt/cpp_src/mpi/mpi.html">C++ MPI Exercises</a> by John Burkardt<br>15 <a href="https://personal.denison.edu/%7Ebressoud/cs400-f04/lectures/04_OSC-MPI.pdf" mce_href="https://personal.denison.edu/%7Ebressoud/cs400-f04/lectures/04_OSC-MPI.pdf">MPI Hands-On Tutorial by OSC</a><br>16 <a href="https://www.fz-juelich.de/jsc/files/docs/vortraege/MPI-OpenMP.pdf" mce_href="https://www.fz-juelich.de/jsc/files/docs/vortraege/MPI-OpenMP.pdf">Tutorial on OpenMP and MPI</a><br><br>17 <a href="https://www.netlib.org/utk/papers/mpi-book/mpi-book.html" mce_href="https://www.netlib.org/utk/papers/mpi-book/mpi-book.html">Book online: MPI The Complete Reference</a><br>18 <a href="https://www.cs.usfca.edu/%7Epeter/ppmpi/" mce_href="https://www.cs.usfca.edu/%7Epeter/ppmpi/">Book: Parallel Programming With MPI</a><br><br>19 <a href="https://www.csc.liv.ac.uk/%7Eigor/COMP308/ppt/Lect_21.pdf" mce_href="https://www.csc.liv.ac.uk/%7Eigor/COMP308/ppt/Lect_21.pdf">Clear Message Passing Concept Explanation</a><br><br><span style="font-weight: bold;"></span><b>MS-MPI</b>/<b>MPI.NET</b><br><br>20 <a href="https://www.microsoft.com/downloads/details.aspx?familyid=D5838485-507C-45CD-8AA6-6D6B383D1071" mce_href="https://www.microsoft.com/downloads/details.aspx?familyid=D5838485-507C-45CD-8AA6-6D6B383D1071">Windows HPC Server 2008 - Using MS-MPI whitepaper</a><br>21 <a href="https://technet.microsoft.com/en-us/library/cc720120%28WS.10%29.aspx" mce_href="https://technet.microsoft.com/en-us/library/cc720120%28WS.10%29.aspx">Using Microsoft MPI</a><br>22 MPI.NET <a href="https://www.osl.iu.edu/research/mpi.net/documentation/tutorial/" mce_href="https://www.osl.iu.edu/research/mpi.net/documentation/tutorial/">Tutorial</a><br><br><span style="font-weight: bold;">Implementations</span><br><br>- Native<br><a href="https://www.mcs.anl.gov/research/projects/mpich2/" mce_href="https://www.mcs.anl.gov/research/projects/mpich2/">MPICH2 - a MPI implementation</a><br><a href="https://www.open-mpi.org/" mce_href="https://www.open-mpi.org/">Open MPI</a> (formerly <a href="https://www.lam-mpi.org/" mce_href="https://www.lam-mpi.org/">Lam/MPI</a>)<br>MPI Implementation List (<a href="https://www.mcs.anl.gov/research/projects/mpi/implementations.html" mce_href="https://www.mcs.anl.gov/research/projects/mpi/implementations.html">List 1</a>, <a href="https://hpcl.cse.msstate.edu/projects/mpi/implementations.html" mce_href="https://hpcl.cse.msstate.edu/projects/mpi/implementations.html">List 2</a>)<br><br>- .Net<br><a href="https://www.purempi.net/" mce_href="https://www.purempi.net/">Pure MPI.NET</a> (implemented totally using .Net)<br><a href="https://osl.iu.edu/research/mpi.net/" mce_href="https://osl.iu.edu/research/mpi.net/">MPI.NET</a> (an .Net wrapper around native MPI library)<br><br>- Java<br><a href="https://i.cs.hku.hk/%7Elchen2/javampi.html" mce_href="https://i.cs.hku.hk/%7Elchen2/javampi.html">Java-MPI binding list</a><br><a href="https://www.hpjava.org/mpiJava.html" mce_href="https://www.hpjava.org/mpiJava.html">mpiJava</a><br><a href="https://mpj-express.org/" mce_href="https://mpj-express.org/">MPJ Express</a><br><br>- Python<br><a href="https://pympi.sourceforge.net/" mce_href="https://pympi.sourceforge.net/">PyMPI</a><br><a href="https://mpi4py.scipy.org/" mce_href="https://mpi4py.scipy.org/">MPI4Py</a><br><br>- Matlab<br><a href="https://www.ll.mit.edu/mission/isr/matlabmpi/matlabmpi.html" mce_href="https://www.ll.mit.edu/mission/isr/matlabmpi/matlabmpi.html">MatlabMPI</a></div></div>]]></content:encoded>
    </item>
    <item>
      <title>Parallel Programming - Using OpenMP</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/parallel-programming-using-openmp</link>
      <pubDate>Mon, 11 Jan 2010 01:53:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/01/11/parallel-programming-using-openmp/</guid>
      <description><![CDATA[Parallel Programming - Using OpenMP



OpenMP is a parallel programming model for shared...]]></description>
      <content:encoded><![CDATA[<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2009/12/parallel-programming-model-openmp.html" mce_href="https://xcybercloud.blogspot.com/2009/12/parallel-programming-model-openmp.html">Parallel Programming - Using OpenMP</a>
</h3>


<a href="https://openmp.org/wp/" mce_href="https://openmp.org/wp/">OpenMP</a> is a parallel programming model for <span style="font-weight: bold;">shared memory</span> parallel computers.<br><br>It's based on <span style="font-weight: bold;">Fork-Join</span> parallel execution pattern and is suitable for <a href="https://en.wikipedia.org/wiki/Data_parallel" mce_href="https://en.wikipedia.org/wiki/Data_parallel"><span style="font-weight: bold;">Data Parallel</span></a> and <a href="https://en.wikipedia.org/wiki/Task_parallelism" mce_href="https://en.wikipedia.org/wiki/Task_parallelism"><span style="font-weight: bold;">Task Parallel</span></a> applications.<br><br><span style="font-weight: bold;">Fork-Join Pattern</span><br>-  OpenMP programs begin as a single thread - the <span style="font-weight: bold;">Master</span> thread, which executes sequentially until the first parallel region construct is encountered.<br>- <span style="font-weight: bold;">Fork</span>: the master thread then creates a team of concurrent threads, which will execute some user provided codes.<br>- <span style="font-weight: bold;">Join</span>:
when the team threads complete, they are synchronized to wait each
other(barrier) and then terminate, leaving only the master thread ahead<br><br><div style="text-align: center;"><a href="https://en.wikipedia.org/wiki/File:Fork_join.svg" mce_href="https://en.wikipedia.org/wiki/File:Fork_join.svg" class="image"><img src="https://upload.wikimedia.org/wikipedia/en/thumb/f/f1/Fork_join.svg/450px-Fork_join.svg.png" mce_src="https://upload.wikimedia.org/wikipedia/en/thumb/f/f1/Fork_join.svg/450px-Fork_join.svg.png" alt="" class="thumbimage" width="450" height="187"></a><br>Fork/Join Pattern in OpenMP (from[1])<br><br></div><span style="font-weight: bold;">Work Sharing Constructs</span><br>The
core functionality of OpenMP is to parallelly process data or execution
tasks, I.E, sharing work load. It provides several constructs to
support it:<br>- <span style="font-weight: bold;">For, </span>OpenMP will automatically divide these (independent) loop iterations and assign them to one of the team thread to execute.<span style="font-weight: bold;"><br></span>- <span style="font-weight: bold;">Section, </span>programmer can define static code sections, each one will be (parallelly) assigned to one of the team thread to execute.<br>- <span style="font-weight: bold;">Task, </span>data and code can be (dynamically) packed as a task and the delivered to team thread to execute them.<br><br><span style="font-weight: bold;">Implementation</span><br>OpenMP is designed for Fortran and C/C++. Its functionalities often exist in the following form:<br>- New Construct as Language Directive<br>- APIs as runtime library<br>- Environment Variables<br><br>Currently, visual studio 2008 supports OpenMP 2.5, <a href="https://msdn.microsoft.com/en-us/library/tt15eb9t.aspx" mce_href="https://msdn.microsoft.com/en-us/library/tt15eb9t.aspx">OpenMP@MSDN</a><br><br>To
use OpenMP in VS2008 c++ developing, you only need to include omp.h
header and enable compiler flag /openmp (project property -&gt; c/c++
-&gt; language -&gt; OpenMP Support)<br><br>More detailed tutorial can be found at [4][5].<br><br>I had written <a href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/OmpPi" mce_href="https://code.google.com/p/code4cs/source/browse/#svn/trunk/AppCase/HpcW/OmpPi">some OpenMP sample applications</a>, it's compiled with vs2008 (except the <span style="font-weight: bold;">task</span> example).<br><br>[<span style="font-weight: bold;">Reference</span>]<br>[1] <a href="https://en.wikipedia.org/wiki/OpenMP" mce_href="https://en.wikipedia.org/wiki/OpenMP">https://en.wikipedia.org/wiki/OpenMP</a><br>[2] <a href="https://openmp.org/wp/" mce_href="https://openmp.org/wp/">https://openmp.org/wp/<br></a><br>[3] <a href="https://computing.llnl.gov/tutorials/parallel_comp/" mce_href="https://computing.llnl.gov/tutorials/parallel_comp/">Introduction to Parallel Programming </a><br>[4] <a href="https://computing.llnl.gov/tutorials/openMP/" mce_href="https://computing.llnl.gov/tutorials/openMP/">OpenMP tutorial at LLNL</a><br>[5] <a href="https://openmp.org/mp-documents/omp-hands-on-SC08.pdf" mce_href="https://openmp.org/mp-documents/omp-hands-on-SC08.pdf">OpenMP hands-on Tutorial at SC08</a><br><br>[6] <a href="https://www.fz-juelich.de/jsc/files/docs/vortraege/MPI-OpenMP.pdf" mce_href="https://www.fz-juelich.de/jsc/files/docs/vortraege/MPI-OpenMP.pdf">Parallel Programming with OpenMP and MPI</a><br>[7] <a href="https://www.multicoreinfo.com/2009/06/parprog-part-4/" mce_href="https://www.multicoreinfo.com/2009/06/parprog-part-4/">Blog on OpenMP programming </a><br>[8] <a href="https://software.intel.com/en-us/articles/32-openmp-traps-for-c-developers/" mce_href="https://software.intel.com/en-us/articles/32-openmp-traps-for-c-developers/">Intel on OpenMP traps</a><br>[9] <a href="https://en.wikipedia.org/wiki/Comparison_of_MPI,_OpenMP,_and_Stream_Processing" mce_href="https://en.wikipedia.org/wiki/Comparison_of_MPI,_OpenMP,_and_Stream_Processing">Parallel Programming Model Comparison</a><br>[10] <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=365849&amp;wa=wsignin1.0" mce_href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=365849&amp;wa=wsignin1.0">Microsoft on OpenMP version in Visual Studio</a><br>[11] <a href="https://computing.llnl.gov/tutorials/openMP/exercise.html" mce_href="https://computing.llnl.gov/tutorials/openMP/exercise.html">More OpenMP sample applications</a>]]></content:encoded>
    </item>
    <item>
      <title>Parallel Programming - Using POSIX Threads</title>
      <link>https://docs.microsoft.com/archive/blogs/csliu/parallel-programming-using-posix-threads</link>
      <pubDate>Sun, 03 Jan 2010 01:52:00 GMT</pubDate>
      <dc:creator><![CDATA[changl]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/csliu/2010/01/03/parallel-programming-using-posix-threads/</guid>
      <description><![CDATA[Parallel Programming - Using POSIX Threads



Pthreads (a.k.a POSIX Threads), is another...]]></description>
      <content:encoded><![CDATA[<div class="post hentry">
<a title="3710575826144174793" class="" name="3710575826144174793"></a>
<h3 class="post-title entry-title">
<a href="https://xcybercloud.blogspot.com/2009/12/parallel-programming-model-posix.html" mce_href="https://xcybercloud.blogspot.com/2009/12/parallel-programming-model-posix.html">Parallel Programming - Using POSIX Threads</a>
</h3>

<div class="post-body entry-content">
<a href="https://en.wikipedia.org/wiki/POSIX_Threads" mce_href="https://en.wikipedia.org/wiki/POSIX_Threads" style="font-weight: bold;">Pthreads</a> (a.k.a POSIX Threads), is another parallel programming model over <span style="font-weight: bold;">Shared Memory Computers</span>, which is categorized to <a href="https://en.wikipedia.org/wiki/Thread_%28computer_science%29" mce_href="https://en.wikipedia.org/wiki/Thread_%28computer_science%29">Threads</a> Based Model (the other is message passing based model).<br><br>Pthreads provides Threads by means of pure C style APIs, while OpenMP does it through language compiler directives.<br><br>As
the Process/Thread concepts are very popular and well understood in
today's developing community, I will ignore the basic explanation.<br><br>Pthreads APIs can be divided into the following categories:<br>- <span style="font-weight: bold;">Thread Management</span> (Create, Destroy, Join, Cancellation, Scheduling, Thread Specific Data and all related attributes)<br>- <span style="font-weight: bold;">Thread Synchronization</span> (Mutex, Conditional Variable, Barrier, Reader Writer Lock, Spin Lock and all related attributes)<br><br>Pthreads is <a href="https://www.unix.org/version3/ieee_std.html" mce_href="https://www.unix.org/version3/ieee_std.html">an  international standard</a>
and is well supported in *nix world. Microsoft Windows has its own
threading interface. But there is a famous open source project <a href="https://en.wikipedia.org/wiki/POSIX_Threads" mce_href="https://en.wikipedia.org/wiki/POSIX_Threads">Pthreads-Win32</a>, which targets a Pthreads implementation over Windows Platform.<br><br>Multithreading
Programming is a very broad topic, this post just aims to give very
simple introduction. [3] and [5] are very good hands on tutorials about
Pthreads programming.<br><br>[<span style="font-weight: bold;">Reference</span>]<br>[1] <a href="https://en.wikipedia.org/wiki/POSIX_Threads" mce_href="https://en.wikipedia.org/wiki/POSIX_Threads">https://en.wikipedia.org/wiki/POSIX_Threads</a><br>[2] <a href="https://sourceware.org/pthreads-win32/" mce_href="https://sourceware.org/pthreads-win32/">https://sourceware.org/pthreads-win32/</a><br><br>[3] <a href="https://computing.llnl.gov/tutorials/pthreads/" mce_href="https://computing.llnl.gov/tutorials/pthreads/">Pthreads Tutorial by LLNL</a><br>[4] <a href="https://www.ibm.com/developerworks/linux/library/l-posix1.html" mce_href="https://www.ibm.com/developerworks/linux/library/l-posix1.html">Pthreads Tutorial by IBM</a><br>[5] <a href="https://conferences.oreillynet.com/presentations/os2007/os_lamothe.pdf" mce_href="https://conferences.oreillynet.com/presentations/os2007/os_lamothe.pdf">Pthreads Hands-On Tutorial</a><br>[6] <a href="https://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html" mce_href="https://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html">Pthreads Tutorial for Linux Platform</a><br>[7] <a href="https://www.humanfactor.com/pthreads/" mce_href="https://www.humanfactor.com/pthreads/">Pthreads Info Center</a></div></div>]]></content:encoded>
    </item>
  </channel>
</rss>