smack-template is a case study of an application built with the SMACK stack.
Within the project there are several modules:
- smack-template, the main module that contains the application sources
- smack-analysis, the Spark application to perform analysis on the model
- smack-client, a tool that can be used to test the smack system
- smack-migrate, a tool to migrate the database schema
The project was developed using sbt. Several commands are available, or tasks; the main ones are listed below.
sbt clean
, clean the compiled project filessbt compile
, compile all the project modulessbt dependencyList
, shows the dependencies of the projectsbt test
, performs the project testssbt multi-jvm:test
, performs integration testssbt clean coverage test multi-jvm:test coverageReport
, performs all tests and generates the coverage ratiosbt assembly
, generates the fat jar for each modulesbt-docker
, creates a Docker image of the application
The list of project dependencies, subdivided by modules, is contained in Dependencies, while the related versions are specified in Versions. To change the project name, the project version or the name of the Docker user to create the application image, you can change the contents of the variables in build.sbt. ScalaStyle is used to verify the style of the code; the list of rules used is available in scalastyle-config.xml.
To perform the tests it is necessary to have at least one instance of Apache Kafka and an instance of Apache Cassandra active in the local machine.
You can launch the necessary components through the command docker-compose up -d
.
On docker-compose.testing.yml it is contained the configuration of docker-compose to create an application test environment,
which can be activated with the command docker-compose -f docker-compose.yml -f docker-compose.testing.yml up -d
.