A common reality of unfamiliarity exists for many developers either when they try to develop either Reactive applications or to implement DDD properly, or both. Many give up on using concepts and paradigms that are proven to be a strong foundation for building modern applications and systems that are robust, modularized, scalable, and that use modern architectures. These developers tend to fall back to familiar, yet outdated, frameworks and tools.
The VLINGO/PLATFORM was created to help developers who face such challenges to confidently move forward and modernize their work. One platform component that greatly accelerates developer modernization efforts is the VLINGO/XOOM Starter. It supports visual model definition, REST API, persistence, and container definitions, followed by project generation that can be immediately built and your services can be running within minutes. With an instantly executable service experience, developers are in a position to quick implement custom business logic within the pre-generated model. This is a great way to learn Reactive architecture and coupled with DDD tactical modeling that are powered by an Actor-based ecosystem.
The next section show you how to run and use the VLINGO/XOOM Starter in your local environment. Let's get started!
The installation process is short. Before you start, just check if you have these tools already installed:
Docker Desktop 18.x
vlingo-xoom-starter compressed distribution file using
$ curl -L -O https://github.com/vlingo/vlingo-xoom-starter/releases/latest/download/starter.zip
$ curl -L -O https://github.com/vlingo/vlingo-xoom-starter/releases/latest/download/starter.tar
Extract the file content, then set an environment variable named
VLINGO_XOOM_STARTER_HOME indicating the absolute path for the uncompressed folder. Additionally, on Unix-based operating systems, it is necessary to enabled read and execute access on executable script as following:
$ chmod 755 xoom
Ensure it's all set by verifying the version (version shown is an example, not necessarily current):
$ ./xoom -version1.4.4
In addition to the command-line interface (see below),
vlingo-xoom-starter provides a web/graphical user interface for a rapid application generation. Simply open a terminal window and run the Starter.
$ ./xoom gui
Following this your preferred browser will open with a wizard-fashioned screen, consisting of five steps.
The first step defines the project artifact and service packaging.
Currently Maven build is supported. You may easily convert the generated project build to Gradle by using the Gradle conversion task.
The second step is used to design feature-based slices through the architecture.
The vital parts of three architecture responsibilities are defined with a domain model focus. Define a domain model aggregate/entity type, its events emitted by each of its command message handlers and the REST API at the frontend.
In a single form, define the model aggregate/entity type, state, events, and REST API for:
Aggregates and State: protocol name; message handler methods; state attributes/properties; emitted events
Domain Events: name; attributes/properties
REST Resources: HTTP method; URI path and path parameters; aggregate message handler method to which the resource dispatches
Following each aggregate definition, add it to the model and see it in the design view.
Track each architectural slice, including REST API, aggregate, and emitted events, on the Aggregate design view. It shows an interesting angle of your model through a design-level Event Storming perspective.
The third step is used to define the persistence, and if CQRS is in use, both command and query models.
This step displays persistence preferences. Configuration selections include the storage type, CQRS usage, specific database mechanisms, and when applicable, how events are projected to the query model.
The fourth step defines the deployment container types.
The project generator provides default packaging, such as Java JAR, but may also include containerization files facilitating Docker and Kubernetes deployment. Using the Deployment Step, choose among deployment types as needed.
The fifth and final step defines project component types, and generates the project.
Enter the project parent folder. In addition, select whether VLINGO/XOOM annotations and auto-dispatch are preferred, or not. Click Finish to generate the defined service project.
Once the five definition steps are completed and the service project is generated, take full advantage of the power of the VLINGO/XOOM acceleration components. Use the VLINGO/PLATFORM comprehensive documentation and its live and collaborative community that supports developers on their journey. Now, go have fun!
Alternatively, you can also generate applications directly from the terminal through
xoom gen command. In this case, the project settings have to be informed in a properties file under the
vlingo-xoom-starter folder. See a commented properties file sample below:
#Maven artifact versionversion=1.0.0#Maven project group idgroup.id=com.company#Maven artifact versionartifact.id=xoom-application#Base package namepackage=com.company.business#Absolute path for the project parent foldertarget.folder=/home/projects#Deployment Type (NONE, DOCKER, KUBERNETES)deployment=DOCKER#Docker Image name, required if deployment type is KUBERNETES or DOCKERdocker.image=xoom-app#Published Docker Image, required if deployment type is KUBERNETESk8s.image=xoom-application#Kubernetes POD name, required if deployment type is KUBERNETESk8s.pod.name=xoom-application#Storage Type (STATE_STORE or JOURNAL)storage.type=STATE_STORE#CQRS (true or false)cqrs=true#Projections Type (NONE, EVENT or OPERATION)projections=EVENT#Domain Model Database, required if CQRS is false (IN_MEMORY, POSTGRES, HSQLDB, MYSQL, YUGA_BYTE)database=HSQLDB#Command Model Database, required if CQRS is true or Storage Type is Journal (see database types above)command.model.database=MYSQL#Query Model Database, required if CQRS is true or Storage Type is Journal (see database types above)query.model.database=YUGA_BYTE#Use Xoom Annotations, when applicableannotations=true#Use Auto Dispatch Resourcesauto.dispatch=true#Xoom versionvlingo.xoom.version=1.4.1-SNAPSHOT
xoom gen causes the application generation based on the settings above.
Shows the container status. Should be executed on the project root folder.
Build / update the Docker image from the application's current state. Should be executed on the project root folder.
tag: relate a tag to the current image build. If not informed, the default value is latest. Example:
Publishes the image into the configured docker repository. Should be executed on the project root folder.
tag: relate the local tag to the remote tag. If not informed, the default value is latest:latest, following the pattern local-tag:remote-tag. Example:
Apply the manifest file(s) placed under
Install the Gloo Gateway API generating an upstream for each running service on Kubernetes.
Uninstall the Gloo Gateway API.
Create routes, on Gloo Gateway API, for endpoints declared in
gloo.upstream: a Gloo upstream name for the app's service running on K8s. Example: gloo.upstream = default-myxoomapp-8080
gloo.resource.[resource-name]: an endpoint for an application resource identified by resource-name. Example: gloo.resource.balance = v1/balance gloo.gateway.[resource-name]: a gateway route corresponding to a mapped endpoint identified by resource-name. Example: gloo.gateway.balance= balance Note that, for each resource, a pair of gloo.resource / gloo.gateway has to be informed for properly creating a route in the Gloo Gateway API.
Our team really appreciates collaboration, not only because it boosts VLINGO to greater value, but also for the fact that the more viewpoints we have the more competent and mature the VLINGO community will become. If you want to be a catalyst for moving the platform forward, take a tour of our development guide.