Permalink
Browse files

Updated README

  • Loading branch information...
cer committed Feb 9, 2017
1 parent 36d9516 commit f374450e043d75df0e0ffac55a93acc1526749e3
Showing with 18 additions and 33 deletions.
  1. +18 −33 README.md
  2. BIN i/eventuate-todo-architecture.png
View
@@ -1,7 +1,7 @@
# Todo List example application
The Todo List application is the hello world application for the [Eventuate™ Platform](http://eventuate.io).
It illustrates how you can use the platform to write an application that uses Event Sourcing and Command Query Responsibility Segregation (CQRS).
It illustrates how you can use the platform to write an application with a [microservices architecture](http://microservices.io/patterns/microservices.html) that uses [Event Sourcing](http://microservices.io/patterns/data/event-sourcing.html) and [Command Query Responsibility Segregation (CQRS)](http://microservices.io/patterns/data/cqrs.html).
The Todo List application lets users maintain a todo list.
The Todo List application is a Java and Spring Boot application built using Eventuate™'s Event Sourcing based programming model.
@@ -22,53 +22,38 @@ Don't hesitate to create an issue or see
# Architecture
The Todo application has a microservice architecture.
It is written using the [Eventuate Client Framework for Java](http://eventuate.io/docs/java/eventuate-client-framework-for-java.html), which provides an [event sourcing based programming model](http://eventuate.io/whyeventsourcing.html).
The following diagram shows the Todo List application architecture:
<img class="img-responsive" src="http://eventuate.io/demos/eventuate-todo-architecture.png">
<img class="img-responsive" src="i/eventuate-todo-architecture.png">
The application consists of the following:
* Todo List Server - a Java and Spring Boot-based server-side application that has a HATEAOS-style REST API for creating, updating and querying todo list items.
* MySQL database - stores a materialized/denormalized view of todo list items.
* Todo service - a Java and Spring Boot-based service that has a HATEAOS-style REST API for creating, updating and querying todo list items.
It uses Eventuate to persist aggregates using event sourcing.
* Todo view service - a Java and Spring Boot-based service that provides a REST API for querying todos.
It implements a [Command Query Responsibility Segregation (CQRS)](http://microservices.io/patterns/data/cqrs.html) view of todos using MySQL.
MySQL is kept up to date by subscribing to events produced by the Todo service.
* MySQL database - stores the CQRS view of todo list items.
Note: for simplicity, the Todo List service is deployed as a monolithic server but as you will see below, it consists of several independent modules.
# Todo List Server design
The Todo List server has a Spring MVC-based REST API for creating, updating and querying todo list items.
The Todo List server is written using the [Eventuate Client Framework for Java](http://eventuate.io/docs/java/eventuate-client-framework-for-java.html), which provides an [event sourcing based programming model](http://eventuate.io/whyeventsourcing.html).
The server persists todo list items as events in the [Eventuate event store](http://eventuate.io/howeventuateworks.html).
The Todo List server also maintains a materialized view of the todo list in MySQL.
The following diagram shows the design of the server:
<img class="img-responsive" src="http://eventuate.io/demos/eventuate-todo-server.png">
The application is structured using the [Command Query Responsibility Segregation (CQRS) pattern](http://microservices.io/patterns/data/cqrs.html).
It consists of the following modules:
* Command-side module - it handles requests to create and update (e.g. HTTP POST, PUT and DELETE requests) todo list items.
The business logic consists of event sourcing based `Todo` aggregates.
* Query-side module - it handles query requests (ie. HTTP GET requests) by querying a MySQL materialized view that it maintains.
It has an event handler that subscribes to Todo events and updates MySQL.
Note: for simplicity, the Todo list application can be deployed as a monolithic application.
# Two versions of the source code
There are two versions of the source code:
* `single-module` - a single module Gradle project. It is the easiest to get started with.
* `multi-module` - a multi-module Gradle project.
It illustrates how to use multiple modules to separate the command side code from the query-side code.
* `single-module` - a single module Gradle project for a monolithic version of the application.
It is the easiest to get started with.
* `multi-module` - a multi-module Gradle project for the microservices-based version of the application.
Note: you do not need to install Gradle since it will be downloaded automatically.
You just need to have Java 8 installed.
# Building and running the application
This is a Gradle project.
However, you do not need to install Gradle since it will be downloaded automatically.
You just need to have Java 8 installed.
The details of how to build and run the services depend slightly on whether you are using Eventuate SaaS or Eventuate Local.
The steps for building both versions of the application are identical.
However, the details of how to build and run the services depend slightly on whether you are using Eventuate SaaS or Eventuate Local.
## Building and running using Eventuate SaaS
Binary file not shown.

0 comments on commit f374450

Please sign in to comment.