Skip to content

A processing microservice for an urban model server written in node.js

License

Notifications You must be signed in to change notification settings

citysciencelab/processing-microservice-nodejs

Repository files navigation

Processing Microservice_Banner

Processing Microservice - node.js

This repository contains the code for a processing microservice in node.js. The microservice connects with an Urban Model Server via a Websocket connection. In this way, different simulation models can be hosted on different isolated microservices with their own programming language, packages and versions.

Urban Model Server Architektur

Configuration

All of the necessary configuration is done in the config.js file. There are two mandatory configurations:

  1. URL of the Urban Model Server. ⚠️ Make sure that both the Urban Model Server and the Processing Microservice are part of the same Docker bridge network. The URL is supposed to point to this Network Gateway and the Port of the Urban Model Platform container.
  2. PROCESS_METADATA that registers the process with the Urban Model Server in accordance with the OGC API Processes standard.

Extensions

Although one can use basically any algorithm to handle the input, do calculations and then return an output, there are multiple simulation packages written in node.js that one can leverage. Thus, multiple extensions come along with this processing microservice that one can use out of the box. The following extensions are currently available:

Insight Maker

Insight Maker is a simulation platform where one can collaboratively work on System Dynamics and Agent-based models. They provide an open-source simulation package with which one can run Insight Maker models on a server. To simulate an Insight Maker model with the processing microservice, import { simulateResults } from "./InsightMaker/InsightMaker.js"; in the server.js file. Download the Insight Maker model from the platform, save it in the InsightMaker/modelsfolder and adjust the output parameters, as well as import the correct model in the InsightMaker.js file.

Other Processing Microservices

About

A processing microservice for an urban model server written in node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published