Standalone Application

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 inside such a stub to avoid concurrent updates. This is essentially a non-replicated non-sharded version of the same application.

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 stanalone stub is code-generated by Monstera tooling.