Open justb4 opened 7 years ago
thanks for this request :-)
We should definitely research the options for easy install/configure multiple GOST instances on a single machine.
Another thought: Maybe somewhere in the Docker tools there is support for this scenario? Seems like a common usecase (running multiple docker-compose instances of an app for different customers).
To answer the last: I have not found Docker support for this other than running multiple daemons using supervisord but my search was not exhaustive. So in theory multiple gost
instances each with their own config
(port
, db schema etc) and using a single HTTP proxy server (mapping /gost_<name>/
to container name/port
) and database (multiple v1_<name>
schema's). But then multiple Docker containers could also be done. Something to experiment, leuke stage opdracht :-).
Like said: at some point there will be a need and (with multi-endpoint) GOST will be ahead of the competition :-). Installing STA Java servers is already more complex...Early implementation has advantages. In GeoServer they implemented this (workspaces-->virtual services
) quite late, and took quite some time to stabilize.
But all depends on the need from the GOST community and especially funding I realize...Let's see if we get more thumbs up :-).
see https://github.com/gost/docker-compose/issues/4 for a test using docker-compose -p option
The STA entity model has a single global namespace. In many IoT scenario's and services like
ThingSpeak
it is convenient to have multiple "contexts" (users, customer, projects etc) in a single server instance. This would allow multiple small IoT projects/customers to share a single GOST instance, each with their own URL, Entity conventions, and possibly (external) authorizations.For example GeoServer has a concept of virtual services allowing multiple OWS-endpoints within a single GeoServer instance. MapProxy has a similar concept: MultiMapProxy and with MapServer it is trivial to declare multiple (CGI-)endpoints.
With GOST we now would need multiple GOST instances, which on a single VM would mean a more complex maintenance (multiple ports, Docker Containers etc). Also we would need multiple MQTT instances and ports.
In theory I think it would be possible, while adhering to the STA-spec, to define a similar concept as GeoServer virtual services: via endpoint URLs (and MQTT Topics). For example taken endpoints
ep1
,ep2
..epN
:http://localhost:8080/ep1/v1.0
,http://localhost:8080/ep2/v1.0
...config.yaml
) and database schema/ep1/Datastreams(1)/Observations
,/GOST/ep1/Datastreams(1)/Observations
(publication) etcConfigurations could each be in a separate directory, named after the endpoint.
I hope my proposal is clear. This would make GOST much more useful over the other STA implementations. I can't estimate the impact though, but could support any effort.