webservice
Last updated
Generate a Webservice microservice (an HTTP front door onto the Rumi engine).
rumi quickstart webservice [options]--app-root
-r
Application root directory
rumi-quickstart
--clustered
-c
Create the microservice clustered
false
rumi quickstart webservice --app-root my-appThe webservice is stateful and clusterable, and embeds an HTTP server that hands requests to the engine and waits for the reply. The generated module contains:
Main.java
The microservice, carrying its @AppHAPolicy
HttpServer.java
The embedded HTTP server
AepEngineProvider.java
Supplies the engine to the web layer
resources/WebMain.java
The HTTP resource, where you add endpoints
models/api.xml
API operations
models/messages/messages.xml
Message model
models/state/state.xml
State model
The HTTP port is wired into the system configuration and defaults to 8080:
Like the processor, driver, and connector quickstart microservices, the generated code is scaffolding: WebMain is where you add your endpoints, and the handlers that service them go in Main.
The webservice is clusterable, so it always carries an HA model. It is generated non-clustered by default, which keeps the quickstart to a single container per microservice while you are learning. Pass --clustered to generate it as a clustered microservice with a hot standby, the same shape the processor uses.
Last updated
<port>${quickstart.local.webservice.http.port::8080}</port>