Comments (5)
In progress! :) I will publish some proof of concepts soon.
from watermill.
Hello,
I am keen on contributing. I am wondering if there are any design ideas for this component, that could form the basis of an initial discussion and/or implementation.
from watermill.
Hello @olpie101. For this moment there aren't any written concept yet. If you have some ideas or sources feel free to post it here :)
from watermill.
Eventstore: https://dgraph.io/badger
See implementation for event sourcing: https://github.com/mishudark/eventhus/blob/master/eventstore/badger/badger.go
https://github.com/timshannon/badgerhold (for convenient read models)
Plus Polling-Publisher Message Relay https://microservices.io/patterns/data/polling-publisher.html
It also seems this might be a bit tricky with the current CQRS implementation:
Since one command may result in several events, it is also important never to persist only some events that result from executing a command. And so events must be appended to the event store in a single atomic transaction, so that if some of the events resulting from executing a command cannot be stored then none of them will be stored.
Source: https://eventsourcing.readthedocs.io/en/v3.0.0/topics/user_guide/aggregates_in_ddd.html
It seems this is the most compatible pattern I have found so far with watermill's cqrs implementation:
https://github.com/andrewwebber/cqrs
Specifically, since their implementation does not require handler in the form of aggregate methods, but uses plain old handler functions:
func(command cqrs.Command) error {
changePasswordCommand := command.Body.(ChangePasswordCommand)
// Load account from storage
account, err := NewAccountFromHistory(changePasswordCommand.AccountID, repository)
if err != nil {
return err
}
account.ChangePassword(changePasswordCommand.NewPassword)
// Persist new events
repository.Save(account)
return nil
}
from watermill.
@roblaszczak any updates on this?
from watermill.
Related Issues (20)
- [watermill-kafka] make update_watermill failed with `sed: 1: "go.mod": extra characters at the end of g command`
- [Questions] How to build modular monolith using watermill
- [watermill-nats] smarter auto-provisioning HOT 2
- [watermill-nats] new jetstream API HOT 1
- [watermill-kafka] - cannot process events concurrently without ACKing the event HOT 8
- [watermill-nats] Calling Unsubscribe for nats.Subscriber can lead to unexpected behaviour HOT 1
- [watermill-kafka] "read tcp <ip>:<port>: i/o timeout" when kafka rebalances HOT 2
- watermill-sql cannot run in a MariaDB HOT 1
- Does Watermill support publishing delayed (set to a a future time) messages? HOT 6
- [watermill-sql] Use TIMESTAMP WITH TIME ZONE instead of plain TIMESTAMP
- Uses old Nats. HOT 6
- Blocking in GoChannel `sendMessageToSubscriber`
- [watermill-kafka] use github.com/IBM/sarama HOT 2
- nats jetstream consumer always received old ack message HOT 8
- Data doesn't get removed from subscribers and subscribersByTopicLock maps (GoChannel pub/sub)
- Allow for custom labels on prometheus metrics
- Skip First Publisher in Router HOT 3
- EventGroupProcessor does only execute the first registered handler for each event type HOT 3
- Slog with `AddSource: true` is not working correctly due to wrapper in watermill
- PGX Subscriber InvalidIfaceAssign HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watermill.