modify Readme

This commit is contained in:
Daniel Kang
2018-04-17 13:30:36 +09:00
parent 32acc2e741
commit 02b2f7895b

View File

@@ -1,14 +1,21 @@
# CQRS-ESwithAxon
본 Hans-On Lab에서는 Axon Framework를 활용해서 CQRS와 Event Sourcing에 대해서 실습한다.
## Axon Framework
Axon Framework은 Event-Driven lightweight CQRS framework으로 Aggregate의 상태정보를 저장하는 방법과 EventSourcing을 지원한다.
## Axon Framework Architecture
### Axon Framework Architecture
![Architecture overview of a CQRS Application](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-L9ehuf5wnTxVIo9Rle6%2F-L9ei79JpweCtX6Qur65%2F-L9eiEg8i2dLcK2ovEZU%2Fdetailed-architecture-overview.png?generation=1523282680564557&alt=media)
### Axon Framework Building Block
예기에 각 Building Block 설명 추가
- Command
- CommandBus
- Event
@@ -16,6 +23,7 @@ Axon Framework은 Event-Driven lightweight CQRS framework으로 Aggregate의 상
Axon framework을 이용하기 위해서는 Maven dependency를 추가하면 된다.
```
<dependency>
@@ -38,17 +46,36 @@ Axon framework을 이용하기 위해서는 Maven dependency를 추가하면 된
- spring Provide various annotations, integrated with spring
### Example 1
## Example 1
첫번째 예제애서는 은행 계좌에 예금을 입출금하는 예제를 이용하여 Axon Framework의 기본적인 작동 원리를 이해한다.
### Example 2
### Scenairio
계죄를 개설하고, 입금, 출금을 한다.
### Aggregate
Collection of Entity (Entity 집합체)
DDD에서 약간 내용 추가 필요
``` java
public class BankAccount {
@AggregateIdentifier
private AccountId accountId;
private String accountName;
private BigDecimal balance;
}
```
## Example 2
두번째 예제에서는 JPA를 이용해서 Aggregate의 상태 정보를 저장하는 예제를 구현한다.
JPA를 구현학 위해서 Transaction Manager를 설정하는 코드가 추가된다.
### Example 3
## Example 3
세변째 예제에서는 JPA에 Aggregate의 상태 정보와 Event Store에 Domain Event를 저장하는 예시이다.
### Example 4
## Example 4
네번째 예제에서는 Command용 저장소와 Query용 저장소를 불리한 CQRS 예제를 다른다.