??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品免费在线,久久亚洲在线,亚洲蜜臀av乱码久久精品http://www.aygfsteel.com/honeybee/zh-cnTue, 17 Jun 2025 18:53:27 GMTTue, 17 Jun 2025 18:53:27 GMT60eclipse关于alt+/问题集合http://www.aygfsteel.com/honeybee/articles/212977.htmlsunsunMon, 07 Jul 2008 03:02:00 GMThttp://www.aygfsteel.com/honeybee/articles/212977.htmlhttp://www.aygfsteel.com/honeybee/comments/212977.htmlhttp://www.aygfsteel.com/honeybee/articles/212977.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/212977.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/212977.html 1. 点击Windows->Preferences->General->Keys .

2. 在列出的快捷键列表中查找刎ͼword competionQ把它的快捷键alt + / Ҏ其它的快捷键Q怎么改,先把此快捷键删除Q点双的按?remove binding", 再选中binding文本框,输入你想要的快捷键)?

3. 在列出的快捷键列表中查找刎ͼcontent assistQ把它的快捷?ctrl + space Ҏ我们想的?alt + / 卛_了?br />
解决办法二:
 window->Preferences->Java->Editor->Content Assist->Advanced 
上面的选项卡Select the proposal kinds contained in the 'default' content assist list: 中把 Other Java Proposals 选项打上勑ְ可以了?

sun 2008-07-07 11:02 发表评论
]]>
weka学习Q安装和部vQ?/title><link>http://www.aygfsteel.com/honeybee/articles/193605.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Wed, 16 Apr 2008 16:15:00 GMT</pubDate><guid>http://www.aygfsteel.com/honeybee/articles/193605.html</guid><wfw:comment>http://www.aygfsteel.com/honeybee/comments/193605.html</wfw:comment><comments>http://www.aygfsteel.com/honeybee/articles/193605.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/honeybee/comments/commentRss/193605.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/honeybee/services/trackbacks/193605.html</trackback:ping><description><![CDATA[<p><span style="font-family: 宋体"><span style="font-size: 14pt"><span style="font-size: 12pt"> </p> <p style="background: white; margin: 6pt 0cm; text-indent: 21pt; line-height: 150%; text-align: left" align="left"><span style="line-height: 150%; font-family: 宋体">最q的工作重点是Web Data Mining, l过q一周的Paper学习后,对于Web日志的挖掘有了一些想法。下面就应该是尽快进行实c?/span></p> <p style="background: white; margin: 6pt 0cm; text-indent: 21pt; line-height: 150%; text-align: left" align="left"><span style="line-height: 150%; font-family: 宋体">于是Q今天利用晚上的旉Q成功安装了Weka(version 3.4.12)Q对于Weka的安装,׃Weka是一个数据挖掘YӞ当然需要和数据库进行连接,因此需要下载驱动,常用的及其支持的有:MySQL, HSQL Database, Mckoi SQL Database, RmiJdbc, 需要注意以下几点:</span></p> <p style="background: white; margin: 6pt 0cm; text-indent: 21pt; line-height: 150%; text-align: left" align="left"><span style="line-height: 150%; font-family: 宋体">一.正常情况下,要在CLASSPATHd上面下蝲的数据驱动jar包,但目前的问题是即使正添加,也会提示“Trying to add JDBC driver: ***Driver - Error, not in CLASSPATH?”{类似的语句Q我用的是WindowspȝQLinux有待于做实验认Q,所以徏议直接在命o行输入\径信息,如:java –Xmx128m –classpath "hsqldb.jar;mysql-connector-java-5.15.bin.jar;RmiJdbc.jar;mkjdbc.jar;weka.jar" weka.gui.GUIChooser Q注Q我这些数据驱动jia包放在了Weka安装目录下)</span></p> <p style="background: white; margin: 6pt 0cm; text-indent: 21pt; line-height: 150%; text-align: left" align="left"><span style="line-height: 150%; font-family: 宋体">?Weka(Version3.4.12)对于RmiJdbcQ一定选择版本2.5Q版?.3Q?.2Q?.05我下载后d依然提示Trying to add JDBC driver:</span><span style="line-height: 150%; font-family: 宋体">RmiJdbc.RJDriver - Error, not in CLASSPATH?</span><span style="line-height: 150%; font-family: 宋体">错误Q?.0版本同样也不行)Q对于Weka(version 3.5.5) 对于RmiJdbcQ一定选择版本3.05?.5?/span></p> </span></span></span> <p style="margin: 6pt 0cm 6pt 18pt; text-indent: -18pt; line-height: 150%; tab-stops: list 18.0pt"><span style="font-size: 10.5pt; line-height: 150%"><br /> </span><span style="font-size: 10.5pt; line-height: 150%"><span style="font-family: 宋体"><span style="font-size: 14pt"><span style="font-size: 12pt">下面是对于Weka学习的一个日E安排,以做备忘Q?br /> 1Q下载和安装Weka (4.16-4.21)<br /> 2Q按照参?a title="ppt" >ppt</a></span></span></span><span style="font-family: 宋体"><span style="font-size: 14pt"><span style="font-size: 12pt">提供的例子跑通clustering法Qƈ且了解它的各Ҏ?4.21-4.30) <br /> 3Q找个复杂的例子Q下载数据集<span lang="EN-US" style="font-size: 12pt; font-family: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><a >http://www.cs.waikato.ac.nz/ml/weka/index_datasets.html</a></span></span></span></span></a></a><span style="font-family: 宋体"><span style="font-size: 14pt"><span style="font-size: 12pt">Q跑通ƈ解释其数据意?5.1-5.6)<br /> 4Q把一个Clustering法改写成Hadoop代码q行在服务器?5.6-5.20)</span></span></span></span></p> <img src ="http://www.aygfsteel.com/honeybee/aggbug/193605.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/honeybee/" target="_blank">sun</a> 2008-04-17 00:15 <a href="http://www.aygfsteel.com/honeybee/articles/193605.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Paper Learning: Data-Intensive Supercomputing: The case for DISChttp://www.aygfsteel.com/honeybee/articles/191770.htmlsunsunThu, 10 Apr 2008 02:21:00 GMThttp://www.aygfsteel.com/honeybee/articles/191770.htmlhttp://www.aygfsteel.com/honeybee/comments/191770.htmlhttp://www.aygfsteel.com/honeybee/articles/191770.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/191770.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/191770.htmlRecently, I have been studying something on DISC, the inspiration for which comes from Google's success that have been used to support search over the worldwide web. According to learning Data-Intensive Supercomputing: The case for DISC, maybe we can turn the idea of constructing a Google's infrastructure like system into reality, that is DISC.

DISC can be developed as a prototype system of Google's instructure, we can divide it into two types of partitions: one for application development, and the other for system research.
For the program development partitions, we can use available software, such as the open source code from the Hadoop project, to implement the file system and support for application programming.

For the systems research partitions, we can create our own design, studying the different kinds of design patterns. (e.g.: high-end hardware, low-cost component).


The paper Data-Intensive Supercomputing: The case for DISC gives me an entire impression of a new form of high-performance computing facility, and there are many other aspects that deeply attract me, I've taken notes on this paper as follows:



阅读PaperQ?/span>

Data-Intensive Supercomputing: The case for DISC  

Randal E. Bryant  May 10, 2007 CMU-CS-07-128

 

QuestionQ?/span>How can university researchers demonstrate the credibility of their work without having comparable computing facilities available?

1 Background

Describe a new form of high-performance computing facility (Data-Intensive Super Computer) that places emphasis on data, rather than raw computation, as the core focus of the system.

The author inspiration for DISC: comes from the server infrastructures that have been developed to support search over the worldwide web.

This paper outlines the case for DISC as an important direction for large-scale computing systems.

1.1 Motivation

The common role in the computations:

Web search without language barriers. (No matter in which language they type the query)

Inferring biological function from genomic sequences.

Predicting and modeling the effects of earthquakes.

Discovering new astronomical phenomena from telescope imagery data.

Synthesizing realistic graphic animations.

Understanding the spatial and temporal patterns of brain behavior based on MRI data.


2 Data-Intensive Super Computing

Conventional (Current) supercomputers:

are evaluated largely on the number of arithmetic operations they can supply each second to the application programs.

Advantage: highly structured data requires large amounts of computation.

Disadvantage:

1. It creates misguided priorities in the way these machines are designed, programmed, and operated;

2. Disregarding the importance of incorporating computation-proximate, fast-access data storage, and at the same time creating machines that are very difficult to program effectively;

3. The range of computational styles is restricted by the system structure.

The key principles of DISC:

1.       Intrinsic, rather than extrinsic data.

2.       High-level programming models for expressing computations over the data.

3.       Interactive access.

4.       Scalable mechanisms to ensure high reliability and availability. (error detection and handling)



3 Comparison to Other Large-Scale Computer Systems

3.1 Current Supercomputers

3.2 Transaction Processing Systems

3.3 Grid Systems



4 Google: A DISC Case Study

1. The Google system actively maintains cached copies of every document it can find on the Internet.

The system constructs complex index structures, summarizing information about the documents in forms that enable rapid identification of the documents most relevant to a particular query.

When a user submits a query, the front end servers direct the query to one of the clusters, where several hundred processors work together to determine the best matching documents based on the index structures. The system then retrieves the documents from their cached locations, creates brief summaries of the documents, orders them with the most relevant documents first, and determines which sponsored links should be placed on the page.

2. The Google hardware design is based on a philosophy of using components that emphasize low cost and low power over raw speed and reliability. Google keeps the hardware as simple as possible.

They make extensive use of redundancy and software-based reliability.

These failed components are removed and replaced without turning the system off.

Google has significantly lower operating costs in terms of power consumption and human labor than do other data centers.

3. MapReduce, that supports powerful forms of computation performed in parallel over large amounts of data.

Two function: a map function that generates values and associated keys from each document, and a reduction function that describes how all the data matching each possible key should be combined.

MapReduce can be used to compute statistics about documents, to create the index structures used by the search engine, and to implement their PageRank algorithm for quantifying the relative importance of different web documents.

4. BigTable: a distributed data structures, provides capabilities similar to those seen in database systems.


5 Possible Usage Model

The DISC operations could include user-specified functions in the style of Google’s MapReduce programming framework. As with databases, different users will be given different authority over what operations can be performed and what modifications can be made.

 

6 Constructing a General-Purpose DISC System

The open source project Hadoop implements capabilities similar to the Google file system and support for MapReduce.

Constructing a General-Purpose DISC SystemQ?/span>

Hardware Design.

There are a wide range of choices;

We need to understand the tradeoffs between the different hardware configurations and how well the system performs on different applications.

Google has made a compelling case for sticking with low-end nodes for web search applications, and the Google approach requires much more complex system software to overcome the limited performance and reliability of the components. But it might not be the most cost-effective solution for a smaller operation when personnel costs are considered.

Programming Model.

1. One important software concept for scaling parallel computing beyond 100 or so processors is to incorporate error detection and recovery into the runtime system and to isolate programmers from both transient and permanent failures as much as possible.

Work on providing fault tolerance in a manner invisible to the application programmer started in the context of grid-style computing, but only with the advent of MapReduce and in recent work by Microsoft has it become recognized as an important capability for parallel systems.

2. We want programming models that dynamically adapt to the available resources and that perform well in a more asynchronous execution environment.

e.g.: Google’s implementation of MapReduce partitions a computation into a number of map and reduce tasks that are then scheduled dynamically onto a number of “worker” processors.

Resource Management.

Problem: how to manage the computing and storage resources of a DISC system.

We want it to be available in an interactive mode and yet able to handle very large-scale computing tasks.

Supporting Program Development.

Developing parallel programs is difficult, both in terms of correctness and to get good performance.

As a consequence, we must provide software development tools that allow correct programs to be written easily, while also enabling more detailed monitoring, analysis, and optimization of program performance.

System Software.

System software is required for a variety of tasks, including fault diagnosis and isolation, system resource control, and data migration and replication.

 

Google and its competitors provide an existence proof that DISC systems can be implemented using available technology. Some additional topics include:

How should the processors be designed for use in cluster machines?

How can we effectively support different scientific communities in their data management and applications?

Can we radically reduce the energy requirements for large-scale systems?

How do we build large-scale computing systems with an appropriate balance of performance and cost?

How can very large systems be constructed given the realities of component failures and repair times?

Can we support a mix of computationally intensive jobs with ones requiring interactive response?

How do we control access to the system while enabling sharing?

Can we deal with bad or unavailable data in a systematic way?

Can high performance systems be built from heterogenous components?


7 Turning Ideas into Reality

7.1 Developing a Prototype System

Operate two types of partitions: some for application development, focusing on gaining experience with the different programming techniques, and others for systems research, studying fundamental issues in system design.

For the program development partitions:

Use available software, such as the open source code from the Hadoop project, to implement the file system and support for application programming.

For the systems research partitions:

Create our own design, studying the different layers of hardware and system software required to get high performance and reliability. (e.g.: high-end hardware, low-cost component)

7.2 Jump Starting

Begin application development by renting much of the required computing infrastructure:

1. network-accessible storage: Simple Storage System (S3) service

2. computing cycles: Elastic Computing Cloud (EC2) service

(The current pricing for storage is $0.15 per gigabyte per day ($1,000 per terabyte per year), with addition costs for reading or writing the data. Computing cycles cost $0.10 per CPU hour ($877 per year) on a virtual Linux machine.)

Renting problems:

1. The performance of such a configuration is much less than that of a dedicated facility.

2. There is no way to ensure that the S3 data and the EC2 processors will be in close enough proximity to provide high speed access.

3. We would lose the opportunity to design, evaluate, and refine our own system.

7.3 Scaling Up


8 Conclusion

1. We believe that DISC systems could change the face of scientific research worldwide.

2. DISC will help realize the potential all these data such as the combination of sensors and networks to collect data, inexpensive disks to store data, and the benefits derived by analyzing data provides.

 



sun 2008-04-10 10:21 发表评论
]]>
DISC(Data Intensive Super Computing 数据密集型超U计?http://www.aygfsteel.com/honeybee/articles/190844.htmlsunsunFri, 04 Apr 2008 15:43:00 GMThttp://www.aygfsteel.com/honeybee/articles/190844.htmlhttp://www.aygfsteel.com/honeybee/comments/190844.htmlhttp://www.aygfsteel.com/honeybee/articles/190844.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/190844.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/190844.htmlData Intensive System(DIS)

System ChallengesQ?/span>

Data distributed over many disks

Compute using many processors

Connected by gigabit Ethernet (or equivalent)

System Requirements:

Lots of disks

Lots of processors

Located in close proximity

System Comparison:

(i)                Data

Conventional  Supercomputers

DISC

Data stored in separate repository

No support for collection or management

Brought into system for computation

Time consuming

Limits interactivity

System collects and maintains data

Shared, active data set

Computation colocated with storage

Faster access

(ii)              Programing Models

Conventional  Supercomputers

DISC

Programs described at very low level

Specify detailed control of processing & communications

Rely on small number of software packages

Written by specialists

Limits classes of problems & solution methods

Application programs written in terms of high-level operations on data

Runtime system controls scheduling, load balancing, …

(iii)            Interaction

Conventional  Supercomputers

DISC

Main Machine: Batch Access

Priority is to conserve machine resources

User submits job with specific resource requirements

Run in batch mode when resources available

Offline Visualization

Move results to separate facility for interactive use

Interactive Access

Priority is to conserve human resources

User action can range from simple query to complex computation

System supports many simultaneous users

Requires flexible programming and runtime environment

(iv)             Reliability

Conventional  Supercomputers

DISC

“Brittle” Systems

Main recovery mechanism is to recompute from most recent checkpoint

Must bring down system for diagnosis, repair, or upgrades

Flexible Error Detection and Recovery

Runtime system detects and diagnoses errors

Selective use of redundancy and dynamic recomputation

Replace or upgrade components while system running

Requires flexible programming model & runtime environment

Comparing with Grid Computing:

Grid: Distribute Computing and Data

(i)                   Computation: Distribute problem across many machines

Generally only those with easy partitioning into independent subproblems

(ii)                 Data: Support shared access to large-scale data set

DISC: Centralize Computing and Data

(i)                   Enables more demanding computational tasks

(ii)                 Reduces time required to get data to machines

(iii)                Enables more flexible resource management

A Commercial DISC

Netezza Performance Server (NPS)

Designed for “data warehouse” applications

Heavy duty analysis of database

Data distributed over up to 500 Snippet Processing Units

Disk storage, dedicated processor, FPGA controller

User “programs” expressed in SQL

Constructing DISC

Hardware: Rent from Amazon

Elastic Compute Cloud (EC2)

Generic Linux cycles for $0.10 / hour ($877 / yr)

Simple Storage Service (S3)

Network-accessible storage for $0.15 / GB / month ($1800/TB/yr)

Software: utilize open source

Hadoop Project

Open source project providing file system and MapReduce

Supported and used by Yahoo

Implementing System Software

Programming Support

Abstractions for computation & data representation

E.g., Google: MapReduce & BigTable

Usage models

Runtime Support

Allocating processing and storage

Scheduling multiple users

Implementing programming model

Error Handling

Detecting errors

Dynamic recovery

Identifying failed components



sun 2008-04-04 23:43 发表评论
]]>
junit试http://www.aygfsteel.com/honeybee/articles/184435.htmlsunsunFri, 07 Mar 2008 03:04:00 GMThttp://www.aygfsteel.com/honeybee/articles/184435.htmlhttp://www.aygfsteel.com/honeybee/comments/184435.htmlhttp://www.aygfsteel.com/honeybee/articles/184435.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/184435.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/184435.html一. JUnit试结
1.单元试的编写原?br /> 三个M目标Q第一个是化测试的~写Q这U简化包括测试框架的学习和实际测试单元的~写Q第二个是ɋ试单元保持持久性;W三个则是可以利用既有的试来编写相关的试?br /> 2. 如何定单元试
一个单元测试基本是以一个对象的明确Ҏؓ基础Q单元测试的q程应该限定在一个明的U程范围内?br /> Z定一个系l最l的行ؓW合我们起始的要求,我们首先需要保证系l内的各个部分的状态会W合我们的设计要求,所以我们的试单元的重点应该放在确定对象的状态变换上?br /> 应该在有可能引入错误的地方引入测试单元,通常q些地方存在于有特定边界条g、复杂算法以及需求变动比较频J的代码逻辑中。除了这些特性需要被~写成独立的试单元外,q有一些边界条件比较复杂的对象Ҏ也应该被~写成独立的试单元Q这部分单元试已经在Junit文档中被较好的描q和解释q了?br /> 3. 如何~写单元试

?  junit中的assertҎ全部攑֜AssertcMQȝ一下junitcMassertҎ的分cR?br /> 1.assertTrue/False([String message,]boolean condition);
    判断一个条件是trueq是false。用途最qѝ?br /> 2.fail([String message,]);
    p|Q可以有消息Q也可以没有消息?br /> 3.assertEquals([String message,]Object expected,Object actual);
    判断是否相等Q可以指定输出错误信息?br />     W一个参数是期望|W二个参数是实际的倹{?br />     q个Ҏ对各个变量有多种实现。在JDK1.5中基本一栗?br /> 4.assertNotNull/Null([String message,]Object obj);
    判读一个对象是否非I?非空)?br /> 5.assertSame/NotSame([String message,]Object expected,Object actual);
    判断两个对象是否指向同一个对象。看内存地址?br /> 6.failNotSame/failNotEquals(String message, Object expected, Object actual)
    当不指向同一个内存地址或者不相等的时候,输出错误信息?br />     注意信息是必ȝQ而且q个输出是格式化q的?br />

 



sun 2008-03-07 11:04 发表评论
]]>
volatile用法http://www.aygfsteel.com/honeybee/articles/182229.htmlsunsunTue, 26 Feb 2008 07:37:00 GMThttp://www.aygfsteel.com/honeybee/articles/182229.htmlhttp://www.aygfsteel.com/honeybee/comments/182229.htmlhttp://www.aygfsteel.com/honeybee/articles/182229.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/182229.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/182229.html
1、中断服务程序中修改的供其它E序的变量需要加volatile;

2、多d环境下各d间共享的标志应该加volatile;

3、存储器映射的硬件寄存器通常也要加volatile说明,因ؓ每次对它的读写都可能׃同意?


sun 2008-02-26 15:37 发表评论
]]>
我的d感二Q架构如此,人生亦如此!http://www.aygfsteel.com/honeybee/articles/181449.htmlsunsunFri, 22 Feb 2008 08:47:00 GMThttp://www.aygfsteel.com/honeybee/articles/181449.htmlhttp://www.aygfsteel.com/honeybee/comments/181449.htmlhttp://www.aygfsteel.com/honeybee/articles/181449.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/181449.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/181449.html    用了q一周的旉认真M作者Roy Thomas Fielding的博士论文《Architectural Styles and the Design of Network-based Software Architectures》,虽然要完整读完这长?80余页的Paperq需要一C天的旉Q但Roy Thomas Fielding博士对于|络的架构思想及他的REST架构深深地吸引着我?br />      对于q篇论文的论qͼ思\上,从简单的Software Architecture谈vQ逐渐深入到基于网l的architectures, properties,styles{,最后提ZREST架构风格Q对于每个部分的阐述Q方法上Q从最单的模型说vQ逐步深入直至引出一个完整而综合的模型。何谓简单的模型Q我觉得Q是一U?null styled and constrainted model。何谓复杂的模型或者说是架构风|我觉得,是一U?architectural style consisting of the set of constraints applied to elements within the architecture。不隑֏玎ͼ从简单过渡到复杂的关键点?#8220;constraints”。其实,在做架构Ӟ道理很简单——首先考虑的是大方向,l自׃个概念上的目标,得到一个初U的模型Q然后在此基上,l合自己的学习、前人的l验Q进而考虑U种U束、细节极现实情况Q力争设计出一个具有Performance, Scalability, Simplicity, Modifiability, Visibility, Reliability and etc.的系l。道理虽然简单,问题在于qx的学习中Q我是否主观的思考过Q推而广之,对于生活的态度Qh生的认识Q道理是否也是一样呢Q?br />       其实Q架构如此,人生亦如此!
 
      对于q篇论文Q我认ؓQ它不单U是一学位论文,因ؓ作者的写作手法Q写作语a真的值得我学习,如,对于架构的方法,作者从derivation tree的角度类比阐qͼ形象而生动,我想QRoy Thomas Fielding的博士论文ؓ我今后写论文帮助很大?br />      另外Q本论文的知识量很大,仅从一文章便可以学到很多知识Q如常见的架构风|架构x的特性,互联|很多协议的产生及发展等{,待完整读完后Q我会收h多!
     世界著名架构大师QUC Berkeley教授Christopher Alexander说过下面一D话—?br />      "Each one of us has, somewhere in his heart, the dream to make a living world, a universe. Those of us who have been trained as architects have this desire perhaps at the very center of our lives: that one day, somewhere, somehow, we shall build one building which is wonderful, beautiful, breathtaking, a place where people can walk and dream for centuries."
     我很喜欢q段话,在此我把它翻译过来,我想Q它对与我,是一个长期不便的目标Q是一股持之以恒的力量Q更是一U恒定不变的信念Q?br />     “我们每个人,在内心深处都怀有一个梦惻I梦想d造一个鲜zȝ世界与宇宙。那些或许处在我们生zȝ中心、被训练作ؓ架构师的ZQ都拥有者一个?渴望某一天,在某个地方,因某U原因,架构Z座不可思议的、美丽的、o人心动的建筑Q在那里Qh们可以行赎ͼ可以梦想Q历l数癑ֹ依然傲然挺拔?#8221;-- by Christopher Alexander



sun 2008-02-22 16:47 发表评论
]]>
Representational State Transfer (REST)http://www.aygfsteel.com/honeybee/articles/181079.htmlsunsunThu, 21 Feb 2008 07:42:00 GMThttp://www.aygfsteel.com/honeybee/articles/181079.htmlhttp://www.aygfsteel.com/honeybee/comments/181079.htmlhttp://www.aygfsteel.com/honeybee/articles/181079.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/181079.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/181079.htmlRepresentational State Transfer (REST)

5.1 Deriving REST

5.1.1 Starting with the Null Style

Two common perspectives on the process of architectural design:

The first is that a designer starts with nothing—a blank slate, whiteboard, or drawing board—and builds-up an architecture from familiar components until it satisfies the needs of the intended system.

The second is that a designer starts with the system needs as a whole, without constraints, and then incrementally identifies and applies constraints to elements of the system in order to differentiate the design space and allow the forces that influence system behavior to flow naturally, in harmony with the system.

REST is based on the latter process.

The following eight sections depict how the applied constraints would differentiate the process view of an architecture as the incremental set of constraints is applied.

From the Null style (Figure 5-1) is simply an empty set of constraints. It is the starting point for our description of REST.

5.1.2 Client-Server

From the client-server architectural style (Figure 5-2)

Separation of concerns is the principle behind the client-server constraints. Perhaps most significant to the Web is that the separation allows the components to evolve independently, thus supporting the Internet-scale requirement of multiple organizational domains.

5.1.3 Stateless

From the client-stateless-server (CSS) style (Figure 5-3)

Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server.

Session state is kept entirely on the client.

Advantage: ease the pressure of Sever.

Disadvantage: decrease network performance by increasing the repetitive data in a series of requests in clients.

5.1.4 Cache

From the client-cache-stateless-server style (Figure 5-4).

Requiring: a response is implicitly or explicitly labeled as cacheable or noncacheable.

Advantage: eliminate some interactions.

Disadvantage: decrease reliability if state data within the cache differs significantly from the data that would have been sent directly to the server.

5.1.5 Uniform Interface

The central feature that distinguishes the REST architectural style from other network-based styles is its emphasis on a uniform interface between components (Figure 5-6).

The REST interface is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web.

REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state.

5.1.6 Layered System

From layered system constraints (Figure 5-7).

The layered system style allows an architecture to be composed of hierarchical layers by constraining component behavior such that each component cannot “see” beyond the immediate layer with which they are interacting.

5.1.7 Code-On-Demand

From the code-on-demand style (Figure 5-8).

REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This simplifies clients by reducing the number of features required to be pre-implemented. Allowing features to be downloaded after deployment improves system extensibility.

5.1.8 Style Derivation Summary

Figure 5-9 depicts the derivation of REST’s constraints graphically in terms of the network-based architectural styles examined in Chapter 3.

5.2 REST Architectural Elements

5.2.1 Data Elements

The nature and state of an architecture’s data elements is a key aspect of REST.

Three fundamental options: 1) render the data where it is located and send a fixed-format image to the recipient; 2) encapsulate the data with a rendering engine and send both to the recipient; or, 3) send the raw data to the recipient along with metadata that describes the data type, so that the recipient can choose their own rendering engine.

5.2.2 Connectors

5.2.3 Components

代理和网关之间的区别是,何时使用代理是由客户端来军_?/span>

5.3 REST Architectural Views
5.3.1 Process View
5.3.2 Connector View
5.3.3 Data View



sun 2008-02-21 15:42 发表评论
]]>
Designing the Web Architecture: Problems and Insightshttp://www.aygfsteel.com/honeybee/articles/180790.htmlsunsunWed, 20 Feb 2008 03:29:00 GMThttp://www.aygfsteel.com/honeybee/articles/180790.htmlhttp://www.aygfsteel.com/honeybee/comments/180790.htmlhttp://www.aygfsteel.com/honeybee/articles/180790.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/180790.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/180790.htmlDesigning the Web Architecture: Problems and Insights

4.1 WWW Application Domain Requirements

4.1.1 Low Entry-barrier

1. Since participation in the creation and structuring of information was voluntary, a low entry-barrier was necessary to enable sufficient adoption. This applied to all users of the Web architecture: readers, authors, and application developers.

2. Simplicity was also a goal for the sake of application developers.

4.1.2 Extensibility

Extensibility: A system intending to be as long-lived as the Web must be prepared for change.

4.1.3 Distributed Hypermedia

1. The usability of hypermedia interaction is highly sensitive to user-perceived latency: the time between selecting a link and the rendering of a usable result.

2. The architecture needs to minimize network interactions.

4.1.4 Internet-scale

1. The Internet is about interconnecting information networks across multiple organizational boundaries.

2. Suppliers of information services must be able to cope with the demands of anarchic scalability and the independent deployment of software components.

4.1.4.1 Anarchic Scalability

1. Anarchic scalability refers to the need for architectural elements to continue operating when they are subjected to an unanticipated load, or when given malformed or maliciously constructed data, since they may be communicating with elements outside their organizational control.

2. The anarchic scalability requirement applies to all architectural elements.

3. Security of the architectural elements, and the platforms on which they operate, also becomes a significant concern.

4.1.4.2 Independent Deployment

4.2 Problem

4.3 Approach

The first step, is to identify the constraints placed within the early Web architecture that are responsible for its desirable properties.

Hypothesis I: The design rationale behind the WWW architecture can be described by an architectural style consisting of the set of constraints applied to the elements within the Web architecture.

The next step, is to identify the properties desirable in an Internet-scale distributed hypermedia system, select additional architectural styles that induce those properties, and combine them with the early Web constraints to form a new, hybrid architectural style for the modern Web architecture.

Hypothesis II: Constraints can be added to the WWW architectural style to derive a new hybrid style that better reflects the desired properties of a modern Web architecture.

The third step, is to use the new architectural style as a guide, we can compare proposed extensions and modifications to the Web architecture against the constraints within the style.

Hypothesis III: Proposals to modify the Web architecture can be compared to the updated WWW architectural style and analyzed for conflicts prior to deployment.

This approach as a single sequence, it is actually applied in a non-sequential, iterative fashion.

4.4 Summary

My approach is to use an architectural style to define and improve the design rationale behind the Web’s architecture, to use that style as the acid test for proving proposed extensions prior to their deployment, and to deploy the revised architecture via direct involvement in the software development projects that have created the Web’s infrastructure.



sun 2008-02-20 11:29 发表评论
]]>
Network-based Architectural Styleshttp://www.aygfsteel.com/honeybee/articles/180608.htmlsunsunTue, 19 Feb 2008 02:50:00 GMThttp://www.aygfsteel.com/honeybee/articles/180608.htmlhttp://www.aygfsteel.com/honeybee/comments/180608.htmlhttp://www.aygfsteel.com/honeybee/articles/180608.html#Feedback0http://www.aygfsteel.com/honeybee/comments/commentRss/180608.htmlhttp://www.aygfsteel.com/honeybee/services/trackbacks/180608.htmlNetwork-based Architectural Styles

3.1 Classification Methodology

In order to provide useful design guidance, a classification of architectural styles should be based on the architectural properties induced by those styles.

3.1.1 Selection of Architectural Styles for Classification

3.1.2 Style-induced Architectural Properties

3.1.3 Visualization

3.2 Data-flow Styles

3.2.1 Pipe and Filter (PF)

Description: In a pipe and filter style, each component (filter) reads streams of data on its inputs and produces streams of data on its outputs, usually while applying a transformation to the input streams and processing them incrementally so that output begins before the input is completely consumed.

Characteristic:

1. One-way data flow network;

2. Zero coupling: a filter must be completely independent of other filters.

Advantage: (by Garlan and Shaw)

1. Simplicity: PF allows the designer to understand the overall input/output of the system as a simple composition of the behaviors of the individual filters.

2. Reusability: any two filters can be hooked together, provided they agree on the data that is being transmitted between them.

3. Extensibility and evolvability: new filters can be added to existing systems (extensibility) and old filters can be replaced by improved ones (evolvability).

4. Verifiability: they permit certain kinds of specialized analysis.

5. User-perceived performance: they naturally support concurrent execution.

6. Configurability: a network of filters is typically arranged just prior to each activation, allowing the application to specify the configuration of filter components based on the task at hand and the nature of the data streams.

Disadvantage:

1. Propagation delay: propagation delay is added through long pipelines;

2. Batch sequential processing occurs if a filter cannot incrementally process its inputs, and no interactivity is allowed.

3. A filter cannot interact with its environment: because it cannot know that any particular output stream shares a controller with any particular input stream.

4. User-perceived performance: these properties decrease user-perceived performance if the problem being addressed does not fit the pattern of a data flow stream.

3.2.2 Uniform Pipe and Filter (UPF)

Characteristic: the uniform pipe and filter style adds the constraint that all filters must have the same interface.

Advantage:

Example: Unix operating system, where filter processes have an interface consisting of one input data stream of characters (stdin) and two output data streams of characters (stdout and stderr).

1. Restricting the interface allows independently developed filters to be arranged at will to form new applications.

2. It also simplifies the task of understanding how a given filter works.

Disadvantage:

It may reduce network performance if the data needs to be converted to or from its natural format.

3.3 Replication Styles

3.3.1 Replicated Repository (RR)

Example: (1) distributed filesystems, such as XMS, and, (2) remote versioning systems, like CVS [www.cyclic.com].

Advantage: Improved user-perceived performance, both by reducing the latency of normal requests and enabling disconnected operation in the face of primary server failure or intentional roaming off the network(U下漫游).

Concern: Maintaining consistency is the primary concern.

3.3.2 Cache ($)

This form of replication is most often found in cases (1) where the potential data set far exceeds the capacity of any one client, as in the WWW, or (2) where complete access to the repository is unnecessary.

Advantage:caching is much easier to implement, doesn’t require as much processing and storage, and is more efficient because data is transmitted only when it is requested.

A typical network-based architectural style: client-stateless-server style (rest rationale).

3.4 Hierarchical Styles

3.4.1 Client-Server (CS)

Description:

1. A server component: offering a set of services, listens for requests upon those services.

A client component: desiring that a service be performed, sends a request to the server via a connector.

2. by Andrews:

A client is a triggering process;

A server is a reactive process.

Clients make requests that trigger reactions from servers.

A server is usually a non-terminating process and often provides service to more than one client.

Principle:Separation of concerns.

Simplify the server component in order to improve scalability.

Method: moving all of the user interface functionality into the client component.

The partition between C and S components: It is often referred to by the mechanisms used for the connector implementation, such as remote procedure call or message-oriented middleware.

3.4.2 Layered System (LS) and Layered-Client-Server (LCS)

Layered System:

1. A layered system is organized hierarchically, each layer providing services to the layer above it and using services of the layer below it.

2.Layered systems reduce coupling across multiple layers by hiding the inner layers from all except the adjacent outer layer. In all, in multiple layers, every layer only couples the adjacent outer layer, thus improving evolvability and reusability (e.g., TCP/IP and OSI protocol stacks, and hardware interface libraries).

3. Disadvantage:layered systems add overhead and latency to the processing of data, reducing user-perceived performance.

Layered-Client-Server:

Layered-client-server adds proxy and gateway components to the client-server style.

Client -> Proxy -> Gateway -> Server

A proxy acts as a shared server for one or more client components, taking requests and forwarding them, with possible translation, to server components.

A gateway component appears to be a normal server to clients or proxies that request its services, but is in fact forwarding those requests, with possible translation, to its “inner-layer” servers.

3.4.3 Client-Stateless-Server (CSS)

Characteristic: no session stateis allowed on the server component.

Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is kept entirely on the client.

Advantage: visibility, reliability, and scalability.

Disadvantage:it may decrease network performance by increasing the repetitive data (per-interaction overhead) sent in a series of requests, since that data cannot be left on the server in a shared context.

3.4.4 Client-Cache-Stateless-Server (C$SS)

Characteristic: the client-cache-stateless-server style derives from the client-stateless-server and cache styles via the addition of cache components.

Description: A cache acts as a mediator between client and server in which the responses to prior requests can, if they are considered cacheable, be reused in response to later requests that are equivalent.

Example: an example system that makes effective use of this style is Sun Microsystems’ NFS.

Advantage: cache components have the potential to partially or completely eliminate some interactions, improving efficiency and user-perceived performance.

3.4.5 Layered-Client-Cache-Stateless-Server (LC$SS)

Characteristic: the layered-client-cache-stateless-server style derives from both layered-client-server and client-cache-stateless-server through the addition of proxy and/or gateway components.

Example: an example system that uses an LC$SS style is the Internet domain name system (DNS).

3.4.6 Remote Session (RS)

Characteristic: minimize the complexity, or maximize the reuse of the client components,andthe application state on server.

Description: each client initiates a session on the server and then invokes a series of services on the server, finally exiting the session. Application state is kept entirely on the server.

Example: when it is desired to access a remote service using a generic client (e.g., TELNET) or via an interface that mimics a generic client (e.g., FTP).

Advantage: (1) easier to centrally maintain the interface at the server, (2) reducing concerns about inconsistencies in deployed clients, and (3) improves efficiency if the interactions make use of extended session context on the server.

Disadvantage:(1) reduces scalability of the server, due to the stored application state, and, (2) reduces visibility of interactions, since a monitor would have to know the complete state of the server.

3.4.7 Remote Data Access (RDA)

Characteristic: the remote data access style is a variant of client-server that spreads the application state across both client and server.

Description: a client sends a database query in a standard format, such as SQL, to a remote server. The server allocates a workspace and performs the query,which may result in a very large data set. The client must know about the data structure of the service to build structure-dependent queries.

Advantage:

Eficiency: a large data set can be iteratively reduced on the server side without transmitting it across the network.

Visibility: is improved by using a standard query language.

Disadvantage:

Lacking simplicity: the client needs to understand the same database manipulation concepts as the server implementation

Decreases scalability: storing application context on the server decreases scalability.

Suffered reliability: partial failure can leave the workspace in an unknown state.

3.5 Mobile Code Styles

3.6 Peer-to-Peer Styles

3.7 Limitations

3.8 Related Work



sun 2008-02-19 10:50 发表评论
]]>
վ֩ģ壺 »| «| Ƹ| | ޭ| | | ɽ| | | | | | | ˫| | | | | ֯| | Ӽ| Ǩ| | ں| | | ɫ| | | | | ̩| ½| ɳ| | | | ԭ| ĺ| ʦ|