Skip to content

Commit 4e6529d

Browse files
committed
docs(model-server): document MPS model-server plugin installation
1 parent fe9a30e commit 4e6529d

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed
62.4 KB
Loading

docs/global/modules/core/pages/howto/usage-model-server.adoc

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ NOTE: If you are interested in a more practical usage of what is presented here,
66
== Backends: In Memory vs. Database
77

88
The `model-server` will by default require a database backend.
9-
While this setup is ideal for deployment, it might not what you need in the beginning.
109
The `-jdbcconf` flag allows you to provide a custom jdbc configuration file.
11-
12-
However, during development or to perform tests, it is recommended to start the `model-server` with in-memory storage.
10+
While this setup is ideal for deployment, it might not what you need in the beginning.
11+
During development or to perform tests, it is recommended to start the `model-server` with in-memory storage.
1312
This can be achieved by adding the `-inmemory` flag to the executable.
1413

1514

@@ -21,8 +20,7 @@ The following list gives an overview of the many ways to run a `model-server`:
2120
=== 1. Docker
2221

2322
We publish a docker container of the `model-server` over on https://hub.docker.com/r/modelix/model-server/tags[docker hub].
24-
To run the container, simply call the following:
25-
23+
To run the model-server container with the in memory backend, simply call the following.
2624
[source, shell]
2725
--
2826
$ docker run --rm -p 28101:28101 modelix/modelix-model:latest -inmemory
@@ -31,7 +29,7 @@ $ docker run --rm -p 28101:28101 modelix/modelix-model:latest -inmemory
3129

3230
=== 2. `docker-compose`
3331

34-
To run the `model-server` in memory, you can use:
32+
If you use `docker-compose`, use the following.
3533

3634
.Content of `docker-compose.yml`
3735
[source, yaml]
@@ -128,7 +126,7 @@ $ docker-compose up
128126

129127
=== 3. Gradle via Dependency
130128

131-
When using Gradle, you run a `model-server` as in the following minimal working example:
129+
When using Gradle, you can run a `model-server` by adding a dependency to `org.modelix:model-server`, as shown in the following minimal working example.
132130

133131
.Content of minimal `build.gradle.kts` to run a `model-server` in memory
134132
[source, kotlin]
@@ -157,7 +155,7 @@ tasks.run.configure {
157155
}
158156
--
159157

160-
You can run it simply by running
158+
You can start the model-server simply by running
161159

162160
[source, bash]
163161
--
@@ -194,9 +192,28 @@ To give arguments to the gradle run command, you have to add them via the `--arg
194192
====
195193

196194

197-
=== 5. *In Process* (Kotlin)
195+
=== 5. MPS
196+
197+
You can run a *light version* of the `model-server` directly in MPS via the dedicated *MPS as Modelix Model Server Plugin*, which is published over at the https://plugins.jetbrains.com/plugin/22834-mps-as-modelix-model-server[JetBrains Marketplace].
198+
199+
200+
[IMPORTANT]
201+
====
202+
A light model-server does not provide the full features as an independent `model-server` instance will.
203+
More *advanced features* (e.g. xref:core:howto/modelql-writing.adoc[ModelQL], or the xref:core:howto/metrics.adoc[metrics]) and *advanced clients* (e.g. xref:core:howto/modelql.adoc[ModelQLClient]) will not work.
204+
====
205+
206+
In MPS navigate to File -> Settings -> Plugins (left) -> Marketplace (top) -> search for "modelix model server" -> press install.
207+
208+
image::model-server-plugin-marketplace.png[Installing the MPS model-server plugin]
209+
210+
You can access the light `model-server` via the
211+
xref:core:reference/component-light-model-client.adoc[light-model-client].
212+
213+
214+
=== 6. *In Process* (Kotlin)
198215

199-
This rather advanced version allows you to run the model-server inside your own application.
216+
This rather advanced version allows you to run the `model-server` inside your own application.
200217
You can find an examples of this in these code fragments:
201218

202219
* https://github.com/modelix/modelix.core/blob/main/model-server/src/test/kotlin/org/modelix/model/server/ModelClientV2Test.kt#L48[ModelClientV2Test (modelix core tests)]

0 commit comments

Comments
 (0)