Skip to content

Status: IN PROGRESS. CQRS and event sourcing using plain embedded into jdk com.sun.net.httpserver with dynamic groovy spock tests

Notifications You must be signed in to change notification settings

daggerok/event-sourced-user-management

Repository files navigation

CQRS and event sourcing app Build Status

CQRS and event sourcing using plain embedded into jdk com.sun.net.httpserver with dynamic groovy spock tests

TL;DR

this is an example of event sourced system I'm using for teaching my students, so please, don't even try use it in production: Also read: Why Developers Should Not Write Programs That Call 'sun' Packages

Status: in progress...

RoadMap:

  • Setup Gradle / Groovy repository with Spring IoC dependency injection and Spock test framework
  • Implement REST API with plain java embedded http server
  • Implement basic REST API info and shutdown endpoints
  • Implement and cover with tests User Account aggregate functionality
  • Implement and cover with tests User Account aggregate repository functionality
  • Implement user-account REST API endpoints
  • Implement Friend Request aggregate functionality
  • Implement Friend Request aggregate repository functionality
  • Implement friend-request REST API endpoints
  • Implement messenger aggregate functionality
  • Implement messenger aggregate repository functionality
  • Implement messenger REST API endpoints
  • Implement async PubSub / Queue functionality to decouple direct REST API calls from aggregate repository
  • Introduce read (query) side to avoid non efficient event sourcing repository querying
  • Split current REST API into CQRS for eventual consistency and projections efficiency
  • Implement CLI interface which is going to be interact with REST API by using CQRS
  • Prepare future RoadMap for EventStore persistence introduction:
    • MapDB
    • JDBC
    • JPA
    • Spring Data
    • NoSQL
    • etc...
  • Prepare future RoadMap for PubSub introduction:
    • plain pub-sub patter implementation
    • simple im-memory pub-sub solution from Google or Android library
    • Using spring application events
    • Kafka

NOTE: For better developer experience during testing, use idea cURL integration tests from rest-client* files. Read more: https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html

why?

just see how everything is clear in next analitics:

events:
- OrderCreated(id=123)
- ItemAdded(product=Bose Headphones, price=400)
- FollowSimilarItemsLink(product=Sony Headphones)
- AccessReviews()
- VoteReviewHelpful(answer=5/5)
- ItemAdded(product=Sony Headphones, price=450)
- ItemRemoved(product=Bose Headphones, price=400)
- OrderConfirmed()
- OrderShipped()

resources:

About

Status: IN PROGRESS. CQRS and event sourcing using plain embedded into jdk com.sun.net.httpserver with dynamic groovy spock tests

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published