SIGMOD: ACM SIGMOD Conf on Management of Data PODS: ACM SIGMOD Conf on Principles of DB Systems VLDB: Very Large Data Bases ICDE: Intl Conf on Data Engineering
CIKM: Intl. Conf on Information and Knowledge Management ICDT: Intl Conf on Database Theory
Rank 2:
SSD: Intl Symp on Large Spatial Databases DEXA: Database and Expert System Applications FODO: Intl Conf on Foundation on Data Organization EDBT: Extending DB Technology DOOD: Deductive and Object-Oriented Databases DASFAA: Database Systems for Advanced Applications SSDBM: Intl Conf on Scientific and Statistical DB Mgmt CoopIS - Conference on Cooperative Information Systems ER - Intl Conf on Conceptual Modeling (ER) 參考 http://www3.ntu.edu.sg/home/assourav/crank.htm
SSD: Intl Symp on Large Spatial Databases DEXA: Database and Expert System Applications FODO: Intl Conf on Foundation on Data Organization EDBT: Extending DB Technology DOOD: Deductive and Object-Oriented Databases DASFAA: Database Systems for Advanced Applications SSDBM: Intl Conf on Scientific and Statistical DB Mgmt CoopIS - Conference on Cooperative Information Systems ER - Intl Conf on Conceptual Modeling (ER)
參考 http://www3.ntu.edu.sg/home/assourav/crank.htm
//*******************The Log classimport java.io.BufferedWriter;import java.io.File;import java.io.FileWriter;import java.io.IOException;import java.uitl.Date;import java.text.DateFormat;
public class Log{ private static final String filePath = PropertyReader.getResource("Log_File_Path");//Supposing we have define in the last ProperyReader class and the file public static final String EXCEPTION = "Exception"; public static final String CREATE_STAFF = "Create Staff"; public static final String EDIT_STAFF = "Edit Staff"; public static final String DELETE_STAFF = "Delete Staff"; public static final String RECORD_HAS_EXIST = "Record Has Exist";
public static void log(String msg_type, Exception e){ StringBuffer errMsg = new StringBuffer(e.toString); for(int i=0;i<e.getStackTrace().length;i++){ errMsg.append("\n\t at"); errMsg.append(e.getStackTrace()[i].toString); } log(msg_type,errMsg.toString()); OptionPanel.showErrMsg("Sorry,System may have an error \n System will exit"); System.exit(-1); }
public static void log(String msg.type,Staff staff){ String msg = null; if(msg_type == CREATE_STAFF){ msg = staff.toString() + "has benn created"; }else if(msg_type == EDIT_STAFF){ msg = staff.toString() + "has been Changed"; }else if(msg_type == DELETE_STAFF){ msg = staff.toString() + "has been Deleted"; }else if(msg_type == RECORD_HAS_EXIST){ msg = staff.toString() + "has exist in the database"; } log(msg_type,msg); }
private static void log(String msg_type,String msg){ BufferedWriter out = null; DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); try{ out = new BufferedWriter(new FileWriter(getLogFilePath(),true));//如果為 true,則將字節(jié)寫入文件末尾處,而不是寫入文件開始處 out.write("["+df.format(new Date()) + "] <" + msg_type + "> :" + msg); out.newline(); out.newline(); }catch(IOException e){ e.printStackTrace(); }finally{ try{ if(out!=null){ out.close(); } }catch(IOException e){ e.printStackTrace(); } } }
private static String getLogFilePath(){ File logDir = new File(filePath); if(!logDir.exists()){ logDir.mkdir(); } int i = 1; String fileName = filePath + "log_"; File file = new File(fileName + i + ".txt"); while(file.exists() && file.length() > 30000L) { i++; file = new File(fileName + i + ".txt"); } return fileName + i + ".txt" }}
//*****************************The OptionPanel Dialog Class for the Log Classimport javax.swing.JOptionPane;
public class OptionPanel { private static final String appTitle = PropertyReader.getResource("App_Title");//suposing the file has been established and the property app-title stands for the name of application private static final MainFrame frame = MainFrame.getMainFrame();
public static void showWarningMsg(String msg){ JOptionPane.showMessageDialog(frame,msg,appTitle,JOptionPane.WARNING_MESSAGE); } public static void showErrMsg(String msg){ JOptionPane.showMessageDialog(frame,msg,appTitle,JOptionPane.Error_MESSAGE); } public static int showConfirmMsg(String msg){ return JOptionPane.showConfirmDialog(frame,msg,appTitle,JOptionPane.YES_NO_OPTON,JOptionPane.QUESTION_MESSAGE); }}
In a project, we can write a class to read the properties.As following,import java.io.InputStream;import java.io.IOException;import java.util.Properties;
public class PropertyReader{ private static Properties property = null; static{ InputSteam stream = null; try{ stream=PropertyReader.class.getResourceAsStream("/resource/properties.properties"); property = new Properties(); property.load(stream); }catch(IOException e){ e.printStackTrace(); }finally{ if(stream != null){ try{ stream.close(); }catch(IOException e){ e.printStackTrace(); } } } } public static String getResource(String key){ if(property == null){ return null;// init error; } return property.getProperty(key); }}
<1>Module Usually,in enterprise software,it presents the logic of the commercial bean.To the SE Swing GUI,it contains data and the rules that govern access to and updates of this data. <2>View It specifies exactly how the module data should be presented,changing with the model data.<3>Controller Controller defines all the methods connecting to the user action which are called by the View.
Most developers have heard of, and possibly used, scripting languages such as Ruby, JavaScript, and Python. These dynamic languages are enjoying a resurgence in popularity, largely because of their flexibility and simplicity, and the productivity gains they promise.
Java 6 comes with built-in support for scripting languages. You can embed scripts in various scripting languages into your Java applications, passing parameters, evaluating expressions, and retrieving results. And you can do it all pretty seamlessly.
First of all, you obtain a new ScriptEngine object from a ScriptEngineManager, as shown here:
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");
Each scripting language has its own unique identifier. The "js" here means you're dealing with JavaScript.
Now you can start having some fun. Interacting with a script is easy and intuitive. You can assign scripting variables using the put() method and evaluate the script using the eval() method,. which returns the most recently evaluated expression processed by the script. And that pretty much covers the essentials. Here's an example that puts it all together:
engine.put("cost", 1000);String decision = (String) engine.eval("if ( cost >= 100){ " +"decision = 'Ask the boss'; " +"} else {" +"decision = 'Buy it'; " +"}");assert ("Ask the boss".equals(decision));
You can do more than just pass variables to your scripts— you can also invoke Java classes from within your scripts. Using the importPackage() function enables you to import Java packages, as shown here:
engine.eval("importPackage(java.util); " + "today = new Date(); " + "print('Today is ' + today);");
Another cool feature is the Invocable interface, which lets you invoke a function by name within a script. This lets you write libraries in scripting languages, which you can use by calling key functions from your Java application. You just pass the name of the function you want to call, an array of Objects for the parameters, and you're done! Here's an example:
engine.eval("function calculateInsurancePremium(age) {...}"); Invocable invocable = (Invocable) engine; Object result = invocable.invokeFunction("calculateInsurancePremium", new Object[] {37});
You actually can do a fair bit more than what I've shown here. For example, you can pass a Reader object to the eval() method, which makes it easy to store scripts in external files, or bind several Java objects to JavaScript variables using a Map-like Binding object. You can also compile some scripting languages to speed up processing. But you probably get the idea that the integration with Java is smooth and well thought-out.
前幾天好不容易下到了JDK6mustang,今天恰好有時間升級了一下Netbeans默認的JDK版本。這里簡單的說明一下升級的方法。如果我 們不修改Netbeans的屬性,需要在JavaPlatform manager中加入另一版本的類庫。新建工程后如果要修改類庫,還需要修改項目的類庫屬性,現(xiàn)在通過修改默認的JDK類庫,便可方便很多,更不需要重新 安裝NB。
我的NB裝在D盤中,可以在該路徑找到文件D:\Netbeans-5.5\etc\Netbeans.conf,我們將原有的默認類庫netbeans_jdkhome="D:\Java\jdk1.5.0_07"修改為 netbeans_jdkhome="D:\Java\jdk1.6.0"便輕松的完成了升級,當然在tools-〉JavaPlatform manager〉中當然也可以將我們慣用的D:\Java\jdk1.5.0_07加入為可選用類庫。
第三步,輸入啟動類。輸入帶有 main 方法的類名
表格 A: 字符匹配
操作
解釋
例子
結果
.
單個字符匹配
.ord
匹配 “ford”, “lord”, “2ord”,
[ ]
多個字符列表
[cng]
只會匹配 “cord”, “nord”, 和 “gord”
[^ ]
不出現(xiàn)字符列表
[^cn]
匹配 “lord”, “2ord”, 等. 但不會匹配 “cord” or “nord”
[a-zA-Z]
匹配 “aord”, “bord”, “Aord”, “Bord”等
[^0-9]
匹配 “Aord”, “aord”, 等. 但不會匹配“2ord”, 等.
表格 B: 重復操作符
?
匹配0次或1次
“?erd”
匹配 “berd”, “herd”“erd”等
*
匹配0次以上
“n*rd”
匹配 “nerd”, “nrd”, “neard”, 等.
+
匹配1次以上
“[n]+erd”
匹配 “nerd”, “nnerd”, 等., 但不匹配 “erd”
{n}
匹配n次
“[a-z]{2}erd”
匹配“cherd”, “blerd”, 等. 但不匹配 “nerd”, “erd”, “buzzerd”, 等.
{n,}
匹配n次以上
“.{2,}erd”
匹配 “cherd” and “buzzerd”, but not “nerd”
{n,N}
匹配n-N次
“n[e]{1,2}rd”
匹配 “nerd” and “neerd”等
October 20, 2006 - Anyone who believes college students today are lacking in initiative, creativity, or work ethic should take a close look at the recent accomplishments of a team of students at the Ecole de Technologie Superieure (ETS) in Montreal, Quebec. Over the past three years, this team of 12 has been heads-down working on the mechanical design, electrical system, and Java™ control and navigation software for an AUV—a submarine—and preparing it for the International Autonomous Underwater Competition sponsored by the Association for Unmanned Vehicles Systems International (AUVSI) and the Office of Naval Research (ONR) in San Diego, California.
For no college credits, no pay, and no guarantee of success, the ETS team designed and built an AUV that could meet the complex and demanding mission requirements of the competition. Detailed in an 18-page document, these requirements included the ability to autonomously pass through a gate, detect a flashing light, find and connect with a docking station, locate a pipe and drop material into a bin—all underwater and with no communication with the team.
The submarine is called SONIA, which stands for Système d’Opérations Nautiques Intelligent et Autonome, and is just over one meter long, with a dry weight of 20 kg and a unique box-shaped design. It is equipped with sensors and two color video cameras. Navigation data input is provided by a compass and two gyroscopes as well as active and passive sonar arrays.
SONIA outperformed all but two of the 21 entries in the student competition, securing a place for ETS on the podium for a fourth year in a row. With an overall budget of just $15,000 U.S. (provided by ETS and a variety of corporate sponsors), the ETS team scored higher than teams with six-figure budgets. The competition was won by the University of Florida, but the ETS team came out ahead of renowned engineering schools such as MIT, Georgia Tech, and Virginia Tech.
Innovative Design, Expert Software Engineering
Two of the characteristics that set SONIA apart from competitors were its innovative box-shaped design and the sophistication of its core software systems.
The ETS team’s expertise with Java software proved a decisive advantage. Martin Morissette, software team leader of the SONIA team, is currently entering his third year in software engineering, and recently completed a six-month internship at Sun Labs, where he worked on the “Squawk VM,” a small J2ME™ virtual machine (VM) written almost entirely in Java. The Squawk VM provides the ability to run wireless transducer applications directly on the CPU without any underlying OS, saving overhead and improving performance.
“I learned a great deal during my time with Sun Labs that was extremely useful in the development of the navigation software for SONIA,” said Morissette. “The fact is, Java is an excellent programming language for robotics. All schools teach Java, so everyone on the software team knows how to use it. It’s object-oriented; it’s portable so it runs on Macs, PCs, Linux, whatever; it’s very efficient so we don’t have to worry about memory management; and there are lots of APIs available. And if you know how to write your applications properly, it can be very fast.”
The ETS team used Java for mission control and SONIA’s control systems, Java Management Extensions (JMX) for management, and a Java 3-D Simulator to simulate a broad range of mission scenarios. The team is now investigating the possibilities of Real-time Java, introduced at this year’s JavaOne Conference, for AUV and other robotics applications.
Consensus Building and Peer Review
According to Mr. Mercier, teamwork was every bit as important as technology in the ETS team’s success. “I can’t stress strongly enough that our ability to work together was the key to our success in the competition,” he said. “This is not about 12 individuals working on separate tasks by themselves. Every step of the way, we worked as a team and built consensus, so in the end everyone learned more. And that’s what this is really all about.”
For example, each software change was subject to peer review. All team members would receive an e-mail containing the previous version of the software, the new version incorporating a proposed change, and the rationale behind the change. Far from slowing the process down, the peer review concept got more team members more actively engaged, and ultimately resulted in far higher quality, according to Mr. Mercier. These peer reviews also ease the integration of new team members. Being a volunteer based project, volunteers come and go on a regular basis.
At the same time, the team shared tips and tricks with peers at other educational institutions. “This is more of a friendly rivalry than a dog-eat-dog competition,” said Tennessee Carmel-Veilleux, electrical team leader of the SONIA team. “We like to exchange information with some of the other teams, keep in touch with them. Who knows—we may all be working together some day.”
In recognition of the team’s willingness to work with other teams, and for achievements at the Unmanned Underwater Vehicle Competition, Felix Pageau, team captain, won the Andy Estabrook Award for "initiative and vision in the unmanned underwater systems.” Given for the first time to a student, the award was presented by the Lindbergh Chapter, San Diego, CA, of the AUVSI. Andy Estabrook was a pioneer in unmanned robotics and this award was created to honor his accomplishments in the advance of unmanned systems technology.
What’s next for the ETS team? The team itself is growing rapidly, thanks in part to the success at this year’s competition. The team leaders now find themselves in management roles as the team’s ranks have swollen to 34. “We’re going to compete again next year, and we’re going to focus on making our software more stable, more reliable, and faster,” said Mr. Morissette. In the mean time, the team leaders will be presenting their work at a variety of conferences worldwide—from Florida and Washington D.C. to Cologne, Germany.
And when will they get around to more traditional college activities such as frat parties and beer runs? “Probably never,” said Mr. Mercier. “We’re geeks. We’re doing what we love.”
For more information:
SPARC 平臺
x86/x64 平臺
Solaris OS
Solaris 8、9 和 10 操作系統(tǒng)整個 Solaris 軟件組、整個 Solaris 軟件組加 OEM 支持或者開發(fā)人員 Solaris 軟件組
Linux OS
免許可費的運行時庫 (.so) 分發(fā)
您應承諾軟件不會被設計、許可或計劃用于任何核設施的設計、修建、操作或維護。
C:
C++:
Fortran:
GNU Compiler Collection(Linux 平臺)
源和目標級與以前版本的兼容性以及 GNU C/C++ 兼容性功能,簡化升級和采用。
Sun發(fā)布Solaris ZFS-全球最先進的文檔系統(tǒng) Solaris 10 OS最新升級版包括Solaris ZFS 1.0文檔系統(tǒng) 提供了端到端的數(shù)據完整性,重新定義縮放能力,大大降低數(shù)據管理成本
(2006年5月25日訊) Sun Microsystems公司發(fā)布了一個具有革命性的新的文檔系統(tǒng)Solaris ZFS 1.0,它提供了多項突破性的功能,包括公共管理任務的自動化、保護數(shù)據免受非法行為的侵害,以及提供實際上無限的縮放能力。Solaris ZFS 1.0將作為我們這個星球上最先進的操作系統(tǒng)Solaris 10 OS的下一個商業(yè)版本的一個組成部分在今年6月份對外正式提供。此外,Solaris 10 OS的最新版本Solaris 10 6/06將先進的前攝性自愈技術和聯(lián)網技術,與對PostgreSQL開源數(shù)據庫的全面支持結合起來,進一步強化了Solaris 10 OS作為宿主高性能的關鍵數(shù)據庫解決方案的首選平臺的地位。 作為世界上最先進的文檔系統(tǒng),Solaris ZFS可以自動檢測和修改細小的數(shù)據錯誤或遭遇意外侵害的數(shù)據,以提供信息的完整性。Solaris ZFS還因為不需要卷宗管理器而大大簡化了數(shù)據的管理,而卷宗管理器是今天數(shù)據管理事務中最耗時、最費錢的部分。例如,今天,一項典型的系統(tǒng)管理任務可能 需要40多分鐘來完成,但是采用Solaris ZFS,僅僅需要幾秒鐘的時間,且沒有系統(tǒng)宕機的危險,從而大大降低了數(shù)據管理的成本費用。此外,Solaris ZFS還是世界上第一個128位的文檔系統(tǒng),這使系統(tǒng)具有了實際上無限的數(shù)據容量。Solaris ZFS提供的先進的縮放能力和管理能力,使它成為許許多多傳統(tǒng)UNIX?文檔系統(tǒng)的理想替代品。 Solaris是宿主高性能數(shù)據庫的杰出平臺。最近,Oracle指名Solaris 10 OS作為其開源64位開發(fā)和部署環(huán)境的理想平臺。現(xiàn)在,Sun還將開源PostgreSQL數(shù)據庫集成在Solaris 10 OS的最新版本內,對PostgreSQL數(shù)據庫提供全面支持。Sun與PostgreSQL社團開展合作,讓他們采用Solaris 10 OS提供的各種先進技術,如前攝性自愈技術、Solaris分區(qū)特性和Solaris動態(tài)跟蹤能力(DTrace)等。
“面對不斷增長的依順性要求,今天的數(shù)據量每9~12個月就要翻番,但今天的文檔系統(tǒng)還植根在上世紀70年代的技術之中,”Sun公司主管系統(tǒng)軟件部的 副總裁Tom Goguen說,“Solaris ZFS從設計之初就是要迎接今天數(shù)據管理的挑戰(zhàn),它的預期壽命是20~30年。這一128位的文檔系統(tǒng)所能存儲的自愈數(shù)據是今天已有文檔系統(tǒng)的160億 倍,同時還大大簡化了卷宗的管理。Solaris ZFS將是今年內發(fā)布的最重要的創(chuàng)新技術之一。” Solaris 10是我們這個星球上最先進的操作系統(tǒng),它可在650多款SPARC和x64/x86平臺上運行,獲得來自獨立軟件廠商的2,200多種應用程序的支持。 其無與倫比的功能性和硬件平臺的支持,加上它所提供的行業(yè)唯一的應用兼容性保證,加快了Solaris 10 OS在全球的應用步伐,目前Solaris 10 OS的注冊許可數(shù)已超過450萬。具有革命性的新的文檔系統(tǒng)技術 Solaris ZFS 1.0具有任何其他商用文檔系統(tǒng)技術所無法匹敵的優(yōu)異性能。客戶可以從Solaris ZFS技術中享用到先進的數(shù)據完整性技術、使用和管理的簡易性、難以置信的高性能,以及實際上無限的縮放能力。
Sun公司簡介 一個獨具特色的理念――“網絡就是計算機”,指引著Sun各項技術的發(fā)展,為全球各個重要的市場增添活力。Sun共享創(chuàng)新和創(chuàng)建社團的思想體系處于新 一代網絡計算-參與時代-的最前沿。Sun的足跡遍及全球100多個國家和地區(qū),其互聯(lián)網的網址為http://www.sun.com。Sun公司的中 文網址為http://www.sun.com.cn。
ZFS是第一個128位的文件系統(tǒng),同時ZFS又被Sun Microsystems稱作史上最后一個文件系統(tǒng)。因為這個文件系統(tǒng)含有多項創(chuàng)新技術,不僅成功地解決現(xiàn)有文件系統(tǒng)的問題和陋習,而且前瞻性地考量了未 來對存儲空間的需求,單個文件系統(tǒng)可以達到256 quadrillion(264) Zettabytes(221)。 ZFS不僅符合POSIX文件系統(tǒng)的標準,而且提供了許多高級功能比如:Quota(配額),Reservation(預留), Compression(壓縮), Snapshot(快照),Clone(克隆)等。如果你還在堅持使用現(xiàn)有32位或者64位的文件系統(tǒng),如果你還在“痛并不快樂著”地用著各式各樣的 Volume Manager,那就很值得看看這里列出的使用ZFS的十條理由。1. 再也不需要fsck, scandisk 不管你是在用Linux,UNIX還是Windows,相信大家都有過類似的體會:當系統(tǒng)意外斷電或者非法關機,系統(tǒng)重起后發(fā)現(xiàn)文件系統(tǒng)有 inconsistent的問題,這時 候就需要fsck或者scandisk 來修復,這段時間是非常耗時而且最后不一定能夠修復成功。更糟糕的是,如果這是一臺服務器需要做fsck的時候,只能offline(下線),而且現(xiàn)有應 用往往都是大硬盤,相應fsck修 復時間也很長,這對許多使用該服務器的用戶來說幾乎不能忍受的。而使用ZFS后大家可以徹底拋棄fsck這種工具,因為ZFS是一個基于COW(Copy on Write)機制的文件系統(tǒng)。COW是不會對硬盤上現(xiàn)有的文件進行重寫,保證所有硬盤上的文件都是有效的。所以不會有這種inconsistent的概 念,自然就不需要這種工具了。2. 管理簡單 ZFS作為一個全新的文件系統(tǒng),全面拋棄傳統(tǒng)File System + Volume Manager + Storage的架構,所有的存儲設備是通過ZFS Pool進行管理,只要把各種存儲設備加 入同一個ZFS Pool,大家就可以輕松的在這個ZFS Pool管理配置文件系統(tǒng)。大家再也不用牢記各種專業(yè)概念,各種命令newfs, metinit及各種Volume Manager的用法。在ZFS中我們只需要兩個命令,zpool(針 對ZFS Pool管理)和zfs(針對ZFS文件系統(tǒng)的管理),就可以輕松管理128位的文件系統(tǒng)。舉個例子,我們經常會遇到系統(tǒng)數(shù)據增長過 快,現(xiàn)有存儲容量不夠,需要添加硬盤,如果依照傳統(tǒng)的Volume Manager管理方式,那我 們需要預先要考慮很多現(xiàn)有因素,還要預先根據應用計算出需要配置的各種參數(shù)。在ZFS情況下,我們的系統(tǒng)管理員可以徹底解放,再也不需要這種人為的復雜 考慮和計算,我們可以把這些交給ZFS,因為ZFS Pool會自動調節(jié),動態(tài)適應需求。我們只需一個簡單的命令為 這個ZFS Pool加入新的硬盤就可以了:zpool add zfs_pool mirror c4t0d0 c5t0d0 基于這個動態(tài)調節(jié)的ZFS Pool之上的所有的文件系統(tǒng)就可以立即使用到這個新的硬盤,并且會自動的選擇最優(yōu)化的參數(shù)。 而且ZFS同時也提供圖形化的管理界面,下面是一個ZFS圖形化管理的一個截屏:[attachment=2119]3. 沒有任何容量限制 ZFS(Zettabyte File System)文件系統(tǒng)就如其名字所預示,可以提供真正的海量存儲,在現(xiàn)實中幾乎不可能遇到容量問題。在現(xiàn)有的64位kernel(內 核)下,它可以容納達到16 Exabytes(264)大小的單個文件,可以使用264個存儲設備,可以創(chuàng)建264個文件系統(tǒng)。4. 完全保證 數(shù)據 的正確和完整 由于ZFS所有的數(shù)據操作都是基 于Transaction(事務),一組相應的操作會被ZFS解 析為一個事務操作,事務的操作就代表著一組操作要么一起失敗,要么一起成功。而且如前所說,ZFS對 所有的操作是基于COW(Copy on Write), 從而保證設備上的數(shù) 據始終都是有效的,再也不會因為系統(tǒng)崩潰或者意外掉電導致數(shù)據文件的inconsistent。 還有一種潛在威脅 數(shù)據的可能是來自于硬件設備的問題,比如磁 盤,RAID卡的硬件問題或者驅動bug。現(xiàn)有文件系統(tǒng)通常遇到這個問題,往往只是簡單的把錯誤數(shù)據直接交給上層應用,通常我們把這個問題稱作 Silent Data Corruption。而在ZFS中,對所有數(shù)據不管是用戶數(shù)據還是文件系統(tǒng)自身的metadata數(shù) 據都進行256位的Checksum(校 驗),當ZFS在提交數(shù)據時會進行校驗,徹底杜絕這種Silent Data Corruption情況。5. 提供優(yōu)異 性能和擴展性 和傳統(tǒng)File System + Volume Manager + Storage架構不同,ZFS則是直接基于存儲設備提供所有的功能,因此有自己獨有的創(chuàng)新特性,性能自然非比尋常。 * Dynamic Striping vs. Static Striping 由于ZFS是基于COW和一個全局動態(tài)的ZFS Pool,任何一次寫 操作,都是對一塊新數(shù)據塊(Block)的一次寫操作。ZFS從ZFS Pool中動態(tài)挑選出一個最優(yōu)的設備,并且以一個transaction(事 務)線性寫入,充分有效地利用了現(xiàn)有設備的帶寬,我們把這個特性稱為Dynamic Striping。而相對應的Static Striping則是傳統(tǒng)文件系統(tǒng)所使用的方式,Static Striping需要管理員預先對這組Stripe進行正確地計算人為 設置,而且如果加入新的設備則需要再次人為的計算和設置,更為嚴重的是如果人為計算錯誤,則會直接影響系統(tǒng)的性能。而在使用Dynamic Striping這種特性之后,我們根本不需要人為介入,ZFS會自動調整,智能的為你 提供最佳的設備,最快的操作方式。 * 支持多種 大小的數(shù)據塊(Multiple Block Size) ZFS支持多種大小的數(shù)據塊定義,從512字節(jié)到1M字節(jié)。和傳統(tǒng)文件系統(tǒng)往往都是固定大小數(shù)據塊不同,ZFS則是可以動態(tài)的根據不同 大小的文件進行計算,動態(tài)的選擇最佳的數(shù)據塊。 因為不同大小數(shù)據 塊,直接影響到實際使用硬盤容量和讀取速度。如果使用較小的數(shù)據塊,存儲文件所導致的碎片則較少,讀寫小文件更快一些,但是會導致需要創(chuàng)建更多的 metadata,讀寫大文件則會更費時。如果使用較大的數(shù)據塊,使用的metadata較少,更利于讀寫大文件,但是會導致更多的碎片。ZFS根據實際 調查現(xiàn)有文件使 用的情況,分析出一個選擇數(shù)據塊大小的算法,動態(tài)的根據實際文件大小確定最佳的數(shù)據塊。所以ZFS是 非常智能的,在不需要系統(tǒng)管理員介入,就可以得到一個自我調優(yōu)的結果。當然ZFS也支持用戶對單個文件或者整個文件系統(tǒng) 所使用的數(shù)據塊大小的自定義設置。 * 智能預讀取(Intelligent Prefetch) 多數(shù)的操作系 統(tǒng)都 有這種將數(shù)據預先讀取的功能,而ZFS則是建立在文件系統(tǒng)上直接提供的一種更加智能的數(shù)據預讀取功能。它不僅可以智能地識別出多種讀取模式, 進 行提前讀取數(shù)據,而且可以對每個讀取數(shù)據流進行這種預讀取智能識別,這個對許多流媒體提供者來說是件非常好的事情。 在擴展性上,和現(xiàn)有文件系統(tǒng)多是基于一個受限的靜態(tài)模型不同,ZFS是采用ZFS Pool這個動態(tài)概念,它的metadata也是動態(tài),并且讀寫操作都是可并行的,并且具有優(yōu)先級概念,所以即使在大數(shù)據量,多設備的情況下仍可以保證性能的線性增長。6. 自我修復功能 * ZFS Mirror 和 RAID-Z 傳統(tǒng)的硬盤Mirror及RAID 4,RAID 5陣列方式都會遇到前面提到過的問題:Silent Data Corruption。如果發(fā)生了某塊硬盤物理問題導致數(shù)據錯誤,現(xiàn)有的Mirror,包括RAID 4,RAID 5陣列會默默地把這個錯誤數(shù)據提交給上層應用。如果這個錯誤發(fā)生在Metadata中,則會直接導致系統(tǒng)的Panic。 而且還有一種更為嚴重的情況是:在RAID 4和RAID 5陣列中,如果系統(tǒng)正在計算Parity數(shù)值,并再次寫入新數(shù)據和新Parity值的時候發(fā)生斷電,那么整個陣列的所有存儲的數(shù)據都毫無意義了。 在ZFS中則提出了相對應的ZFS Mirror和RAID-Z方式,它在負責讀取數(shù)據的時候會自動和256位校驗碼進行校驗,會主動發(fā)現(xiàn)這種Silent Data Corruption,然后通過相應的Mirror硬 盤或者通過RAID-Z陣列中其他硬盤得到正確的數(shù)據返回給上層應用,并且同時自動修復原硬盤的Data Corruption 。 * Fault Manager 在Solaris 10中,包含 一個ZFS診斷引擎和Solaris的 Fault Manager(這也是Solaris 10的 另一個新特性)交互,可以實時地診斷分析并且報告ZFS Pool和存儲設備的錯誤,用戶可以通過Fault Manager及時得到一個非常友善的消息。這個診斷引擎雖然不會采取主動的行為去修復或者解決 問題,但是會在消息中提示系統(tǒng)管理員可采取的動作。類似下面一個ZFS報錯消息,其中REC-ACTION就是建議采取的動作:SUNW-MSG-ID: ZFS-8000-D3, TYPE: Fault, VER: 1, SEVERITY: MajorEVENT-TIME: Fri Mar 10 11:09:06 MST 2006PLATFORM: SUNW,Ultra-60, CSN: -, HOSTNAME: neoSOURCE: zfs-diagnosis, REV: 1.0EVENT-ID: b55ee13b-cd74-4dff-8aff-ad575c372ef8DESC: A ZFS device failed. Refer to http://sun.com/msg/ZFS-8000-D3 for more information.AUTO-RESPONSE: No automated response will occur.IMPACT: Fault tolerance of the pool maybe compromised.REC-ACTION: Run ’zpool status -x’ and replace the bad device.7. 安全 在安全上,ZFS支持類似NT風格NFSv4版的ACL(讀取控制列表)。而且前面所提到的256位驗證碼,用戶可選擇多種驗證方式,包括SHA-256驗證算法,從而在物理存儲單元級別上保證數(shù)據的安全性。8. 超強功能 ZFS作為“最后一個文件系統(tǒng)”,涵蓋了基本的文件系統(tǒng)和Volume管理的功能,同時 一并提供許多企業(yè)級別的超強功能:Quota(配額),Reservation(預留), Compression(壓 縮), Snapshot(快照),Clone(克隆)。并且速度非常快。有了這個文件系統(tǒng),大家再也不需要任何Volume Manager了。9. 兼容性 ZFS是一個完全兼容POSIX規(guī)范的文件系統(tǒng),所以處于上層的應用程序是完全不受影響。ZFS也提供一個Emulated Volume模塊,可以把任何一個ZFS文件系統(tǒng)作為普通的塊設備使用。同時ZFS也可以使用基于Volume Manager構建的Volume作為存儲設備單 元。這樣在不需要修改應用程序,不修改已有文件系統(tǒng)下,給了大家最大的自由度去獲得ZFS提供的各 種特性。10. 開源 ZFS是Sun Microsystems公 司作為OpenSolaris的一個開源項目運作并且完全免費使用,點擊這里(http://www.opensolaris.org/os/community/zfs/source/) 可以直接瀏覽到ZFS的代碼。 這就代表著我們不僅同時可以享受商業(yè)公司的高質量,也可以獲得開源模式的優(yōu)點。 雖然目前只有Solaris支持該文件系統(tǒng),但是這種開源的模式必定會促進更多基于ZFS的應用。現(xiàn)在已經有國外開發(fā)者正在將ZFS移植到Linux和 Mac OS上來。如果想要體驗一下ZFS,由于目前它和Solaris 10綁定在一起,所以需要下載最新版的Solaris 10 6/06 (http://www.sun.com/software/solaris/get.jsp)。參考:Solaris ZFS Administration Guide: http://docs.sun.com/app/docs/doc/819-5461?l=zh&q=ZFSSolaris 10 Zone FAQ: http://www.sun.com/software/solaris/faqs/zfs.xmlAutomatic Performance Tuning in the Zettabyte File System: http://tesla.hpl.hp.com/self-manage03/Finals/henson-self-tune.pdf