# crabzilla **Repository Path**: github-codes/crabzilla ## Basic Information - **Project Name**: crabzilla - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-19 - **Last Updated**: 2022-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README :sourcedir: src/main/java :source-highlighter: highlightjs :highlightjsdir: highlight :highlightjs-theme: rainbow :revnumber: {project-version} :example-caption!: ifndef::imagesdir[:imagesdir: images] ifndef::sourcedir[:sourcedir: ../../main/java] :toclevels: 4 https://vertx.io[image:https://img.shields.io/badge/vert.x-4.2.5-purple.svg[Vertx]] https://github.com/crabzilla/crabzilla/actions/workflows/blank.yml[image:https://github.com/crabzilla/crabzilla/actions/workflows/blank.yml/badge.svg[CI]] https://codecov.io/gh/crabzilla/crabzilla[image:https://codecov.io/gh/crabzilla/crabzilla/branch/main/graph/badge.svg[codecov]] https://frontend.code-inspector.com/public/project/24241/crabzilla/dashboard[image:https://api.codiga.io/project/24241/score/svg[image]] https://frontend.code-inspector.com/public/project/24241/crabzilla/dashboard[image:https://api.codiga.io/project/24241/status/svg[image]] https://jitpack.io/#io.github.crabzilla/crabzilla[image:https://jitpack.io/v/io.github.crabzilla/crabzilla.svg[Jitpack]] == Objectives . Allows writing your testable `CQRS/ES` model with minimal dependencies. . Allows consistently handling your commands and save resulting events into `Postgres`. . Allows projecting events to your read models. == Approach * Using https://vertx.io/docs/vertx-pg-client/java/[Vertx] to implement a `non-blocking IO` event store. * Idiomatic Kotlin: type safeness: pattern matching, honouring your constructors. * Immutability: state transitions occurs after computing results of pure functions `(State, Event) -> State`. * https://github.com/crabzilla/crabzilla/blob/main/crabzilla-pgclient/src/main/kotlin/io/github/crabzilla/pgclient/command/CommandController.kt[CommandController] is consistent by default: before handling a command, your state ID is pessimistically locked using https://www.postgresql.org/docs/14/explicit-locking.html#ADVISORY-LOCKS[Postgres Advisory Locks] * https://github.com/crabzilla/crabzilla/blob/main/crabzilla-pgclient/src/main/kotlin/io/github/crabzilla/pgclient/projection/EventsProjectorVerticle.kt[EventsProjectorVerticle] allows handling your read model projection's strait from database: no need to publish your events to Kafka or NATS. * You can use https://vertx.io/docs/#clustering[Vertx Clustering] to deploy your EventsProjectorVerticle instances. Projections with singleton clustered verticles (singleton writers) and also with High Availability built in Vertx :) * JSON serialization using https://kotlinlang.org/docs/serialization.html[Kotlin serialization]. == Example application https://github.com/rodolfodpk/accounts-z[Accounts] == Status Seems like it's finally reaching stable status :) == More info https://crabzilla.github.io/crabzilla/docs/index.html[Documentation]