找回密码
 新注册用户
搜索
查看: 7075|回复: 8

[已完成翻译] [BOINC 开发文档]Managing distributed data 部分

[复制链接]
发表于 2006-4-1 13:58:20 | 显示全部楼层 |阅读模式
Managing distributed data 部分

待翻译的页面列表见:http://boinc.berkeley.edu/create_project.php
http://boinc.equn.com/dev/create_project.html

Managing distributed data

  ·Uploading file lists             ——> 感谢 碧城仙 翻译!
  ·Uploading files
  ·Downloading files
  ·Deleting files on client hosts

[ Last edited by 碧城仙 on 2006-4-17 at 22:09 ]
回复

使用道具 举报

 楼主| 发表于 2006-4-2 11:51:33 | 显示全部楼层
翻译 Uploading file lists 页面:http://boinc.berkeley.edu/get_file_list.php

Retrieving file lists
检索文件列表

To instruct a host to send a list of all persistent files, use the function
为了能将所有的设置文件发送给主机执行,使用下面的函数

request_file_list(int host_id)

or the command line program
或者命令行程序

request_file_list [ -host_id X ]

If -host_id is absent, get file lists for all hosts.
如果 -host_id 不存在,则从所有主机上获取文件列表。

A message is created for the specific host (or all hosts) and added to the msg_to_host table in the database. The upload message included in the next RPC reply to the host.

消息的生成是针对特定的或者所有的主机的,并将增加到数据库的 msg_to_host 表格中。上传消息在下一次远程过程调用(RPC)中返回给主机。

???? how do you tell it where to upload the list???

那么如何告诉主机到哪里去上传列表呢???

评分

参与人数 2基本分 +30 维基拼图 +20 收起 理由
BiscuiT + 30 + 15
霊烏路 空 + 5

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2006-4-2 13:06:42 | 显示全部楼层
翻译 Uploading files 页面:http://boinc.berkeley.edu/get_file.php

Retrieving files
检索文件

A persistent file can be retrieved from a specific host. This can be done using the function

get_file(int host_id, const char* file_name)

or the command line program

get_file -host_id X -file_name Y

This program must be run in the project's root directory.
get_file() creates a result with a name of the form:

get_FILENAME_HOSTID_TIME

Example: get_test.mpg_34_123456789 is a result representing the upload of test.mpg from host number 34 at time 1234567891.

An upload message is created for the specific host and added to the msg_to_host table in the database. This message instructs the client to upload the file and acknowledge a successful upload. The upload message included in the next RPC reply to the host. The message has the form:



未完...............
回复

使用道具 举报

发表于 2006-7-24 15:39:25 | 显示全部楼层
http://boinc.berkeley.edu/delete_file.php

删除文件

要从参与运算的主机上删除不需要的文件,可以调用以下函数:
delete_file(int host_id, const char* file_name)
或者以下的命令行程序:
delete_file -host_id X -file_name Y
函数 delete_file() 对特定的主机创建一个信息,并将其添加到数据库的 msg_to_host 表中。这个信息指示客户端删除指定的文件,而且会被包含在下一次对主机的调度中。它的XML有如下格式:
<delete_file_info>file_name</delete_file_info>

评分

参与人数 1维基拼图 +8 收起 理由
霊烏路 空 + 8

查看全部评分

回复

使用道具 举报

发表于 2006-7-25 19:29:13 | 显示全部楼层
http://boinc.berkeley.edu/send_file.php

Sending files  
发送文件
--------------------------------------------------------------------------------
To send a file to a specific host, use the function
如果需要发送一个文件到一个特定的主机,可以用命令
send_file(int host_id, const char* file_name, int priority, long int exp_date)

or the command line program
或者在命令行版本中
send_file -host_id X -file_name Y -priority Z -days_exp N

priority is the relative importance of the file (default = 1)
优先权是跟文件的重要度有关联的(默认是1)
days_exp is the number of days the file should stay on the host (default = 100)
days_exp是文件允许停留在主机上的天数(默认是100)
send_file creates a result and initializes it with a name of the form
send_file 创建一个结果并用一个规定格式的名字初始化它
send_FILENAME_HOSTID_TIME.

A message is created for the host and added to the msg_to_host table. This message instructs the client to download the file and acknowledge a successful download. The download message included in the next RPC reply to the host. The message has the form:
一条信息会为主机创建并加入到msg_to_host表格中。这条信息会指导主机去下载文件并确认是一个成功的下载。下载信息将包括在下一个RPC信息回答给主机。这条信息有以下的格式:
<app>
        <name>FILE_MOVER</name>
</app>
<app_version>
        <app_name>FILE_MOVER</app_name>
        <version_num>n</version_num>
</app_version>
<result>
    <wu_name>x</wu_name>
    <name>y</name>
</result>
<file_info>
        <name>file_name</name>
        <url>download_dir/file_name</url>
        <md5_cksum>md5</md5_cksum>
        <nbytes>file->nbytes</nbytes>
        <sticky/>
        <priority>priority</priority>
        <exp_date>exp_date</exp_date>
</file_info>
<workunit>
        <name>result.name</name>
        <app_name>FILE_MOVER</app_name>
        <file_ref>
                <file_name>file_name</file_name>
        </file_ref>
</workunit>

--------------------------------------------------------------------------------
初次翻译,不知道效果怎么样,希望多多指教。

[ Last edited by apple on 2006-7-25 at 19:31 ]

评分

参与人数 2基本分 +30 维基拼图 +16 收起 理由
BiscuiT + 30 + 10
霊烏路 空 + 6

查看全部评分

回复

使用道具 举报

发表于 2006-7-28 16:15:05 | 显示全部楼层
修改建议:)

优先权是跟文件的重要度有关联的 -> 优先级表示文件的相对重要性

days_exp是文件允许停留在主机上的天数 -> days_exp是文件应该保留在主机上的天数

send_file 创建一个结果并用一个规定格式的名字初始化它 -> send_file 创建一个结果并以如下的形式对其命名 //不清楚这里的结果指的是什么

并确认是一个成功的下载 -> 并对成功的下载进行确认


引用 apple 在 2006-7-25 19:29 时的帖子:
http://boinc.berkeley.edu/send_file.php

Sending files  
发送文件
--------------------------------------------------------------------------------
To send a file to a specific host, ...

评分

参与人数 1维基拼图 +4 收起 理由
霊烏路 空 + 4

查看全部评分

回复

使用道具 举报

发表于 2006-7-28 19:56:26 | 显示全部楼层
HOHO 谢谢斑竹的建议:)
的确翻译的时候没搞清楚前后顺序……
回复

使用道具 举报

发表于 2006-7-28 21:02:59 | 显示全部楼层
result 这个词一直都觉得不好翻译的说~~~
结果?工作包?
意思都好像不太对~~~
回复

使用道具 举报

发表于 2006-7-28 21:30:19 | 显示全部楼层
嗯,这个词确实麻烦,看情况翻译吧
大多数时候应该还是指任务包,就是同一个workunit分出来给不同用户算的几个重复任务
回复

使用道具 举报

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

本版积分规则

论坛官方淘宝店开业啦~
欢迎大家多多支持基金会~

Archiver|手机版|小黑屋|中国分布式计算总站 ( 沪ICP备05042587号 )

GMT+8, 2024-4-26 07:51

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表