CN101308463B - Self-adapting method of grid environment facing to proxy programming calculation task - Google Patents

Self-adapting method of grid environment facing to proxy programming calculation task Download PDF

Info

Publication number
CN101308463B
CN101308463B CN2008101241368A CN200810124136A CN101308463B CN 101308463 B CN101308463 B CN 101308463B CN 2008101241368 A CN2008101241368 A CN 2008101241368A CN 200810124136 A CN200810124136 A CN 200810124136A CN 101308463 B CN101308463 B CN 101308463B
Authority
CN
China
Prior art keywords
agent
task
service
grid
management service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2008101241368A
Other languages
Chinese (zh)
Other versions
CN101308463A (en
Inventor
王汝传
易侃
季一木
任勋益
邓松
杨明慧
蒋凌云
付雄
张琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Post and Telecommunication University
Original Assignee
Nanjing Post and Telecommunication University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN2008101241368A priority Critical patent/CN101308463B/en
Publication of CN101308463A publication Critical patent/CN101308463A/en
Application granted granted Critical
Publication of CN101308463B publication Critical patent/CN101308463B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

网格环境内面向代理编程计算任务的自适应方法基于现有的开放的网格体系结构,通过部署代理管理服务和代理消息服务这两个满足FIPA规范和WSRF规范的网格服务以及部署G-A容器,支持代理的管理和移动。通过扩展现有的网格作业类型,即增加新的作业类型“AGENT”,使得任务代理的创建过程与现有网格任务的创建过程完全兼容;同时通过定义面向代理编程的任务,以及代理的移动和定位过程,使得代理任务的能够自适应网格环境的变化,智能的移动决策。

The self-adaptive method for agent programming and computing tasks in the grid environment is based on the existing open grid architecture. By deploying agent management service and agent message service, two grid services that meet the FIPA specification and WSRF specification, and deploying the GA container , to support the management and movement of agents. By extending the existing grid job type, that is, adding a new job type "AGENT", the creation process of the task agent is fully compatible with the creation process of the existing grid task; at the same time, by defining the task of agent-oriented programming, and the agent The moving and positioning process enables the agent task to adapt to changes in the grid environment and make intelligent moving decisions.

Description

网格环境内面向代理编程计算任务的自适应方法 An Adaptive Method for Agent-Oriented Programming Computing Tasks in Grid Environment

技术领域technical field

本发明涉及通过移动代理解决计算任务自适应网格环境的方法,属于网格与移动代理的交叉领域。The invention relates to a method for solving calculation task adaptive grid environment through a mobile agent, and belongs to the intersection field of the grid and the mobile agent.

背景技术Background technique

网格和代理是从不同的角度解决分布式系统中协调、协商、协作的问题。网格是通过一系列工具为动态的地理上分布的虚拟组织提供安全可靠的资源共享基础架构,因此网格可以认为是分布式计算环境的“骨架”。而代理是一种能够适应动态环境的自治的实体,通过自治的行为实现它们的设计目标,其中移动代理不仅具有代理的自治性还具有移动性,因此代理可以认为是分布式计算环境的“大脑”。网格缺乏智能但其安全可靠,而代理则相反,因此结合网格和代理各自的优势能够更好的解决大规模的分布式计算问题。Grid and agent solve the problems of coordination, negotiation and collaboration in distributed systems from different angles. The grid provides a safe and reliable resource sharing infrastructure for dynamic geographically distributed virtual organizations through a series of tools, so the grid can be considered as the "skeleton" of the distributed computing environment. An agent is an autonomous entity that can adapt to a dynamic environment and achieves its design goals through autonomous behavior. Among them, the mobile agent not only has the autonomy of the agent but also has mobility, so the agent can be considered as the "brain" of the distributed computing environment. ". The grid lacks intelligence but is safe and reliable, while the agent is the opposite. Therefore, combining the respective advantages of the grid and the agent can better solve large-scale distributed computing problems.

目前已有将代理技术应用到网格环境中解决若干问题的方案,如利用代理调度网格任务,利用代理对网格资源和任务的属性预测,利用移动代理获取网格资源信息等,然而在这些方案中,网格和代理并没有互相弥补各自的缺陷,代理的安全性问题,资源监控,数据传输方案依然是自成一体,网格平台和代理平台完全独立运行。因此需要结合两者优势提出新的、整合的平台。现有的平台如DEINF/UFMA的MAG项目提出在网格中间件InteGrade和代理中间件Jade的基础上再开发一个中间件MAG来支持任务的错误容忍,然而该方案中任务代理本身并不具备智能性,任务错误的侦测、移动行为的决策都是通过其他代理来完成的。At present, there are solutions to apply agent technology to the grid environment to solve several problems, such as using agents to schedule grid tasks, using agents to predict the attributes of grid resources and tasks, using mobile agents to obtain grid resource information, etc. However, in In these solutions, the grid and the proxy do not make up for each other's shortcomings. The security issues of the proxy, resource monitoring, and data transmission solutions are still self-contained, and the grid platform and the proxy platform operate completely independently. Therefore, it is necessary to propose a new and integrated platform combining the advantages of both. Existing platforms such as DEINF/UFMA's MAG project propose to develop a middleware MAG on the basis of grid middleware InteGrade and agent middleware Jade to support task error tolerance. However, the task agent itself does not have intelligence in this solution. Performance, detection of task errors, and decision-making of mobile behavior are all done by other agents.

此外,网格调度一直是网格研究的热点。目前网格中任务的调度算法大多来源于集群,然而网格环境与集群环境差异巨大,如网格资源高度动态和不可预测而集群资源变化较小和可预测,网格环境需要考虑网络环境而集群则可以忽略等。因此,除了调度算法以外,使任务能够产生自适应网格环境变化的行为是确保任务稳定、快速执行的关键。In addition, grid scheduling has always been a hot spot in grid research. At present, most of the task scheduling algorithms in the grid come from clusters. However, the grid environment is very different from the cluster environment. For example, the grid resources are highly dynamic and unpredictable, while the cluster resources are less variable and predictable. The grid environment needs to consider the network environment rather than the cluster environment. Clusters can be ignored etc. Therefore, in addition to the scheduling algorithm, the behavior that enables tasks to adapt to changes in the grid environment is the key to ensuring stable and fast execution of tasks.

发明内容Contents of the invention

技术问题:本发明的目的是提供一种网格环境内面向代理编程计算任务的自适应方法,解决网格环境与移动代理的高效的融合问题,解决任务代理能在网格环境下的自适应问题。Technical problem: The purpose of the present invention is to provide an adaptive method for agent-oriented programming computing tasks in a grid environment, to solve the problem of efficient integration of grid environment and mobile agents, and to solve the task agent's self-adaptation in the grid environment question.

技术方案:本发明提出的网格环境内面向代理编程计算任务的自适应方法,其特征在于该方法增加新的作业类型“AGENT”,使得任务代理的创建过程与现有网格任务的创建过程完全兼容;通过部署G-A容器,该容器提供满足FIPA规范和WSRF规范的代理管理服务和代理消息服务,支持任务代理的移动和定位过程,使得任务代理能够自适应网格环境的变化,智能的移动决策,其具体的过程如下:Technical solution: The self-adaptive method for agent-oriented programming computing tasks in the grid environment proposed by the present invention is characterized in that the method adds a new job type "AGENT", so that the creation process of task agents is the same as that of existing grid tasks Fully compatible; by deploying the G-A container, the container provides agent management services and agent message services that meet FIPA specifications and WSRF specifications, supports the movement and positioning process of task agents, and enables task agents to adapt to changes in the grid environment and move intelligently The specific process of decision-making is as follows:

第一步:面向代理编程的计算程序设计:Step 1: Computing program design for agent programming:

11.编写计算行为,它包含计算任务的代码,11. Write the calculation behavior, which contains the code of the calculation task,

12.编写移动策略行为,它在独立于代理的线程中执行,感知环境的变化和选择移动的目标,12. Write the mobile policy behavior, which is executed in a thread independent of the agent, senses the change of the environment and selects the target of the movement,

13.编写序列化中间数据行为,定义程序中需要序列化的数据,定期或者移动前调度该行为执行,13. Write the serialized intermediate data behavior, define the data that needs to be serialized in the program, and schedule the behavior to execute periodically or before moving,

第二步:创建任务代理:Step 2: Create a task agent:

21.编写作业描述文件,21. Write a job description file,

22.任务调度,22. Task scheduling,

23.任务提交:23. Task submission:

i. 网格客户端程序将作业提交给资源的作业管理工厂服务;i. The grid client program submits the job to the resource's job management factory service;

ii.作业管理工厂服务验证用户代理证书,并对该用户的行为授权,ii. The job management factory service verifies the user agent certificate and authorizes the user's actions,

如果验证和授权成功则转到下一步,否则通过客户端安全验证失败;If the verification and authorization are successful, go to the next step, otherwise the client security verification fails;

iii.作业管理工厂服务解析作业描述文件,如需准备数据,则调用网格数据传输服务将需要的数据传到指定的目录;iii. The job management factory service parses the job description file, and if data needs to be prepared, call the grid data transfer service to transfer the required data to the specified directory;

iv.作业管理工厂服务发现作业的类型为“AGENT”,将控制转移到代理管理服务;iv. The job management factory service finds that the job type is "AGENT", and transfers control to the agent management service;

v.代理管理服务载入代理的代码,如果载入成功则返回全局的代理标识,否则返回创建代理失败;v. The proxy management service loads the code of the proxy. If the loading is successful, it will return the global proxy ID, otherwise it will return the failure to create the proxy;

vi.代理管理服务更新代理信息表,并与主代理管理服务同步信息;vi. The agent management service updates the agent information table and synchronizes the information with the main agent management service;

vii.任务代理创建完成;vii. The task agent is created;

第三步:移动任务代理:Step 3: Mobile Task Agent:

31.代理的移动策略行为触发移动,31. The agent's move policy behavior triggers the move,

32.代理中断当前执行,并执行序列化中间数据行为,32. The agent interrupts the current execution and executes the behavior of serializing intermediate data,

33.代理通知本地代理管理服务需要移动,33. The agent informs the local agent that the management service needs to move,

34.本地代理管理服务通过代理消息传输服务告知远程代理管理服务将要向他移动一个代理,同时调用网格数据传输服务将与代理相关数据传输到远程资源,34. The local agent management service informs the remote agent management service that an agent will be moved to him through the agent message transmission service, and at the same time calls the grid data transmission service to transmit the data related to the agent to the remote resource,

35.当本地代理服务收到传输成功的消息后,发送启动代理的ACL命令消息给远程代理管理服务,35. After the local agent service receives the message of successful transmission, it sends the ACL command message to start the agent to the remote agent management service,

36.远程代理管理服务根据传输过来的代理信息重建代理,如果成功则返回成功消息,并更新代理信息表;否则,返回失败,36. The remote agent management service rebuilds the agent according to the transmitted agent information, and returns a success message if successful, and updates the agent information table; otherwise, returns failure,

37.本地代理管理服务收到成功的消息,则将本地代理的信息删除,同时更新本地代理信息表;否则重新选择资源并转到步骤34,37. When the local agent management service receives a successful message, the information of the local agent is deleted, and the information table of the local agent is updated at the same time; otherwise, the resource is reselected and go to step 34,

第四步:任务代理的定位:Step 4: Positioning of the task agent:

41.用户根据任务代理标识,首先向用户所在主机的代理信息表缓存查询代理位置,如果查询成功则转到44;否则转到下一步;41. According to the task proxy ID, the user first queries the proxy location from the proxy information table cache of the host where the user is located, and if the query is successful, then go to step 44; otherwise, go to the next step;

42.用户根据任务代理标识向主G-A容器中的代理管理服务请求该任务代理的位置;42. The user requests the location of the task agent from the agent management service in the main G-A container according to the task agent identifier;

43.主代理管理服务查询代理信息表,如果查询成功则返回给用户该任务代理的位置,否则返回失败消息;43. The main agent management service queries the agent information table, and if the query is successful, returns the location of the task agent to the user, otherwise returns a failure message;

44.用户根据获取的任务代理位置,向该任务代理发出请求服务信息,如请求成功,则更新用户所在主机的代理信息表缓存。否则转到步骤42。44. The user sends a request for service information to the task agent according to the obtained position of the task agent, and if the request is successful, the cache of the agent information table of the host computer where the user is located is updated. Otherwise go to step 42.

FIPA规范和WSRF规范的代理管理服务和代理消息服务的实现和部署的步骤如下:The implementation and deployment steps of the agent management service and agent message service of the FIPA specification and the WSRF specification are as follows:

①代理管理服务:该服务的特性是其功能满足FIPA规范,其实现满足WSRF规范,需要实现的功能如下:①Proxy management service: The characteristic of this service is that its function meets the FIPA specification, and its implementation meets the WSRF specification. The functions to be implemented are as follows:

A.支持代理创建,包括:A. Support proxy creation, including:

A1.支持作业管理中间件的调用,根据任务属性创建任务代理;A1. Support the invocation of job management middleware, and create task agents according to task attributes;

A2.支持从备份的中间数据恢复代理;A2. Support agent recovery from backup intermediate data;

A3.支持移动的任务代理的重建;A3. Reconstruction of mobile task agents;

B.支持代理删除;B. Support proxy deletion;

B1.失败代理数据的删除;B1. Deletion of failed proxy data;

B2.代理移动成功后,将本地的代理数据删除;B2. After the agent moves successfully, delete the local agent data;

C.支持自动维护代理信息表;C. Support automatic maintenance agent information table;

C1.创建代理后的代理信息的更新,C1. Update of agent information after agent creation,

C2.删除代理后的代理信息的更新,C2. Update of agent information after agent deletion,

D.支持代理位置查询;D. Support agent location query;

②部署主G-A容器,它作为主资源监控和发现服务和主代理管理服务的宿主容器;② Deploy the main G-A container, which serves as the host container for the main resource monitoring and discovery service and the main agent management service;

③部署子G-A容器,它们必须指出主资源监控和发现服务和主代理管理服务的宿主容器。③ Deploy child G-A containers, they must point out the host container of the main resource monitoring and discovery service and the main agent management service.

有益效果:本发明提出的网格环境内面向代理编程计算任务的自适应方法与现有的通过移动代理解决计算任务自适应网格环境的方法相比有如下优点:Beneficial effects: the adaptive method for agent-oriented programming computing tasks in the grid environment proposed by the present invention has the following advantages compared with the existing method for solving computing tasks adaptive grid environment through mobile agents:

1.本发明提出的G-A容器将网格和代理技术更为紧密的结合,表现为代理将直接利用现有的网格安全基础设施、网格数据传输服务、网格资源监控与发现服务,为代理的安全、数据传输、调度和决策提供直接支持。1. The G-A container proposed by the present invention combines the grid and agent technology more closely, which means that the agent will directly use the existing grid security infrastructure, grid data transmission service, grid resource monitoring and discovery service, and provide Agents provide direct support for security, data transfer, scheduling, and decision-making.

2.通过实现同时满足FIPA规范和WSRF规范的代理管理服务和代理消息传输服务,与目前通过多层的中间件实现两者结合相比,简化了网格对代理技术支持的复杂度。2. By implementing agent management service and agent message transmission service that meet both FIPA specification and WSRF specification, compared with the current combination of the two through multi-layer middleware, the complexity of grid-to-agent technical support is simplified.

3.通过面向代理编程的方法设计网格任务,让编程人员确定数据保存行为和移动决策行为,使得任务不仅能够智能的决策移动的时机而且在移动到目标容器后能够恢复到前一个较为接近的执行状态,保证任务的稳定,有效的执行。3. Design grid tasks through agent-oriented programming, allowing programmers to determine data storage behavior and move decision-making behavior, so that tasks can not only intelligently decide when to move, but also restore to the previous one that is closer after moving to the target container Execution status, to ensure the stability and effective execution of tasks.

4.通过新定义的任务类型“AGENT”,确定提交的任务将是一个移动代理。任务描述文档的定义以及任务的提交过程与网格中现有其他类型的任务如“FORK”、“MPI”、“MULT”的提交过程完全兼容,这样保持在现有客户端的与服务端程序少量修改的情况下,支持新的代理任务的管理。4. Through the newly defined task type "AGENT", it is determined that the submitted task will be a mobile agent. The definition of the task description document and the submission process of the task are fully compatible with the submission process of other types of tasks such as "FORK", "MPI" and "MULT" in the grid, so as to keep a small number of programs on the existing client and server Modifications to support the management of new agent tasks.

附图说明Description of drawings

图1是G-A容器体系结构图;Figure 1 is a diagram of the G-A container architecture;

图2是创建任务代理流程图;Figure 2 is a flow chart of creating a task agent;

图3是移动任务代理流程图;Fig. 3 is a flow chart of mobile task agent;

图4是定位任务代理流程图。Fig. 4 is a flow chart of positioning task agent.

具体实施方式Detailed ways

为了更好的解释上述技术方案产生的原因及其实现细节,现对各步骤详细说明如下:In order to better explain the reasons for the above-mentioned technical solution and its implementation details, each step is described in detail as follows:

步骤1:G-A容器(Grid-Agent Container)的实现和部署:Step 1: Implementation and deployment of G-A container (Grid-Agent Container):

网格容器如Globus Toolkit4通过实现基于WSRF标准的WEB服务提供各种资源共享的功能,包括网格安全基础设施(GSI),网格数据传输,网格资源监控和发现,网格作业管理,其他功能仍在不断完善。基于此开放的网格服务框架,将支持移动代理的服务加入到该框架中,直接支持代理的管理和交互是可行的。考虑到这里只关心多个移动代理解决大规模分布式计算的自适应问题,需要裁减多代理系统的功能。开发的G-A容器是一个基于开放的网格服务框架,能够容纳移动代理的网格容器。具体的开发和部署步骤如下:Grid containers such as Globus Toolkit4 provide various resource sharing functions by implementing WSRF-based WEB services, including grid security infrastructure (GSI), grid data transmission, grid resource monitoring and discovery, grid job management, and others Features are still being improved. Based on this open grid service framework, it is feasible to add services that support mobile agents into the framework and directly support the management and interaction of agents. Considering that only multiple mobile agents are concerned here to solve the adaptive problem of large-scale distributed computing, it is necessary to reduce the functions of the multi-agent system. The developed G-A container is a grid container based on an open grid service framework, which can accommodate mobile agents. The specific development and deployment steps are as follows:

④开发代理管理服务,该服务的功能满足FIPA规范,其实现方式满足WSRF规范,具体需要实现如下功能:④Develop agent management service. The function of this service meets the FIPA specification, and its implementation method meets the WSRF specification. Specifically, the following functions need to be implemented:

A.支持代理创建,包括:A. Support proxy creation, including:

a)支持作业管理中间件的调用,根据任务属性创建任务代理;a) Support the invocation of job management middleware, and create task agents according to task attributes;

b)支持从备份的中间数据恢复代理;b) support recovery of agents from backup intermediate data;

c)支持移动的任务代理的重建;c) Reconstruction of task agents that support mobility;

B.支持代理删除;B. Support proxy deletion;

a)失败代理数据的删除;a) Deletion of failed proxy data;

b)代理移动成功后,将本地的代理数据删除;b) After the agent moves successfully, delete the local agent data;

C.支持自动维护代理信息表;C. Support automatic maintenance agent information table;

a)创建代理后的代理信息的更新a) Update of agent information after agent creation

b)删除代理后的代理信息的更新b) Update of proxy information after proxy deletion

D.支持代理位置查询;D. Support agent location query;

⑤开发代理消息传输服务,该服务的功能满足FIPA规范,其实现方式满足WSRF规范,实现支持ACL消息的处理过程;⑤Develop the agent message transmission service, the function of this service meets the FIPA specification, its implementation method meets the WSRF specification, and realizes the process of supporting ACL messages;

⑥部署主G-A容器。它作为主资源监控和发现服务和主代理管理服务的宿主容器;⑥ Deploy the main G-A container. It serves as the host container for the main resource monitoring and discovery service and the main agent management service;

⑦部署子G-A容器。它们必须指出主资源监控和发现服务和主代理管理服务的宿主容器。⑦ Deploy the child G-A container. They must point to the host container for the main resource monitoring and discovery service and the main agent management service.

步骤2:面向代理编程的计算程序设计Step 2: Computing program design for agent programming

基于面向对象方法的程序在网格环境内执行的一个缺点在于其缺乏有效的迁移手段。通常进程或线程的迁移代价高昂,如JAVA中可以通过使用Brakers框架来支持线程的迁移。由于程序的开发人员通常清楚什么数据对程序恢复执行是必要的,因此可以通过让程序员自己指定哪些数据需要序列化,基于这些数据不能完全恢复代理中断执行前的瞬间状态,但可以恢复到“上一个”一致的状态。One of the disadvantages of object-oriented method-based programs executing in a grid environment is that they lack effective means of migration. Usually, the process or thread migration is expensive. For example, in JAVA, the Brakers framework can be used to support thread migration. Since the developer of the program usually knows what data is necessary for the program to resume execution, it is possible to allow the programmer to specify which data needs to be serialized. Based on these data, the instantaneous state before the agent interrupted execution cannot be completely restored, but it can be restored to " Previous" consistent state.

借鉴Jade中代理行为的概念,Jade是一个开源的基于JAVA的代理开发框架。编写任务代理的步骤如下:Drawing on the concept of agent behavior in Jade, Jade is an open source JAVA-based agent development framework. The steps to write a task agent are as follows:

⑧编写计算行为。它包含计算任务的代码。⑧ Write computational behavior. It contains code for computing tasks.

⑨编写移动策略行为。它在独立于代理的线程中执行,感知环境的变化和选择移动的目标。⑨ Write mobile strategy behavior. It executes in a thread independent of the agent, sensing changes in the environment and selecting targets for movement.

⑩编写序列化中间数据行为。定义程序中需要序列化的数据,定期或者移动前调度该行为执行。⑩ Write serialized intermediate data behavior. Define the data that needs to be serialized in the program, and schedule the behavior to execute periodically or before moving.

步骤3:创建任务代理Step 3: Create a task agent

为保持与现有网格作业管理中间件的兼容,任务代理的创建过程保持与作业提交的过程相同,作业的类型除了“FORK”、“MULTI”和“MPI”外,另外还需要支持“AGENT”。当作业管理工厂服务发现提交的作业类型是“AGENT”,则将该作业的实例化过程交给代理管理服务,具体的步骤如下:In order to maintain compatibility with the existing grid job management middleware, the task agent creation process remains the same as the job submission process. In addition to "FORK", "MULTI" and "MPI", the job type also needs to support "AGENT ". When the job management factory service finds that the submitted job type is "AGENT", it will hand over the instantiation process of the job to the agent management service. The specific steps are as follows:

编写作业描述文件。该文件需要明确两类作业信息: Write a job description file. The file needs to specify two types of job information:

A.作业属性:作业类型、程序语言、执行程序、程序执行参数、上传数据文件地址、结果输出地址、错误输出地址、代理证书等;A. Job attributes: job type, program language, execution program, program execution parameters, upload data file address, result output address, error output address, proxy certificate, etc.;

B.作业执行需求:体系结构、CPU理速度、CPU个数、可用内存大小、可用硬盘空间等;B. Job execution requirements: architecture, CPU processing speed, number of CPUs, available memory size, available hard disk space, etc.;

任务调度。调度器从网格资源监测和发现服务获得网格环境内所有资源的信息,并根据作业执行需求根据最佳匹配算法(即匹配性能最高的资源)选择执行的资源。 task scheduling. The scheduler obtains the information of all resources in the grid environment from the grid resource monitoring and discovery service, and selects the resource for execution according to the best matching algorithm (that is, the resource with the highest matching performance) according to the job execution requirements.

Figure S2008101241368D00071
任务提交。
Figure S2008101241368D00071
Task submission.

A.网格客户端程序将作业提交给资源的作业管理工厂服务;A. The grid client program submits the job to the resource's job management factory service;

B.作业管理工厂服务验证用户代理证书,并对该用户的行为授权,如果验证和授权成功则转到下一步,否则通过客户端安全验证失败;B. The job management factory service verifies the user agent certificate and authorizes the user's behavior. If the verification and authorization are successful, go to the next step, otherwise the client security verification fails;

C.作业管理工厂服务解析作业描述文件,如需准备数据,则调用网格数据传输服务将需要的数据传到指定的目录;C. The job management factory service parses the job description file, and if data needs to be prepared, call the grid data transfer service to transfer the required data to the specified directory;

D.作业管理工厂服务发现作业的类型为“AGENT”,将控制转移到代理管理服务;D. The job management factory service finds that the job type is "AGENT", and transfers control to the agent management service;

E.代理管理服务载入代理的代码,如果载入成功则返回全局的代理标识(AID),否则返回创建代理失败;E. The proxy management service loads the code of the proxy. If the loading is successful, it will return the global proxy ID (AID), otherwise it will return the failure to create the proxy;

F.代理管理服务更新代理信息表,并与主代理管理服务同步信息;F. The agent management service updates the agent information table and synchronizes information with the main agent management service;

G.任务代理创建完成。G. The task agent is created.

步骤4:移动任务代理Step 4: Mobile Task Agent

代理的移动策略触发代理的移动。而代理管理包含在网格容器中使得代理可以方便的访问本地资源监测与发现服务收集的本地资源信息,为代理移动的决策提供支持。代理移动的步骤如下:The agent's movement policy triggers the agent's movement. The agent management is included in the grid container so that the agent can conveniently access the local resource information collected by the local resource monitoring and discovery service, and provide support for the decision-making of agent movement. The steps for agent movement are as follows:

Figure S2008101241368D00072
代理的移动策略行为触发移动
Figure S2008101241368D00072
The agent's move policy action triggers the move

Figure S2008101241368D00073
代理中断当前执行,并执行序列化中间数据行为
Figure S2008101241368D00073
The agent interrupts the current execution and executes the serialization intermediate data behavior

Figure S2008101241368D00074
代理通知本地代理管理服务需要移动
Figure S2008101241368D00074
The agent notifies the local agent management service that it needs to move

Figure S2008101241368D00075
本地代理管理服务通过代理消息传输服务告知远程代理管理服务将要向他移动一个代理,同时调用网格数据传输服务将与代理相关数据传输到远程资源。
Figure S2008101241368D00075
The local agent management service informs the remote agent management service that an agent will be moved to him through the agent message transfer service, and at the same time calls the grid data transfer service to transfer the data related to the agent to the remote resource.

Figure S2008101241368D00076
当本地代理服务收到传输成功的消息后,发送启动代理的ACL命令消息给远程代理管理服务。
Figure S2008101241368D00076
After the local agent service receives the message of successful transmission, it sends the ACL command message for starting the agent to the remote agent management service.

Figure S2008101241368D00077
远程代理管理服务根据传输过来的代理信息重建代理,如果成功则返回成功消息,并更新代理信息表;否则,返回失败。
Figure S2008101241368D00077
The remote agent management service rebuilds the agent according to the transmitted agent information, and returns a success message if successful, and updates the agent information table; otherwise, returns failure.

Figure S2008101241368D00078
本地代理管理服务收到成功的消息,则将本地代理的信息删除,同时更新本地代理信息表;否则重新选择资源并转到④。
Figure S2008101241368D00078
When the local agent management service receives a successful message, it deletes the information of the local agent and updates the information table of the local agent; otherwise, select the resource again and go to ④.

步骤5:任务代理的定位Step 5: Locating the Task Agent

由于任务代理会随环境的变化移动,因此跟踪任务代理位置是确保能够获得任务代理的执行状态和执行结果的关键。任务代理的定位过程与域名服务器寻找IP地址的过程相似,具体的步骤如下:Since the task agent will move with the change of the environment, tracking the position of the task agent is the key to ensure that the execution status and execution result of the task agent can be obtained. The process of locating the task agent is similar to the process of finding the IP address of the domain name server. The specific steps are as follows:

21用户根据任务代理标识(AID),首先向用户所在主机的代理信息表缓存查询代理位置,如果查询成功则转到④;否则转到下一步;21. According to the task agent identification (AID), the user first inquires the agent position from the agent information table cache of the host computer where the user is located, and if the query is successful, then go to ④; otherwise, go to the next step;

22用户根据任务代理标识(AID)向主G-A容器中的代理管理服务请求该任务代理的位置;22. The user requests the location of the task agent from the agent management service in the main G-A container according to the task agent identifier (AID);

23主代理管理服务查询代理信息表,如果查询成功则返回给用户该任务代理的位置,否则返回失败消息;23. The main agent management service queries the agent information table, and if the query is successful, returns the position of the task agent to the user, otherwise returns a failure message;

24用户根据获取的任务代理位置,向该任务代理发出请求服务信息,如请求成功,则更新用户所在主机的代理信息表缓存。否则转到②。24. The user sends a request for service information to the task agent according to the acquired position of the task agent. If the request is successful, the agent information table cache of the host computer where the user is located is updated. Otherwise go to ②.

步骤6:任务结果的获取Step 6: Acquisition of task results

任务代理最终会将结果以文件的形式传输到作业属性定义的结果输出地址中,用户可以直接根据该地址下载数据。The task agent will finally transfer the result in the form of a file to the result output address defined by the job attribute, and the user can directly download the data according to the address.

Claims (2)

1.一种网格环境内面向代理编程计算任务的自适应方法,其特征在于该方法增加新的作业类型“AGENT”,使得任务代理的创建过程与现有网格任务的创建过程完全兼容;通过部署网格代理容器,该容器提供满足FIPA规范和WSRF规范的代理管理服务和代理消息服务,支持任务代理的移动和定位过程,使得任务代理能够自适应网格环境的变化,智能地移动决策,其具体的过程如下:1. An adaptive method for agent-oriented programming computing tasks in a grid environment, characterized in that the method adds a new job type "AGENT", so that the creation process of task agents is fully compatible with the creation process of existing grid tasks; By deploying the grid agent container, the container provides agent management services and agent message services that meet the FIPA specification and WSRF specification, supports the movement and positioning process of the task agent, and enables the task agent to adapt to changes in the grid environment and intelligently move decisions , the specific process is as follows: 第一步:面向代理编程的计算程序设计:Step 1: Computing program design for agent programming: 11.编写计算行为,它包含计算任务的代码,11. Write the calculation behavior, which contains the code of the calculation task, 12.编写移动策略行为,它在独立于代理的线程中执行,感知环境的变化和选择移动的目标,12. Write the mobile policy behavior, which is executed in a thread independent of the agent, senses the change of the environment and selects the target of the movement, 13.编写序列化中间数据行为,定义程序中需要序列化的数据,定期或者移动前调度该行为执行,13. Write the serialized intermediate data behavior, define the data that needs to be serialized in the program, and schedule the behavior to execute periodically or before moving, 第二步:创建任务代理:Step 2: Create a task agent: 21.编写作业描述文件,21. Write a job description file, 22.任务调度,22. Task scheduling, 23.任务提交:23. Task submission: i.网格客户端程序将作业提交给资源的作业管理工厂服务;i. The grid client program submits the job to the resource's job management factory service; ii.作业管理工厂服务验证用户代理证书,并对该用户的行为授权,如果验证和授权成功则转到下一步,否则通过客户端安全验证失败;ii. The job management factory service verifies the user agent certificate and authorizes the user's behavior. If the verification and authorization are successful, go to the next step, otherwise the client security verification fails; iii.作业管理工厂服务解析作业描述文件,如需准备数据,则调用网格数据传输服务将需要的数据传到指定的目录;iii. The job management factory service parses the job description file, and if data needs to be prepared, call the grid data transfer service to transfer the required data to the specified directory; iv.作业管理工厂服务发现作业的类型为“AGENT”,将控制转移到代理管理服务;iv. The job management factory service finds that the job type is "AGENT", and transfers control to the agent management service; v.代理管理服务载入代理的代码,如果载入成功则返回全局的代理标识,否则返回创建代理失败;v. The proxy management service loads the code of the proxy. If the loading is successful, it will return the global proxy ID, otherwise it will return the failure to create the proxy; vi.代理管理服务更新代理信息表,并与主代理管理服务同步信息;vi. The agent management service updates the agent information table and synchronizes the information with the main agent management service; vii.任务代理创建完成;vii. The task agent is created; 第三步:移动任务代理:Step 3: Mobile Task Agent: 31.代理的移动策略行为触发移动,31. The agent's move policy behavior triggers the move, 32.代理中断当前执行,并执行序列化中间数据行为,32. The agent interrupts the current execution and executes the behavior of serializing intermediate data, 33.代理通知本地代理管理服务需要移动,33. The agent informs the local agent that the management service needs to move, 34.本地代理管理服务通过代理消息传输服务告知远程代理管理服务将要向他移动一个代理,同时调用网格数据传输服务将与代理相关数据传输到远程资源,34. The local agent management service informs the remote agent management service that an agent will be moved to him through the agent message transmission service, and at the same time calls the grid data transmission service to transmit the data related to the agent to the remote resource, 35.当本地代理服务收到传输成功的消息后,发送启动代理的ACL命令消息给远程代理管理服务,35. After the local agent service receives the message of successful transmission, it sends the ACL command message to start the agent to the remote agent management service, 36.远程代理管理服务根据传输过来的代理信息重建代理,如果成功则返回成功消息,并更新代理信息表;否则,返回失败,36. The remote agent management service rebuilds the agent according to the transmitted agent information, and returns a success message if successful, and updates the agent information table; otherwise, returns failure, 37.本地代理管理服务收到成功的消息,则将本地代理的信息删除,同时更新本地代理信息表;否则重新选择资源并转到步骤34,37. When the local agent management service receives a successful message, the information of the local agent is deleted, and the information table of the local agent is updated at the same time; otherwise, the resource is reselected and the process goes to step 34, 第四步:任务代理的定位:Step 4: Positioning of the task agent: 41.用户根据任务代理标识,首先向用户所在主机的代理信息表缓存查询代理位置,如果查询成功则转到44;否则转到下一步;41. According to the task proxy ID, the user first queries the proxy location from the proxy information table cache of the host where the user is located, and if the query is successful, then go to step 44; otherwise, go to the next step; 42.用户根据任务代理标识向主网格代理容器中的代理管理服务请求该任务代理的位置;42. The user requests the location of the task agent from the agent management service in the main grid agent container according to the task agent identifier; 43.主代理管理服务查询代理信息表,如果查询成功则返回给用户该任务代理的位置,否则返回失败消息;43. The main agent management service queries the agent information table, and if the query is successful, returns the location of the task agent to the user, otherwise returns a failure message; 44.用户根据获取的任务代理位置,向该任务代理发出请求服务信息,如请求成功,则更新用户所在主机的代理信息表缓存。否则转到步骤42。44. The user sends a request for service information to the task agent according to the acquired position of the task agent, and if the request is successful, the agent information table cache of the host computer where the user is located is updated. Otherwise go to step 42. 2.根据权利要求1所述的一种网格环境内面向代理编程计算任务的自适应方法,其特征在于FIPA规范和WSRF规范的代理管理服务和代理消息服务的实现和部署的步骤如下:2. in a kind of grid environment according to claim 1, it is characterized in that the agent management service of FIPA specification and WSRF specification and the step of realization and deployment of agent message service are as follows: 代理管理服务:该服务的特性是其功能满足FIPA规范,其实现满足WSRF规范,需要实现的功能如下:Agent management service: The feature of this service is that its function meets the FIPA specification, and its implementation meets the WSRF specification. The functions to be implemented are as follows: A.支持代理创建,包括:A. Support proxy creation, including: A1.支持作业管理中间件的调用,根据任务属性创建任务代理;A1. Support the invocation of job management middleware, and create task agents according to task attributes; A2.支持从备份的中间数据恢复代理;A2. Support agent recovery from backup intermediate data; A3.支持移动的任务代理的重建;A3. Reconstruction of mobile task agents; B.支持代理删除;B. Support proxy deletion; B1.失败代理数据的删除;B1. Deletion of failed proxy data; B2.代理移动成功后,将本地的代理数据删除;B2. After the agent moves successfully, delete the local agent data; C.支持自动维护代理信息表;C. Support automatic maintenance agent information table; C1.创建代理后的代理信息的更新,C1. Update of agent information after agent creation, C2.删除代理后的代理信息的更新,C2. Update of agent information after agent deletion, D.支持代理位置查询;D. Support agent location query; 部署主网格代理容器,它作为主资源监控和发现服务和主代理管理服务的宿主容器;Deploy the main grid agent container, which serves as the host container for the main resource monitoring and discovery service and the main agent management service; 部署子网格代理容器,它们必须指出主资源监控和发现服务和主代理管理服务的宿主容器。Deploy child grid agent containers, which must point to the host container for the main resource monitoring and discovery service and the main agent management service.
CN2008101241368A 2008-06-13 2008-06-13 Self-adapting method of grid environment facing to proxy programming calculation task Expired - Fee Related CN101308463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101241368A CN101308463B (en) 2008-06-13 2008-06-13 Self-adapting method of grid environment facing to proxy programming calculation task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101241368A CN101308463B (en) 2008-06-13 2008-06-13 Self-adapting method of grid environment facing to proxy programming calculation task

Publications (2)

Publication Number Publication Date
CN101308463A CN101308463A (en) 2008-11-19
CN101308463B true CN101308463B (en) 2011-03-23

Family

ID=40124929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101241368A Expired - Fee Related CN101308463B (en) 2008-06-13 2008-06-13 Self-adapting method of grid environment facing to proxy programming calculation task

Country Status (1)

Country Link
CN (1) CN101308463B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073503B (en) * 2011-01-19 2013-08-21 上海交通大学 Context aware-based intemetware evolution method
CN102571410B (en) * 2011-10-28 2014-06-18 南京邮电大学 Method for monitoring behavior of remotely-executed mobile agent
TWI610166B (en) 2012-06-04 2018-01-01 飛康國際網路科技股份有限公司 Automated disaster recovery and data migration system and method

Also Published As

Publication number Publication date
CN101308463A (en) 2008-11-19

Similar Documents

Publication Publication Date Title
Luo et al. Container-based fog computing architecture and energy-balancing scheduling algorithm for energy IoT
US10042628B2 (en) Automated upgrade system for a service-based distributed computer system
US9672071B2 (en) Method and system for distributed processing of HTTP requests
US10922303B1 (en) Early detection of corrupt data partition exports
US10970649B2 (en) Automated reinforcement-learning-based application manager that uses local agents
CN110462589A (en) On-demand code execution in a local device coordinator
Essa et al. Mobile agent based new framework for improving big data analysis
WO2012163245A1 (en) Transaction-based service control system and control method therefor
Siddiqui et al. GLARE: A grid activity registration, deployment and provisioning framework
Memishi et al. Fault tolerance in MapReduce: A survey
Aversa et al. Magda: A mobile agent based grid architecture
Steffenel Improving the performance of fog computing through the use of data locality
CN101308463B (en) Self-adapting method of grid environment facing to proxy programming calculation task
Leite et al. Dohko: an autonomic system for provision, configuration, and management of inter-cloud environments based on a software product line engineering method
Thain et al. Building Reliable Clients and Services.
John et al. Making cloud easy: design considerations and first components of a distributed operating system for cloud
Liu et al. Automated data management and learning-based scheduling for ray-based hybrid hpc-cloud systems
Neuman et al. Resource management for distributed parallel systems
CN114546644A (en) Cluster resource scheduling method, device, software program, electronic device and storage medium
Kristiansson ColonyOS--A Meta-Operating System for Distributed Computing Across Heterogeneous Platform
Leite et al. Autonomic provisioning, configuration, and management of inter-cloud environments based on a software product line engineering method
Xiong et al. A novel resource management method of providing operating system as a service for mobile transparent computing
Jankowski et al. Grid checkpointing architecture-a revised proposal
Xiong et al. Amino-a distributed runtime for applications running dynamically across device, edge and cloud
Maheswaran et al. A language for programming edge clouds for next generation iot applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Assignee: JIANGSU JOYQUE INFORMATION INDUSTRY Co.,Ltd.

Assignor: NANJING University OF POSTS AND TELECOMMUNICATIONS

Contract record no.: 2012320000280

Denomination of invention: Self-adapting method of grid environment facing to proxy programming calculation task

Granted publication date: 20110323

License type: Exclusive License

Open date: 20081119

Record date: 20120322

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110323

CF01 Termination of patent right due to non-payment of annual fee