Skip to content

marcvanandel/land-administration-eventsourced

Repository files navigation

Land Administration in an EventSourced way

Based on this article (written by me) I would like to develop and proof the Commands, Events and Queries involved in the (ISO) standardized Land Administration Domain Model (LADM). This model is basically a Single Model close to a Query Model in the article. To build an application with Command, Events and Queries we need to apply CQRS, Command Query Responsibility Segregation, and Event Sourcing. These patterns are promoted in the Domain Driven Design community.

This repo is an example on how a Land Administration system could be set up in a Event Sourced way. It shows how these patterns can be applied to a Land Administration system as a showcase for a (Dutch) Core Administration (Basisregistratie). This is a very (!) simplified system of how Kadaster is using AxonFramework to apply CQRS and Event Sourcing to their internal Land Administration system.

Background info

Architecture

Structure

To guarantee (and enforce) the segregation of Commands, Events and Queries each API is put into a separate module. There's only one Command side and multiple Query sides. Each Query component has its own (separate) API module. Events are the CoreAPI of the system and there are some other value types and utils in this module as well.

Land Administration System Dependency Graph

  • module command-api -> All available Commands
  • module command -> Command Handlers
  • module events -> Core API of the system including some value types and utils
  • module query-ladm-api -> View LADM: The Query API
  • module query-ladm -> View LADM: The EventListener as well as the Query Handler
  • module query-identifiers-api -> View Identifiers: The Query API
  • module query-identifiers -> View Identifiers: The EventListener as well as the Query Handler

In runtime there are these containers:

Land Administration System Runtime Containers

TechStack

Development

Local Development Set Up

You'll the Java Virtual Machine to run and develop locally. An easy way to install and control several versions of Development kits is SDKman First install this and next install the Java SDK:

sdk install java 13.0.2.hs-adpt

No need to install Gradle (because of the Gradle Wrapper) but if you would like to install it, look at Scoop: scoop install gradle

Build

The build uses Gradle with the Gradle Wrapper

./gradlew build

Running

  1. Start AxonServer: ./axon-server.sh start (or restart)
  2. Start Core: :boot/nl.kadaster.land_administration.LandAdministration.main()
    1. Profile command for the Command instances and REST services (incl. Identifiers Query instances and REST services)
    2. Profile query-ladm for the LADM Query instances and REST services

Shutdown

  1. Stop AxonServer: ./axon-server.sh stop

About

Land Administration in a EventSourced way

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published