[go: up one dir, main page]

CN101079736A - Modeled network resource positioning method - Google Patents

Modeled network resource positioning method Download PDF

Info

Publication number
CN101079736A
CN101079736A CN 200710100325 CN200710100325A CN101079736A CN 101079736 A CN101079736 A CN 101079736A CN 200710100325 CN200710100325 CN 200710100325 CN 200710100325 A CN200710100325 A CN 200710100325A CN 101079736 A CN101079736 A CN 101079736A
Authority
CN
China
Prior art keywords
grid
resource
node
resources
user
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.)
Granted
Application number
CN 200710100325
Other languages
Chinese (zh)
Other versions
CN100452726C (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.)
Tsinghua University
Original Assignee
Tsinghua 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 Tsinghua University filed Critical Tsinghua University
Priority to CNB2007101003257A priority Critical patent/CN100452726C/en
Publication of CN101079736A publication Critical patent/CN101079736A/en
Application granted granted Critical
Publication of CN100452726C publication Critical patent/CN100452726C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

模型化的网格资源定位方法属于网格系统中网格资源定位技术领域,其特征在于:基于由逻辑实体和建模关系组成的网格资源模型,在该模型中,基于逻辑实体与网格资源之间以及建模关系与网格资源属性之间的映射关系,把以用户所需网格资源在资源模型中对应的逻辑实体为根的资源遍历线索转化为一条以该网格资源为资源定位入口,即作为根节点来用于替换所选逻辑实体的资源定位线索,用户节点只需要从注册节点中获取事先由网格节点注册的资源定位线索,便可从对应的网格节点中获取已定位的网格资源,此时,网格节点相应地要把遍历线索中的非根节点替换为对应的网格资源属性。本方法可扩展性及灵活性均好,而且也简化了注册节点上注册信息的一致性维护问题。

The modeled grid resource location method belongs to the technical field of grid resource location in grid systems, and is characterized in that it is based on a grid resource model composed of logical entities and modeling relationships. In this model, based on logical entities and grid The mapping relationship between resources and between modeling relationships and grid resource attributes transforms a resource traversal thread rooted at the logical entity corresponding to the grid resource required by the user in the resource model into a resource traversal thread that uses the grid resource as a resource The location entry is the resource location clue used to replace the selected logical entity as the root node. The user node only needs to obtain the resource location clue registered by the grid node in advance from the registration node, and then obtain it from the corresponding grid node. For grid resources that have been located, at this time, the grid node should replace the non-root nodes in the traversal thread with the corresponding grid resource attributes. The method has good scalability and flexibility, and also simplifies the problem of maintaining the consistency of the registration information on the registration node.

Description

模型化的网格资源定位方法Model-Based Grid Resource Locating Method

技术领域technical field

模型化的网格资源定位方法属于分布式技术与系统领域,尤其涉及高性能网格计算技术领域The model-based grid resource location method belongs to the field of distributed technology and systems, especially in the field of high-performance grid computing technology

背景技术Background technique

现代科学研究中人们求解问题的领域在不断扩大,所遇到的问题也越来越复杂,而且规模越来越大,解决这些问题所需要的计算能力也在大幅度提高,局部的计算资源已经无法满足需求。随着计算机和网络技术的迅猛发展,很多组织和科研单位都拥有计算能力很强的超级计算机,但这些机器往往因为只是孤立的为本单位服务而没有充分发挥作用,在大部分时间处于空闲状态。因此,打破地域的限制,协同使用在网络上广泛分布的各类资源已成为必须的要求。In modern scientific research, the field for people to solve problems is constantly expanding, and the problems they encounter are becoming more and more complex, and the scale is getting larger and larger. Unable to meet demand. With the rapid development of computer and network technology, many organizations and scientific research units have supercomputers with strong computing power, but these machines often do not fully function because they only serve their own units in isolation, and are idle most of the time . Therefore, it has become a necessary requirement to break the geographical restrictions and use various resources widely distributed on the network in coordination.

网格技术的提出和发展正是为了满足上述这种要求,其目标是跨地域实现异构资源的共享和协同工作,消除信息孤岛和资源孤岛。与它相关的技术包括网络技术、XML技术、Web服务技术(web service)、高性能计算等。随着网格技术的逐渐成熟,结合了面向服务理念的开放式网格服务架构(Open Grid Services Architecture,OGSA)已成为网格界事实上的标准,而Web服务资源框架(WS-Resource Framework,WSRF)是OGSA的最新实现规范。一个遵从OGSA架构的网格系统(也称为网格环境)通常包括以下三类实体:The proposal and development of grid technology is to meet the above-mentioned requirements, and its goal is to realize the sharing and collaborative work of heterogeneous resources across regions, and eliminate information islands and resource islands. Its related technologies include network technology, XML technology, Web service technology (web service), high-performance computing, etc. With the gradual maturity of grid technology, the Open Grid Services Architecture (OGSA) combined with the service-oriented concept has become the de facto standard in the grid world, and the Web Service Resource Framework (WS-Resource Framework, WSRF) is the latest implementation specification of OGSA. A grid system (also known as a grid environment) that complies with the OGSA architecture usually includes the following three types of entities:

●共享资源。真正提供计算能力、能独立运行的对象,如安装了操作系统的计算机,网络,存储系统等,是网格系统赖以运行的物质基础。网格中的共享资源由个人/组织(称为“资源所有者”或“管理员”)贡献,对外表现为自治的单位个体。资源所有者可以对其贡献的共享资源加以诸如“只有在机器负载不超过50%时才能被网格系统使用”之类的限定,用于限制网格系统对其共享资源的使用。加入网格系统的共享资源通常也称为网格节点,每一个网格节点在网格环境中都有全局唯一的标识(比如,使用IP地址来标识网格节点)。● Shared resources. Objects that really provide computing power and can run independently, such as computers with operating systems installed, networks, storage systems, etc., are the material basis on which the grid system operates. The shared resources in the grid are contributed by individuals/organizations (referred to as "resource owners" or "administrators"), and appear as autonomous units to the outside world. Resource owners can impose restrictions on the shared resources they contribute, such as "only when the machine load does not exceed 50% can be used by the grid system", which is used to limit the use of the shared resources by the grid system. Shared resources added to the grid system are usually also called grid nodes, and each grid node has a globally unique identifier in the grid environment (for example, an IP address is used to identify the grid node).

●网格服务。基于共享资源的本地运行环境(如操作系统)、为达到一定的功能目的,并按照特定的网格标准/规范(如WSRF)来开发的程序代码。网格服务部署在网格节点之上,使用共享资源的计算能力来处理用户的请求。将共享资源上配备的软件、已有程序等具有的功能发布为网格服务的过程称为服务包装。可以将多个网格服务按照一定的流程进行组合,发布为工作流网格服务,向用户提供更强大的功能。工作流服务和一般的网格服务对于用户而言没有区别,均为符合了特定网格标准/规范的网格服务。● Grid services. Based on the local operating environment of shared resources (such as the operating system), in order to achieve certain functional purposes, the program code is developed in accordance with specific grid standards/standards (such as WSRF). Grid services are deployed on grid nodes and use the computing power of shared resources to process user requests. The process of publishing the functions of software and existing programs on shared resources as grid services is called service packaging. Multiple grid services can be combined according to a certain process and published as a workflow grid service to provide users with more powerful functions. There is no difference between workflow service and general grid service for users, both are grid services conforming to specific grid standards/standards.

●用户。调用网格服务的实体,又称为用户节点。● Users. Entities that invoke grid services are also called user nodes.

网格环境中用户通过访问网格服务来获得共享资源贡献的计算能力。按照WSRF规范来实现的网格服务每接收到一个访问请求,都会实时地生成服务资源或选择一个事先已实例化好的服务资源来处理此次请求;用户请求在处理过程中产生的特征则通过该服务资源的属性来表现。比如,某一网格节点上部署有一个批处理服务,它接到用户提交的一个批处理任务请求后,将生成一个批处理服务资源来负责该用户任务的执行事宜;批处理服务资源具有“任务状态”这一资源属性,该属性的值(如“队列中”、“正在执行”、“结束”等)则说明了对应用户任务的执行情况。因此,服务资源反应了共享资源向用户提供计算力的情况,称这样的服务资源为网格资源。具体地说,网格资源是在共享资源之上的一个逻辑概念,它们通过虚拟化和聚合共享资源的计算能力来向用户提供与网格服务对应的功能。一个网格资源的访问地址(即定位信息)在整个网格环境中都是全局唯一的。In the grid environment, users obtain the computing power contributed by shared resources by accessing grid services. Every time a grid service implemented according to the WSRF specification receives an access request, it will generate a service resource in real time or select a service resource that has been instantiated in advance to process the request; the characteristics generated during the processing of the user request are passed through properties of the service resource. For example, a batch processing service is deployed on a certain grid node. After receiving a batch processing task request submitted by a user, it will generate a batch processing service resource to be responsible for the execution of the user task; the batch processing service resource has " The resource attribute of "task status", the value of this attribute (such as "in queue", "executing", "end", etc.) indicates the execution status of the corresponding user task. Therefore, service resources reflect the situation that shared resources provide computing power to users, and such service resources are called grid resources. Specifically, grid resources are a logical concept on top of shared resources, and they provide users with functions corresponding to grid services by virtualizing and aggregating the computing power of shared resources. The access address (that is, location information) of a grid resource is globally unique in the entire grid environment.

网格服务和网格资源之间是互相对应的。不同的网格服务它们对应的网格资源也不同。依据WSRF规范,这种对应关系有“一般”和“Singleton”两种模式。Singleton模式的网格服务在运行期间只会对应一个网格资源,所有请求均由该网格资源来完成;一般模式的网格服务在运行期间可对应多个网格资源,这些资源既能在接收用户请求后动态实例化,也可在初始化时就预先生成。总体上来说,Singleton模式使用得较少,而一般模式较为普遍。鉴于网格服务功能上的差异,它们对应的网格资源在结构、内容、实现等方面的差别也极大,这种现象称为网格资源的异构性。Grid services and grid resources correspond to each other. Different grid services have different corresponding grid resources. According to the WSRF specification, this correspondence has two modes: "General" and "Singleton". A grid service in Singleton mode can only correspond to one grid resource during operation, and all requests are completed by this grid resource; a grid service in general mode can correspond to multiple grid resources during operation, and these resources can be It can be dynamically instantiated after receiving user requests, or it can be pre-generated during initialization. Generally speaking, the Singleton mode is used less, and the general mode is more common. In view of the differences in the functions of grid services, their corresponding grid resources also have great differences in structure, content, and implementation. This phenomenon is called the heterogeneity of grid resources.

对于按一般模式实现的网格服务,如何管理其对应的网格资源,完全由资源所有者决定。当网格节点对同时处理的任务数有一定限制时,一般会采用“事先生成一组网格资源供网格服务选择”的办法,通过网格资源的数目来限定用户请求的数目。也可将“事先生成”和“动态实例化”这两种办法混合使用:首先生成一组网格资源以备使用;当用户请求到来时,如果有空闲的网格资源就从中选取一个,请求处理完毕后网格资源回归空闲状态;如果没有空闲的网格资源,将动态实例化新的网格资源,请求处理完毕后网格资源将被销毁。不论哪一种方式,网格节点上的网格资源均是动态变化的:一是资源属性的值随着用户请求的执行而发生变化,二是网格资源可随着用户请求的到来而实时生成,随着用户请求的处理完毕而消亡。For grid services implemented in a general mode, how to manage their corresponding grid resources is entirely up to the resource owner. When grid nodes have a certain limit on the number of tasks that can be processed at the same time, the method of "generating a set of grid resources for grid service selection in advance" is generally adopted, and the number of user requests is limited by the number of grid resources. The two methods of "pre-generation" and "dynamic instantiation" can also be mixed: first, a set of grid resources is generated for use; After the processing is completed, the grid resource returns to the idle state; if there is no idle grid resource, a new grid resource will be dynamically instantiated, and the grid resource will be destroyed after the request is processed. Either way, grid resources on grid nodes are dynamically changing: first, the value of resource attributes changes with the execution of user requests, and second, grid resources can be updated in real time with the arrival of user requests Spawns, dies as the user request is processed.

当用户访问网格系统时,首先需要知道系统中网格节点、网格服务和网格资源的信息,才能判断该网格系统能否满足他的计算需求。为达到这一目的,通常选定某些网格节点为注册节点,负责维护系统中全部或部分网格节点、网格服务、及网格资源的信息。注册节点是一个逻辑上的概念,用户总能获知注册节点的访问方法。通过注册节点,用户可以查询到该注册节点维护的任何信息。一个网格系统中可以有一个或多个注册节点,每一个需要注册的实体可以到任意注册节点上进行注册,注册的内容称为注册实体的元数据,比如CPU类型、操作系统、当前状态、磁盘容量、部署的应用软件、访问地址和协议等。元数据是描述数据的数据,用于给出数据的结构和意义,为一个抽象概念。这里的元数据向用户展示了网格系统中注册实体的状态、特征和功能等方面的内容。When a user accesses a grid system, he first needs to know the information of grid nodes, grid services and grid resources in the system in order to judge whether the grid system can meet his computing needs. To achieve this purpose, some grid nodes are usually selected as registration nodes, responsible for maintaining all or part of the grid nodes, grid services, and grid resource information in the system. The registration node is a logical concept, and the user can always know the access method of the registration node. By registering a node, users can query any information maintained by the registered node. There can be one or more registration nodes in a grid system. Each entity that needs to be registered can register on any registration node. The registered content is called the metadata of the registration entity, such as CPU type, operating system, current state, Disk capacity, deployed application software, access addresses and protocols, etc. Metadata is the data that describes the data, which is used to give the structure and meaning of the data, and is an abstract concept. The metadata here shows users the status, characteristics and functions of registered entities in the grid system.

综上所述,在遵从OGSA框架和WSRF规范的网格环境中,自治的网格节点按照一定的标准和协议把本地对外共享的资源按照其确定的资源模型进行服务化包装,并根据实际情况来动态生成或使用预先初始化好的网格资源。不同网格节点上的网格资源在语法和语义(结构和内容)上都可能有所不同,呈现异构性,且它们的组织管理方式也可能不同。用户在使用网格资源所呈现的计算能力之前,必须先对网格资源进行定位。To sum up, in a grid environment that complies with the OGSA framework and WSRF specifications, the autonomous grid nodes package the local externally shared resources according to their determined resource models according to certain standards and protocols, and according to the actual situation to dynamically generate or use pre-initialized grid resources. Grid resources on different grid nodes may be different in syntax and semantics (structure and content), showing heterogeneity, and their organization and management methods may also be different. Users must first locate the grid resources before using the computing power presented by the grid resources.

目前的网格资源定位方案大多采用“层次注册-直接索引”的形式,如Globus Toolkit中的Monitoring and Discovery System(MDS),可将注册节点组建为任意层次,多个注册节点之间可以互相注册,甚至构成环状的索引关系;网格资源的信息可通过其直接注册的注册节点依次逐层到达其他注册节点。这种“层次注册-直接索引”的方式虽然具有良好的组织性,但其工作对象为网格资源,粒度过于细化,主要存在以下几个缺点:Most of the current grid resource positioning schemes adopt the form of "hierarchical registration-direct indexing", such as the Monitoring and Discovery System (MDS) in Globus Toolkit, which can organize registration nodes into any hierarchy, and multiple registration nodes can register with each other , and even form a ring-shaped index relationship; the information of grid resources can reach other registration nodes layer by layer through its directly registered registration nodes. Although this "hierarchical registration-direct index" method has good organization, its working object is grid resources, and the granularity is too fine, which mainly has the following disadvantages:

●当系统规模增大时,网格资源的数目也相应增多,在层次结构中处于高层的注册节点需要维护的注册信息急剧增加,容易造成单点失效,可扩展性差;●When the scale of the system increases, the number of grid resources also increases accordingly, and the registration information that needs to be maintained by the registration nodes at the upper level in the hierarchical structure increases sharply, which is likely to cause single point failure and poor scalability;

●由于网格资源的动态性,需要保证网格资源自身和多个注册节点上保存信息的一致性。当网格资源的信息变化频繁时,一致性维护将产生大量开销;●Because of the dynamic nature of grid resources, it is necessary to ensure the consistency of the grid resources themselves and the information stored on multiple registration nodes. When the information of grid resources changes frequently, consistency maintenance will generate a lot of overhead;

●因为注册节点都是同构的,这要求系统中所有网格节点上的网格资源都必须按照相同的规范/标准(甚至是相同的工具)来实现,灵活性差。●Because the registered nodes are all isomorphic, this requires that the grid resources on all grid nodes in the system must be implemented according to the same specification/standard (or even the same tool), and the flexibility is poor.

在“层次注册-直接索引”的背景下,模型化的网格资源定位方法基于网格节点自治的特性,将注册节点的工作对象从网格节点上的动态网格资源转向相对静态的资源模型,放松了对网格节点实现网格资源所采用规范/工具上的限制,既增加了灵活性,又简化了注册节点上注册信息的一致性维护和可扩展性问题。In the context of "hierarchical registration-direct indexing", the modeled grid resource location method is based on the characteristics of grid node autonomy, and the work object of the registered node is changed from the dynamic grid resource on the grid node to the relatively static resource model , relaxes the restrictions on the norms/tools adopted by grid nodes to implement grid resources, which not only increases flexibility, but also simplifies the consistency maintenance and scalability of registration information on registration nodes.

发明内容Contents of the invention

本发明的目的在于提供一种模型化的网格资源定位方法,以便为实现网格环境下的资源共享奠定基础。本方法以网格节点的自治性为出发点,通过相对静态的网格节点资源模型关联其上异构且动态的网格资源,并将与该资源模型对应的网格资源定位线索作为元数据注册到注册节点。由于网格节点资源模型的静态性,采用本方法能有效解决由网格资源的动态性所引起的注册信息一致性维护问题,同时可以提高可扩展性;另一方面,网格节点可采用任意喜欢的方式对本地共享资源进行网格服务化包装,既体现了网格节点的自治性,又增强了提高系统的灵活性。The purpose of the present invention is to provide a modeled grid resource positioning method, so as to lay the foundation for realizing resource sharing in the grid environment. This method takes the autonomy of grid nodes as a starting point, associates heterogeneous and dynamic grid resources on it through a relatively static grid node resource model, and registers the grid resource location clues corresponding to the resource model as metadata to the registration node. Due to the static nature of the grid node resource model, this method can effectively solve the problem of maintaining registration information consistency caused by the dynamic nature of grid resources, and at the same time improve scalability; on the other hand, grid nodes can use any The favorite way to package local shared resources as a grid service not only reflects the autonomy of grid nodes, but also enhances the flexibility of the system.

为更好地说明本发明的内容,首先进行如下说明和名词解释:For better illustrating content of the present invention, at first carry out following explanation and term explanation:

1.资源模型。网格节点对外表现为自治的单位个体,但其内部可能包含有多个子个体。资源模型是对网格节点进行抽象后的结果,主要包括逻辑实体(LogicEntities)和逻辑实体间关系(Relations)两部分:逻辑实体表示网格节点的内在元素;关系表示两个内在元素之间的联系,也称为建模关系,具有一对一(1∶1),一对多(1∶N),多对多(N∶N)等数量描述属性。比如,可以将集群类型的网格节点抽象为“内部节点”和“进程”这两个元素;进程是运行在内部节点上的,故这两个元素间有“运行在”这一联系;一个内部节点上可以运行多个进程,而一个进程只能在一个内部节点上,故“内部结点”和“进程”之间是一对多的关系;因此,按上述方式建模的资源模型包括“内部节点”和“进程”这两个逻辑实体,以及“运行在(一对多)”这一建模关系。为简单起见,建模关系的数量描述属性只在必要的地方才提到,其它均省略。对于包含N个逻辑实体的资源模型,数学定义如下所示:1. Resource model. A grid node appears as an autonomous unit to the outside, but it may contain multiple sub-individuals. The resource model is the result of abstracting grid nodes, mainly including two parts: logical entities (LogicEntities) and relations between logical entities (Relations): logical entities represent the internal elements of grid nodes; relations represent the relationship between two internal elements Relationships, also known as modeling relationships, have quantitative description attributes such as one-to-one (1:1), one-to-many (1:N), and many-to-many (N:N). For example, a cluster-type grid node can be abstracted into two elements: "internal node" and "process"; a process runs on an internal node, so there is a relationship of "running in" between these two elements; a Multiple processes can run on an internal node, but a process can only run on one internal node, so there is a one-to-many relationship between "internal node" and "process"; therefore, the resource model modeled in the above way includes The two logical entities of "internal node" and "process", and the modeling relationship of "running in (one-to-many)". For the sake of simplicity, the quantity description attributes of modeling relations are only mentioned where necessary, and others are omitted. For a resource model containing N logical entities, the mathematical definition looks like this:

ResourceModel={LogicEntities,Relations}ResourceModel = {LogicEntities, Relations}

LogicEntites={LogicEntityi|i=1,2,...,N}LogicEntites={LogicEntity i |i=1, 2, ..., N}

Relations={R(i,j)=<log icEntityi,log icEntityj>|i≠j,i∈{1,...,N},j∈{1,...,N}}Relations={R(i, j)=<log icEntity i , log icEntity j >|i≠j, i∈{1,...,N}, j∈{1,...,N}}

R(i,j)(1∶N-1)=R(j,i)(N-1∶1)R(i,j)(1:N-1)=R(j,i)(N-1:1)

2.连通的资源模型。对网格节点进行建模的过程是人为的,因而按照不同目的进行抽象的结果往往是不同的。比如,从分布式系统组成的角度出发,可以将机群建模为包含“内部节点”、“进程”、和“集群间网络”这三个逻辑实体,以及“运行在”这一关系的资源模型。在一个资源模型中,如果两个逻辑实体间存在有直接的关系,或可通过与一个或多个其他逻辑实体间的关系来间接联系,称这两个逻辑实体是连通的。若任意两个逻辑实体间均能连通,则称该资源模型是连通的。连通两个逻辑实体的一组建模关系序列称为这两个逻辑实体间的一条路径,如<R(i,k1),R(k2,k3),…,R(ka,j)>是LogicEntityi和LogicEntityj间的一条路径,其中,i∈{1,…,N},j∈{1,…,N},kx∈{1,…,N},i≠j,kx≠i,kx≠j,且kx≠ky,x,y=1,2,…,a,a≤N-2。对于上面的例子,因为只有一个“运行在”的关系,只能联系“内部节点”和“进程”这两个逻辑实体,而“集群间网络”跟其他逻辑实体之间没有关系存在,处于孤立的状态,故该资源模型是不连通的。2. Connected resource model. The process of modeling grid nodes is artificial, so the results of abstracting according to different purposes are often different. For example, from the perspective of distributed system composition, the cluster can be modeled as a resource model that includes three logical entities of "internal node", "process", and "inter-cluster network", as well as the relationship of "running on" . In a resource model, two logical entities are said to be connected if there is a direct relationship between them, or they can be indirectly linked through a relationship with one or more other logical entities. If any two logical entities can be connected, the resource model is said to be connected. A set of modeling relationship sequences connecting two logical entities is called a path between these two logical entities, such as <R(i,k 1 ), R(k 2 ,k 3 ),…,R(k a , j)> is a path between LogicEntity i and LogicEntity j , where i∈{1,…,N}, j∈{1,…,N}, k x ∈{1,…,N}, i≠j , k x ≠ i, k x ≠ j, and k x ≠ k y , x, y=1, 2, ..., a, a≤N-2. For the above example, because there is only one "running in" relationship, only the two logical entities "internal node" and "process" can be connected, while the "inter-cluster network" has no relationship with other logical entities and is isolated state, so the resource model is disconnected.

3.资源模型的遍历线索和网格节点的资源定位线索。资源定位线索是针对具有连通资源模型的网格节点来定义的。在网格节点进行服务包装的过程中,将资源模型中的每一个逻辑实体都实现为一个网格服务,而把建模关系实现为网格资源的一个属性。网格服务与网格资源之间是互相对应的,因此网格资源与逻辑实体之间也存在映射关系;一个逻辑实体参与的每一个建模关系都将是与该逻辑实体对应的网格资源上的一个属性。3. The traversal clue of the resource model and the resource location clue of the grid node. Resource location cues are defined for grid nodes with connected resource models. In the process of grid node's service packaging, each logical entity in the resource model is realized as a grid service, and the modeling relationship is realized as an attribute of the grid resource. Grid services and grid resources correspond to each other, so there is also a mapping relationship between grid resources and logical entities; each modeling relationship that a logical entity participates in will be the grid resource corresponding to the logical entity an attribute on .

[1]资源模型可看作是以逻辑实体为顶点,建模关系为边的图,因而可具有生成树。在一个连通的资源模型中,从逻辑实体LE出发可以到达其他任意逻辑实体;按照生成树的思想,将LE到达其他任意逻辑实体的路径集合组织为一棵以LE为根、建模关系为非根节点的树,称为资源模型的一条遍历线索;[1] The resource model can be regarded as a graph with logical entities as vertices and modeling relationships as edges, so it can have a spanning tree. In a connected resource model, any other logical entity can be reached from the logical entity LE; according to the idea of spanning tree, the set of paths from LE to any other logical entity is organized into a tree with LE as the root and the modeling relationship as non- The tree of the root node is called a traversal thread of the resource model;

[2]网格节点上的所有网格资源都与资源模型中的一个逻辑实体对应,因而从任意一个网格资源GR出发,通过对应于建模关系的网格资源属性构成的序列,能到达其他任意网格资源;[2] All grid resources on a grid node correspond to a logical entity in the resource model, so starting from any grid resource GR, through the sequence of grid resource attributes corresponding to the modeling relationship, one can reach other arbitrary grid resources;

[3]假设GR对应的逻辑实体为LE,对于一条以LE为根的遍历线索,将根节点LE替换成GR的定位信息,非根节点(即建模关系)替换为对应的网格资源属性,称替换完成后的树为网格节点的一条资源定位线索。[3] Assuming that the logical entity corresponding to GR is LE, for a traversal thread with LE as the root, replace the root node LE with the location information of GR, and replace the non-root node (that is, the modeling relationship) with the corresponding grid resource attribute , the tree after the replacement is called a resource location clue of the grid node.

[4]因为两个逻辑实体间可能不止一条路径,故以同一个逻辑实体为根的遍历线索也可能有多条。对应地,以同一个网格资源为根的资源定位线索也可能有多个。[4] Since there may be more than one path between two logical entities, there may be multiple traversal clues rooted at the same logical entity. Correspondingly, there may be multiple resource location clues that take the same grid resource as the root.

4.网格资源的索引路径。在资源模型中,一个逻辑实体可通过一条路径到达另一个逻辑实体,将这条路径中的建模关系依次换成对应的网格资源属性,则可以得到一条网格资源间的索引路径。假设<R(LEk1,LEk2),R(LEk2,LEk3),…,R(LEk(i-1),LEki)>为资源模型中从逻辑资源LEki到逻辑资源LEi的一条路径,与R(LEi,LEj)对应的网格资源属性为RP(LEi,LEj),则与这条路径对应的索引路径为<RP(LEk1,LEk2),RP(LEk2,LEk3),…,RP(LEk(i-1),LEki)>。4. The index path of the grid resource. In the resource model, a logical entity can reach another logical entity through a path, and by replacing the modeling relationship in this path with the corresponding grid resource attribute, an index path between grid resources can be obtained. Assume that <R(LE k1 , LE k2 ), R(LE k2 , LE k3 ), ..., R(LE k(i-1) , LE ki )> is the logical resource LE ki to logical resource LE i in the resource model A path of , and the grid resource attribute corresponding to R(LE i , LE j ) is RP(LE i , LE j ), then the index path corresponding to this path is <RP(LE k1 , LE k2 ), RP (LE k2 , LE k3 ), . . . , RP(LE k(i-1) , LE ki )>.

5.每一个网格资源在网格环境中都能通过它的访问地址(即定位信息)来唯一标识,故在不会引起歧义的地方网格资源的定位信息也可直接用网格资源来代替。5. Each grid resource can be uniquely identified by its access address (location information) in the grid environment, so the location information of the grid resource can also be directly identified by the grid resource where there is no ambiguity. replace.

本发明的主要特征为:在OGSA架构和WSRF规范的支持下,网格节点采用面向模型的思想,依据其资源模型来构建向注册节点注册的元数据,使得用户节点可以通过向注册节点查询网格节点的资源定位线索,并据此来对网格节点上的动态网格资源进行查找定位。首先对网格节点进行资源建模,保证其资源模型为一个连通的逻辑实体关系网络;确定逻辑实体与网格资源、建模关系与网格资源属性的映射关系,并据此来实现和初始化网格节点上的网格服务和网格资源;任意选取某个网格资源为资源定位入口,依据资源模型中的遍历线索构建出一条资源定位线索,并将其作为网格节点的元数据向注册节点注册。用户节点通过资源模型理解网格节点上网格资源间的联系后,根据资源定位线索,从资源定位入口出发能对网格节点上的动态网格资源进行有效定位。The main features of the present invention are: under the support of OGSA architecture and WSRF specification, the grid node adopts the idea of model-oriented, and constructs the metadata registered with the registration node according to its resource model, so that the user node can query the network information from the registration node. The resource location clue of the grid node is used to search and locate the dynamic grid resource on the grid node. First, carry out resource modeling on the grid nodes to ensure that the resource model is a connected logical entity relationship network; determine the mapping relationship between logical entities and grid resources, modeling relationships and grid resource attributes, and implement and initialize accordingly Grid services and grid resources on grid nodes; any grid resource is selected as the resource location entry, and a resource location clue is constructed according to the traversal clues in the resource model, and it is used as the metadata of the grid node to Register node registration. After the user node understands the connection between grid resources on the grid node through the resource model, it can effectively locate the dynamic grid resource on the grid node from the resource location entrance according to the resource location clue.

基于上述特征,模型化的网格资源定位方法的发明内容包括:Based on the above characteristics, the invention content of the modeling grid resource positioning method includes:

1.网格节点的资源建模和服务化包装实现。网格节点的资源所有者或管理员首先对本地物理资源进行建模,保证其资源模型的全连通性,并确定逻辑实体与网格资源、建模关系与网格资源属性的映射关系,将网格节点实现为与资源模型对应的网格资源关系网络。具体包括:1. Resource modeling and service packaging implementation of grid nodes. The resource owner or administrator of the grid node first models the local physical resources to ensure the full connectivity of the resource model, and determines the mapping relationship between the logical entity and the grid resource, the modeling relationship and the grid resource attribute. Grid nodes are implemented as grid resource relational networks corresponding to resource models. Specifically include:

1)根据实际情况给出网格节点的一个初始资源模型InitRM(具有N个逻辑实体),判断该模型是否是连通的,如果不是,则进行以下操作:1) According to the actual situation, an initial resource model InitRM (with N logical entities) of the grid node is given, and it is judged whether the model is connected. If not, the following operations are performed:

[1]将InitRM看成以逻辑实体为顶点,建模关系为边的图,找出资源模型中不相交的连通子图,使得InitRM=P1∪P2∪…∪Pm,m≤n[1] Treat InitRM as a graph with logical entities as vertices and modeling relationships as edges, and find disjoint connected subgraphs in the resource model, so that InitRM=P1∪P2∪…∪Pm, m≤n

[2]分别从每个连通子图Pi(i=1,…,m)中任意选出一个逻辑实体LEPi [2] Randomly select a logical entity LE Pi from each connected subgraph Pi (i=1,...,m)

[3]在InitRM中添加一个辅助性逻辑实体LEn+1和m个辅助性建模关系<LEn+1,LEpi>,i=1,…,m[3] Add an auxiliary logical entity LE n+1 and m auxiliary modeling relations <LE n+1 , LE pi >, i=1,...,m in InitRM

注意:步骤[3]的目的是使m个不相交的连通子图之间互相连通,最简单的方法直接就是添加m-1个的建模关系;也可以是添加k个辅助性逻辑实体LEn+1,…,LEn+k和m+k-1个辅助性建模关系。选取何种办法完全取决于资源所有者。InitRM添加了辅助性逻辑实体和建模关系后成为了一个连通的资源模型FCRM。Note: The purpose of step [3] is to make m disjoint connected subgraphs connected to each other. The easiest way is to add m-1 modeling relationships directly; it can also be to add k auxiliary logical entities LE n+1 , ..., LE n+k and m+k-1 auxiliary modeling relations. Which approach to choose is entirely up to the resource owner. InitRM becomes a connected resource model FCRM after adding auxiliary logical entities and modeling relations.

2)逻辑实体与网格资源、建模关系与网格资源属性的映射关系。网格节点的服务包装基于FCRM进行,将FCRM中的每一个逻辑实体都实现为一个网格服务,而把每一个建模关系实现为网格资源的一个属性。因为网格服务与网格资源是互相对应的,故网格资源与逻辑实体之间也是相互映射的,逻辑实体间的建模关系也用于表示网格资源间的联系;一个逻辑实体参与的每一个建模关系都将是与所有映射为该逻辑实体的网格资源上的一个属性。具体包括:2) The mapping relationship between logical entity and grid resource, modeling relationship and grid resource attribute. The service packaging of grid nodes is based on FCRM, and each logical entity in FCRM is implemented as a grid service, and each modeling relationship is implemented as an attribute of grid resources. Because grid services and grid resources correspond to each other, grid resources and logical entities are also mapped to each other, and the modeling relationship between logical entities is also used to represent the relationship between grid resources; a logical entity participates in Each modeling relationship will be an attribute on all grid resources mapped to that logical entity. Specifically include:

[1]对于辅助性逻辑实体,即非初始资源模型InitRM中的逻辑实体,实现为Singleton模式的网格服务,具有唯一的一个网格资源;而InitRM中的逻辑实体可实现为一般模式或Singleton模式的网格服务。[1] For the auxiliary logical entity, that is, the logical entity in the non-initial resource model InitRM, it is implemented as a grid service in Singleton mode, with only one grid resource; while the logical entity in InitRM can be implemented as a general mode or Singleton schema for grid services.

[2]如果逻辑实体LEi和LEj间存在着建模关系R(i,j),R(i,j)对应资源属性为RP(i,j),则无论对应LEi还是对应LEj的网格资源都具有资源属性RP(i,j);[2] If there is a modeling relationship R(i, j) between the logical entity LE i and LE j , and the resource attribute corresponding to R(i, j) is RP(i, j), then whether it corresponds to LE i or LE j The grid resources of all have the resource attribute RP(i, j);

[3]RP(i,j)的值为列表类型,每一项都存储着与该网格资源具有建模关系R(i,j)的其他网格资源的访问地址(即定位信息);[3] The value of RP(i, j) is a list type, and each item stores the access addresses (that is, location information) of other grid resources that have a modeling relationship R(i, j) with this grid resource;

[4]如果逻辑实体LEi和LEj间的建模关系为R(i,j)(1:N),则对应LEi的网格资源上RP(i,j)的值只有一项,而对应LEj的网格资源上R(i,j)的值可有多项。[4] If the modeling relationship between the logical entity LE i and LE j is R(i, j)(1:N), then there is only one value of RP(i, j) on the grid resource corresponding to LE i , However, there may be multiple values of R(i, j) on the grid resource corresponding to LE j .

3)将网格节点的连通资源模型、逻辑实体与网格资源的映射、建模关系与网格资源属性的映射用XML语言表示,并以文件的形式保存在网格节点本地。3) The connected resource model of grid nodes, the mapping between logical entities and grid resources, and the mapping between modeling relationships and grid resource attributes are expressed in XML language, and stored locally in grid nodes in the form of files.

2.将网格资源定位过程中涉及到的对象在逻辑上分为注册节点、网格节点和用户节点,三者之间的总体关系和交互流程图如附图1和附图2所示。其中,2. The objects involved in the grid resource positioning process are logically divided into registration nodes, grid nodes and user nodes. The overall relationship and interaction flow charts among the three are shown in Figure 1 and Figure 2. in,

1)用户节点为发起网格资源定位的网格实体。1) The user node is a grid entity that initiates grid resource location.

2)网格节点通过网格资源来向用户节点提供计算能力。如附图3所示,网格节点具有一个实时存储空间,其用于网格资源定位的模块包括:2) Grid nodes provide computing power to user nodes through grid resources. As shown in Figure 3, the grid node has a real-time storage space, and its modules for grid resource location include:

■初始化服务模块InitResources。用于网格节点的初始化操作,主要负责网格节点运行环境的初始化工作,工作流程如下:■ Initialize the service module InitResources. It is used for the initialization operation of grid nodes. It is mainly responsible for the initialization of the grid node operating environment. The workflow is as follows:

[1]在实时存储空间中加载以XML文件的形式保存的资源模型、逻辑实体与网格资源的映射、以及建模关系与网格资源属性的映射。为方便描述,以ModelDescription代表该XML文件的内容。[1] Load the resource model saved in the form of XML file, the mapping between logical entity and grid resource, and the mapping between modeling relationship and grid resource attribute in the real-time storage space. For convenience of description, ModelDescription is used to represent the content of the XML file.

[2]根据ModelDescription,以及资源所有者对本地计算能力共享方面的设置(如网格节点启动时预先初始化的各类网格资源的数目、各类网格资源的最大数目等,通常用配置文件保存这些设置),实例化网格服务和网格资源,将它们的信息在实时存储空间以XML的方式保存。[2] According to the ModelDescription and the resource owner's settings on local computing capacity sharing (such as the number of various grid resources pre-initialized when the grid node starts, the maximum number of various grid resources, etc., usually use the configuration file save these settings), instantiate grid services and grid resources, and save their information in the real-time storage space in the form of XML.

[3]构建资源定位线索。资源模型中的两个逻辑实体间可能存在有多条连通路径,因而两个网格资源间也对应地可能有多条索引路径,进而网格节点上的资源定位线索也可有多条,需要选定其中的一条作为注册元数据。操作步骤如下:[3] Build resource location clues. There may be multiple connection paths between two logical entities in the resource model, so there may be multiple index paths between two grid resources, and there may be multiple resource location clues on grid nodes. Select one of them as the registration metadata. The operation steps are as follows:

a)从已经实例化的网格资源中随机选取一个网格资源GR作为资源定位入口;a) Randomly select a grid resource GR from the instantiated grid resources as the resource location entry;

b)依据逻辑实体与网格资源之间的映射,找出GR在资源模型中对应的逻辑实体LE;b) According to the mapping between logical entities and grid resources, find out the logical entity LE corresponding to GR in the resource model;

c)在资源模型中随机选出一条LE为根的遍历线索TGlue;c) Randomly select a traversal thread TGlue with LE as the root in the resource model;

d)将TGlue的根替换为GR的定位信息,并依据建模关系与网格资源属性的映射,将TGlue中的非根节点替换为对应的网格资源属性。这样,就得到了一条以GR为资源定位入口的资源定位线索。d) Replace the root of TGlue with the location information of GR, and replace the non-root nodes in TGlue with the corresponding grid resource attributes according to the mapping between modeling relationships and grid resource attributes. In this way, a resource location clue using GR as the resource location entry is obtained.

[4]将资源定位线索作为网格节点的注册信息向注册节点注册。[4] Register the resource location clue as the registration information of the grid node to the registration node.

■模型元数据服务模块ModelMetadata。从作用上来说,它以XML的形式向用户提供网格节点的资源建模及网格资源实现方案的可读说明,即网格节点资源模型、逻辑实体与网格资源的映射、以及建模关系与网格资源属性的映射等内容的XML描述。该模块提供的方法包括:■ Model metadata service module ModelMetadata. In terms of function, it provides users with resource modeling of grid nodes and readable descriptions of grid resource implementation schemes in the form of XML, that is, grid node resource models, mapping between logical entities and grid resources, and modeling An XML description of the mapping between relationships and grid resource attributes. Methods provided by this module include:

资源模型输出接口XMLObject GetResourceModel()Resource model output interface XMLObject GetResourceModel()

功能:被用户节点调用,用于获取网格节点的资源模型Function: called by the user node to obtain the resource model of the grid node

输入:无input: none

输出:向用户节点返回资源模型(包括逻辑实体和建模关系)的XML描述Output: Return an XML description of the resource model (including logical entities and modeling relationships) to the user node

操作:访问实时存储空间,提取ModelDescription中资源模型的XML描述部分Operation: Access the real-time storage space and extract the XML description part of the resource model in ModelDescription

映射关系输出接口XMLObject GetModelMapping()Mapping relationship output interface XMLObject GetModelMapping()

功能:被用户节点调用,用于获取网格节点上网格资源的实现方案,即逻辑实体与网格资源的映射、以及建模关系与网格资源属性的映射Function: Called by user nodes to obtain the implementation scheme of grid resources on grid nodes, that is, the mapping between logical entities and grid resources, and the mapping between modeling relationships and grid resource attributes

输入:无input: none

输出:向用户返回用XML描述的映射关系,包括逻辑实体与网格资源的映射,和建模关系与网格资源属性的映射Output: Return the mapping relationship described in XML to the user, including the mapping between logical entities and grid resources, and the mapping between modeling relationships and grid resource attributes

操作:访问实时存储空间中,获取ModelDescription中用于描述上述映射的部分Operation: Access the real-time storage space, and obtain the part used to describe the above mapping in the ModelDescription

内容描述输出接口XMLObject GetAll( )Content description output interface XMLObject GetAll( )

功能:被用户节点调用,用于获取网格节点的ModelDescriptionFunction: Called by the user node to obtain the ModelDescription of the grid node

输入:无input: none

输出:向用户返回以XML形式表述的ModelDescriptionOutput: Return the ModelDescription expressed in XML to the user

操作:访问实时存储空间中,获取ModelDescriptionOperation: Access the real-time storage space and get the ModelDescription

■直接查询服务模块RelationService。用户通过该模块查询与特定网格资源具有特定建模关系的网格资源的定位信息。提供的查询接口为:■ Direct query service module RelationService. Through this module, users query the location information of grid resources that have a specific modeling relationship with specific grid resources. The query interface provided is:

XMLObject Query( )XMLObject Query( )

功能:被用户节点调用,返回与指定网格资源具有指定建模关系的网格资源的定位信息Function: Called by the user node, returns the location information of the grid resource that has the specified modeling relationship with the specified grid resource

输入:由用户节点指定,包括Input: specified by the user node, including

●一个网格资源(initResource)定位信息,以字符串表示;●A grid resource (initResource) location information, represented by a character string;

●一个网格资源属性relationship,该网格资源属性必须能对应为一个建模关系,且是initResource所具有的,以字符串表示。● A grid resource attribute relationship, the grid resource attribute must be able to correspond to a modeling relationship, and it is owned by initResource, expressed as a string.

输出:向用户返回以列表类型表示的网格资源定位信息,列表中的每一项都为一个网格资源定位信息的XML描述Output: Return grid resource location information expressed in a list type to the user, each item in the list is an XML description of grid resource location information

操作:访问实时存储空间,从当前initResource的信息中提取出relationship这个资源属性的值Operation: access the real-time storage space, and extract the value of the resource attribute relationship from the current initResource information

■定位服务模块LocationService。提供复杂的网格资源定位服务,用户通过该模块可获得与指定网格资源具有指定直接或间接联系的网格资源的定位信息。提供的定位接口为:■ Location service module LocationService. Provide complex grid resource location services, through which users can obtain the location information of grid resources that have a specified direct or indirect relationship with specified grid resources. The positioning interface provided is:

XMLObject Query( )XMLObject Query( )

功能:被用户节点调用,返回与指定网格资源具有指定直接或间接联系的网格资源的定位信息Function: Called by the user node, returns the location information of the grid resource that has the specified direct or indirect connection with the specified grid resource

输入:由用户节点指定,包括Input: specified by the user node, including

●一个网格资源(GR)的定位信息,以字符串表示;●The location information of a grid resource (GR), represented by a character string;

●一条网格资源的索引路径LocationChain=<RP(LEk1,LEk2),RP(LEk2,LEk3),…,RP(LEki,LEkj)>;● An index path LocationChain of a grid resource=<RP(LE k1 , LE k2 ), RP(LE k2 , LE k3 ),..., RP(LE ki , LE kj )>;

●一组过滤规则filterRule,指定与GR具有某种建模关系的网格资源的定位信息是否返回。● A set of filtering rules filterRule, specifying whether to return the location information of the grid resource that has a certain modeling relationship with GR.

输出:向用户返回以列表类型表示的网格资源定位信息,列表中的每一项都是用XML描述的网格资源定位信息。Output: Return grid resource location information represented by a list to the user, and each item in the list is grid resource location information described in XML.

操作:operate:

(a)设定需要向用户返回的网格资源定位信息列表为Results,另有两个列表Temp1和Temp2用于临时存储,将Results、置为空,把GR加入Temp1;(a) Set the grid resource location information list that needs to be returned to the user as Results, and another two lists Temp1 and Temp2 are used for temporary storage, set Results to empty, and add GR to Temp1;

(b)如果Temp1为空,直接返回Results;否则:(b) If Temp1 is empty, directly return Results; otherwise:

i.取出LocationChain的第一个网格资源属性RP,之后将RP从LocationChain删除;i. Take out the first grid resource attribute RP of LocationChain, and then delete RP from LocationChain;

ii.对于每一个Temp1中的网格资源crg,若crg具备RP这个资源属性,调用RelationService,将其RP中包含的每一个网格资源定位信息都加入Temp2;ii. For each grid resource crg in Temp1, if the crg has the resource attribute of RP, call RelationService to add the location information of each grid resource contained in its RP to Temp2;

iii.如果filterRule中指定要将这些网格资源的定位信息返回,则将Temp2中的元素拷贝至Results;iii. If filterRule specifies to return the location information of these grid resources, copy the elements in Temp2 to Results;

(c)若LocationChain中还有网格资源属性,先清空Temp1,将Temp2的所有元素拷贝至Temp1,之后清空Temp2,重复进行步骤(b),(c) If there are grid resource attributes in the LocationChain, first clear Temp1, copy all elements of Temp2 to Temp1, then clear Temp2, and repeat step (b),

(d)如果LocationChain中已经没有剩余的网格资源属性,向用户返回Results。(d) If there are no remaining grid resource attributes in the LocationChain, return Results to the user.

3)注册节点提供资源定位线索的注册/注销服务和查询服务。如附图4所示,它配置有实时存储空间和备份存储空间这两个存储部分,并包含如下模块:3) The registration node provides registration/deregistration service and query service of resource location clues. As shown in Figure 4, it is configured with two storage parts, real-time storage space and backup storage space, and includes the following modules:

■注册服务模块RegisterService用于注册网格节点的资源定位线索,提供的注册接口为:■Registration service module RegisterService is used to register resource location clues of grid nodes, and the registration interface provided is:

boolear register( )boolean register( )

功能:被网格节点调用,用于注册网格节点的资源定位线索Function: Called by the grid node, used to register the resource location clue of the grid node

输入:由网格节点给出,包括Input: given by grid nodes, including

●网格节点的标识gridSiteID;● grid node ID gridSiteID;

●网格节点gridSiteID的一条资源定位线索LG;A resource location clue LG of the grid node gridSiteID;

输出:向网格节点返回表示注册成功与否的布尔值Output: Return a boolean value to the grid node indicating whether the registration was successful or not

操作:首先检查实时存储空间是否已保存有gridSiteID的LG这条资源定位线索,如果没有,则以XML的形式将gridSiteID和LG添加到实时存储空间中。若操作成功,返回true,否则返回false。Operation: First check whether the resource location clue of gridSiteID LG has been saved in the real-time storage space, if not, add gridSiteID and LG to the real-time storage space in the form of XML. If the operation is successful, return true, otherwise return false.

■注销服务模块UnregisterService用于注销网格节点的资源定位线索,可访问的注销接口为:■The unregister service module UnregisterService is used to unregister resource location clues of grid nodes, and the accessible unregister interface is:

boolean unregister( )boolean unregister( )

功能:被网格节点调用,用于注销网格节点的资源定位线索Function: Called by the grid node to log out the resource location clue of the grid node

输入:由网格节点给出,包括Input: given by grid nodes, including

●网格节点的标识gridSiteID;● grid node ID gridSiteID;

●网格节点gridSiteID的一条资源定位线索LG;A resource location clue LG of the grid node gridSiteID;

输出:向网格节点返回表示注销成功与否的布尔值Output: Return a Boolean value to the grid node indicating whether the logout was successful or not

操作:从实时存储空间中删除gridSiteID的资源定位线索LG。如果删除成功,返回true,否则返回false。若实时存储空间中原本就没有该gridSiteID的资源定位线索LG,则不需要进行删除操作,直接返回true。Action: Delete the resource location clue LG of gridSiteID from the real-time storage space. Returns true if the deletion was successful, otherwise returns false. If there is no resource location clue LG of the gridSiteID in the real-time storage space, no delete operation is required, and true is returned directly.

■索引服务模块IndexService提供网格节点资源定位线索的索引服务,提供的查找接口为:■The index service module IndexService provides the index service of grid node resource location clues, and the search interface provided is:

XMLObject find()XMLObject find()

功能:被用户节点调用,用于查询网格节点的资源定位线索Function: Called by user nodes to query resource location clues of grid nodes

输入:由用户节点给出,目标网格节点的标识gridSiteInput: given by the user node, the ID of the target grid node gridSite

输出:以列表的形式向用户节点gridSite所有在该注册节点上注册的资源定位线索,每一个资源定位线索都以XML表示Output: send all resource location clues registered on the registration node to the user node gridSite in the form of a list, and each resource location clue is expressed in XML

操作:检索实时存储空间,如果保存有一条或多条gridSite的资源定位线索,则将它们组织成列表的形式向用户节点返回Operation: Retrieve the real-time storage space, if there are one or more gridSite resource location clues, organize them into a list and return them to the user node

3.网格节点上的网格资源具有动态性的特点,它们能被定位的前提是网格节点完成初始化,进入正常运行状态。用户在定位网格资源之前,首先需要获得网格节点和其资源定位线索,这意味着注册节点的初始化完成及其注册/检索服务的正常工作。3. The grid resources on the grid nodes are dynamic. The premise that they can be located is that the grid nodes are initialized and enter the normal operation state. Before locating grid resources, users first need to obtain grid nodes and their resource location clues, which means that the initialization of registration nodes is completed and the registration/retrieval services work normally.

1)网格节点整体的工作流程如附图5所示,包括网格节点的初始化和运行流程两部分。1) The overall workflow of the grid node is shown in Figure 5, including two parts, the initialization and the operation process of the grid node.

■网格节点的初始化由初始化服务InitResource来完成,之后网格节点进入正常工作状态。■Initialization of the grid node is completed by the initialization service InitResource, after which the grid node enters the normal working state.

■网格节点正常工作时,时刻监听是否有来自于用户节点关于资源定位的请求,如果有,进行以下处理操作:■When the grid node is working normally, it will always monitor whether there is a resource location request from the user node, and if so, perform the following processing operations:

[1]接收并判断用户请求,提取输入参数;[1] Receive and judge user requests, and extract input parameters;

[2]若为模型元数据服务ModelMetadata的请求,则由被调用的接口(GetResourceModel、GetModelMapping、或GetAll)向用户节点返回网格节点资源模型和/或映射关系的XML描述,转[5];[2] If the request of ModelMetadata is served for the model metadata, the called interface (GetResourceModel, GetModelMapping, or GetAll) returns the grid node resource model and/or the XML description of the mapping relationship to the user node, then turn to [5];

[3]若为直接查询服务RelationService的请求,则根据输入参数返回与指定网格资源具有指定建模关系的所有网格资源的定位信息——此过程由RelationService的查询接口来完成,转[5];[3] If it is a direct query service RelationService request, return the location information of all grid resources that have a specified modeling relationship with the specified grid resource according to the input parameters - this process is completed by the query interface of RelationService, go to [5] ];

[4]若为定位服务LocationService的请求,则由从请求输入中提取出查询起始的网格资源、资源索引线索、和结果过滤规则,调用RelationService接口来依次查询,并根据过滤规则想用户返回结果——此过程由LocationService的定位接口来完成,转[5];[4] If it is a LocationService request, extract the query starting grid resources, resource index clues, and result filtering rules from the request input, call the RelationService interface to query in turn, and return to the user according to the filtering rules Result - this process is completed by the location interface of LocationService, go to [5];

[5]向用户返回请求结果后,回到等待状态。[5] After returning the request result to the user, return to the waiting state.

2)注册节点整体的工作流程见附图5,包括初始化、请求侦听处理和数据备份部分。2) The overall workflow of the registration node is shown in Figure 5, including initialization, request listening processing and data backup.

■注册节点初始化的主要步骤■Main steps of registration node initialization

[1]复位注册节点的运行环境;[1] Reset the operating environment of the registered node;

[2]依据备份存储空间中的注册信息备份文件,加载前面已经注册的网格节点及其资源定位线索等信息;[2] According to the registration information backup file in the backup storage space, load the previously registered grid nodes and their resource location clues and other information;

[3]启动请求侦听处理流程和数据备份流程。[3] Start the request listening process and data backup process.

■请求侦听处理流程启动之后时刻侦听是否有来自于用户节点或网格节点的请求,若有,进行如下操作:■ After the start of the request listening process, always listen to whether there is a request from the user node or grid node, and if so, perform the following operations:

[1]接收并判断用户请求,提取输入参数;[1] Receive and judge user requests, and extract input parameters;

[2]如果是注册服务RegisterService的请求,首先判断是否为重复注册,如果不是,则保存到实时存储空间——该过程由其register接口来完成;[2] If it is a request for the registration service RegisterService, first judge whether it is a repeated registration, if not, save it to the real-time storage space-this process is completed by its register interface;

[3]如果是注销服务UnregisterService的请求,从实时存储空间中删除由请求参数指定的注册信息——该过程由其unregister接口来完成;[3] If it is a request to unregister the service UnregisterService, delete the registration information specified by the request parameter from the real-time storage space - the process is completed by its unregister interface;

[4]如果是索引服务IndexService的请求,则按照输入参数指定的索引关键字检索实时存储空间——该过程由其find接口来完成;[4] If it is the request of the index service IndexService, then search the real-time storage space according to the index key specified by the input parameter - this process is completed by its find interface;

[5]向用户返回请求的结果,回到等待状态。[5] Return the result of the request to the user and return to the waiting state.

■数据备份流程为注册信息的维护流程,与请求侦听处理流程并行运行,定期将实时存储空间中的注册信息(即网格节点的资源定位线索)保存到备份存储空间,便于注册节点下一次初始化时进行注册信息的加载。它的工作流程为:■The data backup process is the maintenance process of the registration information, which runs in parallel with the request listening process, and regularly saves the registration information in the real-time storage space (that is, the resource location clues of the grid nodes) to the backup storage space, which is convenient for the next registration node Load registration information during initialization. Its workflow is:

[1]启动数据备份的计时器;[1] Start the timer for data backup;

[2]判断是否为备份时刻,如果是,则从实时存储空间中提取出所有注册信息,以XML文件的形式保存至备份存储空间,该XML文件将覆盖上一次保存的备份文件;[2] Judging whether it is the backup time, if so, extract all registration information from the real-time storage space, and save it to the backup storage space in the form of an XML file, which will overwrite the last saved backup file;

[3]等待下一次备份时刻的到来。[3] Wait for the arrival of the next backup time.

4.对网格资源的定位操作由用户节点发起。用户节点首先向注册节点查询得到选定网格节点的资源定位线索,然后通过与选定网格节点之间一次或多次交互,得到选定网格节点上所有它所关心的网格资源的定位信息。具体流程如附图7所示,主要步骤有:4. The positioning operation of the grid resource is initiated by the user node. The user node first queries the registration node to obtain the resource location clue of the selected grid node, and then through one or more interactions with the selected grid node, it obtains the location information of all the grid resources it cares about on the selected grid node. positioning information. The specific process is shown in Figure 7, and the main steps are:

[1]用户节点判断自身是否已有目标网格节点TGS的资源定位线索,如果没有,访问注册节点的索引服务来获取TGS的资源定位线索GRLG;[1] The user node judges whether it has the resource location clue of the target grid node TGS, if not, accesses the index service of the registration node to obtain the resource location clue GRLG of the TGS;

[2]用户节点判断自身是否理解TGS的资源模型,若否,则通过TGS的模型元数据服务,获取用XML表示的如下内容中的一项或多项:资源模型的XML描述、网格资源与逻辑实体间的映射、网格资源属性与建模关系间的映射。这样,用户节点可以全面理解TGS上所有网格资源之间的联系;[2] The user node judges whether it understands the resource model of TGS, and if not, obtains one or more of the following content expressed in XML through the model metadata service of TGS: XML description of resource model, grid resource Mapping between logical entities, grid resource attributes and modeling relationships. In this way, user nodes can fully understand the connection between all grid resources on TGS;

[3]基于对TGS上所有网格资源间的联系的理解,对于该网格节点上用户所关心的任意一个网格资源GR,从GRLG中抽取出GR与资源定位入口Entry之间的索引路径LPath;[3] Based on the understanding of the relationship between all grid resources on the TGS, for any grid resource GR that the user cares about on the grid node, the index path between the GR and the resource location entry Entry is extracted from the GRLG LPath;

[4]如果GR与Entry之间存在直接的建模关系,即LPath中只包含一个元素,则将Entry和LPath作为请求参数,向TGS的直接查询服务发送请求,转[6];[4] If there is a direct modeling relationship between GR and Entry, that is, LPath contains only one element, then use Entry and LPath as request parameters, send a request to the direct query service of TGS, and turn to [6];

[5]若GR与Entry之间不是直接的建模关系,则设置结果过滤规则filterRule,将Entry、LPath和filterRule作为请求参数,向TGS的定位服务发送请求;[5] If there is no direct modeling relationship between GR and Entry, set the result filtering rule filterRule, use Entry, LPath and filterRule as request parameters, and send a request to the location service of TGS;

[6]判断TGS上是否还存在需要进行定位的网格资源,若有,重复步骤[3]~[5],直至对TGS上用户所关心的所有网格资源都进行了定位。[6] Determine whether there are grid resources that need to be located on the TGS, and if so, repeat steps [3]~[5] until all grid resources that the user cares about on the TGS have been located.

测试环境为包括8台256M内存、2×1300MHz、操作系统为Linux(Redhat 9.0)的PC机,以及两台1G内存、Pentium(R)42.4GHz、操作系统为Windows XP SP2的服务器,这些机器通过100Mbps的网络进行互连。The test environment includes 8 PCs with 256M memory, 2×1300MHz, Linux (Redhat 9.0) operating system, and two servers with 1G memory, Pentium(R) 42.4GHz, and Windows XP SP2 operating system. 100Mbps network for interconnection.

在一台Windows服务器上运行一个注册节点,另一台Windows服务器上运行一个网格节点。测试用的网格节点资源定位线索的高度为3(包括资源定位入口),称资源定位入口为第一层网格资源;与资源定位入口具有直接建模关系的网格资源为第二层网格资源;与第二层网格资源具有直接建模关系而与第一层网格资源间接联系的网格资源为第三层网格资源。Run a registry node on one Windows server and a grid node on another Windows server. The height of the grid node resource location thread used for the test is 3 (including the resource location entry), and the resource location entry is called the first layer grid resource; the grid resource that has a direct modeling relationship with the resource location entry is the second layer network grid resources; the grid resources that have a direct modeling relationship with the second-level grid resources and indirectly relate to the first-level grid resources are the third-level grid resources.

在8台Linux机器上运行用户节点(每台Linux机器上可模拟多个用户节点)。考虑到用户节点对网格资源的定位可以通过定位服务或直接查询服务来进行,而定位服务是通过调用直接查询服务来处理请求的,不需要向用户返回中间结果,故通过定位服务定位一个网格资源所需要的时间总是小于通过多次访问直接查询服务逐渐定位至目标网格资源所消耗的时间。因此,在本测试中用户节点均通过直接查询服务逐渐定位网格节点上各层次的网格资源:首先访问注册节点获取网格节点的资源定位线索,这同时也就得到了资源定位入口的定位信息(这一阶段所消耗的时间称为第一层网格资源的定位时间);然后通过访问网格资源定位入口,得到网格节点上的第二层网格资源的定位信息;再通过访问第二层网格资源得到第三层网格资源的定位信息。分别称从访问注册节点时刻开始,到获得第二层网格资源和第三层网格资源的定位信息为第二层网格资源的定位时间和第三层网格资源的定位时间。Run user nodes on 8 Linux machines (multiple user nodes can be simulated on each Linux machine). Considering that user nodes can locate grid resources through location services or direct query services, and location services process requests by invoking direct query services, and do not need to return intermediate results to users, so a network location is located through location services. The time required to locate the grid resource is always less than the time consumed to gradually locate the target grid resource through multiple visits to the direct query service. Therefore, in this test, the user nodes gradually locate the grid resources of each level on the grid nodes through direct query services: firstly, access the registration node to obtain the resource location clues of the grid nodes, and at the same time obtain the location of the resource location entry information (the time consumed in this stage is called the positioning time of the first-level grid resource); then by accessing the grid resource positioning entry, the positioning information of the second-level grid resource on the grid node is obtained; and then by accessing The grid resource of the second layer obtains the location information of the grid resource of the third layer. The time from the moment of accessing the registration node to the location information of the second-level grid resource and the third-level grid resource is respectively called the location time of the second-level grid resource and the location time of the third-level grid resource.

通过控制Linux机器上模拟的用户节点数目可实现网格节点上不同的访问速率,即网格节点每秒钟接收到的网格资源定位请求的数目。测量网格节点处理网格资源定位请求所消耗的CPU占用率、用户节点定位各层次网格资源所需要的平均时间,结果如附图12和附图13所示。By controlling the number of simulated user nodes on the Linux machine, different access rates on the grid nodes can be realized, that is, the number of grid resource location requests received by the grid nodes per second. Measure the CPU usage consumed by grid nodes to process grid resource location requests, and the average time required for user nodes to locate grid resources at each level. The results are shown in Figures 12 and 13.

从测试的数据可以看到,网格节点每秒钟能处理120次以上的网格资源定位请求,用户节点对网格节点上的网格资源进行定位的时间均在毫秒级别(在本试验范围内不超过500毫秒),这说明系统具有一定的可扩展性,验证了模型化的网格资源定位方法的有效性。It can be seen from the test data that grid nodes can process more than 120 grid resource location requests per second, and the time for user nodes to locate grid resources on grid nodes is at the millisecond level (in this test range within 500 milliseconds), which shows that the system has a certain degree of scalability, and verifies the effectiveness of the modeled grid resource location method.

附图说明Description of drawings

图1.网格资源定位的总体关系图。Figure 1. Overall relationship diagram of grid resource location.

图2.网格资源定位总体流程图。Figure 2. Overall flowchart of grid resource location.

图3.网格节点的资源模型、遍历线索和资源定位线索示意图。Figure 3. Schematic diagram of resource model, traversal clues and resource location clues of grid nodes.

图4.网格节点关于资源定位的模块和数据存储分布图。Figure 4. Module and data storage distribution diagram of grid nodes regarding resource location.

图5.注册节点的模块和数据存储分布图。Figure 5. Module and data storage distribution diagram of the registration node.

图6.网格节点关于资源定位的工作流程。Figure 6. Workflow of grid nodes regarding resource location.

图7.注册节点的工作流程。Figure 7. Workflow for registering nodes.

图8.用户节点对一个网格节点上的网格资源进行定位的流程图。Fig. 8. Flowchart of user nodes locating grid resources on a grid node.

图9.集群资源模型及其对应网格资源的实现示意。Figure 9. Schematic diagram of cluster resource model and its corresponding grid resource implementation.

图10.集群的不同注册方案示意图:Figure 10. Schematic diagram of different registration schemes for the cluster:

●EPR(X)为X的访问地址,即X的定位信息。●EPR(X) is the access address of X, that is, the location information of X.

图11.用户节点对集群上的网格资源进行定位的示意图:Figure 11. Schematic diagram of user nodes locating grid resources on the cluster:

●EPR(X)为X的访问地址,即X的定位信息;●EPR(X) is the access address of X, that is, the location information of X;

●EPRs(X,Y)为X和Y的定位信息组成的列表;●EPRs(X, Y) is a list of positioning information of X and Y;

●{进程}表示只返回对应进程的网格资源的定位信息;●{Process} indicates that only the location information of the grid resource corresponding to the process is returned;

●{*}表示返回所有相关网格资源的定位信息。●{*} means to return the positioning information of all related grid resources.

图12.网格节点处理网格资源定位请求所消耗的CPU占用率情况。Figure 12. The CPU usage consumed by grid nodes processing grid resource location requests.

图13.用户节点定位网格节点上各层次网格资源所需要的平均时间。Fig. 13. The average time required for user nodes to locate grid resources on each level of grid nodes.

具体实施方式Detailed ways

Web服务资源框架WSRF(WS Resource Framework)是OGSA(Open Grid ServicesArchitecture)的最新实现规范,其基本思想为“有状态的资源,无状态的服务”,包括WS-ResourceProperties、WS-ResourceLifetime、WS-RenewableReferences、WS-ServiceGroup和WS-BaseFaults等五个技术规范。有关WSRF的具体内容可以参考http://www.oasis-open.org/committees/wsrf。WSRF (WS Resource Framework) is the latest implementation specification of OGSA (Open Grid Services Architecture). Its basic idea is "stateful resources, stateless services", including WS-ResourceProperties, WS-ResourceLifetime, WS-RenewableReferences , WS-ServiceGroup and WS-BaseFaults five technical specifications. For details about WSRF, please refer to http://www.oasis-open.org/committees/wsrf.

Web服务分布式管理WSDM(Web Services Distributed Management)包括MUWS(ManagementUsing Web Services)和MOWS(Management Of Web Services)两部分,前者定义了如何表示和访问作为Web服务资源的可管理性接口,后者定义了如何将Web服务作为资源来管理以及如何使用MUWS描述和访问可管理性。具体内容可以参考http://www.oasis-open.org/committees/tc home.php?wg_abbrev=wsdm。Web Services Distributed Management WSDM (Web Services Distributed Management) includes two parts: MUWS (Management Using Web Services) and MOWS (Management Of Web Services). The former defines how to represent and access manageability interfaces as Web service resources, and the latter defines Shows how to manage Web services as resources and how to describe and access manageability using MUWS. For details, please refer to http://www.oasis-open.org/committees/tc home.php?s wg_abbrev=wsdm.

Apache MUSE是WSRF和WSDM的一个开源项目,为程序员进一步开发遵循WSRF和WSDM规范的Web服务和网格应用提供了工作平台。模型化的网格资源定位方法就是基于ApacheMUSE 1.0(http://ws.apache.org/muse)来实现的。Apache MUSE is an open source project of WSRF and WSDM, which provides a working platform for programmers to further develop Web services and grid applications that follow WSRF and WSDM specifications. The modeled grid resource location method is realized based on ApacheMUSE 1.0 (http://ws.apache.org/muse).

1.网格节点的资源模型与网格资源/资源属性间映射的实现1. The realization of the mapping between the resource model of grid nodes and grid resources/resource attributes

将网格节点建模为一个连通的资源模型。对网格节点进行服务包装时,将资源模型中的逻辑实体分别实现为一个遵从WSRF规范的网格服务。按照WSRF规范,一个网格服务管理有多个动态生成的网格资源,这也就指出了网格资源和逻辑实体之间的映射;同时,将逻辑实体参与的每一个建模关系均用WSDM的Relationship来实现,这些Relationship都将作为逻辑实体对应的网格资源的资源属性(WSRF的ResourceProperty)。Model grid nodes as a connected resource model. When the grid node is packaged for service, the logical entities in the resource model are respectively implemented as a grid service that complies with the WSRF specification. According to the WSRF specification, a grid service management has multiple dynamically generated grid resources, which also points out the mapping between grid resources and logical entities; at the same time, each modeling relationship that logical entities participate in uses WSDM These relationships will be used as the resource properties (ResourceProperty of WSRF) of the grid resources corresponding to the logical entities.

2.实例2. Examples

下面以集群为例阐述网格节点建模及其网格资源的实现和定位。集群的一个资源模型和对应的网格资源实现如附图9所示。集群中的主机、主机上的进程以及集群之间的网络路径分别对应逻辑实体LE_主机、LE_进程和LE_网络,而主机和进程之间有一对多的“宿主”关系,故LE_主机和LE_进程之间有“R_运行有”这个一对多的关系。为使资源模型连通,附加逻辑实体LE_机群和两个一对多的关系“R_为前端”和“R_连接到”。实现时上述4个逻辑实体都对应为WSRF服务,分别为集群服务(Singleton模式)、主机服务、网络服务和进程服务;3个建模关系实现为WSDM的Relationship,分别是“为前端”、“连接到”和“运行有”,它们将被相应地添加为上述WSRF服务的资源属性。The following takes the cluster as an example to illustrate the modeling of grid nodes and the realization and positioning of grid resources. A resource model of a cluster and the corresponding grid resource implementation are shown in Fig. 9 . The hosts in the cluster, the processes on the hosts, and the network paths between the clusters correspond to the logical entities LE_host, LE_process, and LE_network respectively, and there is a one-to-many "host" relationship between hosts and processes, so LE_ There is a one-to-many relationship of "R_RunningHas" between the host and the LE_process. To make the resource model connected, attach the logical entity LE_Fleet and two one-to-many relationships "R_for frontend" and "R_connected to". When implemented, the above four logical entities correspond to WSRF services, which are cluster services (Singleton mode), host services, network services, and process services; the three modeling relationships are implemented as WSDM Relationships, which are "for the front end", " connected to" and "running with", they will be added accordingly as resource properties of the above WSRF service.

网格节点有多个不同的资源定位线索,因而向注册节点注册时有多种方案。附图10示例了集群的两种资源定位线索:Grid nodes have many different resource location clues, so there are many schemes when registering with registration nodes. Figure 10 illustrates two cluster resource location clues:

1)以集群服务的Singleton资源为资源定位入口,从该资源出发通过“为前端”和“连接到”这两个资源属性可定位到所有主机服务和网络服务的资源,而通过主机服务资源,可以由“运行有”这一资源属性定位至所有进程服务的资源;1) Use the Singleton resource of the cluster service as the resource location entry, and start from this resource through the two resource attributes of "for the front end" and "connected to" to locate all the resources of the host service and network service, and through the host service resource, The resources of all process services can be located by the resource attribute of "running with";

2)以网络服务的资源“路径1”为资源定位入口,从“路径1”出发通过“连接到”这一资源属性能对集群服务的Singleton资源进行定位,进而可依次通过“为前端”和“运行有”这两个资源属性逐渐到达所有主机服务的资源和进程服务的资源。2) Use the resource "path 1" of the network service as the resource location entry, start from "path 1" and use the resource attribute "connected to" to locate the Singleton resource of the cluster service, and then use "for the front end" and The two resource attributes "running with" gradually reach all host service resources and process service resources.

集群初始化完成进入正常工作状态后,主机、网络和进程这三个服务的网格资源集合随着用户的请求动态变化。虽然网格资源是动态生成的,但总可以通过资源定位线索来对其进行检索。附图11为用户节点定位集群上网格资源的一个示意流程图。用户节点从注册节点A处获得集群的第一种资源定位线索后,通过集群的模型元数据服务ModelMetadata返回的结果,可以理解集群上所有网格资源间的联系。After the cluster initialization is completed and enters the normal working state, the grid resource sets of the three services of host, network and process change dynamically with the user's request. Although grid resources are dynamically generated, they can always be retrieved through resource location cues. FIG. 11 is a schematic flow chart of user nodes locating grid resources on a cluster. After the user node obtains the cluster's first resource location clue from the registration node A, it can understand the relationship between all grid resources on the cluster through the results returned by the cluster's model metadata service ModelMetadata.

1)若用户节点需要定位所有主机和进程的网格资源,首先抽取出它们与集群服务的Singleton资源之间的索引线索(在附图11中表示为“为前端---运行有”),设置结果过滤规则为所有网格资源的定位信息都全部返回(在附图11中表示为{*}),然后向集群的定位服务发送请求。见附图11中的4~5所示。1) If the user node needs to locate the grid resources of all hosts and processes, first extract the index clues between them and the Singleton resources of the cluster service (indicated as "for the front-end---running" in Figure 11), Set the result filtering rule to return all the location information of all grid resources (represented as {*} in Figure 11), and then send a request to the location service of the cluster. See 4~5 in accompanying drawing 11.

2)若用户节点只需要定位所有进程的网格资源,同样地,也先抽取出它们与集群服务的Singleton资源之间的索引线索(“为前端---运行有”),此时设置结果过滤规则为只返回进程的网格资源的定位信息(在附图11中表示为{Process}),再向集群的定位服务发送请求,如附图11中的6-7所示。2) If the user node only needs to locate the grid resources of all processes, similarly, first extract the index clues between them and the Singleton resources of the cluster service ("for the front-end---running"), and set the result at this time The filtering rule is to return only the location information of the grid resource of the process (represented as {Process} in Figure 11), and then send a request to the location service of the cluster, as shown in 6-7 in Figure 11.

3)若用户节点需要定位网络服务的网格资源,抽取出它们与集群服务的Singleton资源之间的索引线索(“连接到”),因为该索引线索只包含一个元素,故向集群的直接查询服务发送请求,见附图11中的8~9。3) If the user node needs to locate the grid resources of the network service, extract the index thread ("connected to") between them and the Singleton resource of the cluster service, because the index thread only contains one element, so the direct query to the cluster For the service sending request, see 8~9 in Figure 11.

需要的硬件环境:CPU1GHz或以上、内存256M或以上。网格节点、注册节点和用户节点可以运行在一个局域网范围内,也可以运行在由多个子网组成的一个广域网范围内。Required hardware environment: CPU1GHz or above, memory 256M or above. Grid nodes, registration nodes and user nodes can operate within a local area network or within a wide area network composed of multiple subnets.

网格节点和注册节点需要的软件环境:支持JDK4.2的操作系统、Java4.2运行时环境、Apache Tomcat 5.0.28、Apache Muse 1.0The software environment required for grid nodes and registration nodes: operating system supporting JDK4.2, Java4.2 runtime environment, Apache Tomcat 5.0.28, Apache Muse 1.0

用户节点需要的软件环境:支持JDK4.2的操作系统、Java4.2运行时环境。The software environment required by the user node: an operating system that supports JDK4.2, and a Java4.2 runtime environment.

Claims (1)

1、模型化的网格资源定位方法,其特征在于,依次含有以下步骤:1. A modeling method for locating grid resources, characterized in that it comprises the following steps in sequence: 步骤(1).在支持Web服务资源框架WSRF规范的一个遵从开放式网格服务架构OGSA的网格系统中,把在网格资源定位过程中所涉及到的节点分为网格节点、用户节点和注册节点,其中:Step (1). In a grid system that complies with the open grid service architecture OGSA and supports the Web service resource framework WSRF specification, the nodes involved in the grid resource location process are divided into grid nodes and user nodes and register nodes, where: 用户节点为发起网格资源定位的网格实体;The user node is the grid entity that initiates grid resource location; 网格节点通过网格资源来向用户提供计算能力,所述网格资源是指资源所有者加入网格系统的共享资源;Grid nodes provide computing power to users through grid resources, which refer to shared resources that resource owners join the grid system; 注册节点是管理员指定的一个或多个网格节点,负责维护网格系统中称之为逻辑实体的全部或部分网格节点、网格服务及网格资源的信息,所述网格服务部署在网格节点上,是一种按照所述WSRF规范来开发的具有设定功能的程序代码,以供网格服务使用共享资源的计算能力来处理用户的请求;所述网格资源是一种服务资源,其属性就是用户请求所提交的任务当前所处的执行状态,该属性是网格服务在处理用户请求时产生的一个特征,从而形成了逻辑实体与网格资源之间的映射;The registration node is one or more grid nodes designated by the administrator, and is responsible for maintaining all or part of the grid nodes, grid services, and grid resource information called logical entities in the grid system. The grid service deployment On the grid node, it is a program code with a setting function developed according to the WSRF specification, so that the grid service can use the computing power of the shared resource to process the user's request; the grid resource is a Service resource, whose attribute is the current execution state of the task submitted by the user request, this attribute is a feature generated by the grid service when processing the user request, thus forming a mapping between the logical entity and the grid resource; 步骤(2).由网格节点初始化模块依次执行以下初始化步骤:Step (2). The following initialization steps are executed in turn by the grid node initialization module: 步骤(2.1).在实时存储空间中加载一个XML文件,该文件的内容ModelDescription含有:全连通的资源模型、逻辑实体与网格资源的映射以及建模关系与网格资源属性的映射,其中:Step (2.1). Load an XML file in the real-time storage space. The content of the file, ModelDescription, contains: a fully connected resource model, a mapping between a logical entity and a grid resource, and a mapping between a modeling relationship and a grid resource attribute, wherein: 资源模型ResourceModel={逻辑实体群LogicEntities,建模关系Relations},Resource Model ResourceModel={Logic Entity Group LogicEntities, Modeling Relationships}, LogicEntities={逻辑实体logicEntityi,i=1,2,...,N,N代表逻辑实体数},Relations=R(i,j)=<logicEntityi,logicEntityj>,j∈{1,2,...,N},i≠j,R(i,j)(1:N-1)=R(j,i)(N-1:1),LogicEntities={logic entity logicEntity i , i=1, 2,..., N, N represents the number of logical entities}, Relations=R(i, j)=<logicEntity i , logicEntity j >, j∈{1,2 ,...,N}, i≠j, R(i,j)(1:N-1)=R(j,i)(N-1:1), R(i,j)(1:N-1)表示一个逻辑实体i可对应多个逻辑实体j的关系,R(j,i)(N-1:1)则反之;所述逻辑实体表示该网格节点的内在元素,建模关系表示两个内在元素间的关系,从而形成了建模关系与网格资源属性之间的映射;R(i, j)(1:N-1) represents the relationship that one logical entity i can correspond to multiple logical entities j, and R(j, i)(N-1:1) is vice versa; the logical entity represents the Intrinsic elements of a grid node, the modeling relationship represents the relationship between two intrinsic elements, thus forming a mapping between the modeling relationship and grid resource attributes; 建立一个全连通的资源模型按以下步骤进行:To establish a fully connected resource model, proceed as follows: 首先,根据网格节点的实际,给出一个初始的由N个逻辑实体和建模关系构成的资源模型,用InitRM表示,若该资源模型不连通,则把该InitRM看成以逻辑实体为顶点,以建模关系为边的图,找出途中不相交的连通子图,共m个;First, according to the reality of the grid nodes, an initial resource model consisting of N logical entities and modeling relationships is given, represented by InitRM. If the resource model is not connected, the InitRM is regarded as the logical entity as the vertex , with the modeling relationship as the edge graph, find out the disjoint connected subgraphs on the way, a total of m; 其次,分别从每个连通子图中任意选出一个逻辑实体,再在该InitRM中添加一个辅助性逻辑实体和m个一对一的辅助性建模关系,使m个不相交的连通子图通过该辅助性逻辑实体而相互连通;Secondly, a logical entity is arbitrarily selected from each connected subgraph, and then an auxiliary logical entity and m one-to-one auxiliary modeling relationships are added to the InitRM, so that m disjoint connected subgraphs communicate with each other through the auxiliary logical entity; 步骤(2.2).根据ModelDescription以及资源所有者在配置文件中设置的当网格节点启动时预先初始化的各类网格资源的数目以及各类网格资源的最大数目,实例化网格服务和网格资源,并在实时存储空间以XML文件形式保存这些信息;Step (2.2). According to the ModelDescription and the number of various grid resources pre-initialized when the grid node starts and the maximum number of various grid resources set by the resource owner in the configuration file, instantiate the grid service and network grid resources, and save the information in the form of XML files in the real-time storage space; 步骤(2.3).按以下步骤构建资源定位线索:Step (2.3). Construct resource location clues according to the following steps: 步骤(2.3.1).从已经实例化的网格资源中随机选取一个网格资源GR作为资源定位入口;Step (2.3.1). Randomly select a grid resource GR from the instantiated grid resources as the resource location entry; 步骤(2.3.2).依据逻辑实体与网格资源之间的映射,找出网格资源GR在资源模型中对应的逻辑实体LE;Step (2.3.2). Find out the logical entity LE corresponding to the grid resource GR in the resource model according to the mapping between the logical entity and the grid resource; 步骤(2.3.3).在资源模型中随机选出一条以步骤(2.3.2)所述逻辑实体LF为根的资源模型遍历线索,用TGlue表示;Step (2.3.3). Randomly select a resource model traversal thread whose root is the logical entity LF described in step (2.3.2) in the resource model, represented by TGlue; 步骤(2.3.4).把步骤(2.3.3)所选的根LE替换为网格资源的定位信息,并根据建模关系与网格资源属性之间的映射,把所述遍历线索TGlue中的非根节点也替换为对应的网格资源属性,从而获得一条以网格资源GR为资源定位入口的资源定位线索;Step (2.3.4). Replace the root LE selected in step (2.3.3) with the positioning information of the grid resource, and according to the mapping between the modeling relationship and the attribute of the grid resource, put the traversal clue TGlue The non-root node of is also replaced with the corresponding grid resource attribute, so as to obtain a resource location clue with the grid resource GR as the resource location entry; 步骤(2.4).在该网格节点中再设置以下模块:Step (2.4). Set the following modules in the grid node: 模型元数据服务模块ModelMetadata:网格节点访问实时存储空间提取内容描述ModelDescription中的XML描述部分,其中:Model metadata service module ModelMetadata: grid nodes access real-time storage space to extract content description XML description part in ModelDescription, where: 映射关系输出接口XMLObject GetModelMapping向用户输出以XML形式描述的逻辑实体与网格资源之间以及建模关系与网格资源属性之间的映射关系;The mapping relationship output interface XMLObject GetModelMapping outputs to the user the mapping relationship between logical entities and grid resources described in XML form, as well as between modeling relationships and grid resource attributes; 内容描述ModelDescription输出接口XMLObject GetAll访问实时存储空间向用户输出以XML形式表述的内容描述ModelDescription;The content description ModelDescription output interface XMLObject GetAll accesses the real-time storage space and outputs the content description ModelDescription expressed in XML form to the user; 直接查询服务模块RelationService:输入由用户节点发出的一以字符串表示的网格资源定位信息和一个以字符串表示的网格资源属性,向用户输出以列表类型表示的网格资源定位信息,列表中的每一项都是一个网格资源定位信息的XML描述;Direct query service module RelationService: input a grid resource location information represented by a character string and a grid resource attribute represented by a character string issued by the user node, and output the grid resource location information represented by a list type to the user, the list Each item in is an XML description of grid resource location information; 定位服务模块LocationService:输入由用户节点发出的所选网格资源GR的定位信息以及一条网格资源的索引路径LocationChain=<RP(k1,k2),RP(k2,k3),…,RP(ki,kj)>,其中,RP(k1,kj)为对应建模关系R(ki,kj)的网格资源属性,逻辑实体logicEntityk1为与GR对应的逻辑实体;此外,一组过滤规则filterRule,用来指定与网格资源GR有特定建模关系的那些网格资源的定位信息是否返回;该模块向用户返回由用户指定的且以列表类型表示的网格资源定位信息;Location service module LocationService: input the location information of the selected grid resource GR sent by the user node and an index path of the grid resource LocationChain=<RP(k 1 ,k 2 ), RP(k 2 ,k 3 ),… , RP(k i , k j )>, where RP(k 1 , k j ) is the grid resource attribute corresponding to the modeling relationship R(k i , k j ), and the logic entity logicEntity k1 is the logic corresponding to GR entity; in addition, a set of filtering rules filterRule is used to specify whether to return the location information of those grid resources that have a specific modeling relationship with the grid resource GR; this module returns the network specified by the user and represented by the list type grid resource location information; 步骤(3).在注册节点上设置以下模块:Step (3). Set up the following modules on the registration node: 注册服务模块RegisterService:输入由网格节点从实时存储空间提取且由网格节点发出的网格节点标识gridSiteID以及该标识的一条资源定位线索LG;输出是向网格节点返回用布尔值表示的注册成功与否的信息;Registration service module RegisterService: Input the grid node identifier gridSiteID extracted from the real-time storage space by the grid node and sent by the grid node and a resource location clue LG of the identifier; the output is to return the registration represented by a Boolean value to the grid node success or failure information; 注销服务模块UnregisterService:输入由网格节点发出并且再从实时存储空间删除的网格节点标识以及与该标识相应的一条资源定位线索LG,向网格节点返回用布尔值表示的注销成功与否的信息;Unregister service module UnregisterService: input the grid node ID issued by the grid node and then deleted from the real-time storage space and a resource location clue LG corresponding to the ID, and return to the grid node whether the unregister is successful or not represented by a Boolean value information; 索引服务模块IndexService:输入由用户节点发出的网格节点标识gridSiteID,查询实时存储空间,向用户节点输出以列表类型表示的该网格节点的资源定位线索信息,列表中的每一项都是一条网格资源定位线索的XML描述;Index Service Module IndexService: Input the grid node identifier gridSiteID issued by the user node, query the real-time storage space, and output the resource location clue information of the grid node represented by the list type to the user node, each item in the list is a XML description of grid resource location clue; 步骤(4).按以下步骤执行由用户节点发起的模型化网格资源定位方法:Step (4). Execute the modeled grid resource location method initiated by the user node according to the following steps: 步骤(4.1).网格节点向注册节点注册资源行为线索;Step (4.1). The grid node registers resource behavior clues with the registration node; 步骤(4.2).用户节点向注册节点索取自己所关心的众多目标网格节点TGS的资源定位线索GRLG;Step (4.2). The user node asks the registration node for the resource location clue GRLG of many target grid nodes TGS that it cares about; 步骤(4.3).注册节点向用户节点发送步骤(4.2)中所述目标网格节点的资源定位线索GRLG;Step (4.3). The registration node sends the resource location clue GRLG of the target grid node described in step (4.2) to the user node; 步骤(4.4).用户根据自身需求向目标网格节点索取用XML文件表示的以下内容的一项或多项:资源模型的XML描述,网格资源与逻辑实体之间的映射以及网格资源属性与建模关系的映射;Step (4.4). The user asks the target grid node for one or more of the following content expressed in XML files according to their own needs: the XML description of the resource model, the mapping between the grid resource and the logical entity, and the attribute of the grid resource Mapping with modeling relationships; 步骤(4.5).用户从众多网格节点上选定一个网格节点,从自己所关心的网格资源GR所属的资源定位线索GRLG中取出自己所关心的网格资源GR与资源定位入口Entry之间的索引路径LPath;Step (4.5). The user selects a grid node from many grid nodes, and extracts the difference between the grid resource GR he cares about and the resource location entry Entry from the resource location clue GRLG to which the grid resource GR he cares about belongs. The index path LPath between; 步骤(4.6).用户判断步骤(4.5)中所述网格资源GR与资源定位入口Entry之间是否有直接的建模关系:Step (4.6). The user judges whether there is a direct modeling relationship between the grid resource GR described in step (4.5) and the resource location entry Entry: 若有:则把该Entry和LPath作为请求参数,向所选定目标网格节点的直接查询服务模块发送请求,转步骤(4.7);If there is: then use the Entry and LPath as request parameters, send a request to the direct query service module of the selected target grid node, and turn to step (4.7); 若没有:则设置过滤规则filterRule,把该Entry,LPath和该filterRule作为请求参数向选定的目标网格节点的定位服务模块发送请求,转步骤(4.7);If not: then filter rule filterRule is set, and this Entry, LPath and this filterRule are used as request parameters to send a request to the location service module of the selected target grid node, and turn to step (4.7); 步骤(4.7).若还有需要定位的网格资源,则重复步骤(4.3)~(4.6),直至对该选定的目标网格节点TGS上用户所关心的所有的网格资源都进行了定位。Step (4.7). If there are grid resources that need to be located, repeat steps (4.3) to (4.6) until all the grid resources that the user cares about on the selected target grid node TGS have been carried out. position.
CNB2007101003257A 2007-06-08 2007-06-08 Modeled network resource positioning method Expired - Fee Related CN100452726C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101003257A CN100452726C (en) 2007-06-08 2007-06-08 Modeled network resource positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101003257A CN100452726C (en) 2007-06-08 2007-06-08 Modeled network resource positioning method

Publications (2)

Publication Number Publication Date
CN101079736A true CN101079736A (en) 2007-11-28
CN100452726C CN100452726C (en) 2009-01-14

Family

ID=38906982

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101003257A Expired - Fee Related CN100452726C (en) 2007-06-08 2007-06-08 Modeled network resource positioning method

Country Status (1)

Country Link
CN (1) CN100452726C (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102238188A (en) * 2011-08-01 2011-11-09 中国人民解放军国防科学技术大学 Application-domain-based grid resource organization method
CN101702020B (en) * 2009-10-22 2013-03-13 中国农业大学 Method and device for obtaining remotely sensed data based on grids
CN103098506A (en) * 2010-07-05 2013-05-08 Sk电信有限公司 Method and device for updating a database for wireless LAN based positioning
CN101639531B (en) * 2009-08-28 2013-08-21 中国农业大学 Method for acquiring remote sensing data and device thereof
WO2016008086A1 (en) * 2014-07-15 2016-01-21 Microsoft Technology Licensing, Llc Data model indexing for model queries
CN108596824A (en) * 2018-03-21 2018-09-28 华中科技大学 A kind of method and system optimizing rich metadata management based on GPU
US10157206B2 (en) 2014-07-15 2018-12-18 Microsoft Technology Licensing, Llc Data retrieval across multiple models
US10198459B2 (en) 2014-07-15 2019-02-05 Microsoft Technology Licensing, Llc Data model change management
US10423640B2 (en) 2014-07-15 2019-09-24 Microsoft Technology Licensing, Llc Managing multiple data models over data storage system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100466657C (en) * 2005-12-06 2009-03-04 南京邮电大学 An Access Control Decision Maker in Grid Computing Environment
CN100440803C (en) * 2005-12-26 2008-12-03 北京航空航天大学 A Method of Modeling and Processing Mesh Information
CN1819529A (en) * 2006-03-16 2006-08-16 武汉理工大学 Selecting method of grid resource model and node

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639531B (en) * 2009-08-28 2013-08-21 中国农业大学 Method for acquiring remote sensing data and device thereof
CN101702020B (en) * 2009-10-22 2013-03-13 中国农业大学 Method and device for obtaining remotely sensed data based on grids
CN103098506B (en) * 2010-07-05 2016-02-24 Sk电信有限公司 Upgrade the method and apparatus be used for based on the database of the location of WLAN
CN103098506A (en) * 2010-07-05 2013-05-08 Sk电信有限公司 Method and device for updating a database for wireless LAN based positioning
CN102238188B (en) * 2011-08-01 2014-05-07 中国人民解放军国防科学技术大学 Application-domain-based grid resource organization method
CN102238188A (en) * 2011-08-01 2011-11-09 中国人民解放军国防科学技术大学 Application-domain-based grid resource organization method
WO2016008086A1 (en) * 2014-07-15 2016-01-21 Microsoft Technology Licensing, Llc Data model indexing for model queries
CN105518670A (en) * 2014-07-15 2016-04-20 微软技术许可有限责任公司 Data model indexing for model queries
US10140323B2 (en) 2014-07-15 2018-11-27 Microsoft Technology Licensing, Llc Data model indexing for model queries
US10157206B2 (en) 2014-07-15 2018-12-18 Microsoft Technology Licensing, Llc Data retrieval across multiple models
US10198459B2 (en) 2014-07-15 2019-02-05 Microsoft Technology Licensing, Llc Data model change management
US10423640B2 (en) 2014-07-15 2019-09-24 Microsoft Technology Licensing, Llc Managing multiple data models over data storage system
CN105518670B (en) * 2014-07-15 2021-09-07 微软技术许可有限责任公司 Data model indexing for model queries
CN108596824A (en) * 2018-03-21 2018-09-28 华中科技大学 A kind of method and system optimizing rich metadata management based on GPU

Also Published As

Publication number Publication date
CN100452726C (en) 2009-01-14

Similar Documents

Publication Publication Date Title
CN101079736A (en) Modeled network resource positioning method
CN1262915C (en) System and method for rapid completion of data processing tasks distributed on a network
Alpdemir et al. Service-based distributed querying on the grid
CN1469269A (en) Method and device for virtual unification of multiple network storage devices
CN1956457A (en) Method and apparatus for scheduling grid jobs in a grid computing system
CN1443323A (en) Method, system and program products for controlling system traffic of clustered computing environment
CN1956456A (en) Method and apparatus for presenting resource requirements in a grid computing system
CN1804840A (en) Data access layer class generator
CN1924839A (en) Method for managing device driving program and information processing device
CN101064641A (en) Method and system for attribute based index and/or query of Web service resource
CN1609796A (en) Design of application programming interfaces (APIs)
CN1836213A (en) Automatic and dynamic provisioning of databases
CN1811702A (en) System and method for developing portal applications and automatically deploying them into a portal server application
CN1959717A (en) System and method for preprocessing mass remote sensing data collection driven by order form
CN1645342A (en) Large scale resource memory managing method based on network under SAN environment
CN1967485A (en) Method and system for realizing J2EE application
CN1320874A (en) Program mining method and system in network environment
CN101061688A (en) Network management apparatus and method based on simple network management protocol
CN1820514A (en) System architecture method and computer program product for managing telecommunication networks
CN101043381A (en) System and method for collecting service grid traceback information
CN1300690C (en) Method and system for monitoring resource in computer system
CN1256671C (en) Method and apparatus for managing resource contention
CN1540481A (en) Cooperative use method of multi-computing engines based on grid environment
CN1716249A (en) System and method for delayed fetching of designated members of a user defined type
CN1677932A (en) Network management configuration method and apparatus thereof

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090114

Termination date: 20160608