Git Product home page Git Product logo

nbarnwell / regalo Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 4.0 790 KB

OBSOLETE - USE Inforigami.Regalo instead. A simple event sourcing "framework" packaged on Nuget.org at https://nuget.org/packages/Regalo/ and based entirely on my learnings from Greg Young's DDD, CQRS and Event Sourcing course. The implementation may differ from Greg's in places, but the goal is generally the same. Calling it a "framework" is overstating things somewhat given it's such a straightforward pattern. The code here is extracted from initial versions of my OrderManagementSystem example implementation (also on Github).

License: MIT License

PowerShell 1.42% C# 98.58%

regalo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

regalo's Issues

Implement process managers as first-class citizens

Current implementations of process managers are up to the consumer of the library. It would be helpful if process managers were actually implemented in Regalo, particularly if Regalo could handle the situation where certain aggregate instances (i.e. by type and ID) could subscribe to certain "external" events emitted by other aggregate instances.

This would remove the need for dedicated event handlers just to tell one aggregate about events that happened in another.

Implement event stream conflict detection

First stab at conflict detection:

var common = getcommonancestorevents()
var left = common.Clone()
var right = common.Clone()

left.apply(myevents, Options.BypassInvariants)
left.apply(theirevents, Options.BypassInvariants)
right.apply(theirevents, Options.BypassInvariants)
right.apply(myevents, Options.BypassInvariants)

if (!left.Equals(right)) throw RealConcurrencyException

try {
    right.apply(myevents, Options.CheckInvariants)
} catch {
    throw RealConcurrencyException
}

return true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.