Coder Social home page Coder Social logo

ekochnev / axon-bank-distributed-event-bus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kenyattaclark/axon-bank-distributed-event-bus

0.0 1.0 0.0 83 KB

License: Apache License 2.0

Java 73.79% Shell 6.45% Batchfile 4.58% CSS 0.06% JavaScript 6.96% HTML 8.16%

axon-bank-distributed-event-bus's Introduction

Axon Bank

This is a sample application with the purpose of showing the capabilities of Axon Framework.

Domain

As you may have guessed from the name of the application, Axon Bank concerns itself with the banking domain. The application consists of 2 aggregates: bank account and bank transfer. We have tried to find an appropriate balance between complexity and simplicity. The application is meant to be complex enough to showcase interesting building blocks provided by Axon Framework. But we did not want people to get lost in the business logic of the application.

Technical Details

We have tried to keep the application self-contained. It is built with Spring Boot and therefore does not require you to have Tomcat installed.

There are two ways to run the application: on a single node and on multiple nodes using Docker.

Running the application on a single node does not require you to install any dependencies. The storage of data is all done in memory and does not require you to run an external data store.

The distributed version requires Docker and Docker Compose to be installed. There are 4 containers involved in the distributed version: 1 container running MySQL, 1 container running RabbitMQ and 2 containers running instances of Axon Bank. The MySQL server is used for the storage of events, sagas and query side data. RabbitMQ acts as a dedicated STOMP broker. STOMP is used in combination with WebSockets. The dedicated STOMP broker is needed to keep the interfaces of both Axon Bank instances in sync. The commands are distributed between the containers running Axon Bank with the DistributedCommandBus.

Usage

In order to run the single node version you may execute the following commands:

  • mvn clean install
  • mvn -pl web spring-boot:run.

The distributed version can be run using the following commands:

  • mvn clean install
  • mvn -pl web docker:build
  • docker-compose up db (this will create and initialize the db container, you can stop the container after it has been initialized)
  • docker-compose up

Once all containers are running you can access each instance of Axon Bank by visiting http://localhost:8080/ and http://localhost:8081/.

axon-bank-distributed-event-bus's People

Contributors

abuijze avatar bilak avatar jkallen avatar jvanderkallen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.