Skip to content

franklinzhanggis/wrappersystem

Repository files navigation

OpenGMS Wrapper System

Travis (.org)

OpenGMS Wrapper System is a service loader and manager that can be used to publish services offered by the models on the web. This project is funded by OpenGMS, which aims to model the geographical phenomena and processes in open web environment.

OpenGMS

Introduction

The OpenGMS Wrapper System is a service-oriented system, which aims to share and reuse standard model service on the web. It can deploy such models, manage related geosimulation resources on computing nodes, and invoke and running geoanalysis models in the open web environment. The above functions also benefit interactions among the wrapper system, geoanalysis models, and model users. In addition, service-oriented geoanalysis model services can help eliminate many unnecessary procedures in model use.

It uses Nodejs as service loader and Reactjs as management UI.

Nodejs React

Framework

Overview

  • bin : entry files
    • www : setup file
  • control : this layer is for logic control
  • doc : files for documentation (README.md)
  • geo_data : data cache file for I/O
  • geo_dataMapping : assemblies for data mapping or other functions
  • geo_model : models service related files
  • helper : environment middle files
  • model : this layer is for model for basic operation (include database and files)
  • public : static files
  • router : this layer is for HTTP route
  • socket : this layer if for SOCKET route
  • upload : batch model service deploying
  • utils : common method
  • views : ejs pages template
  • views_src : react pages components
  • app.js : main configuration file
  • batchUpload.js : batch model service deployment
  • debug.js : debug file
  • init.js : initialization file
  • package.json : nodejs package configuration file
  • pm2.json : pm2 setup configuration
  • register.js : register to task server
  • setting.js : setting file

API

Get Model Service JSON

  • URL : /modelser/json/[msid] // [msid] is the model service id in the system
  • Method : GET
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : {}, // model service information items
    "message" : "[msg]" // message for error or other notice in request
}

Get All Model Service JSON

  • URL : /modelser/json/all
  • Method : GET
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : [ // model service information item collection
        {} // model service information items
    ],
    "message" : "[msg]" // message for error or other notice in request
}

Get Model Service by PID or MID

  • URL : /modelser?ac=search&mid=[mid]&pid=[pid] // [mid] is the model id and [pid] is the model package id
  • Method : GET
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : [ // model service information item collection
        {} // model service information items
    ],
    "message" : "[msg]" // message for error or other notice in request
}

Invoke Model Service by MSID

  • URL : /modelser/[msid]&ac=run? // [msid] is the model service id in the system
  • Method : GET or POST // if GET the form data should be formated in URL and POST the form data should be form in request body
  • Form :
{
    "inputData" : [ // input data for model running
        {
            "StateId" : "[sid]", // state id
            "StateName" : "[sname]", // state name, any state id or state name can be conigured !!! If both configured, state id first
            "Event" : "[eventname]", // event name
            "DataId" : "[dataid]", // uploaded data id
            "Destoryed" : "[destroy]" // default as 'false'. 'true' means the data would be deleted aterter download
        }
    ],
    "outputData" : [ // output data configuration
        {
            "StateId" : "[sid]", // state id
            "StateName" : "[sname]", // state name, any state id or state name can be conigured !!! If both configured, state id first
            "Event" : "[eventname]", // event name
            "DataId" : "[dataid]", // uploaded data id
            "Destoryed" : "[destroy]" // default as 'false'. 'true' means the data would be deleted aterter download
        }
    ],
    "cp" : [], // control parameter

}
  • response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : [msrid], // model service running record id
    "message" : "[msg]" // message for error or other notice in request
}

Get Model Service I/O Information

  • URL : /modelser/inputdata/[msid] // [msid] is the model service id in the system
  • Method : GET
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : { // model service information about I/O
        "States" : [ // states
            {
                "$" : {},
                "Event" : [
                    {
                        "$" : {},
                        "ResponseParameter / DispatchParameter" : {} 
                    }
                ]
            }
        ],
    },
    "message" : "[msg]" // message for error or other notice in request
}

Get Model Service Running Instance Information

  • URL : /modelins/json/[guid] // [guid] is the model service running instance id in the system
  • Method : GET
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : { // model service running instance
    },
    "message" : "[msg]" // message for error or other notice in request
}

Operator Model Service Running Instance

  • URL : /modelins/[guid]?ac=[action] // [guid] is the model service running instance id in the system, [action] can be kill, pause, resume, updatedata. kill means stop the model running, pause means temporary pause, resume means resume from pause and updatedata can update input data before requested
  • Method : PUT
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : { //
    },
    "message" : "[msg]" // message for error or other notice in request
}

Operator Model Service Running Instance

  • URL : _/modelserrun/json/[msrid] // [msrid] is the model service running record id in the system
  • Method : GET
  • Response :
{
    "result" : "[result]", // [result] can be 'suc', 'err'
    "code" : [code], // [code] shows 1 which means successful request, -1 means err
    "data" : { // model service running record information about I/O
    },
    "message" : "[msg]" // message for error or other notice in request
}

Public UI

public homepage

Management UI

Homepage

management homepage

Local Services

Items

local service items

Instances

local service instacnes

Records

local service records

Deployment

local service deployment

Notice

Notice

Data Cache

Data cache

Settings

Information

Information

Environment

Environment

Download

Windows (update at Oct 25 2015) v0.2.11

Install

License

AGPL

When using the Wrapper System or other GitHub logos, be sure to follow the GitHub logo guidelines.

Reference

Zhang, F., Chen, M., Ames, D. P., Shen, C., Yue, S., Wen, Y., & Lü, G. (2019). Design and development of a service-oriented wrapper system for sharing and reusing distributed geoanalysis models on the web. Environmental modelling & software, 111, 498-509.

Contributors

Founders/Designers

Min Chen (chenmin0902@163.com)

Yongning Wen (wenyn@msn.com)

Songshan Yue (yss123yss@126.com)

Fengyuan Zhang (franklinzhang@foxmail.com)

Chaoran Shen (shenchaoran212@gmail.com)

Ming Wang (wangminggis@163.com)

Coders

Fengyuan Zhang (franklinzhang@foxmail.com)

Chaoran Shen (shenchaoran212@gmail.com)

Ming Wang (wangminggis@163.com)

All codes are used in OpenGMS platform

About

The wrapper system of OpenGMS

Resources

License

Stars

Watchers

Forks

Packages

No packages published