Nonclustered Mode
In the production environment clients and cores run on different machines in different processes. Running a full cluster locally is possible but can be too tedious for a rapid local development.
A stub has the same interface as application cores behind it. It is possible to implement another stub that will be pointing directly to a core. A lock is added for a core to avoid concurrent updates. This is essentially a non-replicated non-sharded version of the same application. Internally there might be actually multiple shards since each core is essentially single-threaded on updates, but all those cores are running in a single process and this process is nonclustered as the result.
The benefits are:
- One click run and stop from IDE.
- Ability to attach a debugger and trace both client and core logic at the same place.
- Proper integration testing with zero mocking.
- Ability to focus on pure application development and put Monstera wiring aside.
Another angle is: an existing single-process stateful application can be turned into a horizontally scalable one if its stateful business logic is implemented as a state machine without side effects.
A nonclustered stub is code-generated by Monstera tooling.