(趋势)The 2002 Trend Micro Programming Contest, Preliminary

本文介绍2002年趋势科技编程竞赛的初步详情,重点阐述了一个基于局域网的群组软件GoodNeighbors的设计理念与功能要求。该应用通过汇集每个用户的磁盘空间形成共享存储,支持文件的分布式存储与检索,并具备容错机制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The 2002 Trend Micro Programming Contest, Preliminary 蕷B氡呂? 
蘥?╂賓Y?  
Good Neighbors a???6摕  
圓2d:&?d? 
Introduction : 毜kX/髕  
)飩D{}胟幍  
Good Neighbors is a LAN-based groupware application. In the neighborhood, ??喂亢3  
each user (neighbor) contributes a small amount of disk space to construct 庸?躭,檐  
a collectively shared storage, which is globally accessible to all neighbors C€卡悅 ? 
in the neighborhood. Neighbors can freely share files in this system, and ??z翙A犁  
the files are stored in a distributed way. This system has the following 脗蓊?訫€  
characteristics: 稈廳W?:? 
嫫+VKs,?  
Each user (neighbor) can access the neighborhood from any computer (a node) $kP??'某  
that physically resides on the LAN network with proper access rights. R(埇4F6~?  
A shared file in the neighborhood is kept in pieces (fragments) on more than one node. 0?涿飴l? 
A node does not have the ability to reconstruct the file just from its own fragment. 痿T驺謁颠  
A fault-tolerant mechanism should be provided so even if one or more machines are down, _#篪暞?@  
the file can still be correctly retrieved. 光'搝*?  
Architecture Overview 弉=R?  
.W顜qv? 
?j6|c3  
?pI囸?lt;  
Global Directory Structure : |]y傃踆h橡  
鳔藻7賵颟? 
All files in the neighborhood reside on a single level global directory, all the shared 9n?财  
files are listed in this directory. Y@?襎跱扈  
w8lG @龀匹  
File Identification 瑨領慨$鳅? 
A file is identified by its full name (file name with its path in the global directory) eP?泙⒖i  
and its owner. In other words, a "unique" file must have a unique combination of a ?粗[^?? 
full name and an owner. Therefore, two files with identical file names but different @o钡_劵-  
owners are treated as two unique files and can coexist in the global directory. 薸+琳芛  
A file must have the following attributes: l!`?A8纏i  
&麠?o?啱  
Attribute Description : ~?ⅹ{?@  
File Name     The file name with an extension and path. E.g. /pub/mystuff.doc 讃韹H逘s裂  
Creation time   The time the file was put in the global directory (time according to ~ 扜鳭d  
          the node that the user was on when he/she put the file in). 堈~?'  
File         Size The size of the file (not the fragments, or the size of a fragment). 50惘%a  
Owner       The user who put the file in the global directory. O^ Э 籗u'  
搝OUq9潃  
ld;Z湂鱲? 
?`旨衸P  
濬?鱌h桮"  
Functional Requirements : {餱_g梲jO  
Re?攖 ? 
Setup: f?羂M乙?  
.L烆刣?mb  
The setup can either be an auto-installation script (a batch file or shell script) or no_独啭Kh  
an instruction to let users manually install the binaries. However, those who implement ?Z?瀢屭  
auto-installation scripts will earn more points based on the installation criteria. 襟s舓?礤  
The default installation path is: 偛 k楐彤莄  
g ?m8qp? 
b寒E"?愳  
For Windows: c:/Good_Neighbor 鼺朲pJ/  
For Linux: /home//Good_Neighbor vjc茊X?th  
tO鰍3,?jo  
Application Behavior : 酠嫯婋貉x? 
Ah╰GeM汃V  
After successful installation, the program should include a command line tool named gbn.exe 剻?lA巭[  
(either in Windows or Linux) to support commands listed as the following: 岊哽:湵S? 
(Note: All functions should behave similarly to the MS-DOS command line utility or Unix Shell ?gWP?  
commands; if there is any ambiguity, please refer to the MS-DOS command line utility or UNIX 3sCB嬩-?0  
Shell commands.) 觘醾o??? 
崽恞 d樇$u  
Function Parameter   Example Description : 丷?潙慓盢  
start           user_name start david Starts the application. This function has to be 襛弖荮?? 
              called before all other functions can function properly. 焄9*<0  
setlocal         local_path local_path: local directory path setlocal 藛u燀徙yx1  
              c:/my documents/ Sets the local directory. ?裛髫  
put             local_filename local_filename: local file name put public.doc 錈F袉淚鎽  
              Put a files from the local directory to the global directory. ?j鵀?lt;O  
get [-o owner]     remote_filename [-o owner]: select owner ?瀉摐€? 
              remote_filename: remote file name ?}鍓"譞@? 
              1. get -o David homework.doc /gⅠVhb鶞  
              2. get homework.doc 贲橰飍ph?  
              Retrieves a file from the global directory to the local directory. 隯栏fGw>>  
              If there are files with duplicate file names, the user can specify 3`譥G?悜  
              which file to get by specifying the owner using the -o flag. By default, 戨煦V磌?/  
              the most current file will be retrieved. 羬FL^  
ls             ls _?僈??  
              Shows all files in the global directory. ?斷K-p筁  
              Displays all attributes of the file listed in File Identification. =Y麈A現V?  
exit             exit Y? 鼥B? 
              Leaves the neighborhood 虺繱舁鯒  
r6?槚A? 
欋?隷€90|  
vT渄直? 
File Manipulation Mechanism : ?沯媊當_c  
鲇;滾鼘鱎? 
Let N = all participants in the LAN (all nodes that have the program installed). 堹F鮶P$曌  
Let n = number of online neighbors in N (n <= N). G鸬U◎H隵;  
Let M = number of fragments of one file when putting the file (M <= n). ?W?^l  
Let m = number of fragments in M that are accessible (m <= M). ?{惝/魛  
2?竈?蚸  
$tUsF袣  
?婃抁@裆? 
<?乿  
}邬|'?頵  
Restrictions on "ls", "put", "get": 馧Z~cG W  
"ls" must be operational when n >= 1. a痪 -樗亄? 
?i鳐??  
r8IO"Zl/? 
Restrictions on "ls" ?6灱喇? 
Only unique files are displayed. If there are duplicate files [Fam?? 
(with the same path and same owner), only the latest file should be aM?X&荑C2  
displayed so that the file list is unambiguous. ?V?态? 
拨?`Dz凁? 
Restrictions on "put" 5=1%渗擸o  
When a file is "put" into the neighborhood, it is actually split into many ?5琨? 
fragments and each fragment is stored on one node. "藍{Vvx3  
Put is operational when n >= 3. In other words, min(M) = 3. {犁弹硚箟  
z?O悚=:傼  
Restrictions on "get" 漙FMd? 
There are two restrictions on Get. 娝?g&︳? 
The file is not salvageable when m = 1. ?鯕? 
The file must be salvageable when m >= (2/3)M. 嫫F*?K繏  
Details are explained below. 踟?劜  
15??銢  
M m Salvageable M m Salvageable 鯾N崅?-C  
3 1 no         5 3 no restriction 豜:胸掎? 
2 yes         4 yes 旛?塔? 
3 yes         5 yes 筍√{痆菆? 
4 1 no         6 1 no 鬹烑垝?  
2 no restriction 2 no restriction 熩搐e緥-f  
3 yes         3 no restriction n饇鏋?攒? 
4 yes         4 yes 鑯勽弼璏  
5 1 no         5 yes 'Ⅲ的€k  
2 no restriction 6 yes 孖O 頭帣S  
-=嬱,+髇? 
Click here for comprehensive use cases. w鎮?碆*鱝  
蚧p坁躹涹? 
v晵唿/ 齀V  
Sample Execution : 垏?隼Rj  
盳/"侈?? 
b暋AU攮  
PRE condition ù"??駎e  
There is one file, david6.doc in the local directory c:/my documents/. n醞"?6f蚂  
v枱觡鱴紐? 
Command Sample             Output U鱯勞IV?P  
start David               Entering neighborhood... Welcome! p/昍CF_? 
setlocal c:/my documents/     local directory is set to "c:/my documents/" p紒?覜? 
ls                     david1.doc 2002/05/03 1:25pm 204,342 David 怢蓪値怀? 
                    jenny2.txt 2002/02/04 11:50am 10,245 jenny D{:p?n? 
put david6.doc             File put. 浥?雩? 
Get jenny2.txt             File retrieved. ??w?炣? 
Exit                   Bye... ?*塵'设跮  
殩D?蝷'  
?琎計5L塋  
?;?蹑P  
POST condition 瑕?s@is  
The following files are present in c:/my documents/: 梳?枱?&X  
david6.doc #F澧汼狿n  
jenny2.txt :?6G魶?? 
英嶉劏?;  
郋???  
` 罸沺?? 
Test Environment : ?磛[溝}B  
1. At least six PCs will be used for testing. ?慒鏧xu  
Hardware specification: Intel Pentium III 600MHz, 128MB RAM, 20GB available 垡H/N妚mL? 
hard disk space. 浀及s偳VV? 
?j.'郵秄  
9?喕S倧  
Operating System: 鷉?m饧? 
Contestants can choose any of the following environments to be designated as Z鬛?.影€?  
the test environments: ??jI8衏? 
Microsoft Windows 2000 Professional (Service Pack 2), Windows XP Professional, 辳 ?2  
Windows 98SE. E嵶FB 克O? 
RedHat Linux 7.2 (full install) or Mandrake Linux 8.1 (full install). KR? gN宁^  
Y?>c橅? 
?C;裈╟? 
2. The testing environment is a closed, pure LAN environment, and each machine ?誶k貵5?  
has an internal IP. All operating systems are installed with default protocols. ??禉(?? 
No firewalls or routers are present in the environment. 0e■€cT?}  
2?a喰@? 
Evaluation Process: :卉U ?  
The contestants must inform Trend Micro of the desired test environment before y阢蕃€黑胊  
July 14th. P翄偈bj?? 
The contestants must email completed applications to contest@trend.com.tw before k跠a埰?楪  
11:50PM, July 15th. Late applications will not be accepted. A complete application kiop?矈  
should contain the following items: 县a?觛б  
Name of the team 澶?|X3l? 
盛?奉f?  
Source code: mJ+蚑慀  
The executable (binary) and any components the binary needs to run 灷?彮?乔  
Installation guide, user manual or any documentation explaining the installation process 厛媁▂僙躞  
Design documentation (all design decisions, implementation strategies, and system 椞P?巉? 
architecture must be documented here) kVS璀??? 
Other documents if needed for explanatory purposes ??憤?? 
An email should not contain an attachment greater than 5MB. If the total size of the EitFTp?骝  
package is larger than 5MB, it should be divided into different pieces each less than 菵)ずQX>  
5MB and sent in separate emails. ?@嫩k?癇  
Testing and evaluation will commence July 16th. J嫝?z眅? 
Program will be installed according to the installation guide provided by contestants. y硟??lt;X眘  
Program will be tested in the environment listed in "Test Environment". ?洽乥舓  
Results will be announced on 6:00pm, July 22nd at http://www.trendmicro.com.tw/contest. tN>cjw?  
狫E礑?锢  
佤R?lt;D 5尝  
Evaluation Criteria: ???佟  
?qMv摊?  
Installation (15): 鸸?沎m?b  
Full score if the package can be successfully installed and all functions work well, 嗥檼椞癧觟  
deduct 3 points for each defect. Fh涙g ?B  
If installation is in the form of automatic script/program, 3 bonus points are added ?Q毇%扝  
(however, you cannot exceed the maximum score). P苍$馷A  
No points if the installation fails and cannot execute (bonus points will be discarded). 1?♂隴V  
揢氇皫m肿  
Required Features and Functions (75): ^蔷笔qq熤  
*;qM九2}  
put/get (55): Full score if files can be stored by the requirement listed above and 嚝俠鋎f豾? 
downloaded without any errors. 4玩T趃?`  
扡徿瓰Ew  
setlocal (5): Full score if the selected file can be downloaded to the designated ー呰KD鬵c0  
local directory. %w硲蛂q? 
蕓mJW?j钒  
ls (10): Full score if all files stored in the systems can be successfully listed. 汚豂変/? 
^鶨 ?椲?  
start/exit (5): Full score if the system can be entered and exited repeatedly and ^烆蛜蟄N鸟  
functions well. о?wb  
Deduct 3 points for each defect found. 瘧X团揩#  
▅`叛啬廄  
Design Document (5) n^嵽?]磮  
&铙捧号4? 
Installation Guide/Manual (5) 邏YR  
塽陮孇禺  
Bonus Points (25): The earlier you can release your completed project, the more time 打m逅?4? 
it's available on the market and the greater the chance you can become the market ?黋蔖6以? 
leader. The first 50 teams that send completed applications before the deadline will /芨L鄜齇? 
receive 25 bonus points. But teams must include all items in their applications to be +皂秂 礚  
considered for the bonus points. 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值