who is supposed to make us that. I've never met, oh my gosh, I'm going to mix languages, aren't I? You're going to learn Israeli today, anyway. First, let's start with this. Welcome back, not that we went anywhere, thanks. Yeah, to your favorite breakfast show. So ladies' breakfast show. I know it's cold, I know, babes, I know it's cold, but we've got the heat, yeah, just for you. You can find us on WhiteFive on Facebook, WhiteFive on Twitter. Hashtag is Thursday vibes. Where are you vibing with us from? And don't forget the question of the day, which is a muscle questioning. The question is, have you ever found yourself in a relationship by yourself?   Let us know, hashtag is Thursday vibes. Yeah, my name is not important currently. The one that's important is our guest. Good morning. Good morning. How are you? I'm fine, I'm good. Is it the cold? Is it, because it's in the morning, because he does not sound like that in the videos. Where did this base come from? Hello. Good morning. How are you? Okay, what is your good name kind, sir? Well, my name is Samuel, Samuel A. Perry, aka brother Shaggy. I'm about to find my brother, and I'll be pumping black skinny boy. Yeah, if you know his iconic thing, the red one with the circular type situation, yeah, that's him. Okay, so why Shaggy, man? Why Shaggy's could be do? No, actually, the name Shaggy just came. I was only looking for the character. And I can't, I don't think there is any particular reason why I chose Shaggy. Oh, it chose you, didn't it? Yeah, it did. Are you always fighting with clothes? Why you never wear shirts on your videos? Is it that hot? Okay, they keep telling us it's hot in Nigeria. That's why people are always upset. You wake up and it's hot. You're just annoyed for no reason. Is it true? Partly, but you know, my character doesn't wear clothes because it's the character I portray.  They hardly wear clothes. They hardly wear clothes. You will never see them. You at least see them wearing clothes, though. Why, though? Just like that, they don't care. They just move around, you know. They don't care. Okay, because a lot of culture shall going to happen. Ladies and gentlemen, hashtag is Thursday. Okay, tell me a little bit about where you're from before we get into you. Okay, I'm from Lagos, Nigeria. And I come from Oregon State in Nigeria before I moved to Lagos. My both parents were back in Oregon State before my father died. Then after my father died, I moved away from Lagos to Lagos to finish my education. Where did you study? Studying in UNLAG. You're educated. Now I'm even more impressed. It takes a lot of effort to look stupid, so you're very educated, aren't you? Did you just give your certificate back to your mom and say, okay, now I went to school. Thank you. Let me do me now, is that what happened? You know, to get to that stage where, you know, there are some people education doesn't really pay. You know, I think I'm part of those people. My talent just made way for me, side education. I'm not saying education is the important, definitely it is. But my talent made way for me. So, something like that.  Nice, nice. Yes. Paying your bills, just foolishness. Stupidity is paying my bills. Wow. Yeah. Okay, okay. I have also another personal question. Guys, before we get to the actual interview, I must get this off my chest. What is the problem with Nigerian movies? These ones that dust. First of all, we know the songs, but we don't know what they mean. I am Leo, I am here. What does that mean even? I am Leo means, life is hard. Aha. Yes, life is hard. So we're lamenting? Yeah, it's a lamentation song. Okay. How come these kids don't involve, you know, things that we see like witchcraft, someone just randomly disappearing?  I like to portray stories where people can easily relate to, you know, there is no one in Lagos who doesn't know the area boys they get, yeah. So I'm basically learning about Lagos from you? Yes, definitely. Oh! Okay, I like that. You're learning about Nigeria as well. I like that, okay, okay. What else about Nigeria is very out there that looks obvious. They say you're so many, someone sneezes, you find yourself in Ghana. Is it true? Just asking. Maybe. So it's true? Your Nigerians are beautiful people, I'm sure you know that. Okay, yes. That I agree. Beautiful people, beautiful culture, best food in Africa, I'm sure you know. Apokafu, why are you always fighting with Ghanaians once again? Your love rise, what's this? We know Nigerian geography is the best. No, we don't know, I need proof. No, no, no, no. Have you tried Nigeria and Jelof? No. Yeah, you need to try Nigeria and Jelof. I do, because I cannot make an informed decision with such basic information. I need to try. You need to try. Yeah? Do you have a recipe? Do you have a recipe? Yes, you need to come to Nigeria. Oh, not even a recipe, just come straight there. Just come straight to Nigeria and we'll prepare the Jelof rice for you. You were nominated the most, one of the most influential Africans in 2020. How did that go? Yeah, I failed Honod. It's a motivation for me to keep doing what I do. And also a motivation for my followers, my fans, people who look up to me, for them to know that hard work pays. It's not just you trying to go through another way to make it in life, hard work pays. So it's a motivation for me and my fans. My favorite part about that whole thing is when you were being asked the experience and if you thought you were going to win, you were not even about winning, you just wanted to vibe. What's wrong with you? People are out here, sleepless nights getting people, vote for me, vote for me. Why didn't you have that energy? You know, I just feel whatever belongs to me, belongs to me. If you, honestly, if you feel I'm worth it, then I'm worth it. I don't try to be relevant.  I've always been the Samo from back days, before Brother Shaggy, I've always been the same person. Nothing has changed. I don't know what I expected. From seeing your videos and now seeing you, but this is definitely not what I expected. I don't know what I was expecting, but this is not it. I think I'm a little bit more impressed that I was wrong. Okay, hashtag is Thursday vibes. What came first, the skits or the movies? The skits, you know, but I started with movies. Oh. Yeah, I started with movies back then in school. I didn't go for auditions. Well, I only played supporting roles, because there was no name then. After then, I was like, I needed to be known more. I needed to be in people's faces, you know. Then that was when I decided that I needed to stand alone. I needed to be unique and I needed to start something on my own. I don't want to play supporting roles anymore. I want to play lead roles. That was when I went into skit making. That's mine. If you want to be the lady, you might as well create something and then be the lady. More than solutions. More than problems require more than solutions. Okay, I want to have a hashtag a little bit. Okay, but before I get there, there's so much content. Just one person. Ah, this is again, I think, a very personal question. Do you know of Ofai? The funny one also, Enmaraji, those I think of the two people. Yes, Ofai Fada. You know her? Yes. Oh my God, you know her. That's a big sign. Next time you come to, can I please come again? Drag, drag her. Also, is Donjazi your cousin? Like, why am I always seeing him on your page? Did you know what kind of big deal Donjazi is? Donjazi is, you know, I'd say, is a father in the industry and supports every of communitists. Supports everyone, either from the music department or the comedy department, he supports everyone. I love his spirit. I love his spirit. I would not expect that from him. Pride, pride. Is Pride the direct translation of Maringo Sijui? Well, help me, help me guys. Donjazi is a lot proud. There's this assumption that when you get to a certain level, not even just money, just followers, if I suddenly had 30 extra thousand followers, I'd be looking at you like, I can't hear what you're saying. How is that not you? How is not the people who are around you? Like, how? I just remain myself.  They mean I have people who look up to me. I have people who want to learn from me, people who I motivate, people I influence. But it doesn't change me. It doesn't change me at all. I'm still, like I said before, I'm still the number some or any day, any time. I make sure I check my DMs, you know, and I reply to people. Yes, I make sure I do that because I've always done that before the recognition of Buddha Shaggy. And it is very important to me because they are my followers. So they're following me because they want to tap from my, you know, from my success, they want to tap from me, myself. So the little I can do and make sure I do, I give advice like every day to my followers. I take it very... You give advice? Yes, I do. I would not take you seriously, okay? What kind of advice do you give? You know, many times I receive DMs of people telling me they want to give up on life, they've tried this, they've tried that, then I let them know. I'm sure, you know, before you started following me, I was, I was you. Yes, I was you and at that time, I never messaged any celebrity that I'm this and that. Maybe that's me, everybody's different, but I just want you to know that it's you, I was you then, then now I'm different. So you are going to be different.  What drives you? Why don't you get tired? You know, I don't get tired because I know where I'm coming from. I know what I've seen, what I've suffered. You know...  I've suffered. Do this, your hands, they're soft, I'm sure, you see? No suffering there. I'm sure it's because I'm a racial, you know? Yeah, I've suffered, like, you know, after my father died when I moved to Lagos, I struggled to finish school because my mother was in that financial liborant. You know, I made sure I created things myself to make money. Back then in school, I'd go for shows, gather people together, gather students together, teach them how to dance, how to sing, how to play drums, you know? We went for shows to make money. That was how I finished school. You can sing? So, yeah, I do. I sing. Ladies and gentlemen, you're in luck. You are in luck. He's going to sing for us now. Oh, my God. Yeah, yeah. You made that mistake telling me.  You want me to sing? Yeah, very seriously. Okay. Life is short, yes I know. Live, love, I love to you, girl. Oh, say, Cocoa. Mr. Righteous, we are really ones. Life may be part two. It may give us two or two days. Some people we say, they don't really like you. Don't talk about you when you're gone. So, just live your life. I didn't see that coming. I didn't see that coming. You want me to Yolule, it is it? Okay. No. Are you happy? Yeah. Okay, but we've appreciated you. Thank you, thank you very much. Myself and all the girls dying in the gallery. Thank you. I will not ask him if he's single, please see him after this. Hashtag is Thursday. Vibes, why isn't there something that you've pursued? Pardon? Why isn't music something that you've pursued already? Yeah, I do. I'm dropping an album soon. Album, let's sing single. No, no, I've dropped singles. Yes, I'm dropping an album soon. Have you done collaborations with anybody? Yes. Who? I have seen your needs, I have fowls, I have Wajie, you know, a couple of other people. You're dropping those names like they're potatoes. Those are very big names. Thank you. Ah, okay.  I'd be walking on air. Thank you. That there are people who are saying hello to you. Hello, everyone. I'm just joking. Just come down here and we'll take pictures. Will you have time for pictures? Sure, definitely. We will have a... But we have to take it in here. That's fine, that's fine, that's fine. Okay. All right, I saw a trailer that had David doing it. Did you guys work, you know, closely? Yes. Your friends? Yes. Tell me how it is working with these, okay, you're already an A-list name, yes. But how is it working with other A-list names? Um, you know, every time I work with any A-list artist, I'm always happy. Reason because before the recognition of Brother Shaggy, every time I watched the TV, I've always wished to meet them in person, maybe to have pictures. I know I can't really have the time to talk to them because of their availability. But now everything works like just so fast, you know, I can call them, I can chat with them, I can talk to them, you know, we vibe together. So it's a big motivation for me. It's a very big motivation for me. And having access to David is another big access to me, big motivation rather, to me. You do know that people say the exact same thing about you. But you're about five minutes, but I'm quite sure the people who say the same thing about you. I say the same thing about other people. So it's like... We handle the whole morning. Hashtag, Thursday, vibes. OK, if you could choose one, what would you choose to focus on if, you know, in a strange world where you could only do one thing? Would you act or would you sing? I would act. Yeah? Like you said? It's inside. You can do that anytime, any day. You don't have... OK, everyone has days where they're not feeling themselves. How do you push past that?  How do you get yourself there? You know, any time I hear action, every other thing is gone. It's like a bubble. Oh, he gets it. Every other thing is gone. Every other thing doesn't matter, because when I hear action, that's the time to move. Yes. But Ashaki, why are you hiding your hair? What color is it this time? It's still the same color. No, we want to see. Let's roll. Mm-mm, mm-mm, mm-mm. How's some chopper? Guys, I told you good things happen when you watch my morning. I talk to you on Facebook, I watch you on Twitter. Hashtag us again is Thursday at Vibes. How do you feel about being in Kenya for the first time? I feel good, you know, and the fact that I'm staying in one of the best hotels in Kenya, you know... Wednesday. Sarova. Heritage. So fly. You know, and I was told the queen was there before she went back to England, which means she was a princess when she was there. So which means by the time I go back to Nigeria, maybe from Brother Shaggy, I'll be King Shaggy. Mm-mm. I clean it. Okay, all right. Now, let me give him a moment to bask in that. Yeah, so you're done? Yeah, so we're just gonna watch another one of his short skits and then we'll be right back with more conversation. Hashtag Thursday Friday. Ah, Thursday Friday.


teams have announced that they're having new uniforms. There were seven teams that said that they're going to have new uniforms. All of those uniforms have been published. They've been released for everyone to see. Now we know how they look like. So I thought, let's have a little bit of fun. And we're going to put it up for the people that are watching this on YouTube. But I'm going to hand you this iPad real quick. And I'm going to show you the photos and you're going to scroll through and you're just going to give me a grade for each uniform.  Indeed. So you would know what's best. He's not lying. So here is the uniform. So start off. Start off first with the. I thought you're going to show me the Ram's uniform, not Ikea's uniform. Yes, you saw that. You did there. There's this uniform is getting a lot of heat. But I don't think it's as ugly as people are saying it is. I don't think it's as ugly as people make it sound, make it look. I think it. No, it's kind of ugly. Yeah, that's ugly, bro. I don't like the helmet. Like they even look like, no. Why are they? Why did they do the wash on the numbers on the on the jersey? Yeah, the little gradient. Yeah, I don't like that at all. I give that. I give this a D. Wow. Anthony gave his D. Yup. Wow. To the Rams. Yeah. What's next? Oh, man, the the Falcons. See, well, it's hard because, like, if you have a visor on, like, every one of these people have a visor on, which makes your uniform dope. Yeah, visors are fresh. You don't get I don't know if you've ever seen the longest yard. Yeah, you get those vibes. He broke my nose. Yes, that's exactly what that looks like. Like they just came at us. Yeah. Nelly running with no shoes. Oh, my gosh. Yeah, that's exactly what that looks like. Yeah, like they're playing in a prison yard. I give that a I give it a I give it a. I give it a C. So it's better, better than it's better than the Rams. The only thing I don't like about the Rams are there's numbers. I just don't like the font of it. Yeah, the font. I don't like the font either. The Ikea Best Buy colors, whatever, you know, do your own thing. But yeah, OK, OK, not fair enough. Um, did the Browns get a new uniform? Did the Browns get a new uniform? Everybody's. Yeah, so from 2013 to 2019, they had the like the all brown with the orange numbers, OK, OK. And they went back to their classic look. OK, so this is what they are now back to the classic. I think that's clean, though. I like it. That's that's a plus for me. Oh, plus those O'Dell Beckham's going to look real dope knows. So he's traded. I don't know. You think? I don't know. Bucket nears. Hmm. It's it's better than those alarm clock numbers that they had. You know. Oh, OK, I mean, I give this a B minus. I like the older uniforms for the bucket nears. OK, OK, I like I like the classics more. Gotcha. What do you think of the all pewter? The brownish looking ones. I think those are fresh. Those are the first time that they've ever had. Yeah, all pewter. I don't like it. I say I say B minus still. I'm a fan because I like the pewter color on the helmet. I just think with the helmet and the uniform is just too much. But you got the white uniform with the pewter helmet or the red uniform with the pewter helmet. I think it looks dope. So in order right now, it's the browns, the buccaneers, the Falcons and the ramps. That's your order right now. Yeah, OK, you just you just got a notification saying that Joe Flacco is going to the Jets. So you just caught it here, ladies and gentlemen. You caught it here first, ladies and gentlemen. As we were filming, Joe Flacco, the veteran quarterback is now a backup quarterback for Sam Dornal. They need that backup quarterback help. Yeah, I sure do. Patriots. No. No, not at all. What's different about it? So these are like an alternate uniform that they just made their primary. They had different stripes on the shoulders. Yeah, but as far as how it looks now, what would you what would you grade those? B minus B minus. I'll give the buccaneers a B plus and I'll give the Patriots a B minus. OK, so it's browns. Bucks, Patriots, Falcons, ramps. OK, we got a couple more. So this one is pretty much the same uniform, but you could kind of read what the details are, what the changes are compared to old and new. A new secondary logo on top of that as well. Yeah, I like that. I like I like the helmet change. I like the the Nike swoosh change. I think the Colts have a dope uniform, so you can't go wrong with blue and white. Wow. So that's what I think. Um, dang, I already gave a B plus away and a B minus. You can change them. We will allow you to change. But since since I don't see a full uniform. I'm going to do I'm going to do a C plus for the Colts for the Colts. Really? Yes, kind of low. Bro, look at that. Look at the C. Exactly. That's why I gave it a C. I see what you did there. C. The state of the state of Indiana. The frickin state of Indiana. Yeah, is in that C. Oh, I think that's creative as heck. Bro. That's so dope. That's dope. Did you say that earlier? No, no, what the heck? Why that should be the first thing that you point out. You can read. You can read. It says it right there. I know, but all I see is the C.  Like, I don't see Indiana in this. That's dope. That's dope. Bravo. I like it a lot. Yeah. I'm putting this over the Patriots. OK, so like B minus. And so the Patriots have a C plus. OK. Wait. So. Are they higher than the Falcons? Who I believe you said that they have a C plus. Yeah, they're higher than the Falcons. OK, well, I'm talking about the Patriots. So the Falcons got a. Dang, man, this is hard. This is really hard. It's really hard. Right now, the rankings are the Browns, the Bucks, the Colts, the Patriots, the Falcons, the Rams, the Rams. Would you say that's true? That is true. But hold on, we ain't done because we got the. We got the Chargers. Got one more. We got the Chargers, which. Oh, my gosh. Geez, Louise, I think those are. I think those are dope. Those are fresh, aren't they? Those are super fresh. Like black doesn't even make any sense, but it works. Oh, it's it's more of a navy. No, it is. It's more of a darker. Yeah, yeah, you're right. I think that is super clean. This is right after the Browns, though. So Browns is a plus. Chargers is a minus. OK, so so your final rankings are the Browns, the Chargers, the Bucks. Yep. Was it the Patriots? No, it was the Colts. The Colts are four. The Patriots are fifth. The Falcons are sixth. Yeah. And then Best Buy brings it home at seven. So those are your uniform rankings provided by Anthony Dupre and Best Buy. That's great. That's great.


So we're gonna be talking about sticky sessions today and maybe it wasn't such a terrible idea. My name is Dan, I'm from Boulder, Colorado. I work at a little startup in downtown Boulder. It's located right here. We're VictorOps, we're building an on-call management incident management platform. And actually Boulder looks more like this. So it's not a bad place to live. I mean, it's actually so nice to live there right now that the real estate market is really booming. Everything is really, houses are being sold like in a weekend with three multiple offers. And so about three years ago, my wife and I went to buy a house and we found that house on the MLS and we went and looked at it and the realtor said, well, don't worry, you don't have to be able to buy this. It's gonna be gone in a weekend. And we said, okay. Three months later, my wife sent me a text message saying, hey, that place is still on the market. And so we went back and looked at it and I don't know if it's obvious from this photo, but the people who lived there had an interesting style. They had actually mounted a tree decal on the wall. And it also had this awesome like three tone paint scheme going on and it was really messy and nobody could see past that. And so something that would usually have sold in a weekend in Boulder was actually on the market for multiple months. They had this other problem that everything in the house had been dated. It was a house from the late 90s, but nothing had been updated in the last 30 years. So we had all these brass fixtures and this cloudy glass and the whatnot. And so my wife's first comment when she came in was, shouldn't we do something about these fixtures? I go through and upgrade them to brushed chrome or update them to oil rubbed bronze or something like that. And my response being an engineer was, we can do that or we can just wait for brass to become popular again and let the trend come to us and our house will already be modern and contemporary again. That apparently does not work. I tried that a year earlier when my wife said, I need to have a white gold band. And I said, well, why don't you get gold gold? And she said, oh no, no, no, it has to be white gold. And this kind of led me to talking about trends and how architecture happens and then it comes back to one other decision and then we move back to another decision. And it's always this kind of cycle. And there's always reasons for this. It's not like people are arbitrarily choosing trends. You know, there is impetus in the market for it. But if you don't understand the trade-offs and the decisions that you're making when you're talking about these fundamental architectural decisions, then you'll just always be cargo-culting what everybody else is doing. And so what I would like to talk today is about a fundamental trade-off that we make when we're building architectures and that's all about the statefulness of that architecture. So the way that I view the world of at least web application development is a very simple architecture. I write my application in PHP or Java or Rails or something like that and then I get a big instance of my SQL behind it. I buy a whole bunch of web servers. I hook them all up to a relational database and I kind of call it a day. And the underlying decision that I'm making here is that I'm separating the behavior from the data. But there's another way to do it. We could actually store the data for our applications inside of the application. And this has a lot of interesting side effects. This is actually the way that VictorOps is moving right now. We started off building in kind of the standard architectural way and now we're moving to actually store a state inside of our application. So I'd like to talk about what it means to store a state just so we can talk about where it is in the architecture. Where do we store it today? Talk a little bit about history and what people have done in the past and how we could maybe revisit some of those ideas. Talk about some motivations for why we store a state in particular places. Maybe some dangers to storing it in the application versus storing it in a relational database.  So when I talk about state in its simplest terms, it's this distinction between data and the behavior. So if I have code that runs, the code is typically the behavior and what the code works on is the data. Another grander way to think of state is it is an implicit coupling between time and space in your code. It's also really tricky to understand which part of the application is stateful. So if you look at your code and you think about the order of operations and that that's an important part of how it behaves, then the order of operations is part of the state. And there are a couple of ways people talk about happens before. They build synchronization primitives so they can make sure that an application moves in a particular manner. And that's all stateful behavior or that's all state that you're talking about when you're trying to build these. If you have a coupling to space, then it depends where something happens and where is kind of a nebulous term. It doesn't mean that it actually occurs in a different physical location. It could be two threads that are talking together. It could be two processes. Or you could have a application that is deployed in California trying to talk to a server that's in New York. Anything where you care about the fact that two requests hate your server and you don't know where that is or they hit different threads. That's again, you're talking about state. But state is also a lens. So this is a very simple function. I wanted to keep it one line so it doesn't have a barrier check for when it hits zero. So this is an infinite loop. But the point is it's a simple factorial function. And most of the time you might look at this and say this is a completely stateless function. There's no variables being assigned.   And so in this case, the state is actually being held in the stack. In this next function, a lot of people would say that this creates a side effect that writes to the disk, for instance. And so this is a stateful function. Well, if I change your perspective so that you're looking at this from a web server's perspective and somebody's coming in and making a get request and they don't care that this is writing to a disk, then this is a stateless function. And so it always depends on how you look at things on whether or not you're talking about state. And that's always important when you're considering where things should go. So when I break down the world between stateless and stateful apps, stateless apps typically store their data inside of a database and they ship that data from the database over the network to the behavior. And then they do some work on that data and then they ship it back to the database. So it's kind of a data shipping paradigm. And typical architectures look like this. So I have two requests coming in. It doesn't matter what server they hit. They go to the database, they get their data, they work on the data, goes back to the database. They're often deployed behind load balancers. And basically the majority of web applications you see on the internet, behave kind of as clud is create, read, update and delete applications. Behave in this manner. So kind of like this. If I break it, if I break down what's actually happening here when a request comes in, we know that the engineers wrote this part of the system. We know that they went to the internet and downloaded this part of the system. So maybe that part works. These people don't care when things break. They don't care that it's the bowser's fault. They don't care that it's the engineer's code and they don't care that it's the database. To them, this entire thing is stateful. All applications have state. And keeping it separated, maybe that's not the best thing in the world to do. So a stateful application stores the data right next to the behavior. And the data doesn't have to move when it's worked on and moved is going over a network in this case. So 10, 15 years ago when J2EE was still a cool thing to do, people had this concept of sticky sessions. And I should caveat that by saying that people still do sticky sessions today. But if you go on Stack Overflow and you Google should I use sticky sessions on my applications or whatever, but the popular consensus is no, you shouldn't use them. And the basic idea is every request that comes into a web server from a particular human will go to the same server. So if I have a bowser open on my Mac and I make two requests and I'm hitting a web farm, I will always go to server one. So like in this case, two different people. The guy on top is always making a call to server one. The woman on the bottom is always making a call to server three. And this makes it easier to reason about how I do caching for instance. I can create really simple in memory structures and just pull them out of memory. And I always know that that person's session is going to be local to my server. And they accomplish this in basically two different ways. So in order to spread work through a cluster you need to do some sort of lookup because when somebody hits you from a browser you need to know where that server should handle which server should handle that request. And that lookup can basically be distributed or not distributed.  And you're using some sort of identifier. It could be a cookie that they have in their browser. It could be their IP address. Although we know that that won't help with that at servers but some way of identifying a particular browser that's hitting your website. And so to oversimplify the richness here when that hash table is distributed you might use some sort of maybe a consistent hashing lookup or you can send requests any random server and those servers know how to route to other servers so you can kind of move the request through the farm until you find the correct server and that's who ends up responding. A non-distributed hash table could be a centralized load balancer that just has a hash table sitting at memory so it's not sharing it with anyone else if it were to crash it kind of loses that concept or it could be even as simple as just a persistent connection to a server.  And then the hash table is kind of on your computer's list of connections. So why would we even want to do this? I talked a little bit earlier about some ideas around how it makes it simpler for programmers to store in memory caches but there are some other big reasons why stateful applications are a really interesting concept. So a CPU typically does something about four billion times per second. And if I look at the cost of going to get information from different levels of a computer, starting off with a CPU's cache that sits on die, L1 or L2 or L3, and then looking at that compared to main memory disk and network, and if I think about each cost in terms of one second of activity, instead of nanoseconds and microseconds which are all orders of magnitude and we don't normally think in that context, going to the CPU's cache takes about one, if that takes one second, then going to main memory takes about two minutes. So that's not super long. If I go to a disk, it takes 14 hours to get that data. And if I have to go over the network, like in that data shipping paradigm that most stateless apps are built on, it takes six days to get that data.  Going to main memory is like walking across the office to get some piece of information and then coming back to sit down. Disk is like driving from LA to Portland to get some piece of information and then coming back and then go into the network. That's like every time you wanted to answer the question, you drive to New York and drive back. I mean, think about the amount of wasted activity that could be happening while that's occurring. The CPU is just kind of sitting there farting around. And so just from a pure performance perspective, we are leaving so much on the table by keeping our data and our behavior separate from each other. There's also terms of correctness when you're programming across the network. If we keep the behavior and the data coexisting, there are actually proofs in the distributed system literature that talk about how you can change levels of linearizability and serializability and we can actually get different guarantees on our system just by keeping things off the network. You don't have partition problems when you don't have a network involved. I also believe as an engineer that ergonomics are very important. The more tools that we have, the more that you have to deal with. A stateful architecture happens all inside processes that you understand. You don't have to go out, I mean, not that people don't understand my SQL, but it's one less tool to understand to keep things in native data structures. There's also a whole different realm of resilience that we can build in. One of the first conversations you'll always have when you're building out an architecture is what do we do if the database is down? Everybody punts on that. They never think about how their code should handle the fact that where their state lives might be unavailable once in a while.  And so you can build in different kinds of resilience. If we keep this state in the data together, you can actually change the way that you think about things and respond. Failure is a lot easier to handle. Whole classes of errors actually go off the table. There's no network related problems. You still have to be conscious of concurrency issues, but at least those are all local to one process or one thread or something of that effect.  We talked about sticky sessions and that was something that was codified in a bunch of different programming languages. J2EE is a really nice implementation of that. But there are a bunch of different decisions that we have to make. One of them is we need to choose particular one times. There are managed environments where building stateful architectures is not super wonderful. MRI, the default Ruby runtime is one of those. And you'll kind of notice that when people deploy against MRI or the PHP runtime, what they typically do is spin up a bunch of processes behind a web server and then kill them periodically and allow additional ones to serve new requests. So kind of a CGI exact model, but with actually keeping hot processes. And it's very difficult to have a stateful architecture if you're constantly killing the memory space where you're storing the state. You also typically need some sort of threading model when you're inside of your runtime. Again, so that the stateful architectures usually have a lot more background processing going on so they can keep everything polished and working. So you need some background threads to work on. You also typically need some kind of control of your memory that could be on heap, it could be off heap memory that you're just memory mapping. You just need some way to actually control how much data you're storing. From a framework perspective, you also need to make choices and these are kind of the application frameworks that we build applications in. So you need some way to support making remote calls. Unless you're lucky enough to just deploy on a single server, you're probably going to have a cluster of nodes associated to handle the amount of load that you need to handle. And so having those nodes talking to each other is pretty important. You also need to make sure that your frameworks handle concurrency, ideally as a first class citizen and not just something that was bolted on after the fact with some really low level mutexes or seven fours that you're forced to deal with a lot of the concurrency. Then you need some concept of clustering. And clustering is an interesting topic in and of itself. You need some idea of membership inside of your nodes that all understand who the other ones are. This can either be dynamic or static. A static cluster is something where, like on my SQL rollout using Galera, where you actually specify all the IP addresses of that cluster in a config file. And in order to add additional capacity, you actually go back and reconfigure the cluster. That's perfectly fine, people do that. There's also a concept of dynamic clustering which allows your cluster to be more elastic. You can add capacity and it will discover the rest of the cluster and then join it on the fly. Both of those are pretty reasonable ways to do that. A couple of examples of frameworks out there that have reasonable run times underneath them. ACCA is built on top of the JVM. It's an actor based framework. And this is one thing that allow all of those examples I talked about before, ACCA allows you to do. Erlang is a programming language, but they have an application framework called OTP that's designed for helping you to build real-time systems. And that's something that's also really good for using stateful architectures. And then the database React has an underlying library called core that's a distributed systems framework to form the basis of how React distributes data and scales. Or more generally, it's just thought of as a toolkit for building distributed scalable fault-tolerant applications. And those all kind of allow you to build stateful architectures. React core, I mean that was straight off for their GitHub page. You know, a big part of this talk is about trade-offs that we make when we make these decisions. And so there are of course downsides to building stateful architectures. And it's important to know about these pitfalls before you get to them, so that you don't discover them at 2 a.m. when the problems have come up. Probably the biggest thing that I have seen, the biggest problem rolling out of stateful architecture at VictorOps is serialization. You know, when you have a database, you always feel confident that you can restart that database and you always get your data back because they've spent a huge amount of time making sure that the format that they write things to disk can always be read in. And so if you're storing your state inside of your application and you hope to be able to restart that application at some point, you need to think about the way that you're serializing this state. And there are kind of two different levels of serialization. There's writing things to disk and then changing the underlying model and being able to read those things into disk. And we kind of call that backwards compatibility. The other problem that happens, especially in a cluster, is that you will roll out new parts of your model and then try to send messages to systems that are running the old code and they need to be able to handle that fact. And that's kind of what we call future compatibility. You know, I'm receiving messages from the future effectively and I need to be able to deserialize that. In both kinds of serialization are extremely important when you're building a stateful architecture. You also need to watch out for thundering herds, especially when your application is starting up or in the case of a dynamic model, of a dynamic clustering model when it's failing over from node to node. This is one of those cases where engineers are terrible at finding it while they're working on their local machines. They very often have small workloads. They test things locally and then roll it out to production and it craps the bed. This kind of makes sense too. This might be a bit of an obvious thing, but you're serializing all of your data to disk and then you're restarting and kind of trying to fully hydrate a working database. And so of course there's going to be a lot of load on the system when that happens. I've actually heard reports from people running stateful architectures in the real world where their systems take hours to restart the clusters. And so you do have to work around that. You also need to be very careful about the way that you use memory. Again, this is something that we take for granted in the way that relational databases or no SQL databases handle structures that they can, you know, when they need to page data to disk and only keep in memory what they need to be working on. But it's very, very tempting given those performance numbers that I gave earlier for engineers when they're building a stateful application to just keep unbounded in memory data structures. And then again, it works great on their laptop, but in production, it'll grow to such an extent that it starts paging for instance and that completely changes the performance profile of their application. And this is something we take for granted in stateless architectures. There's a lot, the good thing is there's a ton of inspiration out there for how you might do this. Basically any distributed database is a stateful architecture. And so if you need code examples or you need just design examples or white papers or case studies, you can read things like from the React team, the Cassandra team that even read, you know, the Dynamo paper and get general ideas for how DHTs work in production. There's also some framework examples. Aka has a distributed data module where they help you build CRDTs into your database or into your application. A CRDT is just a concurrent replicated data type. So it allows us to build eventual data structures with really sane merge semantics so that I could have a counter that increments on any node. And I know that eventually it will come to consensus without having to lock across an entire data and entire cluster. The Orleans project is actually one of Microsoft's researches. They very specifically set out to build a stateful web development framework. And they ended up deploying it. I think Halo was written. The Halo backend is written on top of this. Unison is a Haskell-based framework for building stateful architectures. He actually took this to kind of a next level. And in addition to it being a framework, it also comes with an IDE for building your applications and a language. So it's a language, a framework and an IDE for building distributed systems. And on top of that, you can build really nice stateful architectures. So we talked a little bit about what it means to have state and what does it look like? Cause it's kind of a tricky subject. We talked about how we store things today in that two tier or multi tier web architecture where things are stored in relational databases and then shipped over to the processes that use them. We talked a little bit about sticky sessions and why people didn't like them. Some motivation behind why you might want to build a stateful architecture. Some caveats to making that decision. And then there was some more information about that. So that's all I got. But if there are any questions, I would be happy to answer them. Yes? And then when you read a request, you can relate that cookie to the cat. Nets and most frameworks like Radles and Django and Python, they promote these patterns. So obviously when this is done in production, these are servers stored outside of the app server. So that means you mention it's a wasteful to go over the network and read the stuff. So what's like a pragmatic alternative to this if someone has an application like this which a lot of people do, you kind of improve the performance of being able to read and write to sort of a state store. You went over some mechanisms, but it's like, but they're all kind of, it would require a big overall of pre-existing architectures and that would pretty much require a lot of buy-in from many different people just to make it happen. So is there any alternative or any incremental improvement upon like the common pattern of just say, let's just store everything in like a reddest cache. So I know it's not even a question. Yeah, I think I can just store it down. That the question is, if I'm transitioning from a stateless architecture to a stable architecture, what are kind of the interim steps that might go on? And I think the answer is you have to start off piecemeal. You know, Redis using a Redis as an interim cache and kind of shipping things around that way is still the same pattern. You're still keeping the state outside of the same memory space, but it's certainly faster. And so I think you cleave off certain parts of your system and maybe you start building things as microservices where the new services can be stateful and the old way can be stateless. And this might only make sense for certain parts of your architecture. In the case of VictorOps, for instance, we have some backing servers that are stateful, but part of our application is stateless. And so it depends on, you know, if some of those benefits work for your company, then those are maybe the parts of your system that could become stateful. It doesn't have to be holistic. Yeah. Yeah. In the other two, I mean some of you will come back while we're on the same cluster. Is there any kind of effort to rebalance that when their session ends? Or you don't see them while you go, make that, take it off that machine store away and then bring it back later for future requests or anything like that? So the question, a couple of points. The question is, how do you rebalance live workloads? How do you rebalance workloads that are no longer important? So kind of like a dead work, right? Yeah, basically those two questions. Those two questions. So rebalancing live workloads is a pretty interesting problem. You actually have to keep in your cluster the performance metrics of the other nodes and then you can move things around preemptively. For dead workloads, when we talk about keeping the state in memory, that doesn't mean that there's not some way to store that state or store the way to get back to that state somewhere else. So at VictorOps, for instance, we use the event sourcing model. So we basically write a log of every state change to Cassandra while it's going on, but that's just a very fast right activity. All state changes themselves happen inside of the application. So when work needs to, effectively, when it's done and it needs to kind of go into a dormant state, we can just kill that shard, for instance, and it can always be rehydrated from the log later. Does that make sense? It's actually just keeping everything in our case. It's more of like a transaction log with snapshotting. So if you were to think about it in terms of a counter, for instance, we store a log of plus one, plus one, plus one, plus one, plus one, and then periodically you might say, okay, the current count is 100 and that's a snapshot. It's the way that databases, if you look at like right ahead logs, it's how that's implemented and the designs behind that. Anything else? Cool. Well, thanks guys.