Skip to content

Commit

Permalink
Big refactoring of module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schnell committed Feb 19, 2024
1 parent d6e108d commit 41a81c1
Show file tree
Hide file tree
Showing 305 changed files with 12,606 additions and 9,158 deletions.
88 changes: 44 additions & 44 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Java Maven Build

on:
push:
branches:
branches:
- '**'
paths-ignore:
- '**/README.md'
Expand All @@ -18,46 +18,46 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: maven

- name: Show versions
run: java -version && ./mvnw -version && gpg --version

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSS_SONATYPE_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }}

- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_USERNAME: michael-schnell
OSS_SONATYPE_TOKEN: ${{ secrets.OSS_SONATYPE_TOKEN }}
OSS_SONATYPE_GPG_PASSPHRASE: ${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw clean deploy jacoco:report sonar:sonar -U -B -P sonatype-oss-release --file pom.xml -s settings.xml
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: maven

- name: Show versions
run: java -version && ./mvnw -version && gpg --version

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSS_SONATYPE_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }}

- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_USERNAME: michael-schnell
OSS_SONATYPE_TOKEN: ${{ secrets.OSS_SONATYPE_TOKEN }}
OSS_SONATYPE_GPG_PASSPHRASE: ${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw clean deploy jacoco:report sonar:sonar -U -B -P sonatype-oss-release --file pom.xml -s settings.xml
51 changes: 27 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# event-store-commons
Defines a common event store Java interface and provides some adapters (like for Greg Young's [event store](https://www.geteventstore.com/)) and implementations (like in-memory or file-based).

Defines a common event store Java interface and provides some adapters (like for Greg
Young's [event store](https://www.geteventstore.com/)) and implementations (like in-memory or file-based).

[![Java Maven Build](https://github.com/fuinorg/event-store-commons/actions/workflows/maven.yml/badge.svg)](https://github.com/fuinorg/event-store-commons/actions/workflows/maven.yml)
[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=org.fuin.esc%3Aevent-store-commons&metric=coverage)](https://sonarcloud.io/dashboard?id=org.fuin.esc%3Aevent-store-commons)
Expand All @@ -8,51 +10,52 @@ Defines a common event store Java interface and provides some adapters (like for
[![Java Development Kit 17](https://img.shields.io/badge/JDK-17-green.svg)](https://openjdk.java.net/projects/jdk/17/)

## Versions
- 0.7.x = New **GRPC** client / Removed **http**/**esjc** modules

- 0.8.x = Refactoring if the module structure (Incompatible!)
- 0.7.x = New **GRPC** client / Removed **http**/**esjc** modules
- 0.6.x = **Java 17** and JUnit5
- 0.5.x = **Java 11** with new **jakarta** namespace
- 0.4.x = **Java 11** before namespace change from 'javax' to 'jakarta'
- 0.3.2 (or less) = **Java 8**


*Caution*: The code coverage value is not correct (it's actually higher than above value) as the 'test' module is not considered correctly (See [Issue #4](https://github.com//fuinorg/event-store-commons/issues/4))

*Caution*: The code coverage value is not correct (it's actually higher than above value) as the 'test' module is not
considered correctly (See [Issue #4](https://github.com//fuinorg/event-store-commons/issues/4))

## Status
![Warning](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/warning.gif) **This is work in progress** ![Warning](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/warning.gif)

| Module | Description | Status | Comment |
|:------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:-----------------------------|
| [esc-api](api) | Defines the event store commons API. | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~92% |
| [esc-http-admin](admin) | HTTP projection admin adapter for Greg Young's [event store](https://www.geteventstore.com/) | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~80% |
| [esc-grpc](grpc) | [Event Store DB Client](https://github.com/EventStore/EventStoreDB-Client-Java) adapter for Greg Young's [event store](https://www.geteventstore.com/) | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~80% |
| [esc-jpa](jpa) | JPA adapter | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~59% |
| [esc-mem](mem) | In-memory implementation | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~60% |
| [esc-spi](spi) | Helper classes for adapters and implementations | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~67% |
| [esc-test](test) | Cucumber tests for adapters and implementations | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Subscriptions not tested yet |

Deprecated modules:

| Module | Description | Comment |
|:-------------------|:-------------------------------------------------------------|:------------------------------------------------------|
| [esc-http](eshttp) | HTTP adapter for Greg Young's event store | No longer supported by event store (use GRPC instead) |
| [esc-esjc](esjc) | Event Store Java Client adapter for Greg Young's event store | No longer supported by event store (use GRPC instead) |
![Warning](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/warning.gif) **This is work in
progress** ![Warning](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/warning.gif)

| Module | Description |
|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|
| [esc-api](api) | Defines the event store commons API. |
| [esc-grpc](grpc) | [Event Store DB Client](https://github.com/EventStore/EventStoreDB-Client-Java) adapter for Greg Young's [event store](https://www.geteventstore.com/) |
| [esc-jaxb](jaxb) | JAX-B serialization support |
| [esc-jpa](jpa) | JPA adapter |
| [esc-jsonb](jsonb) | JSON-B serialization support |
| [esc-mem](mem) | In-memory implementation |
| [esc-spi](spi) | Helper classes for adapters and implementations |
| [esc-test](test) | Cucumber tests for adapters and implementations |

## Architecture

![Layers](https://raw.github.com/fuinorg/event-store-commons/master/doc/event-store-commons.png)

## Examples

- [Simple in-memory example](test/src/test/java/org/fuin/esc/test/examples/InMemoryExample.java)
- [Event store with HTTP interface and XML (JAX-B)](test/src/test/java/org/fuin/esc/test/examples/EsHttpXmlExample.java)
- [Event store with HTTP interface and JSON (JSON-B)](test/src/test/java/org/fuin/esc/test/examples/EsHttpJsonbExample.java)
- [Event store with HTTP interface and mixed JSON/XML content (JAX-B/JSON-B)](test/src/test/java/org/fuin/esc/test/examples/EsHttpMixedExample.java)

### Snapshots

Snapshots can be found on the [OSS Sonatype Snapshots Repository](https://oss.sonatype.org/content/repositories/snapshots/org/fuin/esc/ "Snapshot Repository").
Snapshots can be found on
the [OSS Sonatype Snapshots Repository](https://oss.sonatype.org/content/repositories/snapshots/org/fuin/esc/ "Snapshot Repository").

Add the following to your [.m2/settings.xml](http://maven.apache.org/ref/3.2.1/maven-settings/settings.html "Reference configuration") to enable snapshots in your Maven build:
Add the following to
your [.m2/settings.xml](http://maven.apache.org/ref/3.2.1/maven-settings/settings.html "Reference configuration") to
enable snapshots in your Maven build:

```xml
<repository>
Expand Down
28 changes: 15 additions & 13 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# esc-api

Defines the event store commons API.

| Interface (Synchronous) | Description |
|:------------------------|:------------|
| [ReadableEventStore](src/main/java/org/fuin/esc/api/ReadableEventStore.java) | Read only functionality |
| [WritableEventStore](src/main/java/org/fuin/esc/api/WritableEventStore.java) | Write Only functionality |
| [EventStore](src/main/java/org/fuin/esc/api/EventStore.java) | Combined read and write functionality |
| [SubscribableEventStore](src/main/java/org/fuin/esc/api/SubscribableEventStore.java) | Handles volatile subscriptions |
| Interface (Synchronous) | Description |
|:-------------------------------------------------------------------------------------|:--------------------------------------|
| [ReadableEventStore](src/main/java/org/fuin/esc/api/ReadableEventStore.java) | Read only functionality |
| [WritableEventStore](src/main/java/org/fuin/esc/api/WritableEventStore.java) | Write Only functionality |
| [EventStore](src/main/java/org/fuin/esc/api/EventStore.java) | Combined read and write functionality |
| [SubscribableEventStore](src/main/java/org/fuin/esc/api/SubscribableEventStore.java) | Handles volatile subscriptions |

| Interface (Asynchronous) | Description |
|:-------------------------|:------------|
| [ReadableEventStoreAsync](src/main/java/org/fuin/esc/api/ReadableEventStoreAsync.java) | Read only functionality |
| [WritableEventStoreAsync](src/main/java/org/fuin/esc/api/WritableEventStoreAsync.java) | Write Only functionality |
| [EventStoreAsync](src/main/java/org/fuin/esc/api/EventStoreAsync.java) | Combined read and write functionality |
| [SubscribableEventStoreAsync](src/main/java/org/fuin/esc/api/SubscribableEventStoreAsync.java) | Handles volatile subscriptions |
| Interface (Asynchronous) | Description |
|:-----------------------------------------------------------------------------------------------|:--------------------------------------|
| [ReadableEventStoreAsync](src/main/java/org/fuin/esc/api/ReadableEventStoreAsync.java) | Read only functionality |
| [WritableEventStoreAsync](src/main/java/org/fuin/esc/api/WritableEventStoreAsync.java) | Write Only functionality |
| [EventStoreAsync](src/main/java/org/fuin/esc/api/EventStoreAsync.java) | Combined read and write functionality |
| [SubscribableEventStoreAsync](src/main/java/org/fuin/esc/api/SubscribableEventStoreAsync.java) | Handles volatile subscriptions |

Simple delegating asynchronous event store that uses a synchronous one internally: [DelegatingAsyncEventStore](src/main/java/org/fuin/esc/api/DelegatingAsyncEventStore.java)
Simple delegating asynchronous event store that uses a synchronous one
internally: [DelegatingAsyncEventStore](src/main/java/org/fuin/esc/api/DelegatingAsyncEventStore.java)
Loading

0 comments on commit 41a81c1

Please sign in to comment.