MCPcopy Index your code
hub / github.com/egetman/jes

github.com/egetman/jes @v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.0 ↗ · + Follow
816 symbols 2,286 edges 154 files 108 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

actions status version code coverage maintainability rating quality gate status apache license maven central

Jes

Strongly inspired by:

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.


Getting started

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:

<dependency>
    <groupId>store.jesframework</groupId>
    <artifactId>jes-core</artifactId>
    <version>${jes.version}</version>
</dependency>

Spring Boot Jes Demo

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 Subsection Description
event stream corrections what to do if something goes wrong?
 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
 event stream merge as a split, it can be useful when you want to combine different streams
 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
 copy-and-replace you can read about it here
versioning how your system will evolve?
 multiple event versions you can live with several concurrent event versions
 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)
 copy-and-transform event store you can read about it here
core
 tails directly event store: no more unreliable event publishing you can watch this talk by Greg Young if you want to ask 'why?'
 strong/weak schema formats (partial) there are several formats you can use for the event store
 pull-based projectors there is no 'control communication channel' - each projection is independent, you can change it how you like
 snapshotting have a long event stream? It's not a problem
flow
 optimistic locking perfect for user-related communication

Components overview

You can find components overview on the related wiki page.

Example configuration

You can find spring-related example configuration on the wiki page.

Contributing

Please refer to the contributing guide.

Extension points exported contracts — how you extend this code

Event (Interface)
Central domain object of {@literal Event Store}. A fact of any change in state. [19 implementers]
src/main/java/store/jesframework/Event.java
ItemRepository (Interface)
(no doc)
demo/read-part/src/main/java/store/jesframework/readmodel/repository/ItemRepository.java
StoreProvider (Interface)
Basic {@literal EventStore} component, that provides protocol/tool-specific low level operations. [9 implementers]
src/main/java/store/jesframework/provider/StoreProvider.java
Command (Interface)
Marker interface for all commands in the system. [4 implementers]
src/main/java/store/jesframework/Command.java
Offset (Interface)
Offset used by all {@literal Reactor} subclasses. It's main responsibility to provide actual and consistent information [4 …
src/main/java/store/jesframework/offset/Offset.java
Lock (Interface)
Lock manager controls Projector/{@literal Sagas} JEventStore tailing in clustered environment. (To avoid [4 implementers]
src/main/java/store/jesframework/lock/Lock.java

Core symbols most depended-on inside this repo

uuid
called by 49
src/main/java/store/jesframework/Event.java
add
called by 41
src/main/java/store/jesframework/offset/Offset.java
write
called by 39
src/main/java/store/jesframework/provider/StoreProvider.java
readBy
called by 34
src/main/java/store/jesframework/provider/StoreProvider.java
get
called by 26
src/main/java/store/jesframework/reactors/Saga.java
getProperty
called by 26
src/main/java/store/jesframework/util/PropsReader.java
format
called by 22
src/main/java/store/jesframework/serializer/api/Serializer.java
write
called by 20
src/main/java/store/jesframework/JEventStore.java

Shape

Method 630
Class 169
Interface 15
Enum 2

Languages

Java100%

Modules by API surface

src/main/java/store/jesframework/provider/JdbcStoreProvider.java26 symbols
src/test/java/store/jesframework/UnsafeOpsTest.java25 symbols
src/test/java/store/jesframework/internal/Events.java21 symbols
src/test/java/store/jesframework/internal/JesUnitInfo.java19 symbols
src/test/java/store/jesframework/snapshot/SnapshotProviderTest.java18 symbols
src/test/java/store/jesframework/reactors/SagaTest.java15 symbols
src/test/java/store/jesframework/provider/StoreProviderTest.java15 symbols
src/test/java/store/jesframework/reactors/ProjectorTest.java14 symbols
src/main/java/store/jesframework/serializer/JacksonSerializer.java14 symbols
src/test/java/store/jesframework/JEventStoreTest.java13 symbols
src/test/java/store/jesframework/util/JdbcUtilsTest.java12 symbols
src/test/java/store/jesframework/internal/PostgreSQLClusterContainer.java12 symbols

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add jes \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page