Open MateuszNaKodach opened 3 years ago
Event-Centric Thinking Lowering complexity. Sometimes published events differ from state.
Q&A
Greg uzywa ES kiedy ludzie z biznesu sa bardzo zainteresowani. Jest duzo systemow gdzie CRUD jest OK. Jak to jest tylko updejt data.
Event Sourcing Event Sourcing jest jak księgowość.
Questions:
Event Modeling
Event Modeling Tooling
DB better than Kafka as EventStore (indexes - id of event / aggregate type / )
Kafka does not have
Event Sourcing and Machine Learning
Christian Johansen
11:23:53 pm
So you feed the data with historical temperature Data
Shamresh Khan
11:24:34 pm
The first roomtemperatureview was made of from a number of views but the following views were not. Should they be and if not, where do those following views get the information?
Steven Elliott
11:25:50 pm
right. so, in this example, gathering some historic weather data, we can use it to augment our data when we rebuild our readmodels during a catchup of all events stored in the EventStore db
Christian Johansen
11:28:33 pm
Would like to see how do you bind the azure function event handlers with event store events
Christian Johansen
11:29:27 pm
Do you use Azure event grid at all ?
Steven Elliott
11:30:14 pm
I personally do not have experience with event grid, I understand it can be quite powerful especially when working with IoT and massive firehoses of data
Steven Elliott
11:31:34 pm
I apologize here for simulating a ton of historical data
Steven Elliott
11:33:20 pm
Main point I'm trying to display is how you can generate new datasets to utilize information you originally overlooked
Christian Johansen
11:34:05 pm
Makes sense
Rob Hale
11:36:44 pm
The problem I've encountered with event grid and event hub is that there are limits to the number of events that can be sent. IMHO, events within a domain should be handled within the domain. Cloud services and there limitations should be avoided for command and event handling
Rob Hale
11:37:47 pm
The limits are very high, but you're better publishing events and command internally. They are to critical to your system to trust to an external service
Christian Johansen
11:38:17 pm
@Rob Hale Probalby makes sense. MAybe use it for integration events to other Bounded contexts
Jonathan Swieboda
11:39:25 pm
Sorry just ran to the bathroom - what is this UI?
Rob Hale
11:39:47 pm
Exactly, I wouldn't have an issue using service bus to send things between domain. For example, send an event from ordering to purchasing. But within ordering, I should handle all event processing internally to keep control over issues like eventual consistency
Steven Elliott
11:39:50 pm
This is Azure Machine Learning Studio. It's pretty slick.
Steven Elliott
11:40:28 pm
Doesn't really allow for a lot of customizations, but you can quickly build up a model. Microsoft loves their gui's
Event Sourcing and Machine Learning (Steven Elliott) Lookup tables - how to rebuild projections. OK Lookups have timestamps.
Testing Event Sourcing Systems
Ludzie testujac biora gettery i settery obiektow domenowych i wszystkie sprawdzaja. A przeciez nie spradzasz np. zmieniajac adresu czy zmienilo Ci sie imie. W tym przykladzie wyrkyjesz cos innego.
Kto testuje nasze testy? Nikt, biznes - dostaje wydrukowane i mowi czy to tak działa. Główna wartosc to czytanie testów, a nie ich pisanie.
Polyglot Development & Finding Sub-System Boundaries Możesz zatrudniać Juniorów - proste zadanie do wykonania - kawałek. Najwyżej się przepisze. Inny język? Junior vs doswiadczenie w innym jezyku. Możesz kogos zatrudnić.
State Machines and Types of Storage
Turing machine - input -> state -> output. Events.
Wtirer can write to one stream, which read.
EventStore can be only one and global order -> stream is level of isolation.
Works well. Memory caches also.
GraphQL Event Sourcing
Event Driven UI
https://github.com/immerjs/immer
https://www.adaptechgroup.com/virtual-workshop/
https://www.adaptechgroup.com/virtual-workshop-signup/
VIDEOS:
MIRO:
Questions
Event Sourcing
replay events - external system? / bad logic - how to fix?
handling events from external system - how? Translate to domain command etc? - Q&A: Projections. How to keep encapsulation and loosely coupling while updating projections? I want to expose outside my Bounded Context only certain events (not all domain events) in order do not to couple to my domain events and be able to, for example, enhance events and send only (for example) summary like OrderPlaced(IntegrationEvent) which all data needed for other BCs. So I've made mapping from Domain Events to Integration Events (going outside BC - doesn't matter if those are microservices or its modular monolith). And it works for Write Side, but what if on Query Side I want to update projections for every domain event. Now it looks like I need to expose those Domain Events (maybe mapped 1:1 to Integration Events) and the coupling may increase (events are now visible outside of the BC and I loose encapsulation, which I previously tried to keep introducing IntegrationEvents).
Where should i publish domain events/ I have a repository implementation which save events from aggregate. But what about publishing? If i do it in repo its fine because only infra knows about them, but publishing is hidden there. On the other hand -> publishing from app layer shows that im using it.
How to you keep rules - exceptions / either monad
how to deal with changing in streams / aggregate boundaries and events
- Versioning of Events is one thing, but how to versioning Business Logic. For example, we have Event - OrderPlaced. Since the beginning we have been giving 5 customer points, but business change their mind and now we want to give 10 for the same actions (the same event?). Do we use Policy Pattern in this case or something else?
CQRS
- Security & Permissions (2/2). More about DDD & CQRS than EventSourcing. Write Side: I've heard many times that permissions are not a domain concern. Imagine a collaborative domain (like Google Docs) where I can give permission to do something to whomever I want. It's easy to reject a command if for example your role is not able to do that. But what about command which rejection depends on domain model state (only assigned users can edit this doc)?
- Security & Permissions. (1/2) Do you have some nice solution how to use Event Sourcing while limiting what user can see? For example I want to have dynamic permissions (not role-based). It's easy to create projections for each role, but what if - for example - this user 1 can read field A from projection P, and user 2 can read field B from projection P.
EVENT MODELING - It’s nice to hear such things and after they stay in our minds. But it’s so difficult to repeat such things as you to others. Are you going to write about this topic (replacing DDD / C4 / meetings) with Event Modeling :) ?
TESTING
DOMAIN-DRIVEN DESIGN
oNote Yes templates would be nice. But what about... "extending notation on the fly" like in Event Storming. Sometimes we need to do something unusual. I'm always aware of that something which should help, can limit us in some cases. It would be nice if the oNote won't respond with "it's not possible, system doesn't allow to do that "like in state offices. How is it planned to be flexible and useful as well?
EVENT SOTRE