 Hi everyone and welcome to DEF CON 2022. My name is Dorinda and I'm the co-moderator for this workshop. Up next is Eric Disha Bo. He's speaking about designing your best architectural diagrams. So Eric is Red Hat's portfolio architectural director and he's renowned in the development community as a speaker, lecturer, auto and baseball expert. All workshop contents is freely available online. You can find it in the abstract for this workshop on the DEF CON schedule. While the workshop is ongoing, you can interact with Eric in the chat here and if you have any questions, please write your questions in the Q&A section or you can request to share your audio and video for your questions too. Thank you and I will play the prerecorded video. After that, the room is over here is Eric. I think I have the URL scrambled so I think you can go ahead Eric and can find the video. No problem. We were going to play a short introduction but let me share my screen here. So if you follow the link we put in the chat, you can also see it there. You see here we have designing your best architectural diagrams. This is a free online workshop. This is all around our architectural tooling. If you go back and look at the session we did this morning at 10.30, it shows you kind of the results of everything that we were using this for. What we've done is put this together and when you get in there, if you ever get lost inside here, just hit the M key and it gives you a nice table of contents on the left side that you can run around in and jump through. I won't do that now. What we're going to do is there's a couple of phases. The first part here, this is an introduction video. That's what I'm handling right now so you don't have to go watch that or you can look at it next time when you're at home continuing on with this. That kind of introduces what's going on and how this works. You're going to walk through several labs. The first one is just going to introduce you to the tooling. All the tooling is open source based on the original draw.io.net tooling. We've redeployed that with a configuration on top of it that includes all the icons and the templates for you to use to get started. So this is going to introduce you to that. So all you really need is a browser. As far as I know, it works on pretty much every browser I've messed around with. The only little point of worth noting sometimes it will, because of caching, recognize that you have something from before. So it will pop up and say, hey, I found something. You can either say go ahead and edit what you found or you can say disregard and it will go back to the beginning and let you pick a template and start all over. You're going to do three different templates. And then we're going to look at the asset library in the color palace. This is everything that's on the left side. That's the second lab and kind of walk through what those pieces and bits are. And then you're going to start creating the very first high level logical diagram. And this thing is going to walk you step by step through it. You're going to have screenshots going to show you what's going on. And you can do it in a tab right next to it or split screen your stuff. And then you have exporting and importing diagrams are kind of walking through how you can get what you create out either the entire diagram or getting a couple of the individual pieces. And then you can select an export. This is really handy if you want to put stuff into slides and things like that. We'll show an example using a Google slide. And you have creating a schematic diagram. So first the logical diagram very high level and then you're going to get down into pretty much like a physical diagram and we'll walk through the template and design something really simple for you. And then we're going to create a detail diagram, which is the final step. And that is if you want to zoom in even further on one individual element in the schematic, you can kind of enlarge it out and create its own example and look at that. So there's all three that we promised we were going to do. And then we're going to show you how to use some of the examples that are already existing. We have an examples repository with about 30 projects in it right now, which includes complete collections of schematics, details and all this kind of stuff. They're in all kinds of different verticals. They're in financial, they're in healthcare, they're in edge cases. It's in telco. There's all kinds of good stuff. So those are really nice to be able to import and get started with and get you kind of jump started on creating some stuff. And when you import those, you get a bunch of tabs at the bottom with all the stuff you've imported. And then there's a few other tips that are involved in here and how to submit an issue if you have any issues around that kind of stuff. And that's the complete workshop there. I will jump in and show you really quickly the first chapter and then kind of let you go and I'll hang out on the chat. Probably not going to finish this whole thing in the half hour we have or 30, 40 minutes that we got. But you can take all this home, right? This is all available online. So feel free to continue on and reach out to me at a later time. You see here that you have a link down here for the tooling. If you click on that, it should open a new tab. And here what it's done is detected something I'm doing. So if I want to go edit that, that's fine or I can disregard it and you get the actual what we're looking for, what you will find in the workshop is going to say, hey, this is what you should see. You see here it's got the thing there. So what do we do next? We're going to select from the template red hat template here on the left. We're going to select the logical diagram. Let's go ahead and do that and create it. And the tooling comes up exactly like it says here. So we've just completed the first lab. So that was super quick. That wasn't that hard, was it? You'll find every single lab includes a reference at the end where you can find the workshops, the diagram, tooling link, examples for the diagram repository. So might be worth jumping over to that really quickly. Let's go take a look at that so you can see what we got. This comes back later, but you see here there's an overview of all the different stuff that's available. And if we picked something like a healthcare one, it's a collection. You'll find it has this one here and it has the ability to load stuff straight into the tooling or you can download the diagram file. And you see some of the images have increased. It's some pretty complex stuff so you can get started really quickly by importing one of these things. You'll get that in a lab in a minute, but it's worth exploring that stuff. So after you do all that, you get every time they say if you have a question because you might be at the end of the lab and have a question, you can reach out to me or Eshoo is the other guy that did this. And then it goes on to the lab too. You can just jump right to it. And you can see where you're at. This is where you should be. Then you move on and start following what's going on. So I'll go ahead and leave you guys to that. And I will go stop sharing right now so we can hang out and stare at each other. And if anybody has any questions, you can throw it here into the chat. I'll go ahead and do that. Or is it in Q&A? Hold on, someone's got something in Q&A I think. No. In the chat. I'm just going to hang out over here on the chat. So any issues or questions? Let's get here. And since I can't see what you guys are doing, normally when it works out I'd be walking around and looking over your shoulder and having the chat and all that kind of stuff. So feel free to share your camera and jump on here. If you want to share what you're doing, or if you want to just chat with all of us. See if I recognize anybody in here. Hey, Linca, you're out there. You should share and come chat. I know her. Who else we got? Hi, Ricardo. That's cheating because he's part of the team that developed the tooling. So I'll just go ahead and I'm going to go back and share my screen again and I'll show some more of the asset library we have and a lot of the stuff that we got going on here. So where was that? So you see here, when you open up the tooling, for that first thing here you have an example view here and you have a second tab here at the bottom. That is showing you the actual template. And this template is what you're going to be using to develop your logical diagram. And when you do a schematic you're going to get a different template. They always come with the kit apart. It gives you an idea of what's all available in labels and stuff like that. That's cute. But you have the started care of Canvas here and you'll be able to use different things here. You see here you have that application icons. You have service icons. You have infrastructure icons. All kinds of stuff. And then down here at the bottom you have detail diagrams. If you hover on these you'll see these. These are for the details. We're not going to do that in this one. These things here are all different kinds of services. It depends upon what you're going to do. So if I'm going to do one of these application service icons and I want to go down here and use the application service here. Drag it over here and you can deselect it. Grab it. Drag it over here until you see that it matches the template. Drop it on there. And then you can, I think it's control shift down or to be back, yeah. It goes to the back and then you can select this thing at the front and we can delete that. I think we can delete that. It might be locked. So you have to use command L to unlock it. There we go. There we go. Well, I dragged the whole thing away. That wasn't the idea. It didn't work that way. But the fun part about this is, it doesn't matter where you are, it already got rid of it. So there we go. And you would drop in a few different things as you're designing and you see how they get all kind of caddy-wampus using a complicated word. And these are, for example, some of the things you're going to use. And you're going to put this right here. And if you notice when I select that, you see this red around it. That means that it's locked. And that's also in this stuff. But here's control L or command L if you're using a macOS. And you can delete that background thing. You can use this here to size up. And then control shift B to go to the back. Or you can just right mouse it and say, I think I unlocked it, didn't I? Yep, unlock it. So you notice if something's locked when you select it, you see there on the right? Unlock it. Now it's available to be changing the color, the style, the lines, the text, the words, the range, the different stuff. We're not really going to do much of that. I never really do. So that's a hint. So if it's locked, you can't get it. And if it is unlocked, you can. And you can right mouse it and go to the back. So now we have all these things here. We're giving it a label. We're calling this my dad of cooling or whatever. I don't care. Now select and you shift and select all these. And there's a really handy thing up here says a range. And we can distribute these things vertically. So it'll separate them with the same amount of distance. And we can align them to the left edge. So they're all aligned to the left. Kind of nice. What gets nice is when you have one over here and one down here. You have a couple of these that you've made and you want to get them all lined up so they're all matching nice and neat to this one down here. So it's kind of nicely centered and happy. And I don't want to mess around. Select them all and say a range, align to the bottom. Those are handy. When you get to the point where you're going to drop something in here we have some kind of services. This is going to be my cloud service. You see that? That's a locking. So you're going to drop it in there by locking that. So if I go over here like this, it's not going to work anymore. Now I got deleted. And now it's been locked. Unlock, delete. You have to drop it straight on there by holding the mouse down. And now it resizes and locks into that spot there. Select this and double click and you can start doing whatever you want in there. Cloud service. And maybe you decide you want to change the color. Go over here to the palette and you can make it green there. And we can make this a containerized service again. But you don't want to lock that in here, do you? Then you end up with that. That's not what we want. You got to make sure you lock this with the right part. So if I select that, you see it's red and I'm not getting anything here on the right. So it's locked. I need to unlock it first. Then I'm allowed to change this over into the cloud service now. So that's how you're going to be working with this one. Somewhere along the lines, you're also going to see if I just hit reload, this thing is very capable of keeping track of what you're doing. And you see the save button up here in the right corner. But if I just reload it without saving, he's been doing bookmarking for me. He pops up with this and he says, I remember I go back to the basic templates again and I lose my work. But if I do edit diagram, I'm going to look at my canvas, everything's there. It's pretty hard to make a mistake even though you're in the browser. Hit the save here. You can give it a title and it'll actually save a file locally. But let's reset this thing. And let's say I'm going on to lab two. And now we're working with the schematic diagram. You see here again, you have the kit of parts and all the stuff that you recognize. Starting canvas is a little different here. Got placement guides. I'm not using the detailed stuff. You can close that. I'm not using the scratch pad. I'm not using the logicals anymore. I'm using schematics. One of these things is what we need. Drag these on here somewhere. Put it right over the placement spot. And what's nice about this is he has a lot of things going on. So these are for the networks. You can draw network things on here. You can learn how to do that. Same story here. We're going to select this thing and say oh, I'm going to make this a containerized service application. Make sure you do the right lock button. Select this here. Not the text. And go over here and give it the right color. And you can call what kind of technology this is. I don't know. Fun times. Node. JS. This is right here. We have as many as we want because it's in a container platform. And if we have a second one over here this one might be an event stream. Where was that thing at? Where's our bedstree? Here it is. Lock it in. Give it the right color. Give it the right color. And that's a wrong color. That one. There we go. And we can also zoom in on this stuff. 200%. Makes it much easier to see what's going on. You can see if we take this and go to the back. Oops, not that. Select the whole thing. So here you see a little bit better that when you hover on these you're going to get a line. And if you push down and pull now I got a line. The black one we don't really like that. That's a data line. But you also have down here various colored ones. So let's say we want to use the blue one. So you can select one. You see here on the side you can set it as a default style. You can just delete this. We can say okay this thing now needs to talk to this one. Right? And you can drag these things around a bit. It's proper. Whatever's going on here. You notice these three are used for networking. These are used for input data and output data. So now maybe I want to change to a data. So I will set that as the default. And I will say this one you're going to send some data over to this one. You're going to lock these in. And I don't really like a lot of jump in lines, right? I don't know how you are about that, but I hate that. So over here you have these little arcs. So you can see it if you want to leave it like that. But a little bit of magic, a little bit of thinking, a little bit of triggering and jiggling. You can make stuff look really nice. You'll notice now here if we go back to reset view, it will give you the big overview. If I just say go to 50%, it will go like that. If I say go to 150, it goes in like that. So you can imagine if I'm at the normal view and I'm over here trying to say hey, there's an event stream that's going to send something over to wherever to something else. Or out here we have our nice user. Let's get rid of this. Unlock it. Get rid of it. Unlock it. Get rid of it. Give him a device to talk to us. And we're going to say that he does a straight call into here. Which would be a bit odd. And we're going to bring this to the front. So it kind of hides it in there. You see now we're missing the arrow on that side. So we can go over here and say okay, we want the same kind of arrow. And what happened to our arrow? It's really hard to line this up. I see, right? So let's go down to like 300%. And we can see what's happening. So if I start playing with this bit. See that there's something messing around there. So let's bring this down to here. It should straighten that all out. There you go. And that's really small that arrow. We can make it a little bigger. Let's make this one bigger. It's all pretty. And as you can see, there's a lot you can do with this. I'm just kind of playing around right now. But if you follow the diagramming, you'll see what's going on. So there's your schematic stuff. And we have another option if we just re-do this and say reload and say don't save it. So you really quick the detail diagram. Our placement guide and the detail diagrams. We can do our cloud service application. Call this thing. Occasion is going to be a container one. Again, it has all these lockable things. You see here there's some network details and stuff around this. Let's use this one over here. Use a purple one over here. If you don't need one, you can just select it and delete it. And say you do something wrong like that. Then use command Z or controls it or whatever and it'll, whatever it happens to say up here for undo. And you can get it all back. So it's not much you can really do wrong here, right? And then we can say what kind of technology this was. Java. Maybe using some node S. And you see that it's talking about virtual with these dashes so we can change that to money. There we go. You see here that the line was dashed. Now let's just make it a solid line. And over here what we like to use these for is, for example, this is taking use. User request is coming in and it might be sending an event stream out. Right? So it's going in my example that I just created coming to an event stream and maybe that's all it's doing. It's just an inbound application which is kind of not probably what it's going to be. You see we can delete all stuff we're not using. And then you can talk about how this is my Java and node. We don't want to do that. We want to say something like this is application to the systems. And then we say one, two, and because it's on a container platform, right, we can give it a nice name. There you go. And for example if you want to select this whole thing you can go up here and this comes later and one of these things you can export it as a PNG. Any other thing you like and only my selected item I don't want this whole diagram and then export and what you're going to see is what I'm going to get as a file. I can give a name. I'm not going to do it now. You see a lot of possible connections to Google Drive, GitHub, and stuff like that. As long as there's not any crazy authentication involved you can go directly into your home things and go to your device and just download the file. I'm not going to do that. Let's say we wanted to go to an example repository and we wanted to import that healthcare thing I showed you really quick and this one is called iDAS here. What we do is we take this URL and copy it because I happen to know that's the file and I can go up here and I can say import from URL. This will be the last thing I think I'll show you. I think we're going to run out of time. Look what happened down here at the bottom. You have the kit apart to the thing we're working on but now you also have all the different things that we were using for that. You can go right in here and say I'm going to start editing some of this stuff and get rid of this. I don't want this thing. I want this. I'm going to connect this straight through to something else. You can do whatever you want with this stuff. Export it, save it, do whatever you want. We're more than happy if you're doing something interesting to have you submitted here. Feel free to reach out to us here and you can use this as your centralized collection. We're happy to take almost anything. We have product demo stuff in here. We have lots of different things in here. Telco, all kinds of good stuff. Lots of lots of information and projects are in here. It gives you that get lifecycle, right? Okay. See if I can stop sharing again. See if we're doing in the chat here any questions. Yeah. Differences between a logical versus schematic diagram. Best time to use each. Well, basically we try to use all three. The logical diagram is where you're doing the functional collections. So you do know this, for example, this has absolutely nothing to do with Toga for any of these certifiable standards in the architectural space. We wanted something that is conversational, intuitive and very flexible to do a generic architecture based on multiple customers that we research. So taking individual specific things, comparing them to each other and then up-leveling that to something like that. What you see in the logicals if you explore our examples is they happen to be non-technology specific. Each block, each element is talking about what that group of components would eventually do. So you see a little bit more generic terminology and you see collecting, like one's going to have to be a container platform. And the idea is that we're presenting these to architects and people that have their own infrastructure, their own architectural choices, their own legacy issues or whatever they have and to be able to map a logical diagram to what they have to make sure that they have the right components in the right spot for success at scale because we've taken these off of people that have done it at scale. And then a schematic diagram tends to be when we drop down the end and we show a specific case worked out and you'll find the logical diagram elements named again in there and then you notice inside that schematic diagram, when I drew that, there's a place to put the technology, somebody put Java and Node.js in there, for example. You can indicate what's possible. Most of the ones you're going to find that we've done, we try to map open source technologies and our products if possible. That's if you're doing a green field. If you're not, I mean, if you need mainstreaming, there's a lot of options for mainstreaming if you need to use application and development tooling. There's a lot of choices out there. It's up to you to be smart enough to figure out by looking at that. So you also see the schematic tends to look a little bit like a workflow in the sense of this is how the architecture is tied together and we like to do two different ones. You saw me do the network and the data together. We really like to do one network in one day to just keep the lines simple. So only with network lines and only with data. So I hope that answers your question, Stefan. It's too much of a tight bite away. Okay, there we go. So I hope you guys are progressing with this and doing something with it or it's awful quiet. Kind of the bummer of these virtual sessions, right? Quick example of the export. Sure. Let me get back to sharing my screen again. Okay, so we have if you guys can see my screen we have all this stuff in here again. Let's pick a different one. I'll show you what happens here. So if I selected nothing at all it's basically we're going to try to export this whole diagram, right? So we're going to put it in as a complete slide and so I just do PNG. I zoom into 300 and we found this gets the best results, right? It gets it's not dependent upon what you're viewing it's just zooming the diagram out a little bit so it's a little bit more detail and so 3001 diagram and you see what you're going to see and then we're going to give it a name. I'm just going to download it. See downloaded here if I open it there you go and you see it's a pretty high quality image and this you can import into anything and use as you see fit. Now I can imagine when you do this into a slide that's kind of crappy. What's nice is what we do with our slides and we do that we'll put this in as a complete slide and then in the speaker notes we'll put a link to opening this up in the tooling. So from the slides you just click on it it opens a tab and you're sitting right where I'm at now so you can go in here and start editing stuff. Let's say we want to do the API management one. See I moved it a little bit but I did undo and it's back. So I select you see the line around it let's see what happens when I go to export this one is a PNG only when I select it not the entire diagram export you see there and I will download it and if I open it there you go and you see it's a pretty big clear thing so I'm able to resize that inside my so when you import that it's just the image so I can resize that as I like so we take any image or any piece or whatever so maybe I want to do this this this and this so I've selected all those using shift and I can do export as PNG and there's lots of other formats in there I'm just doing an image file so I can show you easy download and get another download here open there you go I have a subset example of mug use so stop sharing and see if that does that work this tool is pretty nice it's pretty well put together pretty easy to use we're actually hosting it what you're looking at our configuration is in GitLab and we have a build pipeline that then pulls in the base open source project, runs our configuration to include those oh that's something I can share a little bit but it includes the palette and all the templates and stuff let me share my screen again so over here I don't know if you noticed or not but if you look closely there's these X's right and scratch pad and stuff so let's say you wanted to do your own little thing it's kind of fun to drop something over here and now I have the ability to well that wasn't a good idea see what I just did so I had all those things selected and dropped them on here so I have a subset now that I can use everywhere but let's say you wanted to add out a reporting services so you can you can select that and drop it on here and watch what happens you know how reporting services that I can use multiple times so you can do your own thing you can give it its own name you can export it you have your own list and then you can add it into anything you want so if you have this export it's going to give you a file and you're able to import it into here sometimes what happens is you'll get excited and click on the wrong things let's say I do this you're like ooh now what so you think oh let's reload this and that's not going to fix it is it because he remembers what I was doing right so what we're looking to do now is reload it and this should get us back to clean version but it doesn't right so this is a caching issue it's still gone so what you also can do is open an incognito window or whatever you call your private windows where there's no caching and you get this back so depending upon your browser behavior you're going to find out whether or not you need to clear your cache this occasionally happens with stuff like that you can try to close so I tend to often work just from the incognito stuff just to avoid getting crazy stuff like that right and funny enough I mean like we start doing stuff like this and whatever and giving it names and colors and things like that and then we do that and you think oh this is never going to work right but he still knows what's going on in my my little thing here so he's good at that right incognito is nice because when I throw it away then I can just open another incognito window and I have all that back so this can be an issue I mean that's something that you want to be a little bit more careful about oh another thing that's interesting down here at the bottom is add more shapes they also provide all kinds of good stuff here so if you like AWS stuff if you're into the IBM stuff the IBM architects use this also this is all part of their garage stuff you name it there's so much stuff in here so if you want to get really funky you can do that all I'm showing you is our little subset of stuff to keep it consistent and our starting canvases are based on these things so if you use something different I'm not sure exactly what you're going to do but whatever you say you pick one of these things and you say you want to use Azure stuff and you say okay apply it what it does is it adds another should add another thing in here somewhere where is it oh I didn't check it hold on Azure check it apply and then I see down here I did it twice I guess I did it right so you see I have the Azure stuff which just means that I can now make a service like that I should be able to drop something in here and then lock in there so no guarantees what that's going to do as far as our templates it's going to look kind of bad for that kind of stuff so maybe you'd have to come up with something different I don't know do white only or something but anyway just to be just to have some fun okay I'm going to stop sharing again any more questions out there from anybody Ricardo are you done yet you completed the workshop one of the other things you will find I can show you also here we go another question so the session data that's stored during editing is that stored locally in the browser yes it's using browser cache quite extensively so that's usually what's happening when you open it back up and once you've done an actual saved file I can show you that but if you save a file you get a draw.io file in your whatever your download directory when you restart back up he'll say I found a draw.io file so I open that so he's smart enough to figure that out by looking at your local directory that's based on your browser wherever your browser does it's downloads it used to be in the beginning when we first started this four years ago it was a rather new tool and caching was quite an issue so most of the answers were clearly cached so I got tired of doing that if you want to be safe about it I just use incognito or the private browser or the non-history one and every time I open it back up or open one of those links from the example repository just do a right mouse and open it in something without the caching I prefer that because funny enough if you happen to close it and open it back up it seems to find the file he just won't find your your cache stuff in the browser anymore so you won't be able to find back when I do a reload he has it in that cache for that private window but he doesn't have it if you close it and open it back up that's the only difference between the two ways we're working I really don't get caught up in it too much it's pretty good a lot of things with this it's not out there on the internet as far as I know but you saw that there's a possibility to connect your github or to connect to whatever those things were a quick look at the tooling here we go you can do google drive github, gitlab all kinds of stuff you can import from a URL just like we did or you can import from a file all kinds of stuff should be able to make some pretty interesting diagrams I wouldn't put confidential information but there's also a desktop version you can download I don't do a lot with that I don't really know what this quality or what that is for your particular OS something you just have to try I have none of those connections set up, no gitlab no google drive, none of that so I want to be really honest I don't know how you would deal with all the versioning inside of google drive inside of github, gitlab it's not like you're forking, branching all that kind of stuff merge request I've just stayed away from it it's just too much of a management issue so what we do is the work cycle would be that I have in that example's repository I have something I've checked out it's a dry old file once I save it it's been modified so then you use the git tooling in the background to push that up and merge request and merge it in we tend to export the images you saw and those get put into a directory so that they can be shown on that readme when you get down into the adoc stuff gives a little bit of an overview of what's in that without having to actually open up the tooling and that kind of stuff and some people out there in the field that are trying to do sales stuff and they might just want to grab a whole image there's no need for them to do export stuff that's more for us nerdy guys and girls that like to do that for their software development or for their architectural descriptions and their projects and stuff it's quite flexible so we've got about 8 minutes and again anytime you want to stop while you're working on the workshop like that with the tooling just save the file and come back to it later and pick it up it's not going anywhere we occasionally do updates to add new icons and stuff like that and our pallets on the left side there if I do that then I go through the workshop and update that so it all reflects if you find something that doesn't please reach out happy to do it well I see we have okay can you wrap it up? I'm good so can we wrap it up now or should we wait so the guy coming in sure no problem thanks everybody okay thank you very much Eric and thanks to everyone for participating in the workshop if you want to continue the discussion you can meet Eric in the Walk Adventure platform okay