当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Some programs can be made to r
 

 

    摘要:linux is coming to a desktop near you. the question being asked has gone from "can it happen?" to "when and how do we get there?" this article is a high-level overview of some of the technical issues ......
    摘要:microsoft crm is a web-based customer relationship management framework. microsoft business solutions (mbs) developed this product in-house to complement its purchased accounting offerings of great pl......


How To Build a ComputeFarm

some programs can be made to run faster by dividing them up into smaller pieces and running these pieces on multiple processors. this is known as parallel computing, and a large number of hardware and software systems exist to facilitate it. the most famous example of a (distributed) parallel program is seti@home, but there are many other applications, including ray tracing, database searching, code breaking, neural network training, genetic algorithms, and a whole host of np-complete problems where a brute force approach is needed.

the replicated-worker pattern 【程序编程相关:Principles, Patterns

computefarm is an open source java framework for developing and running parallel programs. under the covers, computefarm runs on jini, which brings code mobility and fault tolerance to network applications. from version 2.1 onwards, jini is being java.sun.com/cgi-bin/wa?a2=ind0503&l=jini-users&o=d&p=36217">released under the apache license, version 2.0, so this is an exciting time for jini. this article introduces computefarm and illustrates how to run parallel programs with it. 【推荐阅读:Using the Strategy D

in computefarm, a computespace holds task objects and result objects of the type object. each workers lifecycle is as follows: 【扩展信息:Timing is Everything

computefarm grew out of an implementation in javaspaces (itself a part of jini) of the replicated-worker pattern from the definitive book on javaspaces, java.sun.com/developer/books/javaspaces/introduction.html">javaspaces principles, patterns, and practice, by eric freeman, susanne hupfer, and ken arnold. in this pattern, also know as the master-worker pattern, a master process creates a collection of tasks that need to be run. workers take tasks from the collection and run them, then hand the computed result to the master. a space is a natural conduit for passing messages between master and workers, due to the decoupled programming style it encourages.

wait for an available task from the computespace. execute the task. put the task result back into the computespace. go to step 1.

there are typically many workers, and they are identical; hence the term replicated. this pattern neatly provides load balancing, whereby each worker contributes whatever resources it can afford. the worker on a faster machine will execute more tasks than the worker on a slower or otherwise heavily loaded machine; and as long as the granularity of the tasks is sufficiently fine, no one worker will hold up the computation.

a client of computefarm (the master process) will not usually think in terms of the workers doing their work, but in terms of the overall problem they have to solve, called a job. from the clients point of view, this is what happens:


...   下一页
    摘要:in the first article of this series, we went through the basics of using berkeley db. in this article, were going to walk through a more extended example of using it. the example im going to use......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE