CpH DDD: Event Modelling with Adam Dymitruk

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I think a lot of people just want to watch and they don't want to participate ooh that's there it's there it's there evening television okay yeah it's life you okay who tweeted that no I did okay I'm trashing yeah it's like you okay who tweeted that my dear no what's that really weird long delay someone's got their speakers on and no headphones yeah their mic is picking up like like 5:15 yeah you need to mute you need to turn off the sound if you're watching YouTube Christian or someone else please turn off the sound because otherwise there is a gap but like five seconds between each even zoom and it can be both hear it and to repeat here so it's not me I swear no I know it's not you because you have headphones on yes and I also looking at the YouTube studio which is default or incentive I think you've done this before yeah it's turn off yes nice so what we want is like asked because we started to talk about this being a domain driven design channel and there's that crossover between you know people that are just interested in event modeling outside the scope of that we can focus on domain driven design aspects but include some of the non domain driven design answers that event modeling gives you I think it's one of those things I realized lately just how powerful this approach is for bridging the gap from traditional to domain driven design so hopefully we can start off like that to show how the worlds are united wow I'm gonna add Eric to be a panelist he's a guy that works with us he's really good at this stuff too you'll be able to lead one of the team's hello Eric you don't see if we see a picture of you and it's actually very hard to get webcam right now you know I bet I can start gouging people for it yeah I think I can send him with very help because I have like five microphones since he comes it's like look at this look at this beauty all right Eric it said pants optional not sure no not-not-not more love you get the opposite message someone that's asking what the twitter hashtag is should we make one more Oh Twitter hashtag I'll just use the account event modeling with one L I guess some people use event modeling as a hashtag but you can do DDD design as well so where is this question D it's in the chat should look at this and T's and I'm looking at the chance I don't see that the question it's about muting it's about AIDS 4 to 6 p.m. it says what is from a guy called enchant you know zoom shot yes oh there it is okay eventual consistency holy smokes this is like you you replied to me privately so please change your everyone [Music] all panelists and there it is okay all panelists and participants I'm learning so much I thought Justin was going to be going to because I wrote on YouTube chat about people who wants like her try demand modeling before and want to join the panel and participate in the in the workshop they can go to zoom so I think we need to tell people that they can raise their hands we can bring them in yeah yeah you actually can just say because people here is anyway so yeah okay I'm going downstairs because my kid is going too bad I like your shirt I like the same yeah because you need to see this backside yeah very good Oh gallery view okay now gallery fee was good secret stuff Shannon we're gonna make him speak English for an hour see how he feels hello he said he wants to practice English we want to warn the lectures to speak Norwegian yeah as long as you don't make any try to speak Norwegian no any of it but there is a nice surprise I don't think many people know that ship stuff has made a really cool series about from start to finish using event modeling to design a system and an implemented flow so it sounds good has been tirelessly working for the last seems like five months at least doing five minutes every night progressing this along so it's been fun to watch on YouTube we're gonna definitely go over that I think everyone should see that and then we need some volunteers like Rafael to translate things to English from polish yeah but he's already done some of that which is okay and there's links to you know the mural board that he created and the open source project you know that and the domain is nice and simple yeah for people to understand so I'm glad that you know all these responsibilities are slowly coming off of my shoulders as the only person doing this are adding their efforts so yeah it's been a nice little community I think a lot of people are realizing that it's quite the event allowing a nice type of glue between people and approaches so yeah it's been a lot easier to sell domain driven design when people realize just how important events are with your implementations that are not so I'm giving away too much content before people join now you can just repeat it I will ask applicants yeah how do your mic know there's a audio so those people asking for how you mean your mic I can mute you for you I know there's like he's got there's to Alexa he's cool i I don't know it's I left because I need to go downstairs so I guess this one can go I tried to meet your other one but I didn't work I wrote right clicked on it yeah I'm gone yeah looks like sure stuff has overcomplicated his solution but that's opinion you can see the diagram behind him but it seems like okay there are some things yeah yes sir so maybe people just getting in here just at 9 o'clock how many assumed YouTube now I'm just looking at the participants see if I missed anyone that should actually be interested it should be interested in so just ask people to raise your hand I guess anyone else see potential panelists in there that I missed we got four minutes hopefully this will work nicely yeah well mm-hmm well Alex you've been doing a ton of these oh that's really telling but some so but it works really well so yeah again congratulations on your book it's so far the been incredibly helpful for a lot of people yeah big recommending everyone grab it and finally I'm still getting all this stuff still getting errata says endless work so basically fixing here and there and people finding mistakes Tigers and stuff I'm not fixing typos now it's their work that's really good I'm very very happy oh yeah Ben Christian you want to become panelists and join the discussion and maybe be the Bureau forward it's okay you know yay we need I'm completely done how many people are on YouTube and all the other channels we can get a an idea of how many groups to make I think five to ten people per group would be good and depending how many people there are we can elect a few a few leaders to to do different domains and and I'm hoping that we just promote those leaders that's panelists that can share their screens later and just go through them I don't have a hard stop in you know two hours or whatever so whoever likes to stay up and do that I know when you're up this late but here you know I just woke up it's noon so yeah don't count on me on that leave soon so it's pretty late already and yeah yeah but I like to watch is my second so we have 49 people on YouTube and we have 48 or 56 assume so basically in two minutes I guess we just start yeah and we do the introduction then we discuss the plan okay I'm not exactly sure how you wanted to do the group's because everyone is hearing and seeing everyone else yeah how do you have a mirror board or Nietzsche figure out something for what sorry for aribert or yeah I have a mirror board for the start but then I expect people that have the mural experience like Rafael and Kristoff and Erik to start their own private ones and anyone else and and then invite people coordinate that in the slack channel to do basically you know create their own channels for their own domain and invite people very quickly I mean this is a really good SAS product where you can invite people and get going fairly fairly quickly and if you do incur some sort of expense I'll pay for it just let me know for whatever reason I think yeah I just go to go support have it tried to go support I am going I'm reviewing all of them actually I was supposed to do a review of all the online collaboration tools this Monday but there's been so much work with our clients and other things that have popped up because this issue that the world is facing so I'll be doing that probably I'm hoping tomorrow if not then the following Monday but it's basically going through a dry oh you know all the different tools and how they haven't heard of dry so okay go for it I'm just posting the soon we world and YouTube chance also have some questions but I mean I can come back with those oops guys I don't know why mine's not muted yeah drop the reason that the one reason that I like your I know is because they have a plug-in oh joy yeah we have a plugin for for next cloud so I'm here early waiting until the collaborative part the dry yo is on next cloud that'll allow you to scale with your own infrastructure so yeah I think in this world we need open source initiatives for collaborative whiteboarding and I think things are dry or kind of there if there's others let me know will happily promote the open source tool link for to enable people in you know not such privileged parts of the world and even the playing field and all this stuff you sure we start with official welcome yeah production Joe's gonna get more comfortable here let me know if you can still hear me or not or if I'm too far away from the play I need to do the game well okay okay everyone thanks for joining tonight we have at least now nearly 50 on the soon the channel and also fixed on the YouTube channel but maybe it grows here but I'm it's pleasure to invite you we have an agenda here and welcome and introduction when modeling why we've been mulling into and been mulling breakout we hoped for this to be a short talking like 15 minutes each and then spent most of the time on doing actual modeling under my robots from your bones whatever you call it first of all thank you to Alex a similar way from your picture Dennis sharing is soon account so we can facilitate this and soon nice account and also welcome to you Adam from all the way from Vancouver I guess you're responsible for this crazy time of the evening you're eight hours ahead of us but it's really exciting with this bed modeling remember you mentioned something about storage selling that we are used to tell stories and that's how we remember stuff so why don't you tell us the story about came to this I guess event event modeling isn't something that I set out to make it's something that just ended up being a reflection of how of how information systems really are I think part of it was trying out event storming and the format of a workshop but I think the similarities end there and it was more about cleaning information yet cleaning some teachings from Greg Young as to how information systems work fundamentally after I met Greg young in 2008 and switched to event-driven development event sourcing specifically but a lot of messaging you know full in on myths and based architectures and approaches and during that you know the previous 12 years working with solutions that are only bill those away and I started to get some insight into how information systems function and it's kind of I kind of liken it to a lot of scientific discoveries the e equals mc-squared or finding molecules and atoms and periodic table you know you can say each snowflake is unique therefore you know water is complicated but if you get enough you know a good enough microscope and enough research you start to see that water is actually made of two simple things hydrogen and oxygen if you look at deep enough no matter how unique your solution is in your organization because you are a snowflake you are made from made up fundamentally of very simple patterns which are the equivalent of hydrogen oxygen in water and this is kind of the last 12 years realizing that yeah you may have a snowflake in your insurance company but it's the same patterns that are going on and the other insurance company even though they may have a slightly different solution than you have the underpinning patterns of how information changes over time is identical so I'm gonna try and share this the stream so that I can just go through kind of some of the insights and how going from domain-driven design events or systems I circled back all the way through to regular systems and you've already touched on the storytelling aspect on how our brains work and how we organize information systems before computers it all ties together it's quite interesting how realizing these fundamental you know atoms of information systems helps us be more predictable anticipate things etc so I everyone that got the invite link should have gone to event modeling organ read the couple of articles that I have on there I'm going to just share my entire desktop why not so this is Anna you fill out a bits Adam ya lost this cross-atlantic communication can be tricky yeah maybe yeah so what is wait yeah we wait he will reconnect so meanwhile if I can see the screen I can maybe say something about it sure oh yeah this early doesn't say I see a picture of Adam it's frozen picture of Christian that is frozen as well and yeah yeah yeah I guess we just have to wait someone is blaming Obama for this yeah I don't know if Obama is involved in Vancouver cheek to whatever were resumed his communication I know right away I know you trolling and Ryan I'm not being serious I so ad embrace his hand where was it was it curiae I guess Adam joined again and we need to find him in the list of Comus no it's not him she's still here on the panelists yeah is the last two interred sorry folks for this but I promise you we are still alive [Music] all right but maybe I can share this chance tit I think I don't want online/offline era we're including slack I share Christian yes yeah we can see repeating you know recursive screen in YouTube pretty cool now I can see your fouling yeah I guess the article was the first one the event modeling traditional systems yeah what I liked was that this soaps about storytelling and the way that humans pass knowledge to each other by telling stories this happen has 77 it's like an event and also you can see it's a fairy tale like Snow White you have different actors in there and you can say this happened and have this happened this happened it's the same story wanted to tell about you two main what are the users doing what will happen with access who is participating in the software it's awesome that it's based on how people think I usually paralyzed this when we meet we talk about stories the stories are based on facts and then we draw some conclusions we've got some inventions you know well trigger some you know facts events and then it basically all around okay and I was back ok good reason the other way to techies I'm promoting into spotlight so that was very guys I'm not sure why I was in crashed there was a message about there was a message about some internet speed problems but okay Kristin can make Adam co-host again yes all right okay can everyone see my screen yeah yes okay so where I left off thank you for filling in or felt like didn't hear what went on while I was away but I'm sure you guys found a way to Rafael was saying that we hear stories tell each other stories to the basic facts and I started to laugh because I never heard it such thoroughly old amazing fiction and fish' stories I mean they're always in fiction there are no never single real Fisher story that I heard fishermen started it yeah all right yeah so that long story of discovering domain-driven design event sourcing secure asset cetera there were all exercises that needed to be done and go through to really understand something more fundamental that great thinkers and people that did a lot of research like Fred Brooks who wrote the mythical man-month came up with and one of those realizations is like you know if you know if this is the true nature of information systems then event modeling should be able to show traditional system irrespective of their implementations we can do that but there's one fundamental thing that we share and Rafael added that already is that events are what happens it's the core of user experience it's actually what happens for those that didn't read the article I'm going to quickly go through and show you that as we build up a system from a user interface pardon the small writing I can you can read the article leader yourself on event modeling we can start with the first user interface of someone users such as a registration page it stores this fact that Rafael talked about already which means sorry Adam penny zoom in and make it a little bit bigger not really I think the images that I used are way too wide okay okay okay let's see so you know you can start with a blank form which is the first thing you implement that's the first thing a user can see and then you can say that well we have this event that happens called register and really we have the actual information in here that you have in your head you remember your password or at least your computer remembers it for you for using a password manager your email is this and your name is that however in a traditional system what we do is we put that in the table and this is important because this is how we can explain the difference between domain-driven design implementations and how we do things in domain driven design versus traditional things so as traditional architecture so here if you're talking to someone that's brand-new from Ruby on Rails world then you want them to understand why you know event-driven architectures or domain driven design are are better for keeping up for implementing and maintaining your solutions you can start this way by using words and concepts that they're familiar with likewise from a business perspective most business people understand that there's tables and we have tabular data before digitization in accounting and many other many other disciplines so it's not hard to ask a business person to understand that you know what were this is the record for a user when they register and this is information we keep about them notice the impedance mismatch from UX and implementation the password is not actually stored we have a hash and this is important because as fred brooks said if you show me your tables i'll really understand your system and this is really one of the first key points is that you're showing what gets stored versus what someone had in their mind so even though we throw away this event in terms of our implementation it's important to have it on the event model because it captures the user experience we can then show how we display that information as we go across this time line height so the event modeling is about an example workflow of real data going across the system over time like a book and if we understand something by example we can fill in a lot of the missing pieces I think the industry was too preoccupied with the how describing the minutiae of implementation details versus the what and that is what do we have in our system at any given time if we explore this this is the heart of the event modeling is basically saying that as I move through time I can slice up that time line and see on the finest detail as to why something changed and what it is that is in the system at a particular point in time that is the best right that is the best requirement that you can get one of the interesting things as we continue to do this let's say we had a verification email er notice that our implementation had changed the user table in this particular implementation that we chose to do we added a mixture of column to this to this table so before that we didn't have it when we were when we were here we realized that we need a space to store that verification code and use it in whatever way we want this is this is quite important because it shows why we have a big problem in the industry and why software is such a bad discipline compared to anything else out there why were 90% done 95% done 99% done in all our projects no matter if we're doing agile or not it's a it's an absolute nightmare for compared to any other engineering discipline not any other I'm sure there are other engineering disciplines that suffer similar things but for the most part most most things work out from blueprints and don't suffer this kind of rising cost especially building a house or something so the reason that this happens is that as you can see a registration page needed to be opened up we can pretend that the registration page was our feature for feature a in this diagram and as we continue to add features we notice that the fifth one that we do is feature D and that is this idea that we need to send this verification code by email we had to crack open what we wrote originally to insert a default value or something into that and to account for the fact that there is now extra columns maybe foreign keys etc so our cost is not just implementing verification it's actually reworking the original feature and so a traditional system which really means not planned not modeled system is this agile or just run by the seat of your pants oh you know it's really kind of like a like a cowboy coding back in the day you can actually see that agile didn't fix the core problem with cowboy coding if we however go ahead and not implement anything along the way and we start with an event model that shows you where the date is gonna go right that's important nothing else we're not gonna talk about how the algorithms are structured we're just gonna say this is where the data will go because we understand what the people want to do what their events are across across the time line and more importantly what information is in those events if we find a home for them or at least their artifacts such as the hash value then we don't have to revisit that in that implementation of the registration for example if we go back to the first example that we have here sending this particular verification code does not require opening up what we wrote for the registration page that is open closed principle or for layman's terms I hate using technical terms because we lose audience so event modeling rarely makes its own language we'll say we eliminated rework by working off of a blueprint we don't want to have this because we work off of a blueprint and something that's finished we don't open up again an analogy would be building a house without a blueprint and someone tells you after you're done building the first floor that you know we need two storeys actually just what a fine job II didn't to have to destroy the previous walls because now they have to be rebuilt as supporting walls that's your rework and that's your analogy for you know it's been heavily criticized that you can't make analogies between software and building bridges but that's kind of a snake-oil that agile makes you want to subscribe to because they make money off of not fixing this curve but by making this curve slightly less expensive and if they can show an increase of making this slightly less expensive they can continue to sell their approaches and their band-aids we actually don't want that curve at all does that make sense I hope so I mean it's at least this important point let's with this open closed principle that you don't have to redo what you did I mean that's this is the big thing I think so this is interesting and this is really important to to do because while in domain-driven design we're just you know at most 5% of the of the people out there that are practicing art that are doing software development ninety five percent more is doing table based MVC applications and you're not gonna convince them and you're just gonna be another consultant trying to grab money so event modeling is really key in showing how your state changes over time regardless of your implementation so that you can realize that hey look at these orange stickers and information and that is really useful information are you not capturing this oh I guess we could add a log okay wow that's pretty cool why can't we use the log why can't I just look at this why are we creating these sequel tables and dealing with all this kind of stuff more importantly allows you to add the introduction of like what about maintenance how are we going to version our systems and we all know where the data migration stories end up with traditional systems as you move from schema one to schema two between two big releases it's a nightmare that migration of all those data that's sitting in tables to a new schema for a new version has never gone smoothly right with events we can map that easily at least with this approach even if you are doing migrations at least you have a much or well a much better documented data schema that shows you context within which some of those column columns are used as integrations between features so it allows you to go back and understand why some of the changes to your data for schema 1 to schema to have to occur not the best but at least it's not as bad as the traditional approach without planning where we don't have our original intentions captured as to how the data got in there in the first place and what it was what purpose it was serving but we also have an idea of what is what what the order of operations is so for the purpose of this this meetup because its domain driven design will go back to the original article because that focuses on the 5% of people that actually want to be doing things in a logical organized way so going back to the where Rafael was going on about this when I was away questions like sorry go ahead yeah please don't throw up most questions because I think we're going straight I think you shouldn't raise if we should raise her or ask I love that you mentioned the impedance mismatch and you showed that have you had success like when you're with organizations to point that out and go like hey if you can do this but if you go and do the vents and store them have you won battles that way yes it's easier to win the battles with with business for to understand the importance of events but they themselves will run into the technical side of the organization like the CTO and other Dungeon Master's that don't want things to change or or have their job put in jeopardy because it's no longer what they're comfortable with them they're on an even playing field with the most junior people in the organization so it's entirely people problem but I'm experience the story as well and Microsoft experienced it quite badly with losing the entire server world to just two to Linux because that was logically better smaller it was a cost center it wasn't actually a feature-rich thing and they refused to admit admit that and kept kept on the Titanic and trying to force the Titanic to float after it already collided with that so this is a similar thing this is why I see this as kind of a work into the nature of information systems and really I want this to be backed by the really interesting things that male Conway you know Fred Brooks and all these important people already knew this is not new information it's just a distillation of it to apply in today's world and you know this this motivation part of this article actually goes over that quite well it shows that we have that we have had this way of working in our heads already this is more human right we had really invented a whole bunch of scaffolding band-aids up on band-aids and other constructs which are really not necessary and I just want to point out to one resource where you know if you think event sourcing your domain German design are really tough there's this tiny needle implementation of a real-time board to-do list which is implemented as a simple shell script and that's a it's something that you don't need to store in a file you can just paste that into your into your command until your command line if you're using fish in this particular case but feel free to translate it to bash or PowerShell or whatever else you want to use and you can just up arrow and use it and stores events in a file that's in a dot folder in your home in your home directory and works like a Trello board but guess what you can express that quite easily in an event model one of the things about the event modeling and it's in his goals is to have cadence to so you'll notice that when I want to do something I enable something with a command and then go to an event that stores that fact and then those events are used in projections or views you then show that information back to the user and it's that's kind of enabling people to do something giving them feedback informing them to do the next thing with more information and it's a cyclical thing up and down input output input output and it really has an analogy to how secure s functions and the cyclical architecture of getting input getting output getting in for getting output and this kind of makes this nice sine wave across this time line so they can be longer or shorter sine waves if you you're talking a bit longer or shorter one and it's this cadence that allows you to have to have predictable development that's that flat cost curve is really what we're after what we really want to get rid of is this is this straumann argument of big design up front if this is small design up front we do the event modeling from anywhere from an afternoon to two days yeah I think it's a fallacy that bet that people kind of Leedy and I hear that all the time so saying okay let's do some design I say oh it shouldn't do big design up front see I'm not offering you to do big center front I'm offering you to not go and blindly start shovelin code into the repository and then give me a pull request after two weeks that's complete rubbish because you didn't even know what to do exactly this is a big this is statistic I agree with you this is the fallacy and this is trouble argument and goes also with the thing that's like old versus new although I also agree with you completely that's nothing new like fundamentally and people say what if we do this in in a way we always did in two days and in a way that you offer us to do in two three months I'm saying that's the fallacy I used caring of Stroman and you want me to start discussing this but that's wrong because that's opposite I can do it today so you will be struggling for two months and this happens all the time and I sometimes I'm just on the point of giving up and say just do what anybody wants can I ask a question because you sign out front because it makes very much sense with the small exam you gave but this is just a tiny part of the system I mean isn't it big how much do you need yeah so the modeling for large systems actually does end up being an iterative approach so we don't throw away the event model this is not a one-day exercise what we do is we take advantage of the similar you know similar approaches that have collaboration between many different roles to have them speak but we keep this event model around or for a long time to be the blueprint and we do adjust it when we learn new information and we can take a look at that new version of the event model and hold it up against the old one see which parts were already implemented that have to be replaced with a new implementation and which parts haven't and are free so we have that ability to do fixed costs fixed cost projects because we can do an average for us for implementations if you have that cadence it's also a really good way to clearly define a boundary between your functional and non-functional requirements so an event model will show you the SFA's that you need you can very easily on that timeline put in times such as this is within two seconds this is between has to be between whatever you can mark that up with those important methylase and the event model will then allow you to use that as well as a requirement for for how fast your application is is supposed to be function which has been you know quite good so yes this is a trivial example because we want to show the mechanics and they don't want to refuse things with a really large system so I want to show it on the most basic things we get input and output and some change of a schema and things like that one thing about the big system and versus smaller system and I can refer to the question saying that what about a model that's multiple teams I mean if you get party too many winners on basically Dallas fundamentally flawed if you if you have a design that spans multiple teams I mean if the team we talk usually about Bank context and we normally do not want multiple teams to own a single bond context because of how this is gonna work they will need to coordinate because they will clash between yeah use all the time so I would say or in our experience we modeled within context and if the models leaves within the context it's usually one team to implement it and therefore the model is reasonably small so just lead the model to the context make it contextual assign interfaces on a border of the model and on the boundary and then coordinate the contract and then go a contract and that's really important because it comes up as a big discussion especially with a lot of people that are using Kafka for gluing stuff together and what you're touching on is the difference between let's not get into that in this one but okay but what you're talking about is the the difference between public and private schema and the public schema is something that you need to not have changed very often and this is where your context boundaries and all that configuration device and integration events and all those things have to be something that's worked on I was almost like a shared library where you maybe have some way to talk about semantic versioning if you buy into that but it's it's a it's treated very differently than we our internal schema to the track state of one service or something like that and how you track it with with event modeling is you just give it different swim lanes as you go here in this example already been over you know we can use this to really talk about pretty much everything in here so the inventory system authentication system payment system and an external system that's a GPS coordinates coming in so you can model all of these over time by example there wasn't I want to not skip questions there was a question here that Roger that's about handling branching logic this is done this is specifically done so that you don't have branching logic and it is borrowed from the idea that specifications by example are the things that work best to specify something we are very bad at memorizing chart the what's it called branching schemes and things like that and that activity diagrams we're very good at remembering stories and the first paragraph in the main article goes over that that our brains are built to fill in the gaps so we absolutely do not want any branching in an event model it's up by its imagining your system working over an entire year let's say and we kind of investigate what happened in that system and we pretend that it exists and say what would we like to see in terms of the data and how it changes over time we use that as the standard to hold up our solution against and we know we're done when our system is exhibiting that further to the story yes the more complex parts that need some branching etc we can have a lot of traditional by example specifications that dig into a particular piece and usually they're done in the state change or State View specifications usually given when then type of things that are consumable by business people as well as people that are implementing or responsible for the implementation so we don't want any branching and that's on purpose that is one of the key things where you will not have a similarity between some UML and UML elaborations is that we we find that being a real impediment to understanding and actually your being able to fail and it actually asks more questions of a person's mind then allow them to hold on to what the example is further branching really complicates the idea that you can use event model for what has come what is referred to as information completeness and Kristopher Kandra and a really awesome guy from boston made this discovery where he saw that the event modeling could save their company because they could do an audit for information completeness ie if I find that I have a field here I can trace the information that it puts in the system and I can see where that information is used and if I can't join information with that line I can't find where a field is getting stored and I can't find where a specific screen is getting its information I know I don't have a full spec and I shouldn't start until I actually understand that or at least know that I'm missing that information no and I know that I have that piece of information missing or that implementation isn't so that's that's one of the reasons that that we don't do branching specifically an alternate major workflow would be basically added on the end of this saying let's review and let's see if the checkout process here in this particular workflow fails and and then we can show that as an alternative flow further on if we want to just have really inconsequential derivations or maybe the the difference in different types of data how it's stored really how the calculation is made we can elaborate that on anywhere from five to twenty different given when thenns for a particular command handler event handler if you're talking about events or systems so that's that's where that's why branching is is not shown everything specifically shown by example is to be able to make everyone understand as quickly as possible what it is going on so sure that sometimes it's more it's more verbose that's why we want to use different ways of constructing this event model where we can maybe divvy it up into different workflows there's different styles for different types of applications I hope that answers that question so stupid question maybe I didn't get it but do you need to replicate the whole example to to a branching another example so say now this example follows the other frames yeah if it's a major one you would generally for they're small things such as retries for like a login you would do this down here sometimes it's a small branch I would show an unsuccessful registration because someone for you know used an invalid email address or an email address that was already used and then I show them getting the error message man and they show them using another one and then success and then they try to log in they put in the wrong password I show them the message that they get and then they try it again they use the right password etc so by example is always going to be the best thing for you you do not want to complicate things simplicity is so hard to keep in everything that we do in our lives not just information systems but simplicity is so hard to come by so we must always fight for anything that we do to be simple that's why you know there is a there's a rapid applicants are a rapid event modeling that allows you to just use events and screens to get going really quickly you want to be able to say welcome to a room with people that want to design a system and you want to get going as fast as possible you can do this within five or ten minutes by saying give me an example what all the screens look like and then show me which events the system is gonna get the half story we don't care how they get in there we don't care actually in what format we're going to store them we don't even care if it's an events or system or a domain driven design system I want to see by example what this thing does as fast as possible right I don't want you to read a book on BDD for an entire month and then maybe everyone will be up to speed in a year in the organization I want you to explain that to me five minutes and maybe by the end of the day everyone will understand what we're doing right we want to constrict those times but keeping things simple so you have is very few moving parts you know for for kind of core patterns and that's it and then a legend of what's allowed which which arrows are allowed to point to what it's all your rules we said that we wouldn't do so much song so maybe we should transition in yeah sure we should mirror that yeah I want to ask one question from the Q&A if you don't finish the Q&A real quick yeah so I think we would just say we answered so it's like you don't really want to do it's like a huge model that costs multiple teams because you strive actually to model inside a context model actually belongs to the cortex right because we model both we've done we've done both yeah I mean it's important to model across boundaries but I think I mean if we look at the model itself the model has language in the language can change when it go across the context and that's fine in the show and you show exactly that and we've had really large models that actually made up euro crash so we can we can I I would say that we would do it and because the swimlanes show that so I can have this system here with certain terms in its events and I can have a different system below with different terminology for different events yeah actually I want that to be there I I don't want an event modeling session to only be for one content it's actually as per domain German design it's actually encompasses all of those practices so you should be able to show your context matters you should be able to show all those things on one diagram so that you understand but yes you can dive into that you can dive into specific implementations you can show where it's important to show what's going on in one service versus what's going in another service and have that showing by example that interaction that the community feels if you have an interest in to know the details because that's not always the case because sometimes you're just interested what you can see from the outside organization in aback you're not gonna do it in a giant multinational company absolutely you're not even do it you're gonna have to split it out just like you're not gonna have one blueprint for a high-rise you're going to have multiple blueprints that are gonna make that high-rise go but again you definitely have overarching event models that show how these things interact together it's really important to still continue to communicate by example with layman's terms and like if one if one team has a specific word for their ubiquitous language another one has another one I still want to see both of those dialects on one diagram somewhere people to understand that this maps to this and here's an example how about data falls across all guests hmm that's probably you will answer the next question the top of the list that do you need to know in Bonn context you basically I made this point before yesterday and I'd like to repeat it again idea ban contest ban context I've seen many times and I've made this mistake again people tend to see bonus context as something they once you have if you work with a new system greenfield then it's probably true if you work with a system that really exists bound context actually what I have even have one single thing in cycle server and one single thing in top of it and that's big ball of Matt your contacts macro will one huge thing in the center that's call big balloon man so you'd never know be bound context upfront so I'd say what Adam is showing now is what you discovered you in the modeling when the language changes and you put different terminology and you see oh look what you found out that there is another context that's at least what I think it happens well what we do in the the format is very similar to event storming workshops so we do by example exploration of the problem space has been criticized that this is not a problem space or exercise I've always explored problem spaces using event modeling because people love to talk about stories and what happens over time so we can use anything to this to talk about - just spit ball ears when it comes to actually having something that's going to eventually be an implementation it's nice to at least brainstorm the different things that can happen this is exactly we're gonna do in a minute we're gonna do all this as teams we're gonna brainstorm all the different events that happen in our particular application we're going to put them on a timeline to make sure that it that it extends and then we're gonna add some actual UI pieces to show how this is going to work over time in terms of what people see and then this is actually interchangeable because some people are more visual depends on your organization sometimes people start with a storyboard first which is okay these firsts you know three steps are highly interchangeable in the full event modeling we do use views so we do use views and commands to basically say how I want to input data into the system and then the green ones or how I want to display that information and this is where we link things to show that information completeness later we do the organization they call this Conway's law and applying of it which has never been really used is because this is where we on purpose say that we're gonna make teams to look after in this case it's a hotel example so we're gonna use inventory for four rooms we're gonna have a registration team and we're gonna have a payment team and these teams are gonna work on their particular subsystems together notice I'm using subsystems I don't say domain or bounded context because I don't wanna lose the kind of the audience so when you're trying to do domain driven design and new organizations do not use the words from the book use the word subsystem for a domain right do not say anything that's going to require someone to open up a book and read about something because they're just gonna check out they don't want extra work on top of their already busy day so use common terms for what you're doing even though you know domain driven design make the bar really low for accepting what you're gonna do that make sense side by side these are awesome so the next article that I'm writing is basically traditional systems including legacy beside brand new systems and then augmenting old systems with event-driven types of architectures or the range urban design and this is sort of the very easy kind of make a sidecar but with the new article and showing that you can kind of describe what is happening to the tables underneath that hopefully is a low enough bar to be able to describe an a legacy system in just enough of an understanding so that you can show how that information to interacts with your sidecar solution so that's going to be the third article in the series and and it's a big part of the book as well so so there's one okay any more questions or should we get going no you want to really extract a lot of their stories out of one a model an event model is really kind of like your big book so you're going to look at the example of running the company for a year and you're going to show all sorts of things on that one event model now within the event model you may have multiple streams where we have major differents different types of workflows shown by example and you're gonna have the details with the given when ends for how a complicated report may build up over many events as they accumulate those are all things we're gonna do live to show you right now how to do those things so what was the last question that was something about stairs yeah it's gone but I have one question from YouTube and I don't know what to say to be honest and it's it the question is from your experience how many projects have you seen being at whatever that used the event modeling an event sourcing well personally I've done them all with event modeling and now with event sourcing with a few caveats here and there but I bet the whole company on doing things only this way because I want that predictable cost curve I do not want to run a company with people telling me that oh that developer is not that good you know why are we paying this much per hour I want to be able to say look this is this is a command handler and it's specified as best as it can be and if it's either changing information this way or it's not and so I can pay a fixed price to the consultants for that and if they're really good they're effective rate of pay is quite high because they're doing these very quickly the flip side of that coin is if they screw up and they're going fast because they want to make more money they're gonna make mistakes and they're gonna have to go back and fix things for free because that's part of the contract on a fixed cost is that if you do not implement things according to the spec you are going to fix that that omission for free so it's a self checking system and that removes the entire nightmare of outsourcing work or even internally if you have employees of how you manage effectiveness of people without being subjective it's like I don't know I don't like that person or I'm a prejudiced guy and I don't like women or something there is no room for that if you have a very clear set of goals as to what success looks like so this has been an incredible enablement for removing all subjectivity from success well not all but in terms of orders of magnitude I would say all it's a different league entirely and and so I've done these types of projects for since I met Greg young in 2008 and now professionally as as my company has done this since 2015 as a way to run an organization only doing requirements this way because this is our requirements dock this is what happens the invoices at the end of a project are like a receipt from the grocery store these are the features you bought here's their price and you could at any time you can go to demo dot your URL and try it out and see that it works there is no there is nothing that's hidden between the in between to see you know what quality the work was done in or whatever so yeah I've done a ton of these projects my default to event sourcing by all the time because you can fold into the other implementations if you need you simply can't lose but if here's another analogy you can't unbel an egg this is entropy so if you do an events or a system and do event modelling you're going to have the most organized system that I know you can possibly have from there you can make sacrifices after that but it's definitely the default I think a lot of people confuse event sourcing BDD and CTRs with really heavy large-scale systems that require a lot of infrastructure code and that's what they're spending their time but as that little shell script that I alluded to earlier shows it's just a way of dealing with information it doesn't have any opinion on your technology stack or anything like that and the big sort of FUD out there is that these systems are inherently more more complex and they're not crud systems are incredibly complex immediately because you're introducing people that are non-technical to foreign key constraints and other things so it's all been a kind of a BS campaign to smear event sourcing and CQRS and these these guys will have it like people will come after them for setting them down bad roots and misrepresenting what they could have had if they actually adopted this a lot earlier so there's a lot of smear campaign saying I only have a credit application well what does only crud really mean they're really you know not representing how what crud means in terms of the details of implementation you want to explain sequel and/or MS to people you know lazy loading and all that crap I don't it's a lot easier to just start an event in move on me thus what technology I used I use the file system I just hate I put the event on a file system I did system dot IO filed out right there's your there's your JSON I don't understand what's so complex about that no no but I think it's it's well you know if they think what they know that good at selectively in doing that the other way of doing it then they think it's complicated and it's well there is a bit of complexity involved when you talk about like devouring when you actually build in production system I agree with with both of you basically when you g where simple thing you can write in valhalla system you won't do it in a production right so you would have some piece of instructure he needs to wire that together sure you want to have wave models you need subscriptions you need to monitor them you need to trace them you need to put metrics absolutely good traces you need to put metadata you need to see the whole flow but it's very beneficial and I'd say that's actually essential complexity reveals still because all that wiring as soon as you've done it once and there is no magic and that's fascinating part because we're done we're OSI in terms of complexity it's an OSI it's a constant then people just like to slide that under the under the rug once you do it once it's the same and that's why exactly we approach systems it's a separate statement of work for infrastructure and a separate statement of work for features and so if you want to ramp up and you want to go from the developers machines onto your staging environment that's gonna if you don't have an infrastructure you're gonna have to write it but the features still work hmm yeah you can scale that up to five billion people your state transitions are still the same mm-hm your command handlers and event handlers do not change and what do you need a production system sort of deployment once and you have all the wirings in place in create set of libraries and tools to do that to facilitate it just keep it and you repeat and repeat the problem with things like oh Ram what I experienced is basically a lot of magic involved and there is no guarantee that the magic will work next time because next with a new value object in your schema and suddenly everything breaks because the energy framework by the core does a sport out kind of out of it it's even more fundamental than magic I think it's the the idea that you can effectively share state let's move on let's get into actual event modeling guys so I want to see who can who can actually lead please arrange in the slack channel just one of you say that I've been in one hour here and that's my time to drop off I really enjoyed the conversation thank you very much locating the yeah thank you you chairs bye-bye see you next time thanks a lot see ya so let's too bad we don't have Alexei he'd be a real good host for one of the sessions but we'll we'll do our best to to start that ourselves so if whoops wrong one this is our group here okay let me go in my phone because that's probably easier right now I'm trying to do this all right so we start off with a blank screen just for the purpose of the exercise and you can have one event that you're going to start with so what what specific domains that people want to try if we go to that slack Channel [Music] yeah we have quite a few people here so I was gonna say to please make suggestions for domains insurance yeah insurance is good although it kinda tends to be document heavy and we end up looking at managing documents and splitting the splitting them up into areas so I've done a few insurance event models and and they I guess if you keep it on the work flow the high level work flow of people going through claims and all that kind of stuff it can be useful I just kinda gets boring with the document management but at least from people that are experts in insurance it really gives into the weeds pretty quickly so if you want to keep it at a ignorant level from consumer perspective that might be a good way to do it oh sure let's do insurance and how many people do we have that can actually do lead a team because I'm gonna work with a couple of people here on the hotel thing because I'm used to that and then some other people can follow the the sort of guidelines on other domains so if you go back to the if you go back to the article let me go back to this you can follow along by doing things in these steps right so if you go to here first of all we want to brainstorm all the different events from from your particular domain so if I'm doing the hotel system I'm going to definitely have some core things that I want to do such as check-in right I definitely have people checking in so we'll do in past tense check then and right now we're not gonna elaborate on the information in there although you can we can start saying that you know we can say user and we can do in Jay Smith at aol.com and of course we all kind of need what other things do we need to know when that event happened obviously we want to know the room type so if they want to king bed or whatever we're going need to know when they want to you know when that booking is actually no we don't need to that we just need to know a little time probably time this is a checked in event so time whatever however when someone reserves so already we have another event that we need to put on in here and that would be something like reservation made right and that's gonna come before that's it's the same user it's in the opposite order but we're gonna organize that later so just use J Smith for now emails make great identifiers for users so we'll just keep going down that road and start we're going to have something like 20/20 in the summer and xx and I guess I'll just do it easier to read so we did length five days and that's it so we have those things that's how we do a whole bunch of events I have a touchscreen so it's easier for me to zoom around to move things into the right order so if you have a touchscreen feel free to help out by doing these things very quickly and in mero make sure to add this wireframe although we can just use squares for now if you don't have that and the stickies are kind of your important thing here use orange ones for orange or yellow will do for for events I'd like to use yellow recently because they're the most available stickies in any store if you're doing this on a physical board at home for yourself or eventually when you're back to an office so you can use them as yellow and that will make it easier for you to actually find physical ones and that's all you kind of need to start so here we can start to add the name of the page and this is all the brainstorming point I feel feel free to mix all the first few steps there if you want something more guided feel free to to separate them out but in the interest of time I think you can compress a lot of these steps together so think of a storyline to remind yourself you can add a line to make sure that we have whoops I'm during this brainstorming are you just pretty much dumping knowledge and not really yelling about the event name okay you're dumping knowledge but you're discussing as well on your slack channel or wherever else as to why you want a specific event or if it's out a scope for your work or start to discuss the details that it contains like the data that's in it so I know that right away I can show a middle of a work flow I'm definitely gonna have a few more of these I'm just trusted pressing ctrl D to just make a few example ones and I can start to give them you know titles that will tell me what it is such as a book room and there I can show that I can have a drop down written I drop down combo box and so I can do combo box for the type type and then of course we can do how you like this I can't find or you can also add that to Miro so we're gonna use a better one this is kind of bad but anyway point point made this is a calendar that we want to use to do the start and end dates with time of stay and then of course we want to add a button I can change that to be booked not reserved okay and so that if we want to do a complete event model would need a command which would be [Music] command we want to show in blue and it's an imperative so we don't say we're busy the reservation made we'll just call it make reservation and sometimes you have complex UI so what we want to do is show that which button specifically on a page was used to to create that command and then when that command is successful it ends up you know doing this and then if we have you know your itinerary maybe is your second you know it kind of spit Co to your itinerary for all your bookings of this hotel site so I want to quickly show that I have however you spell that whatever of course we can make these a lines you see that mural does a lot of nice things like alignment for you et cetera and here we can have perhaps just some boxes of your specific stays that you may have had why am I not able to duplicate this all right there we go so those can be your stays and so if I I can have a view called future reservations or yeah here I can show what information that is start and etc I can actually show a table if I want here obviously the views are a different color because we're showing information coming back out and this is going to obviously come from this piece of information so you can grab this anchor and join it to here and then we're gonna show that this information that's shown in this particular case for this we can organize it and group it especially if we have a composed UI of multiple things we want to show exactly which parts of that UI we're interacting with so this is the basic flow and over here we can basically move on we don't show any actions from menus for example if we show a menu action we may want to abstract that to something that just shows me clicking on a menu if I was to add some menu items why not actually do that as an example because a lot of people ask well what about an action that doesn't do anything and people are just moving around this is by example so we're not changing the state of the system let's just you know add some things such as a menu item for let's say I don't know what could we do I have another booking or mmm let's log out for sure make sure we've done if we have a logout thing for now we can show that later on the year we actually go there but over here we go back to the login screen so into user ID or email let's just use email it's easier email escape and password so I can show that from this particular click these little anchors are really helpful because we go to the next part and you can use this handle to just move it wherever adding them can screw things up a bit so be careful how you use them there we go that shows that we go on to that so let's see where people got to this is the basic workflow for an event model and later on when we have payments you can add different events to different subsystems over here we can have a payment payment made for pre-booking so I guess maybe some some hotels give you a discount you know 15% off a few or 10% off if you allow them to charge your card ahead of time we're looking for reservation or after reservation okay and here we have amount user not in this order you can change this later but yeah here we go so that's about it and we can have swim lanes and all that does that make sense to you on any questions at this point about the setup of all that so we have a few people online that have that have some experience and they're sharing some mirror boards so if you go to the slack channel hopefully you have organized yourselves into a few a few of teams so questions there so deep sorry no no go ahead when you're doing this with with the with your group are you really using the domain experts or the business folks to try to gather these events rather than engineers yes well they're both they both have to be there so they understand one another so one of these things is that we're online together with people from all these different disciplines so if a business person is talking nonsense or something that would be really really bad from the technology perspective like they're claiming that they can have you know instantaneous essays and things like that you can tell them though instead of six months down the road so you want all of these different people participating from all different roles and that's where you have that ability to to basically have any kind of future meetings removed so one of the things that that's really good about event modeling is having that discussion months and months before any of it comes up in implementations that you're not really heading misunderstandings when it's really too late to do anything about it or introduces a significant amount of waste or rework does that make sense wow that makes complete sense I think the mental model too for all engineer some parts I mean I think it's tremendous yeah so the idea what I wanted to show you is just how quickly you can do this right I got a core part of a hotel system explained very quickly and as I this is why people kind of scratch your heads wide are you talking about you know the small design upfront and why is it only taking an afternoon because it literally is this and if someone doesn't understand why we need to go through and explain it to them or have them explain to us why we don't have it right this is why it's the the meetings layer you just destroy future meetings you just like none of the agile stuff really starts applies anymore certainly your your planning poker and things like that have place a lot of the standup is just ceremony it just goes away because you know where everyone is and what everyone's working on they're taking these vertical slices of this event model and working on it I may be working on this blue piece and the and the screen that feeds it I can immediately create you know something like this and and say that Adams working on this particular piece right measure screen shortly because I have a miracle where some people are participating so that's good to show that you can actually collaborate online yeah absolutely so I have Rafael in here Rafael can you add some things yes sure I just you're making me do all the work just share another screen but then we can go back to you in two seconds yeah you can I'll stop sharing yeah sure but I was gonna show Rafael doing something at the same as me okay so what was the question well no I wanted you to add some stuff on to the event model well I can I can get into it in like five seconds or so oh look at this it has a processor mmm it's just scratched off with where we call it 2 min 1 & 2 & 3 I don't know if people are actually doing something but at least you can see them who move around I mean down here you have a chance I try to ask him something but they don't answer I don't know why so sometimes when someone's made something I right-click on the I right-click on an event or a screen and do a comment watch what happens when you do that so right-click on one event and do add comment and I write something what is this I don't think they should be giving you a bill anymore they should probably be giving you this for free that's it so now now watch once you've left that you see these these are comments they start to pop up and if you haven't read them they have a unread thing which is really cool to show hearts as they're called in events storming where people are discussing things like that thing needs to get some attention because a lot of people are talking about that event or that part of the work so you can go in there and start to answer and clarify things but also make sure to keep the event model as clean as possible and clean clean out that junk as best as possible when you're done with it of course you want to of course you want to keep some good dialogue in there if it's if it's pertinent if it's just superfluous you want to definitely remove it so it's keeping things you know as simple as possible that's great and I think we had a one question that I got online beforehand that I wanted to answer we can also stop go back to your screen and then show your interaction because then you can give a better explanation so I'll stop sharing but at least you get an idea oh yeah more collaborators can know that's great coming walls so if I Ain't just share this right so adding some stuff please add the text fields for the login screen Caesar FL was working with me but I wanted to show just before we quit here that I want to you know maybe use a green color and I want it to be not very not in the way and I want to have some text to it I can get gonna add text anyway I can basically say that anything that's green it's Adams work I'm working on it right I think you can also bring forward and page up page down yeah so if I want to move this to the backs I can you know have things still movable here I can do that not gonna walk things as well so Miro and these these different tools they have all these nice facilities for for doing these these things but maybe you can post the link to your mirror board as well yeah I mean this one's pretty trivial I'll add that later but it's okay so Rafael is doing some really cool stuff because what he's doing is he was adding it I'm not sure if this is gonna be here I wanted on the same one we want the separate users no now we're fighting okay cool but what he's doing is adding the manager for the hotel probably at the top so the workflow as to what screens the manager sees over time are done in a separate in a separate place so yeah he's adding them all the actors here which is really good but what I wanted to answer is that a lot of systems don't have UI and so what we want to do is we want to enforce this cadence to having this cycle of only of only having this type of circular movement through information and so if you have something else entirely not user facing and some things that are maybe complex thing soever fellows already doing it perfect these are processors which will show that and the other thing that we want to do is always have what Rafael is adding here those commands and events that basically form the pattern for something that's automated and that menu also want to give a name to to the processor so that you know what's going on there's a good example one client we had a very complex thing for finding a bad word checker so in the messaging app you certainly want to filter out nasty words or spam and other things like that and it gets really interesting if you multinational company need to do this for different languages so while it looks like it's just a simple command that says send message underneath it the filtration and the type of orchestration to be able to tokenize the message identify the bad words or at least set up dictionary for localization there's quite a few things so even though some of your events are not stored and some of your read models or these views are not evident and they may just be variables that never gets put on disk you want to actually event modeled on that showed that we had one variable called tokenized message that's actually a view into that original message so you can elaborate complex complex processing by applying the same approaches and not really seeing that even though some events don't get stored or some views are not materialized they still exist me still explain the complexity of the system so in that you know the if you take this at face value and you know events are stored to disk and materialized views are things that are database tables then you would say oh well that's really easy to implement or whatever from the business perspective it looks like it's gonna be you know one event handler and one command Handler and yeah the people are working for a month on it no that's because they didn't actually stretch out that logic overtime they didn't actually add any specific they didn't add any specific details as to what is happening with the state even though that you don't care about the states it's transient because either that message went through or didn't the logic and the amount of work that's going behind it is it is managing the state of that message as it gets filtered and changed and morph to be able to accomplish that so a lot of times what I will do even though something is never seen by a user is I'll put in admin screens so I will take one of these screens here and and I will even those if there's no actors such as nada main or whatever I'll make an admin screen and I will add a dashboard and I will show how these dashboards are are are changing with what's happening to that invisible process for the user so long-winded workflows for credit card processors and things like that user never sees that and even the administrators or managers at the company don't see that the information may and might end up in there and the sales record or something at the end but I want to add even though we might never implement that dashboard I want the event model to show and what's going on and for people to understand and the reason that the dashboard is important is because a lot of people are visual and they don't care to look at a bunch of stickies with writing they want to look at screens as to what's happening on that so this is much it has a lot of similarity to to a movie storyboard so you have your your your keyframes at the top to show what scenes are going on in the movie but down below is your plot as to what the story's about hopefully that makes sense quick quick question on that there your reminder you've got it in the swimlane at the same swimlane of what of your manager how strictly do you enforce the swimlanes and should you rather move those other processes up into their own storm lens no the processors should be in the lanes to which users they affect the experience of I try to do that the processor it's really the data you want to concentrate on where the state is stored that tells you where your boundaries are for your subsystems the other stuff is just helping that out that's why I say with the rapid event modeling where you only have screens and events those other things don't even come into play I mean you might have a processor in there to to show something happening as well but I'm hoping that that helps you understand yes so would it be a case when you put it the event model like where you have the GPS coordinates being inputted or some other system that was throwing events into would you ever draw that below I'm sorry again I cut out there for a second sorry would you ever put that a process or something like that in the same place when you had the GPS coordinates coming in as events in the bottom would you put a process or external subsystem inserting that's in the I world I wouldn't I wouldn't do that I would keep the swimlanes to just have the events because I want to store I would really want to be accurate on and undistracted in terms of how state is changing and so I mean I would if it's getting too complicated too vertical like it's just too many lines and getting hard to navigate I would really think about collapsing some of those and having separate event models for a sub for different subsystems that's I think when you know some of the original things that I like say raised in the initial part of this conversation that's where he had that made that point to to only do internals of a particular subsystem I definitely that if you're talking about a really large company at some mostly your only option usually but I mean we have everything from startups to to to anything in the middle so it's a it's a different range I think you would want to split things up if you feel the need to actually put the processor down below the processor is really there to show that there's an interruption to the workflow visually does that make sense yes it does Thanks I wanted to show one thing real quick visit before I forget and this is this is something that our friend has been doing over the last few months let me see if I can find it well okay there's quite a lot of trying to find the proper youtube link I'm just gonna pause this and I'm gonna share again so you can see this sure yes so this is Chris who's doing a lot of awesome stuff and he has quite an awesome channel showing the implementation from event modeling to actual implementation in a domain driven design event source type of application and if I go oh it's cool Dave okay that's mr. dev but it's go dev here for some reason that's why I couldn't find it but if you look at all the videos it's insane how much work this man has put into this it isn't polish but he does to change things to to English and Italy can see so you can yeah you can see he's doing in other pieces five minutes but I'm but he originally started with with event modeling just for ideas sorry I've been storming just for ideas and then so that's where you can see the ideas starting to take shape and then initial attempts so it's kind of nice to see how he has slowly evolved the approach from just trying it out for himself and then getting into some of those core guidelines and patterns that would spell out how to get that cadence that's needed bit by bit and then obviously slicing up the work to show how you can change how he can assign different work items to different people to do that and then slowly looking at this beautiful sine wave that we're talking about and the application that he designed was a Pomodoro timer location with suggested break times that a very and pretty cool features so you can learn polish which is pretty hard but you can also just follow what he's doing on the screen and yeah I'm hoping that I can catch up with him and and do a English Polish version that's condensing all of these five minutes you know video video blogs and yeah of course have a have a two hour one where it just goes from start to finish and we can skip the mistakes and kind of show the ideal world of like if you've done this a few times you know how it happens so he's even going in like in this particular one and number 82 he's doing the given when thenns right below which is kind of neat is just kind of what we're what we want to do a lot of times and then later it just it just gets into a lot of the implementation which which you know there's a there's a lot of fun stuff that is doing with with sort of event type of technologies etc it's certainly the opposite of my of my shell script which is very simple on purpose so we do have some of the traditional stuff that you'll remember from from DDD and CTRs things so we're gonna provide the link to this in in the video notes and and hopefully people check it out and then which is kind of nice anyway resource oh yeah and there's links below I believe for everything where are they I thought there was links below each video I'm sure they're in certain videos there's a link to all this stuff oh yeah so if you show more there's the mirror board and all the other all the other stuff for for the actual implementation so I don't know if it's got a youtube link sorry the github link and let sure if there's a github link but sure it'll be updated so yeah that's really cool sorry Chris maybe you can talk about it how long have you been doing and how long for 140 days I read every day's yeah so getting close to 5 months yes almost 5 months today so no matter what happened no matter where he is he doesn't miss yes five minutes every day it's been like clockwork it's crazy yes I have my Pomodoro timer yeah yes every day I work five days sometimes longer because when I implementing is really hard to break five minute because I something's right yeah sometimes he goes on for way longer than five minutes because he's got to explain what his gonna do and then what he did and then he's in the middle of something he doesn't want to stop and put it down and just cut it off so it's it's a lot more than five minutes they would say it's more like 10 minutes each time but yes but I work on fighting yes it's getting late so I think we should run off with those questions we have left yes we should answer some questions and we should go back to a shared board of what people are doing and continue to build this out and I hope that we can continue on the slack channel especially the people that are in better time zones yeah and continue to explore some of this and continue to do this can you see the questions if you open the questions in a treadle yeah Q&A okay so is there a common thing that you find that mistakes that common happened across people trying to this that you would recommend to look out for yeah events are not things that that don't change states a lot of times query the sales report is not a is not a command it doesn't change state things like that I think people want to have events kickoff specific things let me just share the screen again here and I want to make sure that people understand that it's really important to have that cadence because it's worth so much this legend here tells you that you cannot have an event kickoff a command directly that's the most common mistake you need a reed model that to do lists of what a processor is supposed to kickoff for you automatically ie you have to be very explicit about automation I think it's always been under described in all sorts of different approaches and we make it a point to really be explicit about any kind of automation that happens so we don't want to short-circuit anything that says this event happened and then it kicked off this command and then this other event happened and this event kicked off a command we want to know why and how it got kicked off with using what information so these to-do lists are views for processors to understand what they're to do next in terms of automation that's a big big problem that I see when people are coming from other disciplines that they just ignore this legend here this bottom left corner is very important we want that cadence we want that cyclical pattern to show how information moves up and down in the in the system so that's what a textual mean I only realize that now that you can only go from this state to this state you see yeah that's a that's a good thing to remember yes yeah it forces people to be explicit about stuff that they just shove underneath and this is where complexity can hide in systems and you will not have it in your scope and your project is jeopardized because you've superficially glossed over unimportant implementation yeah so let's go back to the questions can you speak to how event modeling supports composable design of flows and user experiences right so the reason we want UX and UI to be at the four most part of event modeling is so that people understand when they have especially single page applications these days with react and react native etc you want to show that certain pieces certain buttons and you can get very complex like trading systems they have a whole bunch of buttons and usability on one screen that kind of stays the same so what you do there is you directly link with those arrows just like here we have a specific button going to a command you can imagine that this specific screen could have a whole bunch of complicated stuff you can gray out the things that are not at play and still highlight the things that are part of this workflow in terms of focus so it's really important to make use of this UI to show how the composable UI is being implemented and what information that's getting and where it's from etc I hope I hope that that explains it so and user experience is key again it's the very first thing I said events are the things that tell the story and that's what's going to be stored in people's heads as they use a system so even if you're doing the traditional so the traditional system like the other our article shows the events are key to showing what UX is what that user experience is like and event changes so so there is many approaches to evolve events a good example that I use all the time is basically adding your bookstore and/or a video store or something like that and you have to have all the sudden age-restricted content so you now for your registration wants to add ask about the date of birth of the person how do you do that when your systems already been running for a year you can add another event which is called you know date of birth provided you can change the event to be a version two which now has a property with the date of birth now if you want to get into event versioning there's a whole book by Gregg Young on and on the event version which goes over this and a lot more other things such as how do you migrate systems to two new ones and all sorts of things around making mistakes with previous events and how do you have you do that but in essence they are immutable and they are stored and you should be adding new versions of an event if you made a mistake or even if you have new requirements and then you provide a map from the old to the new so that when you're implementing your solution you're always you're not implementing for too many different types of events and other aspects of the system you're only keeping with what the current system is doing and that mapping from old events to new event takes care of that but you certainly don't rewrite them but yeah definitely there's a opinion on the whether you should change the event or just decorate your system with additional events that provide you that extra information and that's really a business decision that's something that you have to discuss with how you're going to deal with the fallout of your changing requirements with business so maybe your business forces users that log in to go provide the date of birth or maybe your business doesn't allow that and you have to basically not show certain books to people that registered you know earlier and just give them a notice or something or email them about it that they have to go to the profile screen and and change their you know provide that information themselves so there's lots of lots of ways there's no one right way and always should go back to the business how you do that eventing and using events as a source of truth should be amicable to whatever strategy you chose I hope that answers that question yeah maybe you should read them out loud yeah sorry this is how do you yes how do you deal with event changes reservation mate has a has several fields what if you know what if they're not required or if there's new information related to this event so I use that examples like okay let's try selling books and registered event is the is the one that needs this new information like date of birth for example so there's two ways to do that so the question was about whether that you use small events small events or you know add more information to existing events and make them larger events and and again unfortunately it's this thing that happens quite a lot is it depends is the answer but I don't want to leave it at that I want to qualify what it depends on and it may depend on things you know as I said if it's okay for you to force people to go back and update their profile or whether you just stop showing content because if you stop showing content to users that don't provide that and you kind of don't forcely usually do anything then you have to obviously change some of those views in your system and that's gonna have impact as well on your scope of how how much it's gonna cost to add this functionality right and that's why the event model is important because you can show that to your business and to the developers that this is what's happening at this point when we want to add this particular feature so I hope that answers that and then we have if a reservation sent an email on the reservation made event how would you represent this on the diagram okay so if you made a reservation you want to send an email that would simply be a process or any automation is done via one of the four so event modeling has four core patterns this is a state change stage of view but then we have the same thing in terms of input output but on systems a system so if we want to have external inputs such as subscription to the GPS coordinates we do it here but if we want to send an email that's external State out but we do this with these to-do lists here so our payment processor is the same as your email er so it could live this this green piece here could have this green view could be listening for events for bookings and this could be on registration email or is the name of that processor and then that would basically have a command that would use this to-do list to then and emails to different people and your event would be emailed sent to show which ones have been have had that happen this successful event would obviously mark this to-do list with that item having been done and then this processor wouldn't pick it up the second time around so that's how you would represent a reservation email sent this is a very good pattern to study it's quite nice it decomposes to a certain amount of command handlers and event handlers that you can then use in your estimations when you're doing requirements for any kind of automation so that's that that one next one is where do the email addresses at the blue sticker come from I cannot see it on the screen on the registration part so is that on my that's on this one here so okay when I did this what I had is I jumped right into the event model in the middle of the workflow I didn't start at the beginning I went and said the most important thing is booking so I'm gonna assume that the boring stuff is gonna happen later and I don't want to event model that right now but yes you are correct that is the power of event modeling to show that you are not information complete here so we don't have a complete event model I do I am using a I am using this which is J Smith and I have to ask myself yeah where does that email come from does our system account for where this thing came from and so this is where I would use that completeness check to see that yeah I don't have my full requirements this system is not gonna work if I implement it with this as their time so I want to go back and see where they register so absolutely this this particular question about where do the email address if the blue sticker come from so the blue sticker obviously is I'm not sure which one they're talking which event while they're talking about maybe it's the one that I showed at the beginning but it's in the screen maybe we were talking about the top of this article here let me just go to this one and if we look at where does the email come from because it's a small writing I have to press this oops sorry for the small writing it's here right user registered and you can see that it's here in the traditional system so the screen has the event that this is the the UI that was responsible for putting that information to the system on mine here I didn't do that yet I didn't go back on to the left side far enough to show there the registration part of the workflow I hope that makes sense okay when do when revenue is per feature but resources are paid monthly how does one minute resources to cost well in in that case if you're in this traditional development you better have people that are obviously building those slices fast enough for you to be able to make money and keep your company and in in the in the black or you're gonna go broke if people are getting paid too much and not doing that so it's a way of actually getting your true velocity and true costs it's kind of looked at the other way however if you're a consulting company an outsourcing company you can do that by passing them directly on to the people you subcontract because they're not done by the hour they're now done by the actual work so that reduces a lot of risk but that's how we would that's how we do that so yes absolutely this cost per per slice or per command Hendler per hit for event and there is a really good anchor point for velocity in a traditional company so this is where you would measure your velocity and you could judge house how fast someone is or how slow they are instead of believing what's on their resume or believing on what these you know what they said about how good they are so it shows you empirically their rate of output so revenues per feature but costs are paid monthly yes so so that's kind of how we do things again you probably some of your core people that have been you know we have you know one person that has that ability our CTO is incredibly fast and all that stuff so they're in a regular kind of payment there's a couple of people that are on regular payments like that you know core team but then anything that comes out to to be extra help you want you want those people to hopefully be ok with these fixed cost measures so it depends on your organization hopefully that explains it next question is how strict are your swim lanes for your roles and many exempt look process or email service what does a swim lane to know that one shouldn't shouldn't those systems and be below the commands views the reason I have the processors up in by the UI is I want to show that the little spinning circle that you see as your payment processor is being is working you know that that's the user experience so that little processor and gears are up there on the user experience site to show that there's automation happening underneath obviously you could put it somewhere else but I think this is the best place for it to show that there's an interruption in the regular SLA of how quickly the person is able to see the next piece of information on the workflow right it's a lot easier to discuss things with everyone from business all the way down to implementation that right now there's a pause or a potential pause anyway as the payments getting processed and it's always it's always a good idea to go to the payment process for example because that shows where you need to show the delay which is the user is waiting for the syndicate process so that's I'm not too strict and that's why I want the guidelines for how the implementation is actually done can be glued to where the event lives down below that's why we use the bottom swimlanes for organizing the subsystems themselves or domains if you will I hope that answers that that questions so yeah that's why I don't I don't put them below what are some of the examples of domain cases that you would not want to event model so I would not really want to event model esoteric things like cryptography some mathematical things but the premise of event modeling is that we are looking at the water molecules in the snowflakes really not the fact that the snowflakes are different so I've been only adding more and more domains that are that are serviced by event by event modeling it's the idea that information systems aren't that special it's really what we had with pen and paper and that you can show the same types of patterns throughout every single insurance company every single online banking every single shopping cart and every single online store they're all doing this kind of stuff you put something on the screen you submit it it gets stored somewhere later on that information was used in another thing and so going back to that famous quote from Fred Brooks and so if you understand and do that this is what your information is supposed to look like over a time line that is 90% of your guideline as to what success is and I think we've been just sitting too much in the how instead of the why we need to know about the why and thank you for Jeff Doolittle from Oregon to really make that point we had a call yesterday and he he definitely showed me from his perspective why the industry's really infatuated with the how where we don't even know were the Y or the what you know and this is answering the what we're really knowing what it is that success looks like at the end if we have this time line with information changing like this over over the course of running the system and if we can show that the other system is doing that then we'll we will have that so so yeah the domain case is that I would not want to event model would be something esoteric like non information system which would be some some calculations in math or science maybe kernel development even though you could probably event model quite a few you know Linux kernel things but that's definitely something I wouldn't be starting you know exercising Deven modeling maybe it maybe we'll see certainly seeing how moving it further up in terms of business process description it's quite applicable and I'm thinking that next year we'll move it entirely out of the technology side as well just to be able to have companies talk about their business processes this way because the same rules apply they're still talking about information and if we can show that by example over time that's the key if you can show it by example over time and focusing on data then this is what event modeling is built for hopefully that answers Sam's question and last question here if an event cannot directly be linked to a command how will you design that in the pub/sub system where the processor is to perform an action as a result of an event that listens to so the good example in the article is where we have GPS coordinates coming in from a phone in our hotel system the feature is such that you will automatically get checked out of your hotel if you opted into this thing where your GPS coordinates are published to the hotel system and if you're far enough from the hotel on your checkout day the automated checkout process should automatically kick in and that's a good example of where you show externals coming into the system and one of the fundamental sort of points of view that that helped shape a shape event modeling as it is now those systems thinking if you just do some reading about that subject on Wikipedia it means you need to be a hundred percent responsible for things that you control it's a closed system you have a very good idea of what your boundaries are on your scope and you can see where external information comes from and absolutely this is a one of those things where we would design that by showing that event in a separate swim lane but that event now translated and then listened to by a reed model that then a processor listens to and then sends a command so that's kind of the standard pattern for externals and in other words there's a reed model that shows the current you know to notify for checkout and it would have the logic listening to the GPS coordinates coming from each hotel guests phone and once that was past the threshold it would change its status to please send them an email with the check out stuff for this for this guest and then that would then the processor would pick that up send the command when the event for successfully sending that email comes back the event would then also update that valve you to then not have that as a to-do item anymore so that's the standard process and you can see these in you can see this in here this is the reminder which is a similar thing but imagine another swim lane down below with GPS coordinates or external assistance so so that is the exception to this rule that you that you show let's just go back to let's go back to all posts and I guess it's the caveat to this rule in the lower left-hand corner where some events are coming from commands that are external in a system that you don't have so that's that's something that you need to do you need to start somewhere so it's a circular diagram so some of these don't have any arrows pointing to them like the initial web page that you see in fact going in doing an event model with all the information accounted for you can keep going to in the left direction all the way until you specify the installer with what the initial values are for your for your config fields so you keep if you keep going with this you can specify all the way all the way up to the Installer of your software I hope that answers that question but yeah it's an important one so any more questions from YouTube and I'm going to send out a questionnaire to people about this event and how they how they found it if they have further information that they want to keep in contact and you know get get in line forward for the book that's coming out and all that stuff I'm gonna be sending out a quick little form not through Google it's gonna be through next cloud so your informations gonna be safe and sound and on our servers in Canada so some questions from YouTube one question from sighs Joe Schley Sargent back on versioning but to make those versions explicit in the diagram I mean that's interesting if so how would you do that so we would have an example and what you want to do is you want to update the event model to use the latest events however part of the specification could be another workflow and when they go back to my example of having adding the date of birth you would show the scenario of someone that's already a user that's coming into the system that all of a sudden can't see some of the content because they provided they weren't asked for their date of birth and so there you would event modeled that part but you would certainly update the your main event model to use the latest versions of events so that you're not over complicating things and you really want to simplify things so you're always working with what your best understanding of the domain is at that particular moment and and you keep you keep track of the versioning with maybe extra event models that show how you handle the situation that someone that's already a user now has to be taken care of because they never had the opportunity to provide their date of birth okay this is another question here from nitsa sort Adam would you have an example of how you sub out a job that's in an example of the specs what you expect back oh spec out a job of someone that's gonna work on one of these things yeah so the nice thing about the event model is that you can get into these given when dens that sure stuff has kindly provided examples of from his own experience but generally it depends on your organization as to how fluid they are and and how much informations are for example we had a point-of-sale system an inventory system where the really the specifications were up to us to really implement correctly as long as this thing allowed to sell products and we saw certain certain reports we left it up at the event model without going into a lot of given when thenns but where there is more scrutiny we certainly explode those in a bunch of given when dens and those are pretty interesting because for something that's highly highly complicated what we do I'm going to use this as an example if I have something that's complex I'm going to use kind of what it looks like by default that's my first given when done with no previous events and then I'm going to have a whole bunch of previous events that can happen if I'm just pretended you're different we don't have time to for me to edit a whole bunch of stuff right now but what I'm going to do is I'm going to basically continue to stack up the situation as it evolves over time to explicitly say how that complicated view down here is building up so I would have and we did this for a trading company which was really really key one of the hardest hardest sort of screens that they were working on was a traders dashboard and it kind of was a living report of what's going on with a particular trade and the best way to describe it was this basically your first your first scenario is what does it look like by default what happens when the first event happens what does it look like then what happens when the subsequent one is in there and so on until you've gone through a whole scenario and in fact what if the managers view also has to change we can reuse that specification right below so we can have two different reports being specified how they look like in a certain situation and in this case would be one two three four five six it would be twelve unit tests that you would have that would fall out of that specification but it would all be tied to you know this particular workflow piece so we would basically say that in this case we are describing scenario 1 and I can put that here to say that that's our legend so as I have my main workflow explained here when I see a big number like this I go below and say oh this is how that happens right we actually have two things so we could we could basically have one here and and if it was you know if it was this guy here if we had this one described here then we could have that legend be here so in other words here's how we show the mean workflow of what the happy path is and what we're supposed to see in terms of what the system does and what people are experiencing but here is where we can explore in detail what these two specific complicated pieces are doing right and you do have a usually when you do these projects you're taking the most important interesting pieces first and they're gonna have the largest amount of these scenarios and as your project continues you're gonna have the boring stuff done at the end like the logins the the sales reports the logout all that kind of stuff is going to be very easy and it's gonna you're not even gonna need any given when ends it's just common sense of how you're going to support a screen that's gonna show you have successfully logged out do I really need to have anything for that no so a lot of times the event model allows human beings to use their common sense to fill in the blanks and that's why by example is incredibly powerful it doesn't it doesn't force you to do the same level of scrutiny for everything and I think that's where a previous attempts like UML and other frameworks fail is because they have this discipline of doing the same amount of rigor for stupid things that are absolutely a waste of time there was actually a question from the chat yeah but that was how would you compare p.m. that must be event modeling to bpmn and other workflow notations maybe you just said it's yeah what is this BPM in any way that all of them are kind of killed but they kind of put themselves in a category of their own because they all embrace branching and they lose the entire by example unfortunately anytime you introduce branching you you lose that train of thought that your human brain is built for this is their Achilles heel all of them UML you name it all of them as the minute say well this is look however but look how accommodating this is to showing you all the exception cases it's like you just killed the entire benefit of having by example right so we have to see combining what Fred Brooks said with behavior driven and specification by example disciplines you have an incredibly powerful paradigm that is so close to or how our human minds work you mentioned error-handling I if I heard right but what about ever handling in the giving women things did you just show me their assess event so how do women tation specific thing it really depends on your I mean as Alexa alluded to I'm sure in an enterprise situation you're gonna have you know dead-letter queues and all sorts of implementation specific things for things that's failed in a lot of simpler systems you may just raise in there and just show something I generally don't have an event for the basic system I just put if this given these events you know if I do this as an example just quickly while we're still doing this you know we're running out of time and then thank you for keeping online here but if I have a given and I change this to a command so I'm gonna make this blue so it's a command if I have this situation and and I and they have and it's not satisfactory oops and it is not satisfactory I have an error in this case I can show know what this is out of the way come on please okay there we go I will just put a big what happened there did I just kill Firefox okay Firefox kill okay it's back I think I've hit ctrl Q by accident and that's just that's a shortcut in Firefox to destroy everything yeah okay no I don't want that to be the background that's also not what I want this to be good and they want this to be transparent and actually I don't want the background to be white I want it to be transparent okay so yeah I would have something like this with an explanation as to why I will and that's if I want to throw that event away of that failure and for those I mean you really have to ask yourself whether that information is worth keeping if you want actually for example keep all your attempted logins failures as something that you're gonna store or somewhere that's gonna add up pretty quick with all the hackers and things like that so however depends on a situation if that exception is worth keeping as a piece of information then you would certainly have a failed event but you would store it now again see how important that is to your organization in some cases it's if you have the storage why not just keep it really it's probably a feature that you're gonna want next year and you just don't know that you want that feature yet so this is about you know hugging this is getting into event sourcing rather than event modeling and we want to make sure that we keep the fact that these two are related but not not dependent on one another you can event model or non event source system but maybe we should round up here because it's getting late and okay so much planning I want to remind everyone to to join the slack to your answers didn't get new questions didn't get answered and if you also would please fill out the form that I send to that and these I can then hopefully keep in contact with you and send you notes and get some other feedback from you but be highly appreciated it helps this entire discipline quite a lot I think it's really helped me to get domain-driven design adopted in a lot of places simply because it allows people to not get scared by the fact that there's a big blue book and other big books about it and uses common common language and common sense to organize what essentially is going to make implementing DDD they're very easy so thank you very much for the opportunity to share that and I hope to be in Copenhagen one day I only pass through the airport recently in the last year I hope to stop by and visit everyone in person and anyway I'm online if anyone wants my Twitter is out there I think people know it and you can ask me there or any other place so thank you and don't forget about stuffs stuff as well looks really awesome and you can you paste this slack channel in here in case maybe well so I will go right now I'm still sharing the screen so if I go here and at the top there's a resources and in here there's a slack group with the link is a link so it looks like you can click this but this is just an anchor to the title of the paragraph if you want a link to a paragraph you use this but the link is actually here so feel free if someone wants to copy paste that that link URL for the slack group into into the chat or the comments of both YouTube and anywhere else wonderful meetup.com if you didn't get my link for the little survey thing let me know on on twitter and i'll make sure that you get it otherwise i'll be posting it in there in all the changes very shortly because one way I think we could go from here is to maybe a range smaller session will yeah maybe it's a little and then do real modeling unknown on those domains I mean it's it's a bit chaotic here but I think we got a really good impression on how it works it was it was a it was a tall order to cover so much in an hour and a half we can do a subsequent one where if you want to just arrange two or three domains we can leave a group and just try it out and I know that extra stuff has base code that we can use and we have other base code that we can just kind of get going a lot quicker and it certainly will have some of the familiar patterns from domain-driven design so people that are familiar or want to learn the range urban design on the implementation side can use it as a learning tool yeah that sounds really awesome yeah again thank you so much for the opportunity thank you for all the volunteers that joined yeah I don't think the I think I had a private conversation on this on the slack channel there was my company's one so hopefully we can click that out before we publish the video okay in yes thank you everyone for participating and for volunteering to support the vindens yeah explaining all these things so yeah once again thank you Thank You Adam for joining hope hopefully everyone uses this to collaborate more effectively well yeah that could be the whole idea right yeah yeah it's very it's very important to make sure that people are best or society in general is best prepared for these situations so that we can continue to function while we take care of the problems like that like we're experiencing now yeah super all right thank you see you get in touch everyone yeah yes [Music]
Info
Channel: DDD Norway
Views: 1,222
Rating: 5 out of 5
Keywords:
Id: hOmHfgzJnIY
Channel Id: undefined
Length: 148min 46sec (8926 seconds)
Published: Thu Mar 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.