Giter Site home page Giter Site logo

mastermind1981 / axon-springboot-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sfav/axon-springboot-cloud

0.0 3.0 0.0 379 KB

A sample springboot project using axon framework to implement event sourcing and cqrs

Java 63.49% HTML 20.44% JavaScript 14.51% CSS 1.56%

axon-springboot-cloud's Introduction

##Spring Cloud with Axon Event Sourcing, CQRS and AngularJS Example

###Introduction

This application is a Spring Cloud example of using axon event sourcing in microservices. The project is intended to demonstrate end-to-end practice for building a microservice architecture that implement event sourcing and CQRS(Command Query Responsibility Segregation) using Spring Cloud and Axon Framework. It also demonstrates the usage of AngularJs SPA when building the Web UI server.

The function of the application is simple: to do customer creation, customer list and query. It includes the following microservices:

  • Edge Service that routes request to different microservices (Zuul)
  • Discovery Service that discovers the microservices available and facilate Zuul for the routing (Eureka)
  • Configuration Service that is used to provide center configuration
  • Web UI Resource Server that contains the static resources like html, javascript and css, etc.
  • Customer Command Service with Axon Event Sourcing, it would handle customer creation, updates and also log the latest information to DB2 which would be used for query.
  • Customer Query Service that handles query of customer information.

Architecture Diagram

Architecture Diagram

This reference application uses the following data store, but they could be changed to other type with small changes.

  • H2 - Customer Query
  • File - Axon Event Store

###How to Run

  1. Download H2 databse and run below command to start H2 database

     java -jar h2-1.4.192.jar -webAllowOthers -tcpAllowOthers   
    
  2. git clone this repository and go to each maven module and start those micro services using maven:

     mvn spring-boot:run
    

Note,
- The configuration service need to be started first so that other services could get correct property.
- The configuration service will get properties from Sfav Configuration Repository.
- There will be warning message shown for configuration service due to not able to register with Eureka. 3. Visit link http://{your-computer-name}:8080/ui, it will show this introduction, click create to enter new customer, and then query the customer list and see details.

Home View

Create View

List View

Query Details View

###License

This project is licensed under Apache License 2.0.

axon-springboot-cloud's People

Contributors

thomas-yp avatar

Watchers

 avatar  avatar  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.