much. It's thrilled to be here. Thank you all as well for dialing in, whether it's morning, afternoon or evening, or watching this recording. As was mentioned in the introduction, I'm going to be talking today about Cata, Kubernetes Event Driven Auto Scaling. I'm excited to do that. Before we jump into it, though, let me give a quick introduction about myself. Fantastic to meet you all. I am Jeff Holland. I've been at Microsoft for a little over seven years now. I'm currently the lead product manager for Azure Serverless. That includes the Azure Functions Serverless service. That includes Azure Static Web Apps to do some serverless web hosting. It's been great. I thought I would add something a little bit more fun into the mix as well. I decided to call out that I have actually been a guest on the Ellen DeGeneres show. My wife and I got called up to play a game during one of her shows. I was not a guest to talk about Cata or Serverless or anything fun like that. But it is just something more light. You can find me on Twitter at Jeff Holland. If you ever want to reach out, have questions or whatever it is, just want to say hi. And speaking of which, I do have the questions here live. So as you are going through this presentation, if you want to go and drop me a question about Cata, about what we're talking about, I'll probably pause here in 20 minutes or so and grab a few of them depending on what's there. It makes some time at the end as well. So feel free to keep those coming in and I'll make some time for them. As for our session today, there's a few topics I want to spend some time covering. The first is a little bit of an overview of what we mean by serverless and event driven. These are both incredibly powerful and emerging popular trends. A lot of buzzwords involved, but there's some meat behind them. There's some benefits behind them. There's some use cases that I want to go over. We're going to weave that into how that works with Cata and what's Cata's role in this event driven world. Some different concepts of Cata, including scaled objects and scale jobs that we'll get to. We're going to talk about how serverless run times and Cata can work together and make some time for Q&A. All right, so let's start with those fun words. Let's do event driven first. So event driven architectures is not new. This has been around for a very long time, but the idea is that you want to run your workload in reaction to events. This is very natural in some ways, right? You don't answer your door unless somebody knocks on it. There is some event that lets you know I need to get up and answer the door. You don't do things usually until something happens. So event driven is saying, can you build your application in a way so that it is responding to the business events, to the technology events, to the platforms that actually have work that needs to be done. Means is you'll have something like a new employee is hired. That's an event that gets admitted into your system. Well, maybe an employee is hired to issue company email address. And so one of your event driven pieces of code might say, oh, I see the employee hired event. I'm going to go issue them any email address. Maybe somebody else is is, you know, I need to go make sure that they're registered in our HR systems. You get the idea. When you're building off of these events, some of the benefits is that your architecture becomes very loosely coupled and very highly composable, right? I can add additional for when an employee hired necessarily go change the issuing the email or the registering HR system. I just write another microservice, another component that says, oh, I actually care about the event and employee gets hired. So you can move these around, you can reuse them. It has some benefits. Now as part of event driven, this is taken off a bit more in the cloud recently, because of serverless. Often you'll hear about things like AWS Lambda Azure functions, Google Cloud Functions, open FAS a myriad of other serverless options. In the intent of serverless, while the word itself is a misnomer. Yes, there are servers in serverless. It's more or less a meaningless term in many ways. But the gist of it, what we often try to get across when we talk about serverless is enabling developers, enabling users to focus as much as possible on writing their code. In the other aspects of shipping and deploying software are taking care of by your form, by your cloud vendor, by something else. So you're focusing on the layers that matter, your individual IP, your differentiated tech, and the other elements like patching the operating system, scaling, managing capacity, managing resources. Those aren't in the full of the mind of the developer. Now part of that in something your function service. If I talk about, you know, where I mentioned I have a lot of experience, that means that people are deploying these functions to the Azure cloud.  Well, in order to run their bit of code when something has, it needs to be event driven. They need to associate it with some event. Hey, when a message gets dropped in a queue, when an image shows up in the storage account, when a record is changed in this database, when an HTTP request is made when it's Friday at five PM, an event could be anything, but that's one of the core elements of serverless. You also have this aspect of on demand compute because it's event driven, you can build your applications and serverless is that way where you only pay for a serverless function when it's actually running when that happens. If no employees are hired in the month of January, your new employee serverless functions never run and you're never charged. They never consume any CPU or memory. And so part of that too is the billing aspect. Now I want to introduce these concepts now because it's going to weave into what Kata is and what, how it brings these capabilities pretty seamlessly and in a very user friendly way to any Kubernetes cluster running anywhere on premises in the cloud with red hat a Azure doesn't matter. Now just an example of where we see these event driven and serverless patterns use. These are four big ones I see in that you might have seen yourself to accomplish automation tasks. Hey, when a whole request is submitted, I need to run some checks when, you know, Friday at five PM, I need to re-index my anything that maybe manually I'm having to do now that you would love to automate. It's often a great ask for serverless or event driven. Often you'll hear about serverless being used is the glue between different services. I have my postgres database here and I have my file store over there and I need them to be able to talk to each other somehow. And if there's not a direct bridge, I can stick in a serverless function and say like hey whenever data gets changed here transform it and write a record over there. Building very rapid APIs, especially APIs that you want to be able to scale in that event driven way. And then finally event streams, whether it's a Kafka stream, an event hub stream, a Kinesis stream, having streams of data from something like an IoT device or from system telemetry, another great candidate for event driven and serverless because you have these IoT events. The temperature is this someone has entered the room pop, run your event driven code. In a real world use case, if we've seen of this is something like in retail. And so I pulled a slide from a presentation of one of our retail partners that they gave at the Java one conference where they showed their architecture of how they're using event driven and serverless. And this will kind of give you the idea of the types of scenarios for extra building. So this is a massive retailer. They need to be able to scale to billions of transactions on an event like Black Friday or the holiday season that just happened. And so they have these individual event driven functions in their case to say like hey someone places an order. I need to run this process function. I need to then run this notify function. I need to run this persist function. A few capabilities that were important for their serverless platform is they need to make sure it was resilient. If something like an error occurs, that Kafka stream needs to be able to replay those messages. Losing a transaction, not getting the item that was ordered actually shipped, is a really big deal. So you need to have some resilience here. You need to be able to use like Kafka checkpointing if you're familiar with event streaming terminology. They really cared about cost optimizations. You can see here they're using things like Kubernetes and OpenShift in addition to some Azure Cloud functions. They want to make sure that in fact this partner, they're tracking things like the cost per order. You don't want to be spending CPU cycles or running events or scaling when you don't need it, right? You don't want to be running at Black Friday capacity in a Black Friday load all of the time. You want to be very smart about when and how you're using those precious compute resources.  We'll get to this maybe a little bit further into the presentation, but things like the order that those events get processed in. So order made, order sold. It's very important that the functions that the serverless pieces of code that were running this grab those in the right order. You can't just throw them out and hope that the order canceled is processed after the order was made event. So a few patterns that we see from time to time. In a few kind of an example use case. In this case in retail though you could see similar architectures whether it's in finance, healthcare, you name it, IT. So the one thing out here and it's kind of the history of CADA is now we're kind of we've had an intro into event driven and serverless. We've seen an example architecture. What about CADA? Well one of the ways that this came about is from our learnings in Azure of running serverless services like the architecture I've shown. More and more we saw that people were interested in running these event driven workloads not necessarily using the Azure serverless service or any serverless service. Maybe they wanted to run on premises. Maybe they wanted a little bit more control.  And what we saw was that the default Kubernetes scaling was not optimized for event driven applications. So how it usually works in Kubernetes for those of you who are familiar is I'll have my application. Let's say I order a processing application and I'll deploy it to Kubernetes. What Kubernetes by default is going to watch are what's called resource metrics. That's things like how much CPU is this consuming and how much memory is this consuming. And as it watches those it will be like well the app you publish seems to be using a lot of its CPU. It's at like 80%. I don't know why it's using CPU but it seems to be using a lot.  See if it's still using a lot of its CPU. It's very reactive. It's looking at the symptoms of what's happening. It's cCPU rising. It doesn't know how. It doesn't know why. It doesn't know how long the CPU is rising for and it's making the best decision it can based on that information. Now that's fine but it's not optimal. In running a service like Azure Functions, a serverless service, we use what I call proactive scaling, event-driven scaling, where rather than looking at the CPU for a function we look at the event source. We look at the thing that is triggering your function. So if this is an order processing function and you have a Kafka stream we're going to look at that Kafka stream. We're going to say hey there are a million messages here. Someone just dropped a million messages in Kafka. We need to scale right now. It doesn't even necessarily matter what the CPU and the memory are. There are a lot of events that are coming in. So let's scale you out to process those events. That's that event-driven scaling that we're talking about. It's much more rapid. You're scaling on the cause. You're scaling on the actual events that are happening and not just on the symptom. It also enables you to do things like scaling all the way to zero because if there's no messages on that stream of data you don't need to be running that application at all. There's no work to be done. So event-driven scale also lets you scale all the way down to zero. So let's show you a little bit of an overview of Cata. So Cata was born. This was a partnership initially between Microsoft Azure and Red Hat. We kind of huddled together talked about some of these problems and worked together to build the initial release of Cata. There was released a little over a year and a half ago. It's currently a CNCF sandbox project. So this is full open governance. I mentioned I work at Microsoft but Cata is not a Microsoft project. It's a CNCF sandbox project. It's going to monitor the rates of events happening in your system enable you to proactively scale any of your containers, any of your apps. You can say Cata, go scale this thing using event-driven auto-scaling. It feeds the data into Kubernetes APIs. You'll see in a second when we walk through how Cata works, but it's very non-intrusive. It's a single-purpose component. It only does one thing, event-driven auto-scaling, but it does it really well and it integrates with what Kubernetes already provides. We didn't want to reinvent Kubernetes. We just want you to say use this with Kubernetes. You're going to find a lot of value from it. It lets you scale to zero and back out of zero. So you can really efficiently use your CPUs and your cores. You can add it to any cluster, a new cluster. You could have an existing cluster that you've already been running for years or months. You can pop Cata in there. It's not going to get in the way. It won't do anything until you tell it to. One of the great things about Cata is that it knows about all of these different event sources. So Cata knows how to monitor events from Kafka, from RabbitMQ, from Prometheus, from a number of cloud services like Azure Qs, AWS, GCP. I think at this point there's like 33 event sources. It's extensible as well, so it can really monitor anything. But it's super easy and efficient to use there. And just a quick answer to one question that I'll do. CNCF, and thank you, it's a good one. This is the Cloud Native Compute Foundation. So this is an open governance foundation sponsored by a lot of large companies like Microsoft, AWS, Red Hat, you name it, that is a safe spot for open governance projects. It's actually where Kubernetes itself is hosted, is out of the CNCF. So a great foundation to be a part of. We were thrilled when we became a Sandbox project. Okay, so there's a few questions around how Cata works. I figure at this point I'm going to show a quick demo and then we'll walk through what happens behind the scenes. I think this is actually going to answer a lot of the questions that I see coming in. So I have here a quick scenario that I want to show you all. And I see this little bar up here. I don't think you can see it, but I'm going to move it out of the way just in. So I'm showing here on my desktop console, I have a Kubernetes cluster that is up and running. If you're not familiar with Kubernetes, that's okay. I'm going to walk you through this. You don't have to know about Kubernetes to follow along here in the story. What I have here in this Kubernetes cluster is a Rabbit MQ queue. So this is just a message queue and it's totally empty right now. There are no messages on that queue. And what I want to publish is an application that will hold messages from that queue. So maybe this is my order process function. Whenever something drops in this queue, I want to process a message. Okay. And I don't think I actually have that application there now. I think I need to deploy it, but I just want to make sure. Okay. Yeah. So nothing, there's nothing here. I haven't deployed any apps. Okay. So what I have over in this window, I think it's right here, I have a simple piece of go code that I want to run. And this is just a simple container that's going to talk to Rabbit MQ and pull the messages. It doesn't matter. You don't need to worry about knowing what this code does. It's just the hello world for pulling a message from a queue. And I'm going to now deploy that to my cluster. Okay. So I'm going to do a Kubernetes deployment. This is how I defined it. I'm saying, hey, I have this thing that's going to pull Rabbit MQ messages. Nothing here is different. Yes, I do have my username and password in plain text, but that's okay. It's a local one. You can't do much with it. We'll get to this in a little bit, but as part of this deployment, I'm giving it some metadata to tell Kata, hey, by the way, you know this thing I'm about to deploy? It cares about messages coming from Rabbit MQ. And I want you to use this using event-driven scaling based on Rabbit MQ.  There's even this other metadata I can provide where I can more securely handle secrets. No, I'm only half using it as you can see here. But you get the idea. So short answer is I'm going to deploy something that triggers and listens to Rabbit MQ messages. And I'm telling Kubernetes, let Kata do it. Okay, so let's run that in there now. So I'm going to add that to my cluster right here. So now I'm telling Kubernetes, hey, go about my container that pulls Rabbit MQ. Here's the cool. If I look at Kubernetes now and I say, tell me about your deployment. I have my consume running, but what I mean when I say scale to zero, it's not actually running. It knows about my container, but it's not running. It's not consuming any CPU. It's not consuming any memory. It's not consuming any container spots because Kata knows that there's nothing on that queue. So why should I run this container right now? Well, let's change that. Let's actually go ahead. In this other tab, I'm going to watch. We're going to watch this happen in real time. Let's watch the containers that are running. So I only have one container in my whole cluster right now, and that's the actual queue itself. So we're going to deploy something that's going to drop, I think a thousand messages to this. So I'm just going to publish a thousand messages to the queue and let's see what happens. So I'm going to run that. If I come here, we should see the container that's going to spin up and publish all these messages. But you'll notice actually, look at all these consumers that are spinning up. As soon as I start publishing those thousand queue messages, Kata realizes, oh, there's actually work to be done now. And very quickly, hopefully you saw it. If you blinked, you might have missed it. I went from zero instances to four instances. Now I'm spinning up to eight instances. This is much faster and more reactive than something like Kubernetes default scaling. CPU hadn't even been hit before I realized, oh, there are a lot of messages to be processed here. I might have cranked this up to 10,000 messages to make the demo more apparent. But you can see what Kata is doing here. It's scaling out very rapidly. I've configured it to scale out rapidly. You can actually kind of scale it down until it not to go too far, too fast. But I wanted to blow your minds here. So I've told it scale to the moon. But this is scaling a lot like a serverless function does in the cloud. In this case, in my Kubernetes cluster, if I waited here for a little bit longer, we actually might wait long enough. What will end up happening is once the queue is drained, once I've emptied that queue, I process all the messages, Kata is going to scale it back. It's going to say, okay, we did all the work we needed to do. Oh, wow. It's happening as if it's listening to me in real time. The queue is empty. Kata realizes there's no more work to be done scaling me back down to zero. I don't need those CPUs anymore. So I've had this very serverless scale-like experience in this case on Kubernetes with RabbitMQ. Okay. So let's walk through what happened behind the scenes and then I'll pause there and answer a few questions. Okay. All right. So what happened here? Let's watch this. What was happening behind the scenes? Well, a few things. The first, before I ever did the demo, I had deployed what's called the Kata operator. This is a one-time install step. I'll actually show you what it looks like. So hey, get me the pods. I have a special namespace for it. I've deployed here with this is a really smooth bit. I says in go entirely and go very tiny little operator that just knows how to orchestrate what you just saw happen. Okay. So I have the Kata operator. It has all these what we call scalers. Scalers are all of the different things that Kata knows how to monitor and scale for. I just brought over the Kata homepage. You can just the list as I scroll through it. These are all scalers that Kata knows about out of the box. So these are all the things that it can drive and run. Okay. So that's sitting there in my cluster. Now these darker blue boxes or gray boxes, these are actually just pieces of Kubernetes itself. This isn't part of the Kata project. This is a part of Kubernetes. Kubernetes has this thing called the metrics API, which enables you to omit and publish specific metrics about your application or about your system. And it has this other thing I annotated it is the HPA. This is the horizontal pod autoscaler. This is the default Kubernetes autoscaler, the one that scales based on CPU and memory. It's not a bad thing. It just doesn't know a whole lot about what your code is doing. And what Kata does here is if I, oh, let me switch to the next part of the animation. I've got my RabbitMQ queue. My events are in these slides. I'm going to switch this to Kafka. They all work the same. Like the dance that's going to happen here is the same. And I deploy my app along with the scaled object. You remember I saw that briefly. This is the little bit of metadata that tells Kata, hey, the thing I just deployed might cares about Kafka. It cares about RabbitMQ. It cares about Azure queues. You need to go listen and scale. I have value here called the lag threshold. This is how aggressively it scales. So 50 means if there's 50 messages that haven't been processed, I only need one instance of my container. If I set this to one, the lag threshold to one, that would mean if I have 50 messages, I need the instances of my container. One message per container is my target. It's just a target. It won't always be honored, but if I make the number higher, I'll scale slower. If I make the number lower, I'll scale more aggressively. I go and pop that deployment, my Kubernetes deployment and the scaled object description into my cluster. Kata now knows, okay, here's your deployment. You care about Kafka. Now, Kata starts asking your event source. How many events are being generated? Hey, Kafka, how many messages here aren't processed that deployment cares about? Now, when I started the demo, the event source was totally empty. So Kata told the metrics API, which told the HPA, actually, in this case, Kata did it all itself. Kata scaled that deployment down to zero. It said, we don't need to run it at all. Now, as soon as a message comes in, the message hits your event source. Kata asks this question, how many events are being generated? It sees that there are messages to be processed. Kata tells the HPA, hey, this deployment has a hossages that need to be processed. Kubernetes now goes and does its cool scaling thing because Kata has just made it a lot smarter. It's told it about how many events are being generated. Now your deployment up, and it pulls the messages. So one note I want to call here. I know there's a lot of info. Kata doesn't pull the messages and send the messages to your deployment.  It's up to your deployment. It's up to your app itself to actually go and fetch those messages. And there's a reason for that because it means that you can now do things like checkpointing and order delivery and all of the things that whatever event source you're using is going to have its own semantics to do that. Now this goes on and on until, as you saw, if I'm actually getting a lot of messages, if maybe it's not one message, it's thousands. Kata's telling the Kubernetes autoscaler, hey, I need you to scale it a little bit more. There's a lot of stuff coming and you'll see what happened in that demo. Okay, let me go over these core principles and I'll do a quick pass through the questions. So when we build Kata, and as a maintainer now, we have some core principles. One is we didn't want to rebuild anything that Kubernetes offered itself. We didn't want to provide our own autoscaler. Kubernetes has an autoscaler. We just want to figure out how can we extend that autoscaler? How can we make it a little bit smarter, a little bit faster? So we only built the pieces that made it smarter and faster. We didn't rebuild the whole thing. It's very single purpose. It's not doing a lot. And we want it that way. If you want to do more, then pull in other stuff that does other things. It's not a service mesh. It's not an event broker. It just scales based on the number of events that are happening. Kata works with any container, with any workload. It can scale stateful sets. It can scale deployments. It can scale go code. It can scale Java code. It can scale Azure function code. It can scale Python flash code. Anything works with it. We want to preserve what makes messaging brokers powerful. So there are things like Kafka and RapidMQ that give you these rich semantics for processing messages. We didn't want to bypass any of that. And then finally, we want to make Kata open and built by and with the community. We have biweekly standups every Tuesday that you're all invited to join anytime. Kubernetes Slack channel on Kata. We wanted to make this general purpose, not just a Microsoft tool or a Red Hat tool or a Codit tool or you name it. A few folks who are using Kata today, these are just a few of our logos. Ali Baba Cloud has it integrated with some of their offerings. Apache Airflow, we're using it at Microsoft for a few projects. A number of folks who have been using Kata in production as well. All right, so let me take a pause here. I'm just going to look at a few of these questions and see if there's anything here. There's one question about incoming traffic. I'm actually going to pause that one and answer it a little bit later for time. Yeah, and I think there's one question on how we configure the burstiness of the metric. So I briefly went over this, but let me just show you this very quickly here. If I come over here to the Kata site again, Kata.exe, if you have questions, I'd recommend you come poke around here in the docs too after the webinar. Hang out with me for a bit more. I've got some more stuff I want to share with you. But when I deploy that scaled object to tell it to scale deployment, I've got a few knobs here that I didn't go over. I can configure the polling interview. How frequently does Kata ask Kafka if there's messages? For my demos, I made this really low because I wanted it to scale quickly, but that means that I'm adding a bit more traffic there. Cool down period is how quickly it can scale back down to zero. I can set minimum. Maybe I never want to scale to zero. Maybe I always want to keep one available so I don't need additional latency. I can control whatever minimum I want, one, 10, 50. I can set a map pay. That's cool if you want to scale to the moon, but only scale up to 20 because at past 20, you're going to start hogging too many resources. I can control these fancy HPA metrics. I won't go into them now, which is how many it adds and how quickly it adds. So there's a few knobs here and more, I mentioned, the lag threshold that give me a bit more control over the behavior of Kata. So it's not just running wild. I'm trying to move this window out of the way, but okay, let's look here. I'm going to count this one as answered. Hopefully I described it simple enough. I know a few of you here are more beginner, but at the very least, I want you to at least understand Kata is helping your container scale kind of like you imagine a serverless function scale. We did mention Kata is written and go. We talked about what CNCF stood for. I talked a little bit more about what scaling takes. In the other one of comparing Kata to some other open source projects like Knative, I planned out later along with the HD. This is, I'll answer this one now. Actually, I'll pause. Let's move on. Let's move on. So end you there. Keep them coming. We'll take another break. And I think there's a few I didn't answer. I'll get to them. So there's one more Kata pattern I want to go over before we dig into some of those other questions. And that's this quite we get sometimes, which is what about long running executions? And you would by that demo I showed how quickly I scaled out to 50 instances and how quickly I scale back down. Well, what if each of those messages wasn't something small doing a simple mission? What if it was actually like the link to a video a three-hour video that I need to transcode or encode? Well, that's a lot of work. That might take a few hours to do. How do I make sure that Kata scales me with scale, but it doesn't disrupt a long running process? And let me show you why that, because Kata or, I mean Kubernetes, Kubernetes has this interest. Let's imagine I'm scaled out to four in five containers of my app running. And each of them I've got animated like these little progress bars. Imagine I'm encoding a video and instance one is barely started. Instance two is almost done. Maybe it's going to finish in the next minute. Instance three and instance first kind of far, somewhere in the middle. That Kata, Kubernetes, and sorry, I'm getting unnoticed. I might have a bit of a hiccup in my video feed. So I'm going to turn off my camera. I'm going to keep her to hopefully save some bandwidth. Let's imagine that Kata tells Kubernetes, hey, we actually don't have a lot of messages in the queue. We can probably start to scale you down a little bit. We might not need four instances anymore. Well, when Kubernetes tries to something down, I often talk about it's kind of like Thanos, where it snaps its fingers. Trouble hearing you. I said Thanos. In theory, I thought I was talking. It snaps its fingers and Kubernetes is going to down, but you decide what it's down. It's going to randomly decide what it scales down. So you can see here in this case, it's going to scale down one of those things that was almost done. You're like, no, now that's going to have to restart on one of these other instances. Like I have something long running. Please don't scale me down where I'm in the process. So if it's short lived, that's fine. If it's long running, you're going to have options. One is there are some APIs in Kubernetes to tell Kubernetes like, hey, hold on, give me a second. I know you're trying to scale me down. I'm just going to give you a second. It's probably intended to really give you like a few seconds to clean things up, but we have tried this out and you can kind of like do this for hours. We're like, hey, Kubernetes, give me a second. And it comes back a second later and like, just give me a second. You do that for hours. It's fine. The other option though is use this capability of Kata called scaled jobs. Now what scale jobs does, it's instead of scheduling containers that are going to be constantly pulling those messages, you create what's called the Kubernetes job for every single message. And jobs are different than deployment because jobs, the intent is that wakes up, it runs to completion, and then it terminates, right? I don't want to terminate my web server. My web server should keep serving traffic constantly, but a job is something like wake up, process this data, and then terminate yourself. So you can tell Kubernetes, hey, for every Q message, I actually want you to create a Kubernetes job. The job wakes up, pulls one Q message, encodes the video, terminates, and then it's done. Kata is going to orchestrate this process for you. It's going to periodically remove completed and failed jobs. So it will keep them clean. You can control how many jobs you want to have in parallel. Like, hey, I'm cool transcoding 10 videos at a time, so you can have 10 parallel jobs happening at once. You can control how aggressively it creates those jobs. There's a lot there. So I just want to note, if the event driven thing you want to do is a little bit more long running, you might be interested in this scaled jobs pattern, other than that scaled deployment one that we kind of talked about, where it just wakes up and keeps pulling and pulling and pulling as many messages as it can. So very useful pattern here that I wanted to share. Other thing I want to cover quickly, Kata currently is 2.0. We actually rolled out the 2.0 version in November at KubeCon. So a few things I wanted to highlight for those of you who might have looked at Kata before, things that are new. We broke out scaled jobs as its own custom resource. So we always supported scaling jobs, but it's to kind of be like a subset of functionality. Now it's its own first class thing. We let you scale lots of stuff. You can scale any type of resource. You could scale a stateful set. You can scale custom resources like Argo, rollouts if you're using other frameworks. We allow you to define multiple triggers on a scaled object, and we will scale based on the noisiest of the triggers. We provided a bunch of new scalers. We enabled better extensibility so that you can do external scalers. Maybe you have, like at Microsoft, one of the ways we're using Kata is we have some internal tools called Geneva that we use to monitor our services. You can build a Geneva Scalar that knows how to scale based on our own proprietary thing and just attach it to Kata just by writing a bit of extensibility code. We support liveness and readiness probes so that Kata stays reliable. We expose some Prometheus metrics for every scaler so you can have better first class monitoring. More around that 2.0 releases in this blog post though, if you're curious in checking that out. Okay, let's get him here. This will actually start to answer one of the questions here and I'm seeing a few other ones of how Kata compares to some of these other serverless runtimes, including things like Knative is a very popular one and a very useful tool that we get a lot of questions on. And the way I want to kind of dive into this a little bit is talking some about a serverless runtime in addition to Kata. So here's how I want to explain this. What I'm showing here on my screen right now is the code required, you actually saw this a minute ago, to pull a message from a RabbitMQ queue. So this is the code. This is like the hello world thing. I've got to create a connection. I've got to connect to an exchange. I need to pull in messages from RabbitMQ. It's not a whole lot. Like this isn't terrible. This will only take you a few minutes to write. But there's code here that I need to write to actually connect to that queue, to pull in the message, to make sure that I'm retrying it and keeping it resilient and doing all those cool things that I want to do when I'm using a queue. Now, the challenge with this though is that that is a bit of code. And oftentimes when you think about serverless, you don't want to have to write all of this code. Like if I'm writing an Azure Function or AWS Lambda and I'm pulling messages from a queue, I don't have to write all that code. In fact, what a serverless runtime will provide is code that looks more like this. This is the Azure Functions runtime. Very similar code sample could be pulled from AWS Lambda, Google Cloud Functions, you name it. It's doing the same thing. The left and the right side of the screen are doing the same thing. But what a serverless runtime is going to provide is all of this code on the left as part of the runtime. Like you don't have to write it as a developer.  When I get that queue message, this is what I want you to do. So pairing a serverless runtime with Kata can be very useful. Now, there's a few serverless runtimes that are open source. Azure Functions is one of them for sure. So you can create an Azure Functions project and you can just write, hey, I have this Azure Function. I want you to package it up in a container and I'll go deploy it to Kubernetes. So instead of running this in a Cloud serverless provider, using Kata, you can package that runtime with the code using some of these commands and go run it in Kubernetes. So hopefully you get the idea that you can still have that serverless runtime experience. In Kubernetes, you use Kata to do the scaling. You use the runtime to minimize the amount of code you have to run. So there's another demo that I could do here to kind of make that solid. Maybe I'll run through it very quickly because I don't want to spend too much time just to kind of get you the sense of like, what does using a serverless runtime with Kata look like? Let's create a quick project here. I'm going to just create a folder called live demo. It looks like I've used something like that before. So if I'm using a serverless runtime, let's say I want to use Python. Here, I can choose a bunch of different event sources that I actually care about. I think there's even more here than I'm not showing like Kafka and RabbitMQ. But the idea here is that I can use a serverless runtime in this case inside of Visual Studio Code to pull messages from my queue, which I have lovingly named queue. I could build this, debug it, run it the same way I would a serverless app that's going to be published to the public cloud to Azure in this case. But the last step of this, and I'll just show this part quickly, here's all the code that I have to have. This is pulling from a queue. All of the additional code is handled in the runtime. I want to pull from a queue. I could come in here and do whatever work I wanted to do. But once I'm ready, once I've debugged this thing and it's doing what I want it to do, the piece that I wanted to highlight is that I can just simply run this command. In fact, I have it saved here because I knew I was going to need to use it. Maybe I don't. I can run this command, funk Kubernetes deploy. We'll name this Python function and I'll give it a registry to stick the container into. But what this is now going to do is it's going to build a Docker container for my function, this Docker container. In fact, it's going to build a Docker container for the serverless runtime and it's going to stick it up in my cluster so that Kata can now scale it. Apologies, I know I ran through it really quickly. It's because I want to get to the other stuff. But just to give you an idea, the thing I want to emphasize is you're now using a serverless runtime to pull in those events to help broker those events to simplify the code you have to run. Kata, in this case, is just going to be doing the scaling. So once this is finished and I'm not going to wait for it, I would be able to come into my cluster here and you would see that my serverless function is parting in... Actually, it's there. Wow, that happened quickly. There's my function, scale to zero. If I drop something in the queue, you would see this code spin up and run. So again, hopefully that makes sense, that the main gist here is serverless run times can simplify the code. All right. Yep, brings an event-driven programming model paired with Kata for scale. It gives you that same serverless developer experience, package it in a container, scale it with Kata. There's more docs in that if you're interested as well and samples too. In fact, every demo I've showed here, there is a sample on kata.sh where you could run through the RabbitMQ demo or using a serverless runtime. Both of those are ready for you to walk through if you're curious to learn more. So what's some of the reasons that folks might want to use a serverless runtime and host it on Kubernetes with Kata instead of hosting it in a serverless provider, whether that's Azure Functions AWS Lambda, you name it. Well, you might want to use your serverless on-premises. You don't want to be running in a data center all of the time. You might be more hybrid. Maybe you have existing Kubernetes investments. You have more custom compute security or networking requirements. That's when I face a lot, when I'm working with financial companies. They're like, hey, I love the serverless service you have, but I have more constraints around what I can and can't pass through in networking or maybe I need special nodes that have watchdogs running on them or whatever it is. And then finally, it's no vendor lock-in. If I'm running in Kubernetes with my own containers, I can run that anywhere. I could run that same... I didn't even specify for this demo that I've been running. Where is this running? I could do this exact demo on the Azure Cloud, on DigitalOcean, on Azure. I said Azure twice on AWS, on Google. I can run this wherever it makes the most sense for me. Okay, so there was one question. Now let's start to answer some of these other ones. How can you do Cata with incoming traffic? So often when I think about incoming traffic, I think about maybe a non-traditional event source. That's a bad way to say it. Not a message broker, but something like HTTP traffic. So how can I use Cata with HTTP traffic? And the answer is you can. It just requires an additional piece here into the mix. So I think actually, and there's a... I had a slide here, because I knew this was going to come up, but in the FAQ of Cata.sh, we have a question here, which is, hey, can I use Cata with HTTP? And the answer is yes. You just need to add in one additional piece. In fact, there's a diagram right here. So Cata needs to ask something how many messages are coming in, right? That's how Cata works. So I need to talk... Cata needs to talk to something. It can't talk to the ingress controller directly today. It's something we've actually considered doing. So the pattern we recommend doing here, and I'd recommend... You saw how I found this doc. So whoever asked that question, I would recommend you come to this doc. You would usually set up something like a Prometheus server, have Prometheus expose how many HTTP messages are coming in, and then Cata can scale the thing. The other thing I'll mention quickly here, since we're kind of in the Q&A section now, we're actually spinning up an additional project as part of the Cata org called Cata HTTP. Let me see if I can find it. If I can't find it, I won't worry about it. But we actually have some folks, HTTP add-in. We actually have some folks who are looking at building capabilities. Yeah, it's still in the early stages that let you do HTTP without having to manually set up what I've just described. So it is possible. You have to use Prometheus today, or at least that's what I recommend, but there is some work happening in that space. All right, so good question. The other question here was around, how does this compare to Knative? And I knew this question was going to come up, so I prepared some slides. Cata, I mentioned, if I think about my container, the actual user code, my container is responsible to pull messages from the event source. It is up to my container, maybe a serverless runtime in that container, but something needs to connect to RabbitMQ or Kafka or whatever it is and pull the messages in. What usually happens with solutions like Knative and OpenFaz is that what happens is you write a container that knows how to respond to HTTP traffic. So you would write something that's like receive HTTP requests and process the messages. If you want that container to process Kafka messages, you would deploy what's called a Kafka adapter, and there would be some adapter that's provided by the project, OpenFaz and Knative, both have a Kafka adapter, and you have this adapter that pulls the messages from Kafka and then sends them over HTTP to your container. Okay, so there's a little bit of a difference here in how the events are distributed. Now, there's pros and cons to both of these approaches. So the pros of kind of the alternate, the non-Kata way of doing stuff is that the developer just has to know how to talk about HTTP. They don't have to know how to talk to Kafka. Everything becomes HTTP, which is great because pretty much everyone can write an HTTP server. Now, some of the downsides though is that when I have some more specific message systems, like if I'm using Kafka, Kafka provides way for this SDK to preserve ordering, for it to do checkpointing. This becomes a lot harder when you're translating everything to HTTP. In fact, none of the providers that I'm aware of enable you to do something like checkpoint or do ordered messaging at scale using this pattern. So you get some pros, but there are some cons. You can't talk directly to that event source anymore. So things like stream processing where you're windowing and pulling and windows of data just become really difficult when you're trying to do all that windowing with just HTTP messaging. And then the last one here is like, this event adapter is now responsible for talking to the messages. Your developer can no longer control that code for better or for worse. Now again, the alternate approach, the Kata approach is not perfect either. It has pros and cons too. It looks like I messed this one up. I think it's almost the opposite. The downside here now is though the developer has to have this SDK code in there somewhere. I mentioned a serverless runtime is a useful library that can abstract that, but that has to exist.  This could be over GRPC. This could be over AMQP. This could be over any protocol. You're talking directly to the event source. Kata is just scaling it up. The only other thing I'll mention in terms of I'll leave this up as we answer the last few questions. The only other thing I'll mention in terms of differences between Kata and KNative, I mentioned Kata is very single purpose. It just does the scaling thing. KNative provides actually a lot more. So KNative provides like ingress. It provides things called replicas where you can do versions of apps. It provides routing so that you can route between the apps. You can optionally provide in like this eventing component. It does a lot of things, like 30, 40 things, all pretty useful things, but you grab a lot of them when you use KNative. Kata just does event-driven autoscaling. It's very unobtrusive. It just sits there. You apply it to scale what you want it to. That's not saying one is right and one is wrong, but it's worth noting that if you use KNative, you also will be adopting a lot of other features for better or worse as well to it. So hopefully that helped some. I'm a fan of KNative. I follow that progress of that project a lot. I think it's doing some incredible things. And KNative and Kata have actually been working together for a bit now to figure out how we can bridge some of these worlds together to make KNative do other stuff as well. Take a look. Take a look at both. Okay. Let's answer a few more of these as we wrap it up in the last five minutes here. Limit scaling. We talked about already. You can define it. I'm going to ignore this one around service meshes. It's a great question, but not this webinar. I think there's other webinars on service meshes. Definitely check that out. KNative eventing, that event pattern is what I talked about. KNative eventing is the kind of thing in the middle that turns everything into HTTP. So hopefully that answers that question. Let me read this online. Can we combine Kata with the usual HPA? For example, if the app is processing images of different sizes, it may happen that just scaling and function of images may not be enough. Yes. So the answer is yes. You can you can combine HPA scaling with Kata scaling and you kind of leave it up to the HPA to use its algorithm to use both bits of data. But great question, Sergio. And the answer is yes. You can't combine them all. Good question, Kevin. If you're extending Kata, like you have your own event source, does your extensibility need to be written in Go? And the answer is no. We actually provide a GRPC protocol for you to follow. One of our most popular extensibility pieces for Kata right now is actually for this tool called durable functions. The extensibility that lets Kata know how to scale a durable function is written in .NET. But it can talk to Kata, which happens to be written in Go. So no, you can extend it in any language. Great question. Yep, Kata, this is similar to the other one I see someone ask. Kata can be combined with traditional metrics. So you can use Kata, but also include CPU and memory. You just make it smarter. You don't have to say it's only event-driven or it's only CPU. Let's see what else is here. We talked to him about Kata and KNative. Someone asked, I just like this question. We got about three more minutes left. Incorporate Kata with quantum computing. Sure. As long as quantum computing works with K Kubernetes, I would assume that there is a world or a project somewhere that has Kubernetes using computing. I have no idea. I'm not a quantum expert, but nothing would stop you from that. In fact, I guess an interesting note. Because how Kata integrates just natively with Kubernetes APIs, usually if Kubernetes can do something, Kata can do it as well. In fact, almost always. So like for example, a few cloud providers have this feature called like virtual nodes. There's another CNCF project called virtual kubelets where let's say I want to scale out really far, really fast. Similar to how I did it before, like imagine if your cluster didn't have the capacity to scale out as far as maybe your best, your Black Friday sale is causing you to scale out. You can turn on this virtual kubelet and scale out to serverless containers. It's this cool feature. Check it out. Virtual kubelets, another project. Anyway, Kata works great with that. You can use Kata to scale into serverless containers that aren't even in your cluster. Because Kata just tells Kubernetes, I need to scale. Kubernetes is actually in charge of taking care of it, whether that invokes cluster scaling, serverless container scaling, you name it. All right, doing a last pass here before we run out of time. Great questions. I appreciate all of you asking all of these as well. Incoming traffic. Yeah, I'll just wrap up with this one, Moe. I know this one was a little bit earlier. I could have grabbed this one earlier. I think I just missed it. Any benefits to event-driven scale over traditional scaling? And it depends on the solution. I think the big benefit of event-driven, if it's much more proactive, you're scaling based on the cause of the load. So you actually are scaling far and fast. You're able to scale all the way to zero, which isn't really possible with resource scaling, because the CPU is never going to be at 0%. So when do you scale it down to zero? That said, resource scaling isn't all bad. And in fact, I would encourage you, and we kind of talked about, Kata lets you combine them both. See where Kata might fit in? See where it doesn't? Super unattrusive, as I mentioned. You can pop it into a cluster. You can only have one of your containers using Kata to help it scaling. The other 99 containers might just be using vanilla Kubernetes. That's totally cool. Maybe you want to mix and match some event-driven metrics, some resource metrics. That's totally cool too. But it's a very valuable piece in your toolkit. Definitely worth considering. And so thank you all again for joining. Thanks for watching this recording. This slide was up. Hopefully you read it. Check out the site to learn more. Reach out if you have questions on our Kubernetes Slack channel. I would love to see some of you in our community stand-ups, whether you want to contribute with code, docs, issues, samples, designs. Just saying, hey, thumbs up. I noticed all of it is very welcome. We want to bring everyone in. So thank you all very much. And with that, I'm going to wrap it up and pass it back over. So thanks all for joining. Thank you, Jeff. That was awesome. Really appreciate all your knowledge there. And thanks, everyone, for joining us today. Have a great day. Bye-bye.


My name is Charles Venditti. I'm an investigator in the National Human Genome Research Institute here in the Intramural Research Program at the National Institutes of Health in Bethesda, Maryland. And I'm here with my colleague and collaborator Dr. Randy Chandler to discuss our recent developments in gene therapy for methylmalonic acidemia. This is a very grave metabolic disorder that mainly affects infants and children. And unfortunately, despite all conventional dietary and cofactor therapy, is lethal in many children. We're using adeno-associated virus to basically deliver the gene that's defective in methylmalonic acidemia. And the virus is just like a car that delivers a passenger, which is the correct gene sequence for the genetic defect. Our early studies, preclinical studies in our mouse model of methylmalic acidemia, which is an early lethal model of the disease.  Those experiments were quite successful. The mice survived after the treatment with the adeno-associated virus until adulthood. Unfortunately, we began to observe an increase in liver cancers in the mice treated with the AAV at levels that we hadn't observed in our control group of untreated mice. The mice fell up cancer at a rate of between 75 and 50 percent compared to the control mice, where only 3 out of 51 of the mice developed cancer. And notice that in the liver cancers, one locus, the rion locus, was overrepresented in the cancers versus the control tissue. The high early expression of this gene is a contributing factor for the AAV vector integrating into this locus and causing cancer in the mice. Most of the AAV integrations that caused liver cancer landed in a gene that is not found in the human genome. Some people would wonder whether or not the cancers we observed after AAV gene therapy were therefore a mouse specific phenomenon. So we designed a new vector using a different promoter enhancer system. And what we observed in a small number of mice is integrations in the same locus that we observed before without the occurrence of the liver cancer. So what we suspect may be happening here is that the new vector we have developed is not activating nearby genes in proximity to the integration, and therefore it's a safer vector. But since we've only studied this in 10 mice, we'll have to perform more studies before we can be sure that this is indeed a safer vector. What I think is important about our study is, you know, we've identified a risk in the mice, which may or may not be present in the humans, but it's an important risk to understand and to disclose to patients. There's been a great controversy in the field of AAV gene therapy about whether or not AAV could ever be associated with cancer. And our results clearly prove that it in fact can be. We feel that these studies will help us move forward to develop safer gene therapy for methylmalonic acidemia because we have defined a very important safety parameter related to the AAV gene therapy in our mouse models, which is critical to understand before we move to human patient trials.


One thing I've noticed is a lot of people really struggle with using position absolute when it comes to making responsive designs. And of course, we need to make everything responsive and position absolute, maybe the first thing is maybe don't use it if you can avoid it, but sometimes it is the better solution or sometimes you're stuck having to use it. And in those cases, it can be frustrating when you feel like you're just throwing magic and now you have to guess at every number and then you resize the page and it's not really flowing the way you'd expect it to and you're using percentages and maybe it's not, things aren't lining up the way you'd want. So in today's video, I'm gonna be taking a look at part of this front-end mentor project that you can see on the screen right now and we're gonna be focused on these two credit cards because this is something I've seen a few people trying to do with position absolute where we could actually use grid probably to lay them out but position absolute works well for them and it's less so of getting the layout like this but it's more so the logo here, the text, each piece here is a separate element on top of a background. And so to be able to do that, position absolute can actually work pretty well and you can make it perfectly responsive as long as you take the right approach to doing it. So in this video, we're gonna use this project to look at how we can use position absolute and still have things be perfectly responsive. Hello, my front-end friends. Thank you so much for coming to join me once again. And if you're new here, my name is Kevin and here at my channel, I help you fall madly in love with CSS and if I can't get you to fall in love with it, I'm hoping to at least help you be a little bit less frustrated by it and today we're gonna be doing that by taking a look at position absolute and how we can make sure that it does stay responsive and we're gonna jump into the code now and you can see I'm not starting with very much. I have a basic starter template here. I've linked to the Google Fonts for this project and I've set up the colors as custom properties in my CSS and that's about all I've really done and I have this content grid that is right here. And so for the content grid, my idea here is I just want something that's gonna hold my content and make it two columns. I'm not gonna go into the code that's for that because I really just wanna focus on these guys and the whole position absolute thing, but my finished code will be linked down below so if you wanna see how that content grid works, you can also check that out at your own time. But in here, we're gonna need two things and we need two things. We need something for the cards, we need something for the form so then we can actually focus on the cards. So to be able to do that, and we're gonna have my card previews which is going to be the div here that I have the two cards in it and then over here, we can just have a placeholder for the form and here is what that is giving us where I'm using grids, we got like two equal sections here and if we go look at the CSS, I have put a border on the two elements there just so we can see them and see the space that we're gonna be working with and you have two columns that are coming there that we'll worry about a little bit later and the reason I have them stacking is well, we've looked at one design, we also have the mobile design like this where we need the card sort of overlapping and it's gonna be another exploration where we're gonna look at sort of the inside of them but we're also gonna look at the outside and how we can handle those as well. But of course we need the cards to actually be in there and so I just have a card front and a card back that are gonna be right here, nice and simple, nothing too fancy and of course we need the different things that are actually going to be in there and this is where there's a really important thing when it comes to position absolute that you sort of need to decide at one point because we have these images here and even the back, like even the card here and the background gradient thing here, those are images and I could set those as background images. The problem with the background images it doesn't actually take up any space and when we use position absolute we always wanna have it like a space that that thing can live in and if we don't have a defined space for it that's the first thing that can make life more difficult because then you're working within like the zero height div or something like that and that just makes life a little bit harder to function but we do need to place all of these things in here so you can see I have an image, I have the image for my card front, my logo and then I have the text here just all in spans and then we can do the same thing. We have the card background as well as this right here and I am specifically using the card front BG and the card back BG here as actual images instead of having them as background images just so they're gonna actually define what my space is and those we'll see how we're gonna do that but for me it's really important that these actually get defined as actual items. The other thing is right now we can't see it but I do have the logo floating around here somewhere but it is white so just really fast. I have a variable here. We're gonna turn on dark mode for a second. There we go, just so we can see that the logo is there and we'll leave it in dark mode for now because it's easier on the eyes and I like it better and we can always switch it back after but yeah, I'm just really important for how I'm doing this. Different situations will have different things. Sometimes you'll have other content and then one item in there that's position absolute. That's fine. As long as you have some content that's defining the size that you're working with. That's the first thing you wanna have. So card front has a whole bunch of content in it but anyway, I'll show you what I'm talking about. It'll be a little bit easier. So to better illustrate and this is something I always tell people when they're, if you're newer to CSS and doing things it's a bit of a different mental model in general and it's a lot easier when you can see the spaces you're working with so putting backgrounds or borders on things to help visualize what you're working with is always a nice first step. So yeah, there we can see I have these green borders now that are coming on these so I can visualize the space that I'm working with and what I wanna do we do wanna be using position absolute but as I said, we wanna be a bit careful but I'll show you why. So say we wanted all of these items to be position absolute and I've put classes on them so that does make things easier to select and we're gonna be selecting them individually in a second but what I could do just to make my life a little bit easier here is I could say that my card front and select everything inside of it so this is just selecting all the direct children of my card front and then on there we can put the position absolute so if I hit save everything just sort of stacks on top of each other and it makes this big mess that we can see right here. Now one way to understand this what's happening here is on my card front I'm gonna hit save now and give it a height of 20 pixels and you can see it's moved we have 20 pixels there and maybe let's make that 50 pixels and the card front and you know what maybe even we'll change the border color border color on this one's gonna be red for a second and you can see my card front here at the top is only that tall all the other elements are in there but their position absolute which means they're pulled out of the flow and because they're pulled out of the flow they're ignored by everything including the parent so the parent is shrinking down to zero pixels tall and that just makes life really hard to work with as I said it's a lot easier if we actually have a defined space to work with we can say select everything except the background image and we can do that like this so we're selecting every child except for so everything but or not including the card front BG and now if I hit save you can see things have moved around a little bit why did that not work and that's just because I still have the height on here so we can get rid of that height that's on there and there we go we have solved all the problems or not all the problems we've solved some of the problems that we've had now another thing you're gonna notice is the logo or not the logo but the text with the logo and the text and everything else is overlapped and it's also moved over to the right side and that's because when we do a position absolute it's sort of gonna try and stay where it originally was in the flow so in this case we have our image everything else has moved over and then they're getting a position absolute so they're sort of all stacking but they're not like shooting off somewhere else they're gonna stay in that realm that they were living in but now we can actually position it but how are we positioning it? We still need to think about that and I wanna make sure that I'm positioning it in this red box but ideally this red box should actually fit the image that's inside of it and that's the whole thing like we could give it a physical like an actual height and width it's an option but giving something an actual height and width it could be a little bit tricky especially if you want things to be responsive because responsive height all of that is a little bit we try to avoid that as much as possible generally so I actually want this image to define the size of what my div is going to be so one way we can do that and this one's very peculiar to this one situation where I'm using an image and I don't have any other content often something like this wouldn't necessarily be needed but really because we're trying to focus on like this one little thing that we're working on I'm gonna give this a width of min content and we'll hit save on that and you can see the width is actually shrunk down to fit the space of the image and min content means get as small as you can based on the content that's inside of there this specific step won't always be necessary in this situation but it's one of those things where I'm not worried about really how you get to this point but the point of what I'm doing right now is trying to have a defined space that I'm gonna be working with I wanna have this width, this height and ideally if you have content that can set that space up rather than having to set like a fixed width and a fixed height that are really just very specific and then it is hard to update later on that's usually the best approach so I'm trying to base things on the content that are in there and with the image being the only thing that's in there this is perhaps the best approach often you might be using something like display flex or some other things where it's sort of gonna be doing its own thing anyway on the parent and so this might not be something that you need to do it's really dependent on the situation but the main thing right now is just get yourself a defined space to be working in there is two things with this because this is an image a lot of resets have something like this where they have a width 100% I should say a max width so if you have that you'll actually have the whole thing disappear so that is 100% of the parent and if it's trying to be with 100% of the parent but the parent is a min content which means go as small as you possibly can get we just shrink down to nothing so if ever you do run into this type of situation a little bit of a divergence from positioning now I do apologize but if ever you do run into this position what you could do is select the specific element that is causing the problem and we could do a max width on there of revert and revert basically means or it does mean go back to whatever it was originally it is different from initial I'm not gonna go into the difference of them now but often when you use initial you probably actually wanna be using revert now the last thing here just really fast since we are working with an image you'll notice this little space that's underneath here that just means you need a display of block on the image which is a very common reset that you'll see used now really fast I just set this exactly up how we had before but added these selectors to also be doing the back and not only the front and I'm gonna just take this part right here and we're gonna move it down a little bit just cause I like having the parent first and then the children coming after that we'll hit save on there it also got rid of the color but again we have the border that's setting up the color on those so we can see them now I'm gonna start with taking the number so I just have my card front number here and just it has a larger font size it'd be a little bit easier to see what's happening so I'm gonna set the font size up for it first and we're gonna try and position this I'm gonna say a top of zero for now and it will move all the way up but I'm also going to say a right of zero and hit save and you can see it's moved all the way over but remember when I talked about we wanna set up something so we're working within a confined space we're defining the space we wanna live in and my number is completely gone from there or you know what let's do this instead of a top of a bottom and it's gonna shoot all the way down to the bottom of the page and that's really awkward I don't want it there I want it to live within this gradient background that I've set up with the green border on it so to be able to do that I wanna go ahead and define where the containing block for this element is and how can we do that? Well the easiest way is usually on the parent so on the card front and the card back here or I'll do it on this because we'll eventually get rid of those colors the borders on there and on this I'm gonna give those a position of relative and then when I hit save you're gonna see the number jump up and now it's living within the green box here because now this area is the containing block for it which means that because that's the containing block for it that this bottom is now relative to the bottom of here and the right is relative to the right there which I'm assuming you sort of know but we obviously don't want it to be here we need to move it around a little bit but the first thing I'm gonna do and remember these are actually working because here we turned them all into position absolute so other than the front BG so like all of these elements here are position absolute as well as my CVC number down here so first position absolute then I can use my top, my bottom, my left and my right and because we're locking it into where this green box is it makes it much easier to be responsive as we're gonna see soon but a few things really, really quickly we have my number there so let's leave this like that for a second I wanna show you another nice trick because there's a bit of an issue what we're gonna do to highlight this issue is on my front and my back here let's add a bit of padding padding to rim and when we add padding it adds space around so now we have all this space before my border that we can see and let's do this maybe for the logo because the logo is the first one and for now we're just gonna try a top zero and you'll notice that it goes into the padding normally if you do padding and there's text inside the text is pushed in when you're using position absolute that's not the case we end up with the space that's showing up here so obviously I don't want padding now but if we look at the design I do sort of want to sort of treat this like padding so even if this card was a background image and I just set a fixed width and a fixed height instead of basing it on the size of that original image I wouldn't be able to use padding to create all the space that I need around here on all the different sides I have to come up with a different approach and we're gonna do it sort of the traditional way but then I'll show you a nice trick to sort of create fake padding when you're using positioning so the first thing we're gonna do is get rid of that padding because we don't actually need it and we're gonna come in with a different solution and so here my logo instead of being a top there we're just gonna say that we wanna move down by two rem so I can do that and it's moved down by two and then we can also say a left of two rem and hit save and it's gonna move over by two and what this is doing is it saying the left side of my logo is two rem from the left and it's two rem down and the top is two rem down and that's important because now if we jump over to my name we'll skip the number and we'll come back to that but if we look at the name and I wanna position the name somewhere we can come and do that now we'll put it over here and we wanna put a bottom of two rem on there so that's gonna pull it down and of course the left of this can also be on that one so it's positioned relatively close to where I want it to be but the bottom of two rem here is not looking it's looking at the bottom of this element whereas when I said top before it was looking at the top of this element and this is important and you might already know this about positioning but this comes in a lot when we wanna do something like our number because our number is not really an obvious distance away from anything we sort of need to guess a little bit but it's close to the middle so my first guess when I see something like that is actually to do a top of 50% and hit save and you know what and we can throw the left on there left of two rem and if you look at that it might not be exact but it's actually pretty close and a lot of the time people use a top of 50% because they want the item to be in the middle top 50% does not mean the middle top 50% means the top of that element is 50% away from the top and the 50% is 50% of the parent so we're going the top of these numbers that blue line here is 50% of the way down so it's not perfectly centered it's offset by quite a bit and there's other tricks we can use to center things with positioning but for now we're not gonna worry about that too much because we don't need it centered and that I think is for me close enough this is I said we can avoid magic numbers this is maybe you're gonna do a 52 and you're gonna sort of try and line things up closer to the actual design if that's the case that's perfectly fine we're not magic numbering so much in terms of the overall layout we are semi magic numbering though within like within this little micro layout we're creating but because it's gonna be contained within the space when it is time to make it responsive it's going to work a lot better but even if you do get a little bit magic numbering with the elements or the numbers you're putting here because it's self-contained within a certain space when it is part of a bigger layout and things do start moving around it's perfectly fine because they're all moving together and they're all sort of locked into that one little thing that we've created so now I can come in and I can position here just out of the expiry as well and I'm just doing the same idea two rem over two rem from there and this is leading to one thing where I mentioned that we can solve this issue of having to repeat this number and if ever you're using positioning and you're repeating a number over and over and over again first of all I could make one big selector that would have the left of these all there since we are repeating that a little bit but what to me is more useful is to have a selector for just the card front so let's come right here and in this selector we can set a locally scoped custom property so this custom property is not in my root it's something that's only in my card front so that means it's only available to that element and it is inherited so that element and anything inside of that element so now I can come down here and on every place I had this two rem I'm just gonna select them all really fast with a command D or it's control D on windows command D on Mac and then I can set those all up as my card padding and the advantage with doing this with a custom property like that is now if I come in I need to go actually I need to tweak that a little bit they're all gonna move at the same time so if I need to reduce it they all get reduced if I need to make it bigger they all get bigger at the same time and so that just sort of now acts like padding would but with positioning which makes our life a little bit easier along the way and so now I've also added my CVC number here on the back which is definitely a little bit magic number rate especially with the 44 here so I said we'd move away from them but we're gonna move away from them in the sense of doing it like relative to viewport and using fractions of pixels and stuff we're getting things locked in in the layout that we want and then we can control that all together so now let's just say we do want to get this type of layout going on where we need to move things around and all of that once again we can start thinking well maybe I can use position absolute for it so let's just shrink this down a little bit just so it's a little closer to the design we're trying to do and we can say okay and we need my green card to be up at over and now I need this card to be down and stay on that side I guess and this becomes easy to do and once again we could use position absolute for this on the cards themselves so originally I'd set a position of relative here on the two cards and I said this made them into the containing blocks so everything would stay contained within that space as long as the position here is not static which is the default and we never really see it declared because usually we're declaring it it's because we're changing it from the default but if it's static it's gonna break everything because now everything's relative to the viewport but as long as you have a declared position other than static so my relative like I had before everything falls into line but I can actually switch these over to absolute and it's still gonna work now things broke a little bit because they're not looking at each other so they're overlapping each other now that means my card front and my card back are still the containing blocks and those pieces we just positioned aren't gonna break out of the green borders basically that we put on there so looking at the design the card front should be in front so we can easily do that by coming on here and just adding a Z index Z index is basically layering things I might could even do a one here but I'm gonna put a two just to be more obvious so we're just pulling that forward and now we wanna sort of move things around up and down or going okay if I need to move something I wanna have a defined space that it's living in and if I look here I have a defined space for it and the height here is happening because of the way I'd set up my grid you might not always have it but this is why having borders or backgrounds on stuff can be really helpful because it lets you see do I have a defined space that I can work with in this case yes I have a defined space that I can work with so because I do have that defined space on my card front we could try this and we're gonna have a small problem but let's just say that we do a top and actually this is bothering me that that's there we're gonna do it this way around but on here we can add a top now and this is gonna be a little bit or you know what let's do a bottom for now of zero and it's gonna go all the way down there because we have a defined space we haven't done anything to make that space the containing block and where we wanna contain it inside of so we do need to make sure so if we come back here and look remember that's on my card previews here that has that border on there so I have my card front and I wanna keep my card front inside of this card previews so I can jump over to my CSS come all the way up here give my card previews a position of relative hit save on there and now it's lining up with the bottom of that orange box so the bottom of that defined space and now this is the containing block so it will not escape outside of it that means I can also go on my card back here and put the right of zero to push it over to the right and now we'll see that even though the cards are sort of moving around and balancing back and forth and even though I use position absolute on those things that are inside the cards I don't have to worry about their positioning anymore I've set them up, I've locked them in and now we have this layout that's pretty responsive and it's working well and I'm happy basically with what I have here I can move this up maybe instead of a bottom zero we'd actually use something like a top of 35% or something just to sort of line it up where we need it to be or maybe even a set size would be better for that just if you don't want it to move with the viewport that really depends on what you need and in the design that you have and so we've created something that can function that can work and it can move around without any issue so even when I get to this other one now we have problems here with the way they're overlapping each other and we'll talk about why in a second but at least the cards themselves despite having used position absolute for everything inside them they move, they work, everything is fine because they're all relative to that defined space that we've created using position relative we're not worried about like bigger picture trying to move things with the viewport or anything like that soon as you're dealing with the viewport that's where things get into trouble and the reason this is sort of broken now is again I look at it and I go, well, what's happening? Well, I can see that my defined space that I had because of how I was using grid here was fine I had all this height and I had the width because the width is always basically gonna be there but when I get to this larger screen size the height of that is going and collapsing away because I'm using position absolute on the children my grid was helping me set things up when the items were stacked but now that we have this shrinking away it doesn't know what to do so we're sort of stuck so how can we fix this? So if we look at the design now when we're at the bigger screens these two don't actually need to overlap anymore so maybe I could take a little bit of a different approach with them and this is where you do need to be a little bit more like critical and thinking a bit about how am I gonna define that space or why is my space collapsing to zero or things like that? So what I think is a nice solution here and we could give it a height and try and figure out how big to make it 100% could work but I always try to avoid setting heights because setting heights and responsiveness tend not to go hand in hand very well so instead of trying to set a fixed height on something for me, another option here would actually be within the media query and I'm gonna come all the way down just to make life a little bit easier and set one up here is I'm gonna take my card front and my card back and I'm just using the same media query that I used to make the two columns and on these we had position absolute before which means the parent doesn't see it anymore it can collapse away we saw this early on when we first set up the cards and that's why I said, okay I want my images in here to actually be defining my space now we're into that same situation as we were before where the parent has collapsed away because it doesn't see the children and so now I wanna use my card front and my card back to actually define the space so I can do that by switching their positioning back over to relative and now if I hit save they stack on top of each other because position relative is very similar to position static in the defaults but now they stack on top of each other and we've solved a little bit of that problem we had now we also have the space that we need here we'll worry about that after though let's just worry about how we can actually get this card off to that side and one thing that you might think when you're using positioning you can actually do something like I could do a bottom is two REM and because I have a position relative on here I can use that and it's gonna move up by two REM or I could use that and do a negative two and pull it down by two the one thing this doesn't work with when you have a position relative on the parent because otherwise it's a little bit similar to position absolute but it's not pulled out of the flow but it would make positioning things like this side really, really hard or even getting this two REM from the bottom it would make that really, really hard and that's why position absolute is a good thing and sometimes we wanna use it but what we can't do is something when you have position relative I can't do a right of zero and get it to move to the right side of its containing block just doesn't work because that's not how position relative things work it's that's one of those magic things that comes from position absolute and one of the reasons we like using it because it just makes life a little bit easier on that front so even on the card front if I did a bottom zero it's not actually gonna go bottom zero of the parent it's more, it's based on where it already is so if I did a bottom zero here of like two REM it's gonna move but move from where it was and not two REM of the containing block that it's inside of that's what position absolute is for and why we use it so get rid of that one but because we can't use the right of zero here we could try and magic number it over but another easier way to do that is to use a margin left which will push it as far to the right as we can and usually we use auto when we wanna center something because we do a left and a right but if we have just a margin left of auto that means like go as far away from the left as you can so if we, so here is like this adapts and moves around a little bit we can see that it's always over on the left side and then to put the space in between them we could use a margin or something like that but for that type of thing I like using a grid with gap these days putting that on there you can see that it sort of worked we have the big problem of the space on the top and that's just actually coming from when I initially set things up when we were doing that I'd set the top at 35% for when we were at the small screens so we just need to make sure that we get rid of that I could actually do it on here and get rid of all the positioning because we have inset and inset is top left bottom and right and so we could just say either a revert or an auto we just make sure that all the positioning properties are taken off or as I said we could do a revert just to go back to what the default is as well I can then come here and hit save now to get rid of all the borders we had on there and we get I think what is pretty close to the type of layout that we wanted to have here and I think it's a nice exploration of how we can use positioning but of course we don't have a form over here and if you'd like to look at form and form validation and setting that side of things up to finish off this project let me know in the comments down below and it could be something that we look at in the future but for now I'm gonna say thank you very much to my enablers of awesome Jan, Johnny, Michael Mr. Dave, Patrick, Simon and Tim as well as all my other patrons for their monthly support and of course until next time don't forget to make your call on the internet just a little bit more awesome.


Design, create, entertain. Developing software or games is an ability to create something transformative, dynamic, interactive. The degree in games design and development at the University of Greenwich provides the creative and technical skills you need for a career in video game development, combining all the aspects of theory, practice and technology. Experience the creative aspects of the game industry through practical projects. Specialise in programming or modelling and animation. Create powerful artificial intelligence. Experiment in virtual and augmented reality. Learn how to apply critical analytical skills in industry through programming languages and techniques. This is the opportunity for me to develop my skills and gain experience in an industry I love. It's time to step up. Study games design and development at the University of Greenwich.


Sleep is crucial to the development of physically and psychologically healthy children, but a number of factors have been identified as interfering with sufficient sleep, including the use of electronic media devices. These days, most children, and nearly all adolescents, have at least one such device in their sleep environment with most used near bedtime, and such use is associated with inadequate sleep quantity and quality with a resultant excessive daytime sleepiness. So there are calls to minimize device access at bedtime. But wait a second, not so fast. I mean, which came first, the media use or the sleeping problem? Are they not sleeping because they're on their phone? Or are they on their phone because they can't sleep? Higher media use has been consistently associated with all sorts of sleeping problems. Is it because they're so caught up they push back their bedtimes? Or does it so kind of key them up that they have trouble falling asleep? In college-age students, it may be more of the reverse than not sleeping, leading to pulling out their screens instead of just staring at the ceiling. Though in early childhood, it may be a bit of both. How might screen time interfere with sleep? It may not just be pushing back bedtimes and overstimulation. The light emitted from devices may affect circadian timing by interfering with the production of melatonin, the sleepiness hormone that starts ramping up as soon as the sun goes down. But put a screen in someone's face and the excess light at night may confuse your brain. Of course, if you're sitting there checking email with the lights on, then you're already overexposed, and a little extra from the screen may not make much of a difference. But if you're sitting in the dark and need to send off that final text or something, then having the light settings tweaked to yellow, your screen may help. But what about the cell phone radiation? Leaving your phone on the nightstand somehow affect your sleep? There's an enzyme called the beta-trace protein that makes a sleep-promoting neurohormone in the brain. Researchers found that those with greater long-term cell or cordless phone exposure tend to have lower levels of this enzyme in their bloodstream. So the thinking is that the emissions may affect the release from the tissue surrounding the brain, especially those right up under the skull, closest to the phone. So there is a kind of possible mechanism if cell phones do indeed affect sleep, but you simply don't know until you put it to the test. Study participants were exposed to 30 minutes of a cell phone in talk, listen, standby, or off modes. All the lights and speakers were disabled. There was insulation used to prevent them from feeling if it was heating up or anything. So the participants didn't know which group they were in.  Those exposed to the phone when it was off or in listen or standby mode fell asleep within 20 to 30 minutes. But after being exposed to the same phone in talk mode, it took an average of closer to 50 minutes to fall asleep. The reason for the significant difference between talking and listening might be due to the fact that the typical SAR value, the specific absorption rate, how much cell phone energy your body absorbs is about nine times higher when you're talking than when you're just listening to someone else talk. When you do finally get to sleep, though, what are the effects of cell phone exposure on sleep quality? There's been about 20 studies. It's been about half and half in terms of whether cell phone exposure affected sleep parameters, and not all in a negative way. Reminds me of the brain function data. Yeah, an increase in the excitability in the brain cortex, the outer layer of the brain, in response to exposure to cell phone emissions might disrupt sleep, but that increased excitability may mean like faster reaction times. Similarly, in affected study subjects, those exposed to an active cell phone showed significantly more R sleep. But R stands for REM, so they got like 4% more potential dream time, so that's not necessarily a bad thing.


Links to full digital collections can be found within each topic page of the Special Collections Digital Teaching Collections LibGuide. Clicking on a collection will take you to its introduction page, which provides general information and context for the collection materials. For a general overview of all collection contents, click Browse. On the left hand side of the screen, you'll find Limiters, filters that can be used to narrow down the resources you're looking at. These can also give you ideas or provide inspiration for further research. At any point during your exploration, you can use your browser's back arrow to return to the previous page, even all the way back to the research guide. You can also return to the general context page by clicking Introduction. If you're looking for something specific within the collection, enter your terms into the search box next to the collection name. For example, if I search for the word yields, I can get 3,167 results. I can use the subject filter for crop yields to get down to 87 results. Information on how to navigate and utilize different types of digitized materials can be found in the multi-page versus single item tools video.


The House of Representatives has advocated jail term and fines for parents and guardians who violates the Child Rights Act The House did this by reinforcing the provisions of the compulsory free Universal Basic Education Ubeq Act 2004 in the federal capital territory and other parts of the country The House urged the minister of the federal capital territory to ensure full compliance Honourable Bamedeli Salam from Osho state who moved to the motion lamented the increase in the number of out-of-school Children in the country which according to the report by the Federal Ministry of Education in 2021 was estimated at 10.1 million 27 out of the 36 states in Nigeria have adopted and domesticated the Child Rights Act Cognizant section 2 of the Universal Basic Education Commission Ubeq Act Provides that every government in Nigeria shall provide free compulsory and basic education for every child of primary and and the junior secondary and that parents who feel to have to complete such and The parents must ensure that their words are turned and complete primary and junior secondary school Also Cognizant section 2 subsection 3 of the Act compels stakeholders in education in the local government area To enforce the provisions of section 2 Thus ensuring that every parent or person who has a care and custody of a child Send such a child for his primary and junior secondary school education Hello, hope you enjoyed the news Please do subscribe to our YouTube channel and don't forget to hit the notification button So you get notified about fresh news updates


And now for your strong Europe spotlight. Foreign military officers who are recipients of the Army Award Legion of Merit traveled from all over Europe to take part in the 2017 Legion of Merit Conference hosted by the U.S. Army Europe Commander Lieutenant General Ben Hodges. They discussed Army Europe activities and training plus the changing environment that affects the Alliance and partner nations. We look on the agenda. There are no secondary topics or topics of lower priority. We say that we need to actually first of all understand the environment properly, understand what is going on in our neighborhood, what is within our nation, within our militaries. And of course we need to discuss training and exercise programs. The purpose of the annual event was to gain different perspectives on key issues from experienced European leaders and to strengthen U.S. relations with our allies and partners. From V-Spot in Germany, Army Sergeant Danny Debehead, Army Europe Public Affairs.