12
返回列表 发新帖
楼主: Sky-Tiger

Web Services and the Search for Really Big Prime Numbers

[复制链接]
论坛徽章:
350
2006年度最佳版主
日期:2007-01-24 12:56:49NBA大富翁
日期:2008-04-21 22:57:29地主之星
日期:2008-11-17 19:37:352008年度最佳版主
日期:2009-03-26 09:33:53股神
日期:2009-04-01 10:05:56NBA季后赛大富翁
日期:2009-06-16 11:48:01NBA季后赛大富翁
日期:2009-06-16 11:48:01ITPUB年度最佳版主
日期:2011-04-08 18:37:09ITPUB年度最佳版主
日期:2011-12-28 15:24:18ITPUB年度最佳技术原创精华奖
日期:2012-03-13 17:12:05
11#
 楼主| 发表于 2009-3-16 23:13 | 只看该作者
The Patterns

This server-side architecture uses a number of GOF patterns, which are detailed below.

A stateless facade service class is exposed to the client via a Web service. This facade calls the FactorFactory (which is a factory class, a mediator, and a singleton) to create Factor stateful objects. Potentially, there will be many of these objects, depending on the number of client requests for factorization. The Factor stateful object uses a strategy pattern to find the factors of the Mersenne number and informs the FactorFactory of the state change using an observer pattern. The FactorFactory will then email the result. Finally, the FactorFactoryalso uses a memento pattern to persist the state of the Mersenne number factorization calculation, so it may be reinstated in case of a server restart.

Here is a list of and references to the GOF patterns used:

   1. The facade pattern (the stateless service exposes a simple interface of checkMersenne number to the client).
   2. The factory method (a FactorFactory object for creating Factor (or any other type of object implementing the IFactor interface) at runtime),
   3. The singleton pattern is used for the FactorFactory object to ensure that there is only one object creating and managing Factor objects.
   4. The strategy pattern (for factorizing the MersenneNumber, decoupling the Factor object from how it factors).
   5. The mediator pattern is used in the FactorFactory again to control and manage the lifecycle of the Factor objects that it is responsible for creating.
   6. The observer pattern (a callback to the FactorFactory object that the stateful Factor object has finished factoring and the results should be emailed to the calling client).
   7. The memento pattern to persist the state of the Factor object in case of a server restart.

使用道具 举报

回复
论坛徽章:
350
2006年度最佳版主
日期:2007-01-24 12:56:49NBA大富翁
日期:2008-04-21 22:57:29地主之星
日期:2008-11-17 19:37:352008年度最佳版主
日期:2009-03-26 09:33:53股神
日期:2009-04-01 10:05:56NBA季后赛大富翁
日期:2009-06-16 11:48:01NBA季后赛大富翁
日期:2009-06-16 11:48:01ITPUB年度最佳版主
日期:2011-04-08 18:37:09ITPUB年度最佳版主
日期:2011-12-28 15:24:18ITPUB年度最佳技术原创精华奖
日期:2012-03-13 17:12:05
12#
 楼主| 发表于 2009-3-16 23:13 | 只看该作者
Grid Computing

Where does the notion of grid computing come into all of this? In the above example, an instance of the strategy pattern -- the LLFactorer -- has been looked at. Another potential factorization algorithm uses the Elliptic Curve Method (ECM) to check for primality. This can be another implementation of the IFactorer interface called ECMFactorer. Numerous other algorithms exist that could be used for this; a comprehensive list can be found here.

For grid computing, the algorithm must be capable of breaking this problem down into nonsequential units of work that can be run in a simultaneous, or parallel, manner. The LL algorithm cannot be parallelized very well, but the ECM algorithm can. Thus, a master Web service could accept a potential Mersenne number for primality testing, only to de-convolute the problem into multiple, paralleled problems that can be farmed out to other Web services from the ECMFactorer strategy implementation.

Idle processes, within an Intranet exposing an algorithm service as WSDL, for example, could be looked up using UDDI and invoked using SOAP/HTTP. Care should be taken here in long-running blocking transactions, and in extreme cases, a more flexible non-blocking protocol like SOAP/JMS or SOAP/SMTP could be used.

Therefore, our choice of algorithmic implementation dictates the usefulness of applying the problem to a grid solution. The easy infrastructure that Web services provide for solving this sort of computationally-intense problem is unattainable in any other middleware solution currently available.

使用道具 举报

回复
论坛徽章:
350
2006年度最佳版主
日期:2007-01-24 12:56:49NBA大富翁
日期:2008-04-21 22:57:29地主之星
日期:2008-11-17 19:37:352008年度最佳版主
日期:2009-03-26 09:33:53股神
日期:2009-04-01 10:05:56NBA季后赛大富翁
日期:2009-06-16 11:48:01NBA季后赛大富翁
日期:2009-06-16 11:48:01ITPUB年度最佳版主
日期:2011-04-08 18:37:09ITPUB年度最佳版主
日期:2011-12-28 15:24:18ITPUB年度最佳技术原创精华奖
日期:2012-03-13 17:12:05
13#
 楼主| 发表于 2009-3-16 23:13 | 只看该作者
Conclusion

The combination of Web services and grid computing provides a powerful duo for tackling computationally difficult problems. The three amigos of Web services -- WSDL, UDDI, and SOAP -- provide a framework on which a grid can flourish.

It remains to be seen how effective this will be in terms of providing solutions in realistic timeframes. Other standards within the Web services domain will need to mature in order for this to be a true robust enterprise solution. However, this type of grid computing is already being actively developed by Sun and HP, and applications may not be far off.

Eoin Lane is a Principal Technologist with Cape Clear Software. He offers advice and consultancy to Cape Clear clients in the design and implementation of Web services projects.

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
186
授权会员
日期:2008-07-27 22:25:202014年新春福章
日期:2014-02-18 16:42:02马上有房
日期:2014-02-18 16:42:02马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:14版主4段
日期:2015-02-26 02:21:03慢羊羊
日期:2015-03-04 14:51:35
14#
发表于 2009-3-18 17:57 | 只看该作者
看着头晕。。。。闪人,呵呵

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表