[go: up one dir, main page]

CN101741904B - Method for building distributed space computation service node and gateway device - Google Patents

Method for building distributed space computation service node and gateway device Download PDF

Info

Publication number
CN101741904B
CN101741904B CN2009102385099A CN200910238509A CN101741904B CN 101741904 B CN101741904 B CN 101741904B CN 2009102385099 A CN2009102385099 A CN 2009102385099A CN 200910238509 A CN200910238509 A CN 200910238509A CN 101741904 B CN101741904 B CN 101741904B
Authority
CN
China
Prior art keywords
task
space
node
computing
interface
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
CN2009102385099A
Other languages
Chinese (zh)
Other versions
CN101741904A (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.)
CENTER FOR EARTH OBSERVATION AND DIGITAL EARTH CHINESE ACADEMY OF SCIENCES
Research Institute Of Forest Resource Information Techniques Chinese Academy Of Forestry
Tsinghua University
Original Assignee
CENTER FOR EARTH OBSERVATION AND DIGITAL EARTH CHINESE ACADEMY OF SCIENCES
Research Institute Of Forest Resource Information Techniques Chinese Academy Of Forestry
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 CENTER FOR EARTH OBSERVATION AND DIGITAL EARTH CHINESE ACADEMY OF SCIENCES, Research Institute Of Forest Resource Information Techniques Chinese Academy Of Forestry, Tsinghua University filed Critical CENTER FOR EARTH OBSERVATION AND DIGITAL EARTH CHINESE ACADEMY OF SCIENCES
Priority to CN2009102385099A priority Critical patent/CN101741904B/en
Publication of CN101741904A publication Critical patent/CN101741904A/en
Application granted granted Critical
Publication of CN101741904B publication Critical patent/CN101741904B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Multi Processors (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种分布式空间计算服务节点的构建方法及网关装置,以融合多种平台提供空间计算服务。其中该方法包括:基于Web服务结构,对空间计算资源进行异步调用;按照先入先出的次序,以多线程的方式对事件进行响应,实现事件相应的功能;通过配置文件来配置实际连接计算资源的连接器,实现与实际计算资源的连接。本发明使得空间计算资源的所有者可以简单地将其所拥有的各种不同平台、不同系统上的计算资源提供出来,由节点构建工具将其服务化,形成具有统一的自描述接口的空间计算服务。

Figure 200910238509

The invention discloses a construction method of a distributed space computing service node and a gateway device to provide space computing services by integrating multiple platforms. The method includes: asynchronously invoking spatial computing resources based on the Web service structure; responding to events in a multi-threaded manner in a first-in-first-out order to implement functions corresponding to events; configuring actual connection computing resources through configuration files Connectors to connect to actual computing resources. The present invention enables the owner of spatial computing resources to simply provide computing resources on various platforms and systems owned by them, and the node construction tool serves them to form spatial computing with a unified self-describing interface. Serve.

Figure 200910238509

Description

一种分布式空间计算服务节点的构建方法及网关装置A method for constructing a distributed spatial computing service node and a gateway device

技术领域 technical field

本发明涉及Web地理信息系统(GIS)及Web遥感技术,尤其涉及一种分布式空间计算服务节点的构建方法及网关装置。The invention relates to a Web geographic information system (GIS) and a Web remote sensing technology, in particular to a method for constructing a distributed space computing service node and a gateway device.

背景技术 Background technique

目前已有的基于地理信息网络服务框架的开发方法和系统,虽然功能各有所长,但大都依赖于特定的GIS软件,有的甚至依赖特定的操作系统,不能支持集群和并行计算环境。Although the existing development methods and systems based on geographic information network service framework have their own advantages and disadvantages, most of them depend on specific GIS software, and some even rely on specific operating systems, which cannot support cluster and parallel computing environments.

目前已有的基于地理信息网络服务框架的开发技术,包含有开发地理信息系统网络服务框架使用的数据库,该数据库中包含有空间数据。此外,地理信息系统的网络服务框架,提供了一个地理信息系统的网络服务给用户。基于GIS功能是结合地理信息系统的网络服务。用户访问地理信息系统的功能是使用这一地理信息系统的网络服务。The existing development technology based on the geographic information network service framework includes the database used to develop the geographic information system network service framework, and the database contains spatial data. In addition, the GIS web service framework provides a GIS web service to users. GIS-based functions are web services combined with geographic information systems. The function of users accessing geographic information system is to use the network service of this geographic information system.

目前已有的地理信息系统接口服务技术,基于GIS接口服务的数据基础,其中的GIS接口,与外部的应用系统相匹配,供外部的应用系统使用GIS接口服务功能,使得与外部的应用系统相关的信息在GIS上进行定位和分布等。At present, the existing geographic information system interface service technology is based on the data foundation of GIS interface service. The GIS interface matches the external application system, so that the external application system can use the GIS interface service function, so that it is related to the external application system. The information is positioned and distributed on GIS.

目前已有的一种网格服务组的建立技术及网格服务的发现技术,若干GIS实例之间通过交互,生成服务组成员列表并建立层叠网连接,之后完成服务组的建立。其中的网格服务发现技术,GIS实例在收到服务查询请求后,当存在该服务类型的服务组时,判断出所述GIS实例为服务组的成员则将请求转发给服务组的其他成员,否则将请求转发给服务组的任一成员,由该成员转发给其他成员。这种网格服务发现技术提高了服务查询的效率,避免了现有技术中洪泛的方法带来的响应时间长和网络开销大的缺陷。At present, there is a grid service group establishment technology and grid service discovery technology. Through interaction between several GIS instances, a service group member list is generated and a cascade network connection is established, and then the service group is established. In the grid service discovery technology, after the GIS instance receives the service query request, when there is a service group of the service type, it judges that the GIS instance is a member of the service group and forwards the request to other members of the service group. Otherwise, the request is forwarded to any member of the service group, who forwards it to other members. This grid service discovery technology improves the efficiency of service query and avoids the defects of long response time and large network overhead caused by the flooding method in the prior art.

已有的方法各有自己的着力点,但是往往依赖特定的GIS软件,依赖特定的操作系统,不能支持集群和并行计算环境,这些方法集中在对于地理信息的数据库操作,因此不够灵活,因为实际的地理信息文件格式和空间计算需求是多种多样的。Existing methods each have their own focus, but often rely on specific GIS software, rely on specific operating systems, and cannot support clusters and parallel computing environments. These methods focus on database operations for geographic information, so they are not flexible enough, because the actual The geographic information file formats and spatial computing needs are varied.

发明内容 Contents of the invention

本发明所要解决的技术问题,在于需要提供一种分布式空间计算服务节点的构建方法及网关装置,以融合多种平台提供空间计算服务。The technical problem to be solved by the present invention is to provide a method for constructing a distributed spatial computing service node and a gateway device, so as to integrate multiple platforms to provide spatial computing services.

为了解决上述技术问题,本发明提供了一种分布式空间计算服务节点构建方法,包括:In order to solve the above technical problems, the present invention provides a distributed spatial computing service node construction method, including:

基于Web服务结构,对空间计算资源进行异步调用;Based on the Web service structure, make asynchronous calls to spatial computing resources;

按照先入先出的次序,以多线程的方式对事件进行响应,实现事件相应的功能;According to the order of first-in-first-out, respond to the event in a multi-threaded manner, and realize the corresponding function of the event;

通过配置文件来配置实际连接计算资源的连接器,实现与实际计算资源的连接。Configure the connector that actually connects to the computing resource through the configuration file to realize the connection with the actual computing resource.

优选地,对所述空间计算资源进行异步调用的步骤,包括:Preferably, the step of asynchronously invoking the spatial computing resources includes:

将用户的计算需求封装成用可扩展标记语言描述的计算任务;Encapsulate the user's computing needs into computing tasks described in Extensible Markup Language;

通过预定义的Web服务接口将所述计算任务提交到空间计算服务节点,生成具有唯一标识的任务实例;Submit the computing task to the spatial computing service node through a predefined web service interface, and generate a task instance with a unique identifier;

由用户通过启动和控制所述任务实例的运行,直到所述任务实例执行结束后回收执行结果。The user initiates and controls the operation of the task instance until the task instance is executed and the execution result is recovered.

优选地,对节点本身以及节点上部署的各个任务实施监视和管理。Preferably, monitoring and management are implemented on the node itself and each task deployed on the node.

优选地,按照先入先出的次序,以多线程的方式对事件进行响应的步骤,包括:Preferably, the step of responding to the event in a multi-threaded manner in a first-in-first-out order includes:

将用户请求和系统状态变化作为事件加入到事件队列,按照先入先出的次序,以多线程的方式对事件进行响应。Add user requests and system state changes as events to the event queue, and respond to events in a multi-threaded manner in the order of first-in-first-out.

为了解决上述技术问题,本发明还提供了一种分布式空间计算服务节点的网关装置,包括空间计算服务统一接口、节点网关引擎以及资源接口,其中:In order to solve the above technical problems, the present invention also provides a gateway device for a distributed spatial computing service node, including a unified interface for spatial computing services, a node gateway engine, and a resource interface, wherein:

所述空间计算服务统一接口,基于Web服务结构,用于对空间计算资源进行异步调用;The uniform interface of the spatial computing service is based on the Web service structure, and is used for asynchronously invoking spatial computing resources;

所述节点网关引擎,与所述空间计算服务统一接口相连,用于按照先入先出的次序,以多线程的方式对事件进行响应,实现事件相应的功能;The node gateway engine is connected to the uniform interface of the spatial computing service, and is used to respond to events in a multi-threaded manner in a first-in-first-out order, and realize functions corresponding to events;

所述资源接口,与所述节点网关引擎相连,采用插件-配置结构,通过配置文件配置实际连接计算资源的连接器,实现与实际计算资源的连接。The resource interface is connected to the node gateway engine, adopts a plug-in-configuration structure, and configures a connector for actually connecting computing resources through a configuration file, so as to realize connection with actual computing resources.

优选地,根据可扩展标记语言的自描述性,所述空间计算服务统一接口具备自描述的能力。Preferably, according to the self-description of Extensible Markup Language, the unified interface of the spatial computing service has the ability of self-description.

优选地,所述节点网关引擎,用于根据建立任务时所使用的任务描述和配置文件所提供的配置信息寻找计算资源接口支持类,以实现与该种类计算资源的连接。Preferably, the node gateway engine is configured to search for a computing resource interface support class according to the configuration information provided by the task description and the configuration file used when creating the task, so as to realize the connection with this type of computing resource.

优选地,所述节点网关引擎支持桌面系统、condor或集群计算资源平台,支持Linux或Windows操作系统。Preferably, the node gateway engine supports desktop systems, condor or cluster computing resource platforms, and supports Linux or Windows operating systems.

优选地,该装置进一步包括:Preferably, the device further comprises:

节点监视和管理服务模块,用于提供对所述服务节点以及所述服务节点上部署的各个任务实施监视和管理。The node monitoring and management service module is configured to monitor and manage the service node and each task deployed on the service node.

本发明技术方案主要在空间计算服务的分布式计算以及Web化的空间计算进行了系统地设计和实现,提供了一种有力且易于使用的技术手段,使得空间计算资源的所有者可以简单地将其所拥有的各种不同平台、不同系统上的计算资源提供出来,由节点构建工具将其服务化,形成具有统一的自描述接口的空间计算服务,可以比较简单地通过安装中间件以及简单地配置,与其他安装有相同中间件和类似配置的空间计算服务节点进行通信,形成一个多节点多支撑环境的分布式空间计算环境,克服了以往技术和产品在这方面的不足。空间Web计算服务的用户可以通过任意浏览器而无须安装其他插件就可以方便地使用这些空间计算服务。The technical solution of the present invention is mainly designed and implemented systematically in the distributed computing of spatial computing services and web-based spatial computing, and provides a powerful and easy-to-use technical means, so that the owner of spatial computing resources can simply use the Computing resources on different platforms and systems are provided, and the node construction tools serve them to form spatial computing services with a unified self-describing interface, which can be relatively simple by installing middleware and simply Configuration, communicates with other spatial computing service nodes installed with the same middleware and similar configurations to form a distributed spatial computing environment with multiple nodes and multiple support environments, which overcomes the shortcomings of previous technologies and products in this regard. Users of spatial Web computing services can easily use these spatial computing services through any browser without installing other plug-ins.

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明 Description of drawings

附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the description, and are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the attached picture:

图1是本发明提出的空间计算服务节点网关装置实施例结构示意图;Fig. 1 is a schematic structural diagram of an embodiment of a spatial computing service node gateway device proposed by the present invention;

图2是图1所示空间计算服务统一接口的逻辑执行示意图;FIG. 2 is a schematic diagram of logical execution of the unified interface of the spatial computing service shown in FIG. 1;

图3是本发明分布式空间计算服务节点构建方法实施例的流程示意图。FIG. 3 is a schematic flowchart of an embodiment of a method for constructing a distributed spatial computing service node in the present invention.

具体实施方式 Detailed ways

以下将结合附图及实施例来详细说明本发明的实施方式,借此对本发明如何应用技术手段来解决技术问题,并达成技术效果的实现过程能充分理解并据以实施。The implementation of the present invention will be described in detail below in conjunction with the accompanying drawings and examples, so as to fully understand and implement the process of how to apply technical means to solve technical problems and achieve technical effects in the present invention.

需要说明的是,如果不冲突,本发明实施例以及实施例中的各个特征可以相互结合,均在本发明的保护范围之内。另外,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that, if there is no conflict, the embodiments of the present invention and various features in the embodiments can be combined with each other, and all are within the protection scope of the present invention. In addition, the steps shown in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and, although a logical order is shown in the flow diagrams, in some cases, the sequence may be different. The steps shown or described are performed in the order herein.

传统的Web空间计算服务采用的调用模型基本上都是同步调用,即在调用空间计算服务的时候调用者会被阻塞,直到计算服务完成工作将控制权返回给调用者之后才能继续执行。这种同步调用会带来一系列的问题,其中最严重的是超时问题。为了解决上述问题,针对现有技术空间计算服务计算量大、计算时间长的缺陷,本发明在Web空间计算服务节点构建时采用空间计算服务的异步调用模型。The calling model adopted by the traditional Web spatial computing service is basically a synchronous call, that is, the caller will be blocked when calling the spatial computing service, and the execution cannot continue until the computing service completes the work and returns control to the caller. This synchronous call will bring a series of problems, the most serious of which is the timeout problem. In order to solve the above-mentioned problems, aiming at the defects of large amount of calculation and long calculation time of the existing spatial computing service, the present invention adopts an asynchronous invocation model of the spatial computing service when constructing the Web spatial computing service node.

图1为本发明提出的空间计算服务节点网关装置实施例的组成示意图。如图1所示,该装置实施例主要包括空间计算服务统一接口110、节点网关引擎120、资源接口130、节点监视和管理服务模块140,其中:FIG. 1 is a schematic composition diagram of an embodiment of a spatial computing service node gateway device proposed by the present invention. As shown in Figure 1, the device embodiment mainly includes a spatial computing service unified interface 110, a node gateway engine 120, a resource interface 130, and a node monitoring and management service module 140, wherein:

空间计算服务统一接口110,基于Web服务(Service)结构,用于对空间计算资源进行异步调用;Spatial computing service unified interface 110, based on the Web service (Service) structure, is used for asynchronously invoking spatial computing resources;

由于空间计算通常计算量大,计算时间长,传统Web Service的同步调用模式由于超时限制而无法作为空间计算服务的统一接口;上述的空间计算服务统一接口110,基于传统的Web Service的结构,用于对空间计算资源进行异步调用,并赋予该上述的空间计算服务统一接口110自描述的能力,方便空间计算服务的使用。Because spatial computing usually has a large amount of calculation and takes a long time, the synchronous call mode of traditional Web Service cannot be used as a unified interface for spatial computing services due to timeout restrictions; the above-mentioned unified interface for spatial computing services 110 is based on the structure of traditional Web Services. It is used to make asynchronous calls to spatial computing resources, and endow the above-mentioned unified interface 110 of spatial computing services with self-describing capabilities, so as to facilitate the use of spatial computing services.

自描述性本指可扩展标记语言(XML)文档的一个特征,即XML文档通常包含一个文档类型声明,因而XML文档是自描述的。不仅人能读懂XML文档,计算机也能处理。XML表示数据的方式真正做到了独立于应用系统,并且数据能够重用。XML文档被看作是文档的数据库化和数据的文档化。在本发明中,利用了这个技术实现了空间计算服务接口的自描述。Self-describing refers to a feature of Extensible Markup Language (XML) documents, that is, XML documents usually contain a document type declaration, so XML documents are self-describing. Not only humans can understand XML documents, but computers can also process them. The way of representing data in XML is really independent of the application system, and the data can be reused. XML documents are regarded as databaseization of documents and documentation of data. In the present invention, this technology is utilized to realize the self-description of the spatial computing service interface.

从效率和使用的方便性等方面考虑,空间计算服务统一接口110的异步模式的基本实现过程是:将用户的计算需求封装成为一个用可扩展标记语言(XML)描述的计算任务,这个计算任务通过一个预先定义好的Web Service接口提交到空间计算服务节点,生成一个具有唯一标识(ID)的任务实例,并由用户通过启动和控制这个任务实例的运行,直到任务实例执行结束后再回收任务执行的结果。Considering the efficiency and convenience of use, the basic implementation process of the asynchronous mode of the spatial computing service unified interface 110 is: encapsulating the user's computing needs into a computing task described in Extensible Markup Language (XML). Submit to the spatial computing service node through a pre-defined Web Service interface, generate a task instance with a unique ID (ID), and the user starts and controls the operation of the task instance, and recycles the task until the execution of the task instance is completed the result of the execution.

具体来讲,空间计算服务统一接口110为服务的使用者提供以下功能,以满足建立、销毁和控制任务的需求:Specifically, the spatial computing service unified interface 110 provides service users with the following functions to meet the needs of creating, destroying and controlling tasks:

建立(Create):根据用户提供的任务描述建立一个新的空间计算任务实例,并返回用来标识该任务实例的唯一ID。Create: Create a new spatial computing task instance according to the task description provided by the user, and return the unique ID used to identify the task instance.

启动(Start):启动一个任务实例的运行,节点网关引擎120将根据提供服务的平台和系统的状态决定何时以及使用哪些资源运行该任务实例。Start: start a task instance, and the node gateway engine 120 will decide when and which resources to use to run the task instance according to the status of the platform and system providing the service.

暂停/恢复(Pause/resume):暂停/恢复一个任务实例的运行,只有任务实现支持暂停/恢复的时候才可以使用,也就是说,某些任务是不能被暂停/恢复的。Pause/resume (Pause/resume): Pause/resume the running of a task instance, which can only be used when the task implementation supports pause/resume, that is, some tasks cannot be paused/resume.

结束(Terminate):强制结束一个任务实例的运行。Terminate: Forcefully end the running of a task instance.

销毁(Destroy):销毁一个任务的实例。Destroy: Destroys an instance of a task.

除了上面这些控制任务所需要的接口之外,空间计算服务统一接口110还定义了如下功能,以实现用户对任务更多的控制和监视:In addition to the interfaces required by the above control tasks, the spatial computing service unified interface 110 also defines the following functions to achieve more control and monitoring of tasks by users:

参数设置(setParameter):设置任务实例运行所需要的参数,参数将根据其类型自动编码,当前参数/结果传递支持的数据类型(即可以被自动编解码的数据类型)有:Java简单类型、字符串、iava beans,以及上述类型的数组。Parameter setting (setParameter): Set the parameters required for the task instance to run. The parameters will be automatically encoded according to their types. The data types supported by the current parameter/result transmission (that is, the data types that can be automatically encoded and decoded) are: Java simple types, characters Strings, iava beans, and arrays of the above types.

参数读取(getParameter):读取任务实例运行的参数。Parameter read (getParameter): read the parameters of the task instance running.

结果获取(getResult):得到任务实例运行的结果。需要说明的是,任务实例不一定必须在到达完成(finished)状态才有结果输出,getResult接口也就可以在任何时刻读取任务实例运行结果,如果结果尚未输出,则返回一个空值。Result acquisition (getResult): Get the result of the task instance running. It should be noted that the task instance does not necessarily have to reach the completed (finished) state before it can output the result. The getResult interface can also read the running result of the task instance at any time. If the result has not been output, it returns a null value.

状态获取(getStatus):得到任务实例的运行状态,客户端可以轮询以获得任务实例的状态。Status acquisition (getStatus): Get the running status of the task instance, and the client can poll to obtain the status of the task instance.

消息获取(getMessage):读取任务实例运行过程中输出的消息,这些消息由任务的实现代码设置。Message acquisition (getMessage): read the messages output during the running of the task instance, and these messages are set by the implementation code of the task.

上述功能都通过Web Service方式调用,具有明确的网络服务描述语言(WSDL)描述,并提供一些客户端支持库,方便其使用。The above functions are all invoked through Web Service, have a clear Web Service Description Language (WSDL) description, and provide some client support libraries to facilitate their use.

节点网关引擎120,与该空间计算服务接口110相连,用于按照先入先出的次序,以多线程的方式对事件进行响应,实现事件相应的功能;The node gateway engine 120 is connected to the space computing service interface 110, and is used to respond to events in a multi-threaded manner in a first-in-first-out order, and realize functions corresponding to events;

基于事件的节点网关引擎120,以事件队列为中心,将各种用户请求和各种系统状态变化作为事件加入到事件队列,按照先入先出的次序,以多线程的方式对事件进行响应,以实现对应的功能。The event-based node gateway engine 120, with the event queue as the center, adds various user requests and various system state changes to the event queue as events, and responds to the events in a multi-threaded manner in the order of first-in-first-out. Realize the corresponding function.

节点网关引擎120定义的事件包括请求建立任务的任务建立请求事件、完成任务建立的任务建立完成事件、请求启动任务的任务启动请求事件、启动任务的任务启动事件、完成任务的任务完成事件以及表示任务失败的任务失败事件等。节点网关引擎120所定义的计算资源实现的功能包括如下几个:The events defined by the node gateway engine 120 include a task creation request event for requesting to create a task, a task establishment completion event for completing task creation, a task start request event for requesting to start a task, a task start event for starting a task, a task completion event for completing a task, and a Task failure events for task failures, etc. The functions realized by the computing resources defined by the node gateway engine 120 include the following:

任务启动(startJob):启动一个任务实例的运行。Task start (startJob): Start the operation of a task instance.

任务终止(terminateJob):终止一个任务实例的运行。Task termination (terminateJob): Terminate the running of a task instance.

任务初始化(onCreate):在任务实例被建立的时候调用,以提供一种在任务实例实际运行之前对相应计算资源进行初始化的机制。Task initialization (onCreate): Called when the task instance is created to provide a mechanism for initializing the corresponding computing resources before the task instance actually runs.

任务清除(onDestroy):在任务实例被销毁前调用,以提供一种在任务实例被销毁之前对相应计算资源进行清除(Cleanup)的机制。Task cleanup (onDestroy): Called before the task instance is destroyed to provide a mechanism for cleaning up the corresponding computing resources before the task instance is destroyed.

任务暂停(stopJob):暂停一个任务实例的运行。Task suspension (stopJob): suspend the running of a task instance.

任务恢复(resumeJob):恢复一个被暂停的任务实例的运行。Task resume (resumeJob): Resume the operation of a suspended task instance.

其中startJob必须具备功能性的实现,以保证任务能够得到运行;而其余几个功能在计算资源不需要或不支持的情况下可以采用空实现。Among them, startJob must have a functional implementation to ensure that the task can be run; while the remaining functions can be implemented empty if the computing resources do not need or support it.

同时,节点网关引擎120还提供任务运行所必需的任务实例上下文的定义。任务实例上下文中包括任务实例的ID、描述、参数、状态、消息、结果等信息,同时任务实例上下文中还指明了任务实例依赖于何种计算资源接口支持。At the same time, the node gateway engine 120 also provides the definition of task instance context necessary for task execution. The task instance context includes information such as the ID, description, parameters, status, message, and result of the task instance. At the same time, the task instance context also indicates which computing resource interface support the task instance depends on.

资源接口130,与该节点网关引擎120相连,用于采用插件-配置结构,由节点网关引擎120以Java接口等方式定义计算资源接口所必须实现的功能,通过配置文件来配置实际连接计算资源的连接器,实现与实际计算资源的连接。The resource interface 130 is connected to the node gateway engine 120, and is used to adopt a plug-in-configuration structure. The node gateway engine 120 defines the functions that must be realized by the computing resource interface in the form of a Java interface, etc., and configures the actual connection to the computing resource through a configuration file. Connectors to connect to actual computing resources.

实现的计算资源接口可以通过一个XML文件进行配置,节点网关引擎120会根据用户建立任务时所使用的任务描述和该配置文件所提供的配置信息寻找合适的计算资源接口支持类,以实现与该种类计算资源的连接,可以支持桌面系统、condor以及集群三种不同的计算资源平台,以及Linux、Windows两种不同的操作系统。The implemented computing resource interface can be configured through an XML file, and the node gateway engine 120 will search for a suitable computing resource interface support class according to the task description used by the user when creating the task and the configuration information provided by the configuration file, so as to realize the The connection of various types of computing resources can support three different computing resource platforms of desktop system, condor and cluster, as well as two different operating systems of Linux and Windows.

节点监视和管理服务模块140,与该节点网关引擎120相连,用于提供对节点本身以及节点上部署的各个任务实施监视和管理,主要工作包括如下:The node monitoring and management service module 140 is connected to the node gateway engine 120, and is used to monitor and manage the node itself and the tasks deployed on the node. The main tasks include the following:

获取节点相关信息,包括静态信息(如节点体系结构、操作系统、平台版本等等)和动态信息(如节点当前负载等等);获取节点上部署任务的情况,包括对任务进行列表和根据一些条件(如任务名、任务特性等)进行任务查找,并提供方便的任务部署手段;获取任务接口,以供用户调用任务使用。同时提供工具,根据已知的任务接口自动生成调用计算服务任务的客户端。Get node-related information, including static information (such as node architecture, operating system, platform version, etc.) Conditions (such as task name, task characteristics, etc.) are used to search for tasks, and provide convenient means of task deployment; obtain task interfaces for users to call tasks. At the same time, tools are provided to automatically generate clients for invoking computing service tasks based on known task interfaces.

图2是图1所示空间计算服务统一接口的逻辑执行示意图。结合图1所示网关装置实施例,图2所示的逻辑执行示意图主要包括如下步骤:FIG. 2 is a schematic diagram of logical execution of the unified interface of the spatial computing service shown in FIG. 1 . In combination with the embodiment of the gateway device shown in FIG. 1, the logic execution schematic diagram shown in FIG. 2 mainly includes the following steps:

步骤S210,根据用户提供的任务描述建立(create)一个新的空间计算任务实例,完成初始化(initialized);Step S210, create (create) a new spatial computing task instance according to the task description provided by the user, and complete the initialization (initialized);

步骤S220,启动(Start)该任务实例的运行,之后处于运行(running)状态;Step S220, start (Start) the operation of the task instance, and then be in the running (running) state;

步骤S230,在运行(running)过程中,可以对部分任务执行暂停(Pause)操作;执行暂停(pause)操作后,任务实例处于暂停(pause)状态;Step S230, during the running process, a Pause operation can be performed on some tasks; after the Pause operation is performed, the task instance is in a Pause state;

步骤S240,对处于暂停(pause)状态的任务实例执行恢复操作,重新返回运行(running)状态;Step S240, perform a recovery operation on the task instance in the pause (pause) state, and return to the running (running) state;

需要说明的是,只有部分任务支持暂停/恢复(pause/resume)功能;It should be noted that only some tasks support the pause/resume function;

步骤S250,处于运行(running)状态在实现(accomplish)之后,进入完成(finished)状态,可以执行步骤S280,销毁(Destroy)任务实例,使该任务实例处于不存在(Not Exist)状态。Step S250, in the running (running) state and after (accomplished), enter the completed (finished) state, and step S280 can be executed to destroy (Destroy) the task instance, so that the task instance is in the non-existing (Not Exist) state.

如图2中步骤S260所示,在初始化(initialized)过程中、运行(running)状态或者暂停(pause)状态,可以强制结束(Terminate)该任务实例的运行,此时任务实例处于失败(failed)状态。As shown in step S260 in Figure 2, during the initialization (initialized) process, in the running (running) state or in the pause (pause) state, the operation of the task instance can be forcibly terminated (Terminate), and the task instance is in failure (failed) at this time. state.

如步骤S270所示,在运行(running)状态中,可能会因为异常(exception)状态而使得任务实例处于失败(failed)状态。As shown in step S270, in the running state, the task instance may be in a failed state due to an exception state.

在失败(failed)状态或者完成(finished)状态,可以执行步骤S280,销毁(Destroy)任务实例,使该任务实例处于不存在(Not Exist)状态。In the failed (failed) state or the completed (finished) state, step S280 may be executed to destroy (Destroy) the task instance, so that the task instance is in a non-existing (Not Exist) state.

当任务实例处于不存在(Not Exist)状态,说明这是一个新起的任务实例,回到步骤S210。When the task instance is in the state of not existing (Not Exist), it means that this is a new task instance, and returns to step S210.

图3是本发明分布式空间计算服务节点构建方法实施例的流程示意图。结合图1所示网关装置实施例以及图2所示的逻辑执行,图3所示的本发明方法主要包括如下步骤:FIG. 3 is a schematic flowchart of an embodiment of a method for constructing a distributed spatial computing service node in the present invention. Combining the embodiment of the gateway device shown in Figure 1 and the logic execution shown in Figure 2, the method of the present invention shown in Figure 3 mainly includes the following steps:

步骤S310,基于Web服务结构,对空间计算资源进行异步调用;Step S310, based on the Web service structure, make an asynchronous call to the spatial computing resource;

步骤S320,按照先入先出的次序,以多线程的方式对事件进行响应,实现事件相应的功能;Step S320: Respond to the event in a multi-threaded manner according to the order of first-in-first-out, so as to realize the functions corresponding to the event;

步骤S330,通过配置文件来配置实际连接计算资源的连接器,实现与实际计算资源的连接。In step S330, the connector for actually connecting to the computing resource is configured through the configuration file, so as to realize the connection with the actual computing resource.

上述对所述空间计算资源进行异步调用的步骤,主要包括:The above steps of asynchronously invoking the space computing resources mainly include:

将用户的计算需求封装成用可扩展标记语言描述的计算任务;Encapsulate the user's computing needs into computing tasks described in Extensible Markup Language;

通过预定义的Web服务接口将所述计算任务提交到空间计算服务节点,生成具有唯一标识的任务实例;Submit the computing task to the spatial computing service node through a predefined web service interface, and generate a task instance with a unique identifier;

由用户通过启动和控制所述任务实例的运行,直到所述任务实例执行结束后回收执行结果。The user initiates and controls the operation of the task instance until the task instance is executed and the execution result is recovered.

图3所示方法实施例中,可以对节点本身以及节点上部署的各个任务实施监视和管理。In the method embodiment shown in FIG. 3 , monitoring and management can be implemented on the node itself and each task deployed on the node.

上述按照先入先出的次序,以多线程的方式对事件进行响应的步骤,可以包括:The above-mentioned steps of responding to events in a multi-threaded manner according to the order of first-in-first-out may include:

将用户请求和系统状态变化作为事件加入到事件队列,按照先入先出的次序,以多线程的方式对事件进行响应。Add user requests and system state changes as events to the event queue, and respond to events in a multi-threaded manner in the order of first-in-first-out.

本发明在通过构建空间计算服务节点达到空间计算服务的分布式计算以及Web化的空间计算的目的方面区别于现有的技术。因此本发明的核心发明点就是构建空间计算服务节点以实现空间计算服务的分布式计算的过程,以及空间计算服务的异步调用模型、各种不同平台的计算资源接口支持方法等。The present invention is different from the prior art in achieving distributed computing of spatial computing services and web-based spatial computing by constructing spatial computing service nodes. Therefore, the core invention of the present invention is the process of constructing spatial computing service nodes to realize the distributed computing of spatial computing services, the asynchronous calling model of spatial computing services, and the support methods of computing resource interfaces of various platforms.

本发明方法采用面向服务架构(SOA)基本理论模型以及Web服务技术框架,利用Java技术和服务封装等技术,可以适用于多种地理信息系统(GIS),很好地克服了现在网格计算技术灵活性不够,扩展性差的缺点,并且有效地支持运行环境及应用程序在网格环境下的迁移,同时还支持原有网格计算模型。本发明方法能在不修改应用系统的前提下使得应用系统能很好地利用GIS,大大降低了实现成本。The method of the present invention adopts the basic theoretical model of Service-Oriented Architecture (SOA) and the technical framework of Web service, utilizes technologies such as Java technology and service encapsulation, can be applicable to multiple geographic information systems (GIS), and overcomes the present grid computing technology well Insufficient flexibility and poor scalability, and effectively support the migration of the operating environment and applications in the grid environment, and also support the original grid computing model. The method of the invention can make the application system make good use of GIS without modifying the application system, and greatly reduces the realization cost.

显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个程序模块,或者将它们中的多个模块或步骤制作成单个程序模块来实现。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Optionally, they can be implemented with program codes executable by computing devices, thus, they can be stored in storage devices and executed by computing devices, or they can be made into individual program modules, or their Multiple modules or steps are implemented as a single program module.

虽然本发明所揭露的实施方式如上,但所述的内容只是为了便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属技术领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式上及细节上作任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。Although the embodiments disclosed in the present invention are as above, the described content is only an embodiment adopted for the convenience of understanding the present invention, and is not intended to limit the present invention. Anyone skilled in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed by the present invention, but the patent protection scope of the present invention, The scope defined by the appended claims must still prevail.

Claims (8)

1. a distributed space computation service node construction method is characterized in that, comprising:
The Web-based services structure is carried out asynchronous call to space computing resources; Specifically comprise: user's computation requirement is packaged into the calculation task of describing with extend markup language; By predefined Web service interface described calculation task is submitted to space computation service node, generation has the uniquely identified task instances; By starting and control the operation of described task instances, until carrying out, described task instances finishes the rear execution result that reclaims by the user;
According to the order of first-in first-out, event is responded the corresponding function of realization event in the mode of multithreading;
Dispose the connector of actual connection space computational resource by configuration file, realize and being connected of space computing resources.
2. the method for claim 1 is characterized in that:
Each task-cycle to space computation service node itself and space computation service node deploy monitors and management.
3. the method for claim 1 is characterized in that, according to the order of first-in first-out,, comprising the step that event responds in the mode of multithreading:
User request and system state change are joined event queue as event, according to the order of first-in first-out, in the mode of multithreading event is responded.
4. the gateway apparatus of a distributed space computation service node is characterized in that, comprises space calculation services unified interface, node gateway engine and resource interface, wherein:
Described space calculation services unified interface, the Web-based services structure is used for space computing resources is carried out asynchronous call; Specifically comprise: user's computation requirement is packaged into the calculation task of describing with extend markup language; By predefined Web service interface described calculation task is submitted to space computation service node, generation has the uniquely identified task instances; By starting and control the operation of described task instances, until carrying out, described task instances finishes the rear execution result that reclaims by the user;
Described node gateway engine links to each other with described space calculation services unified interface, is used for the order according to first-in first-out, event is responded the corresponding function of realization event in the mode of multithreading;
Described resource interface links to each other with described node gateway engine, adopts plug-in unit-configuration structure, disposes the connector of actual connection space computational resource by configuration file, realizes and being connected of space computing resources.
5. device as claimed in claim 4 is characterized in that:
According to the self descriptiveness of extend markup language, described space calculation services unified interface possesses the ability of self-described.
6. device as claimed in claim 4 is characterized in that:
Described node gateway engine is used for employed task description and configuration file provide when setting up task configuration information and seeks the computational resource interface and support class, to realize and being connected of this kind computational resource.
7. device as claimed in claim 6 is characterized in that:
Described node gateway engine support table plane system, condor or cluster computational resource platform are supported Linux or Windows operating system.
8. device as claimed in claim 4 is characterized in that, this device further comprises:
Node monitors and management services module, is used for providing each task-cycle to described space computation service node and described space computation service node deploy to monitor and management.
CN2009102385099A 2009-11-27 2009-11-27 Method for building distributed space computation service node and gateway device Expired - Fee Related CN101741904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102385099A CN101741904B (en) 2009-11-27 2009-11-27 Method for building distributed space computation service node and gateway device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102385099A CN101741904B (en) 2009-11-27 2009-11-27 Method for building distributed space computation service node and gateway device

Publications (2)

Publication Number Publication Date
CN101741904A CN101741904A (en) 2010-06-16
CN101741904B true CN101741904B (en) 2013-01-02

Family

ID=42464787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102385099A Expired - Fee Related CN101741904B (en) 2009-11-27 2009-11-27 Method for building distributed space computation service node and gateway device

Country Status (1)

Country Link
CN (1) CN101741904B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262541A (en) * 2011-08-12 2011-11-30 北京思创银联科技股份有限公司 Method for starting dynamic configuration plug-in
CN102508639B (en) * 2011-10-10 2014-04-02 北京邮电大学 Distributed parallel processing method based on satellite remote sensing data characteristics
CN102523249A (en) * 2011-11-24 2012-06-27 哈尔滨工业大学 Distributed long-distance simulation system and simulation method based on Web
CN102710441B (en) * 2012-05-31 2014-04-02 朱峻茂 Uniform-interface-based multi-platform information acquisition method and information acquisition system
CN104424157A (en) * 2013-08-24 2015-03-18 镇江金钛软件有限公司 Service construction method
CN105791354A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Job scheduling method and cloud scheduling server
CN106651008A (en) * 2016-11-23 2017-05-10 长江水利委员会水文局 Universal network service constructing method for hydrologic forecasting
CN113810977B (en) * 2020-06-11 2024-06-07 中国移动通信有限公司研究院 Method, system, node and medium for generating computing force topology
CN114338283A (en) * 2021-12-07 2022-04-12 珠海格力电器股份有限公司 Web-based configurable gateway, equipment control method and readable storage medium
CN116149621A (en) * 2023-04-21 2023-05-23 云账户技术(天津)有限公司 Access method, system, equipment and medium of bank virtual account

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540481A (en) * 2003-10-31 2004-10-27 清华大学 Cooperative use method of multi-computing engines based on grid environment
CN101587639A (en) * 2009-06-23 2009-11-25 华中科技大学 City bus information management and dispatch decision support system based on network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562254B2 (en) * 2003-07-01 2009-07-14 International Business Machines Corporation Checkpointing and restarting long running web services

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540481A (en) * 2003-10-31 2004-10-27 清华大学 Cooperative use method of multi-computing engines based on grid environment
CN101587639A (en) * 2009-06-23 2009-11-25 华中科技大学 City bus information management and dispatch decision support system based on network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张小溪等.空间信息网格中异步Web计算服务设计与实现.《遥感信息》.2009,正文第77-80页,图2-3. *

Also Published As

Publication number Publication date
CN101741904A (en) 2010-06-16

Similar Documents

Publication Publication Date Title
CN101741904B (en) Method for building distributed space computation service node and gateway device
Hughes et al. LooCI: a loosely-coupled component infrastructure for networked embedded systems
CN111506412A (en) Distributed asynchronous task construction and scheduling system and method based on Airflow
CN112799789A (en) Node cluster management method, device, equipment and storage medium
CN108270818B (en) A microservice architecture system and its access method
CN101976062B (en) Open type control method based on lightweight service-oriented architectures (LSOA) framework
CN108804238B (en) Soft bus communication method based on remote procedure call
CN105472042A (en) WEB terminal controlled message middleware system and data transmission method thereof
JP2004206712A (en) Architecture of topology aware grid service scheduler
CN110716748A (en) Service processing method and device, computer readable medium and electronic equipment
CN105791354A (en) Job scheduling method and cloud scheduling server
CN104579792A (en) Architecture and method for achieving centralized management of various types of virtual resources based on multiple adaptive modes
CN110162417B (en) Data interaction method for industrial edge computing application and OPC UA address space
Aiello et al. Maps: A mobile agent platform for wsns based on java sun spots
JPH11312079A (en) Method for controlling portable information processor
CN103685572A (en) Method and system for building data center management platform based on SOA (service-oriented architecture)
CN115391006A (en) Heterogeneous multi-cluster data processing method, device, medium and terminal
Migliardi et al. The Harness Metacomputing Framework.
KR100833494B1 (en) Apparatus and method for weight reduction of application through dual application management in OS middleware of embedded terminal
CN115248692A (en) Device and method for supporting cloud deployment of multiple deep learning framework models
CN111898162B (en) Parallel task execution method and device, storage medium and electronic equipment
Lee et al. Itinerary-based mobile agent as a basis for distributed OSGi services
CN101315618A (en) A utility computing cluster system and its runtime environment management method
CN103677842A (en) Software tool configuration type integrated expansion calling method and system
CN115237547B (en) A unified container cluster hosting system and method for a non-intrusive HPC computing cluster

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

Granted publication date: 20130102

Termination date: 20131127