Skip to content
Permalink
Browse files

update readme.md

  • Loading branch information...
egetman committed Oct 14, 2019
1 parent d9f2f9b commit 08af1e76241dfb5919fd630855c4828c729ab809
@@ -21,4 +21,4 @@ Stock will be available at `http://localhost:8080/stock`

You can interact with it: add new items to stock, order some items from stock and so on.

![Sample](sample.png)
![Sample](../docs/img/demo-screenshot.png)
File renamed without changes.
Binary file not shown.
Binary file not shown.
@@ -9,17 +9,17 @@
* [The dark side of event sourcing: Managing data conversion](https://ieeexplore.ieee.org/document/7884621) by Michiel Overeem, Marten Spoor & Slinger Jansen

---
Jes is a library for those who wanted to try Event Sourcing but did not know how to approach it.
It demonstrates well the basic principles inherent in approach and does not limit the methods of use.
How to use the library - everyone decides for himself, in accordance with his understanding of the concept of Event
Sourcing.
Jes is a framework to build robust, event-driven microservices in a CQRS & ES paradigm.
Jes provides several abstractions, that help to organize the workflow of your application, and hide all the mess.

Jes provides several abstractions, that helps organize workflow of your application.

---
## Getting started

Simply add the dependency to your project:
#### Prerequisites
1) `java 8`
2) build tool like `maven` or `gradle`

You can start using `Jes` by simply adding the following dependency into your pom file:
```xml
<dependency>
<groupId>store.jesframework</groupId>
@@ -28,7 +28,64 @@ Simply add the dependency to your project:
</dependency>
```

[Try out Jes demo](demo/readme.md)
#### [Spring Boot Jes Demo](demo/readme.md)

#### Building from source
```shell script
git clone https://github.com/egetman/jes.git
cd jes
mvn install -DskipTests
```

## Overview
There are some typical patterns for mainstream apps for which Jes is perfect:

1) **webapps with lots of user interaction**

![webapp-overview](docs/img/webapp-overview.png)

- a user interacts with the system via queries and commands
- queries are read-only
- commands can be accepted or rejected when received by command handlers
- command handler uses optimistic locking when writing events
- each projection tails the event store and processed new events if needed

2) **event-driven apps with lots of automatic processing**

![ed-app-overview](docs/img/ed-app-overview.png)

- client emits commands to process
- commands can be accepted or rejected when received by command handlers
- command handler can use optimistic locking when writing events
- each saga tails the event store and processed new events if needed: it can trigger compensation action via
command, trigger new business logic via command or call an external service
- sagas are distributed components with proper sync
- sagas can be stateless or stateful. When stateful - state shared between all instances and all state changes
use optimistic locking
- stateful saga is an event-sourced saga

3) **hybrid apps, which combines 1 & 2 types in some proportion**

## Features
Feature | Seubsection | Description
--------|-------------|-------------
event stream corrections | | what to do if something goes wrong?
&#xfeff;| event stream split | it can be useful when you need, for example, split event stream for the anonymous one and another, that contains clients personal data
&#xfeff;| event stream merge | as a split, it can be useful when you want to combine different streams
&#xfeff;| event stream deletion | optional operation. You can use it when, for example, you need to delete all user-related information, that bounded to a specific stream
&#xfeff;| copy-and-replace | you can read about it [here](https://leanpub.com/esversioning/read#leanpub-auto-simple-copy-replace)
versioning | | how your system will evolve?
&#xfeff;| multiple event versions | you can live with several concurrent event versions
&#xfeff;| upcasting | if you want to handle 'always last' version of an event - upcast it (from the 'raw' representation - no intermediate representations, you better know how to transform your data)
&#xfeff;| copy-and-transform event store | you can read about it [here](https://leanpub.com/esversioning/read#leanpub-auto-copy-transform)
core | |
&#xfeff;| tails directly event store: no more unreliable event publishing | you can watch this [talk](https://youtu.be/I3uH3iiiDqY?t=2410) by Greg Young if you want to ask 'why?'
&#xfeff;| strong/weak schema formats (partial) | there are several formats you can use for the event store
&#xfeff;| pull-based projectors | there is no 'control communication channel' - each projection is independent, you can change it how you like
&#xfeff;| snapshotting | have a long event stream? It's not a problem
flow | |
&#xfeff;| optimistic locking | perfect for user-related communication


## Jes basics
Central library element is `JEventStore`. It provides basic functionality for managing events in your system:
@@ -144,20 +201,6 @@ public class JesConfig {
```
## Features
- [x] copy-and-replace event stream: event stream corrections
- [x] event stream split: event stream corrections
- [x] event stream merge: event stream corrections
- [x] event stream deletion: event stream corrections
- [x] multiple event versions: versioning
- [x] upcasting: versioning
- [ ] lazy transformation: versioning
- [x] copy-and-transform event store: versioning
- [x] strong/weak schema formats (partial): core
- [x] pull-based projectors: core
- [x] snapshotting: core
- [x] stream-level optimistic locking: flow
## Todo:
- version caching? to avoid every-write check
- snapshots invalidation: describe or reimplement

0 comments on commit 08af1e7

Please sign in to comment.
You can’t perform that action at this time.