3 Star 1 Fork 0

Franklin_Zhang/GeoModelTaskServer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

GeoModelTaskServer

Travis (.org)

Introduction

Task server for geographical modeling, including Master server and Task IO server.

  1. Master server is the task server which has many children computing nodes for sharing several same model services.
  2. Task IO server is a sever which is used to receive and dispatch tasks for model users and model computer.

Framework

Overview
Local network version :

Overview_1

Internet version :

Overview_2

Database

table server : for geo-service container

Field Type Introduction
_id ObjectID OID for server
s_services Array Service 'PID' in geo-service container
s_ip String Geo-service container IP address
s_mac String MAC address in server
s_port Int Port for server
s_type Int Type of server: 1 - Local network; 2 - Internet
s_status Boolean Status of server (Internet only): true: online, false: offline
s_hardware Object hardware of server
s_software Object software of server
s_dynamic Object Current status of server

table task : for computing task record

Field Type Introduction
_id ObjectID OID for task
t_inputs Array input data for task computing see Note 1
t_outputs Array output data for task computing see Note 1
t_user String Task uploader
t_status String Task status, including Inited, Started, Finished and Error
t_server String Task receiver (a server)
t_msrid String Task record id in target server
t_type Int Task type, 1 - Local network; 2 - Internet
t_note String Task record id in target server
t_datetime Date Task starting datetime
t_pid String PID of model service

Note 1 Array data paradigm

{
	"StateName": "RUNSTATE",
	"Event": "LOADDATASET",
	"Url": "http://127.0.0.1:8062/data/5c49a1e6b4941b0a5023f3ae",
	"Tag": "FDSDemo"
}

table dataexserver : for data exchange server

Field Type Introduction
_id ObjectID OID for data exchange server
ds_ip String IP for data exchange server
ds_port Int Port for data exchange server
Function logic
Container register : Local network

ServerRegister1

Container register : Internet

ServerRegister2

Task subscription

TaskSubscription2

API
Data Exchange Server Register
  • URL : /dxserver
  • Method : POST
  • Form :
{
	"port": 8062  // Port
}
  • Response :
{
	"result": "suc",
	"code": 1,
	"message": "",
	"data": ""
}
Model Service Container Register
  • URL : /server
  • Method : POST
  • Form :
{
	"mac": "00-01-6C-06-A6-29", // MAC address
	"port": 8060  // Port
}
  • Response :
{
	"result": "suc",
	"code": 1,
	"message": "",
	"data": ""
}
Model Service Check
  • URL : /server?pid=PID
  • Method : GET
  • Response :
{
	"result": "suc",
	"code": 1,
	"message": "",
	"data": ""
}

If model service existing, the result is suc and code is 1.

Task Subscription
  • URL : /task
  • Method : POST
  • Form :
{
	"inputs": [], // input data configration
	"username": "[Unknown]",  // usrname 
	"pid": "15ea8a5740fdcfa951eea30579a33c4d"  // PID of model service
}

Each item in inputs see table task, note 1

  • Response :
{
	"result": "suc",
	"code": 1,
	"message": "",
	"data": ""
}

If model service existing, the result is suc and code is 1.

Install

Construction ...

Usage

All the functions can be invoked by URL, but we recommend do it by SDK.

Task Usage Workflow

The usage workflow of task shows in the picture below, orange step means it can be used by URL, blue means it can be used by SDK API, and green means both:

Workflow

The workflow consists of following steps:

Check model service

Check model service existing by model service PID (Model Service Package ID). See [ModelServiceAPI](#/Model Service Check)

Create task

Create a task to run. This task just build in local, and it would request the server. SDK API provides an interface to organize it.

Get data exchange server

Get an available data exchange server from task server. See GeoDataExchangeServer.

Upload data

Updata data exchange to data exchange server. See GeoDataExchangeServer.

Configure data

Configure data with target model service by StateName and Event. The data should be organized by Array, and each item referring to Database, table task, note 1.

Subscribe task

Subscribe a task in task server.

API see Task Subscription

Check status

Check the task status.

  • Inited: The task has inited but not started.
  • Started: The task has been invoked.
  • Finished: The task has been finished and user can download the data.
  • Error: Some error happened in task running.

Download data

Download data when it is finished.

Contributors

Founder

Min Chen (chenmin0902@163.com)

Yongning Wen (wenyn@msn.com)

Songshan Yue (yss123yss@126.com)

Fengyuan Zhang (franklinzhang@foxmail.com)

Coder

Fengyuan Zhang (franklinzhang@foxmail.com)

Ming Wang (wangminggis@163.com)

All codes are used in OpenGMS platform

The MIT License (MIT) Copyright (c) 2018 Franklin_Zhang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Task server for geographical modeling, including master server and task IO server. 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/geomodeling/GeoModelTaskServer.git
git@gitee.com:geomodeling/GeoModelTaskServer.git
geomodeling
GeoModelTaskServer
GeoModelTaskServer
master

搜索帮助