Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Axon demo - `Courier Management` Information System - A part of the systems landscape:https://github.com/fraktalio/courier-demo,https://github.com/fraktalio/restaurant-demo,https://github.com/fraktalio/order-demo

License

NotificationsYou must be signed in to change notification settings

fraktalio/courier-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI with maven

Systems Landscape

The systems landscape consists of threesystemsorder management,restaurant managementandcourier management

Customers use the web application to place food orders at local restaurants. Application(s) coordinates arestaurant/kitchen order preparation, and a network of couriers who deliver the orders.

Vision

Event Modeling is a method of describing systems using an example of how information haschanged within them over time.

event modeling

Structure

TheC4 software architecture model is a simple hierarchical way to think about the staticstructures of a software system in terms of containers, components and classes (or code).

A SystemContext diagram can be a useful starting point for diagramming and documenting a software system, allowingyou to step back and look at the big picture.

landscape

Courier Management System

Managing courier information. A courier view of an order (managing the delivery of orders).

Vision

We zoom in to show the event model of the Courier Management System only:

event modeling

Specification by example (SBE) is a collaborative approach to defining requirements and business-oriented functionaltests for software products based on capturing and illustrating requirements using realistic examples instead ofabstract statements.

spec by example

Structure

Once you understand how your system fits in to the overall IT environment with a System Context diagram, a really usefulnext step can be to illustrate the high-level technology choices with a Container diagram:

containers diagram

Following on from a Container diagram showing the high-level technology decisions, you can then start to zoom in anddecompose each container further:

components diagram

Canvas

Name:Courier Management
Description:Managing courier information. A courier view of an order (managing the delivery of orders).
Concepts:Architectural patterns:Technology:
  • Domain Driven Design
  • Event Driven Microservices
  • Eventsourcing
  • CQRS
  • Java
  • Axon
  • Spring(Boot)
  • SQL(Postgres)
  • Docker
  • Testcontainers
  • Kubernetes
  • Prometheus
  • Grafana
  • Jaeger
Service API
Commands:Queries:Events published:
gRPC:
  • CreateCourierCommand
  • CreateShipmentCommand
  • AssignShipmentCommand
  • MarkShipmentAsDeliveredCommand
gRPC:
  • FindCourierQuery
  • FindShipmentQuery
  • FindAllCouriersQuery
  • FindAllShipmentsQuery
gRPC:
  • CourierCreatedEvent
  • ShipmentCreatedEvent
  • ShipmentAssignedEvent
  • ShipmentNotAssignedEvent
  • ShipmentDeliveredEvent
  • ShipmentExpiredEvent
Domain model:
  • Courier
  • Shipment
Dependencies:
InvokesSubscribes to
- -

Development

This project is driven usingmaven.

Run locally

Requirements

  • Java 17
sdk install java 17.0.1-zulusdk use java 17.0.1-zulu

You candownload a ZIP file with AxonServer as a standaloneJAR. This will also give you the AxonServer CLI and information on how to run and configure the server.

Alternatively, you can run the following command to start AxonServer in a Docker container:

docker run -d --name axonserver -p 8024:8024 -p 8124:8124 axoniq/axonserver

Build & Test

./mvnw clean verify

Run

./mvnw spring-boot:run

Run on Kubernetes cluster

Requirements

  • Kubernetes. It is included in the Docker on Mac (and Windows) binary so it installedautomatically with it. After a successful installation, you need to explicitly enable Kubernetes support. Click theDocker icon in the status bar, go to “Preferences”, and on the “Kubernetes” tab check “Enable Kubernetes”.
  • Kubectl allows you to run commands against Kubernetesclusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs

Build the docker image to local registry:

./mvnw clean verify jib:dockerBuild

Deploy:

kubectl apply -k .k8s/base

Delete:

kubectl delete -k .k8s/basekubectl delete pvc --all

Continuously deploy with google skaffold

  • Skaffold is a command line tool that facilitates continuousdevelopment for Kubernetes applications.

Useskaffold dev to build and deploy your app every time your code changes:

$ skaffold dev

or activateobservability profile, to enable metrics and tracing with Prometheus, Grafana and Jaeger:

$ skaffold dev -p observability

Deploy once

Useskaffold run to build and deploy your app once, similar to a CI/CD pipeline:

$ skaffold run

or activateobservability profile, to enable metrics and tracing with Prometheus, Grafana and Jaeger:

$ skaffold run -p observability

References and further reading


Created with ❤️ byFraktalio


[8]ページ先頭

©2009-2025 Movatter.jp