My name is Tyler, and this is Steven. And today, we are talking about BuildPacks. So what are BuildPacks? I think some of us are familiar with this scenario. Developer creates an application, runs a CF push. Maybe this is a Ruby app. Our BuildPack is going to run, install Ruby, install a version of Ruby, and we're going to get a running application on Cloud Foundry. Pretty simple. Well, we are on the BuildPacks team. We love BuildPacks. We love this model. There are a lot of reasons that we really love this.  This means we get this really nice, consistent application environment structure across the organization. Our apps look the same. Because of this nice consistency, security is a really primary concern as a part of the BuildPack model. This model allows us to easily roll and update our applications quickly. And we also don't feel limited by this model. We still have flexibility. We can still use all of our favorite languages, tools, frameworks. And of course, we're always trying to help the operators, empower operators, and allow developers to develop. So thinking about this, let's take a look at an alternative to BuildPacks. A really popular alternative in the application build is the Dockerfile model. There are a lot of good things about Dockerfiles. Dockerfiles are really flexible. It's really easy to add dependencies, change up your application image. These Dockerfiles create container images. There's a lot of great things about those. Container images come with immutable container layers. So we know that the code that we are testing against is the same code that we are deploying. It's also a straightforward model, pretty easy to pick up. And we also can easily tell what's going inside these Dockerfiles. We're writing it out line by line. But it's not all good. Some of the issues with this model comes up when specifically when we're creating app images and also a lot in the enterprise world. Because we're creating app images, the dependencies in our environments are locked behind other Dockerfiles because we are using Dockerfiles on top of Dockerfiles and layers on top of layers. So if we want to patch a dependency at the bottom layer, we need to rebuild layers on top of those. Dockerfiles are so flexible that it's pretty hard to create a consistent structure across the organization for these apps. And because of that inconsistency, it is harder to keep those secure and update all those dependencies. Again, because of that inconsistency, it's harder for operators to control the contents of all the apps across the organization and therefore harder for them to audit those apps. So let's take a look at what this might look like. Here is a pretty typical Dockerfile application, based application. We're going to be starting at the OS layer at the bottom where we are installing any OS level packages, maybe OpenSSL, maybe like MySQL connector if we want to use that. And then our next layer is going to install Node.js. Let's say we're using a Node app here. We're going to install Node.js. We're going to pull from that previous Dockerfile. And finally, on the top layer, we're going to install our app, run MPM install. We have our running application, a nice Node app. Well, what happens when we give the developers a little bit of flexibility here? Let's say the developers are all managing their own application images. So everyone is going to choose their own base image for their app. They're going to choose their favorite operating system. They're going to pick the packages that they want. And then maybe everyone is installing their Node layer as well, differently as well. Maybe they're installing different versions of Node. And finally, they're installing their apps on top of that. So we've got a lot of divergence here already. But what happens when we look org-wide? We've got lots of applications running. Well, now we have chaos. And we have lots of different applications on top of Node layers, on top of OS packages. Well, what happens when an OS level CVE comes in? OpenSSL has a critical CVE. We need to patch this right away. Well, in this scenario, an operator could rebuild that OS image layer. But it's more likely that that operator is going to wait for the downstream package to get updated. And it'll pull that one in. So after it updates the OS layer, it's going to have to update each individual Node.js layer. And finally, the developer can rebuild their apps on top of those layers, test all of those, redeploy them. And this scenario may take something maybe like months, but in reality, it may never get patched across the org. Maybe we're not doing it exactly this inconsistently. Maybe we're doing Docker files a little bit more the right way, where we have a consistent organization image for the OS layer and the Node.js layer. We are using good practice and making sure all teams are using the same OS, the same version of Node, and they're building their apps on top of that. Well, CVE comes in, operators are going to wait for downstream to build that one OS-level image, rebuild the Node.js image, and then all the apps on top of that. This scenario is better, but still not great. Maybe this gets rolled, depending on how long these builds take and the testing and the redeploying. Maybe this takes a few days, maybe longer. So let's take a look at the BuildPack model. On Cloud Foundry, we start with our staging container, which contains BuildPack. We are going to stream in our application, our developer application. The BuildPack is going to inspect the app, figure out what dependencies it needs. Using this Node.js example, we're going to install Node. We're going to run MPM install, get the MPM packages. We're going to tar up those layers into what's called a droplet. Export that out of the staging container. And next, we are going to provision the desired number of running containers. And those launch containers are going to contain packages supplied by the platform rootFS. The droplet is going to get streamed into the launch containers. The platform will invoke the star command, and we have our running apps. So we can easily tell that with this BuildPack, we're able to take care of the inconsistencies that arise from the Dockerfile model, take care of the Node.js level, take care of the operating system level. So, sorry. So Cloud Foundry has a really interesting way of dealing with vulnerabilities when they occur in operating system packages. And it ties into the infrastructure for how Cloud Foundry runs on top of VMs. So this is a Diego cell. And you can see it has multiple apps on it. They could be different droplets. They could be the same. And it has operating system packages for the containers, for the stack, which is like the container rootFS. And it has operating system packages for the VM to support the Diego components themselves as they run. So when a vulnerability hits, you have a whole bunch of Diego cells, and they have some vulnerability in them in the operating system layers. And to patch this, the platform one by one starts a new Diego cell with duplicate apps from one of the old outdated Diego cells that has new, where the new cell has new operating system packages, both for the stack, the container rootFS, and the stem cell, the VM. And then it takes the old cell down. And so it runs through each cell and brings new cells up and takes old cells down until the whole platform is patched. And this is really nice in Cloud Foundry because it lets us take advantage of the way the infrastructure looks in order to patch security vulnerabilities in operating system packages sort of live in production for a very large platform in a couple of hours. It's sort of very consistent. And of course, we only do this for the operating system packages that have that sort of ABI compatibility contract and only with operating system packages that are patched by upstream vendors in sort of safe ways. So we've never had a report of this causing problems where app behavior changes in an undesirable way. So that's a pretty exciting advantage of BuildPacks that people don't think about too much. So again, as Tyler said, we like BuildPacks because they're opinionated, they're secure. You have nice security benefits. They provide a lot of different languages. They provide a lot of operator control, which is really important. They make developers' lives easier. But there are problems too. So this sort of droplet model involves a lot of data transfer that's probably not necessary. We build droplets, and then we transfer the same droplets to the Diego VMs many times but when we don't really need to necessarily. We rebuild a lot of stuff every time, even if we don't need to. And that sort of simple BuildPack model where we're building a brand new droplet on each rebuild. And there's some caching, but it's pretty inefficient. It's sort of a simple form of caching we have right now. So we've been working on a new BuildPack contract along with Heroku. It's sort of a collaborative engineering effort where we have contributions from Pivotal and Heroku. It's called Cloud-Native BuildPacks. It actually just entered the CNCF last week. It's a really exciting thing. This new contract has some really key changes over the previous one. It's sort of a complete breakaway from what we had before. It creates portable OCI images. It uses separate build and run images. So you can have compilers and stuff on one image, but not have that in your final container. The detection process gets a lot more advanced. So detection involves looking through the application and figuring out what dependencies need to get supplied and creating a plan for the build ahead of time, which has a lot of benefits. It also serves as a build of materials for the container afterwards. It has BuildPack groups that allow for multi-detection. So we can pick a bunch of different BuildPacks that apply to your app without you having to think about that ahead of time. And we can break the BuildPacks down into really small pieces that just do instead of a Node BuildPack, we're going to have a NPM BuildPack, and a Yarn BuildPack, and a Node BuildPack, and then individual BuildPacks for different partners or extensions that you might want to your app. And I think most importantly, this leverages some really new features of the OCI image format and new features of Docker registries to really efficiently update just individual layers on a registry that need to get updated. We don't have to rebuild lower layers in order to rebuild higher layers with OCI, which is something not many people know about. And I'll talk more about those a little bit later in the presentation. So let's take a look at some of these changes a little bit more in depth. So if you remember the droplet that we were creating during staging before, we've gotten rid of that. We're using OCI images. There's a lot of really nice benefits to this. Right off the bat, we get a layer digest for each of the different layers. And this is contractually associated with the contents of each layer. So we can easily audit our applications, make sure things haven't changed. Not only that, those OCI images are very portable. We can run these images on all over the place, a lot of different places. It really makes it nice to abstract that. So let's take a look at the actual change of the implementation of BuildPacks. So on the left, you'll see the old BuildPackvent interface. This is how we used to develop BuildPacks. We would have four separate executables. These would all run in order. And we've reduced that down to two. We think that we don't need this extra complication. And we hope that this simplification makes it easier for people to write their own custom BuildPacks. Not only that, but another interesting part is that previously the detection script was generally a pretty minimal step that would return 0 or 1 depending on whether the BuildPacks should be used for the application. Well, now the detection is going to have a little bit more responsibility. It's going to reach into that app and figure out a build plan for the subsequent steps to run based on those contents of the app. And we'll see that come up more. So because of this change, we are able to create a new way of doing multiple BuildPacks. So we have this new concept for multiple BuildPacks called a BuildPack group. And this is going to be how a lot of BuildPacks are kind of thought of in the new API. So let's take an example of a Ruby and Node.js app. Pretty common scenario. So we've got our BuildPack group, which we have defined as a Ruby BuildPack and a Node BuildPack. We have our application code. First thing that's going to happen during staging is the detection script is going to inspect the application code. It's going to say, OK, great. This is a Ruby app. You should use this BuildPack. I'm going to return 0. I'm also going to contribute a BuildPlan. I think we need to contribute a Ruby version. And maybe I might provide metadata along with that for the BuildSteps as well. We're going to move on now to the next BuildPack in the group. This BuildPack says, yes, this is also a Node.js BuildPack, our application. So we are going to return 0. And I'm also going to contribute to the same BuildPlan and let you know what versions of Node I also want to contribute to this app environment. So after that, we're going to go back to the Ruby BuildPack, which is going to run its BuildStep. It's going to read from this BuildPlan. It's going to create a Ruby layer because it knows it needs a version of Ruby. It's going to run bundle install. The tech script probably told it to do that. And then we're going to move over to the Node.js BuildPack. It's going to read from the BuildPlan during build, create the Node.js layer, run MPM install, get some Node modules. So one of the things that's really nice about this change is that we're finding that making these BuildPacks really modular is a really powerful thing because we are able to reduce the dependencies that we need only to the applications that really need them. We're able to reduce a bit of resource usage there. So in this example, we thought initially that the Node.js BuildPack would be just a single BuildPack, but really we're finding it's better implemented as separate BuildPacks where the Node.js BuildPack provides just Node and the MPM BuildPack, its detect script, tells the build process whether it should actually install MPM modules. So you could imagine that there is an application that only needed Node, didn't need modules, and we were able to moduleize like this. A really good example of this is the Java BuildPack, and the Java BuildPack team is working on splitting the Java BuildPack into a lot of separate BuildPacks. Thanks. So I want to go into a little more detail about how this works and specifically how we make rebuilds really efficient using the new model. So I think the key idea behind it is that we only rebuild and upload layers when it's necessary, and then includes uploading layers all the way to the edge. So we just update, rebuild a few layers that we need to locally or on your CI system or on a platform, and then those individual layers get transferred through Docker registries and Docker daemons all the way out to the cell or whatever you could run on Kubernetes, Kubernetes deployment out at the very end. So to do this, we use some interesting features of the OCI image specification. So the OCI image specification breaks layers. It's sort of a departure from the Docker v1 image specification where now instead of linked layers that point to each other, you have individual content addressable layers for the file system, and you can apply those in an order, but it's not like get anymore. They're not linked together. So we can rebuild those layers, whatever layers we want to replace, and just update the individual ones in the image and just send those up to the registry. So another feature we take advantage of is a new feature in modern Docker registries and the sort of Docker v2 registry where it's a feature called cross repository blob mounting. So we can have one image repo that's a source of the root FS for lots of other image repos. And then without any data transfer, or without the negligible amount of data transfer, we can point 1,000 image repos at a new base image just by going across each image and making a small metadata change. As this would let you update, this would take the Cloud Foundry Model where we have the cells and we're rolling them and replay that on top of the Docker registry to get the same benefits. That's one of the coolest things about this, I think. So the result of using these two strategies together is that we get really fast builds, a really minimal data transfer, and we can do the sort of layer rebasing thing directly on the registry. And so I'll kind of go through and compare these two ways of doing things a little more technically. So before we had just the supply and finalize build step, and so you have your application and it runs supply finalize, does everything and generates a droplet. And when you want to rebuild again, yes, there's a small cache it has access to that where it can recover some of the things that downloaded last time, but it's basically gonna do all the same things and generate a new droplet and transfer all those same droplet bits out to the edge. Where in the new model, we take those two steps, that sort of detect step, and that supply and finalize step, and we combine that supply and finalize step into one, and then we introduce two more steps that the platform is responsible for called analysis and export. And so detect selects the build packs that should run and figures out what dependencies the application needs, analysis sort of grabs information about the previous image. Build uses that information to determine what layers to rebuild and export sends those layers up to the registry, and I'll talk about that more in a little bit. So to kind of break this down really granularly, in the analyze step, we pull information from the image configuration, which is a special sort of easy to access section in a Docker image in a registry, and we write that into toml files that each build pack can read. And so you'll see in the build step they can modify those toml files, and those toml files represent the contents of the image layers. So in the first step here, we pull them from the remote image. In the build step, the build packs read those toml files to determine the contents of the existing layers and decide which layers to regenerate, and they just regenerate them by creating a directory with the new contents in the file system. It's very simple. And they also still have access to a small transparent cache. It has a little bit fewer guarantees than the cache in Cloud Foundry right now. It may go away, but it can also be used to cache things that you need to download for build, for instance. And then so you end up with new layers in your compiled app. And then in the export step, we re-upload the newly created directories as layers to replace the previous ones. We leave other layers alone, and then we combine all those toml files together into a big JSON blob and put that back on an image label to live in the image configuration so that on the next analysis step, it can be recovered and it sort of works like that. So to kind of give you an example of this, to break it down into what this looks like in first build and second build. You have your app in your first build. Analysis doesn't do anything yet because there's no image there. Build generates these Ruby or downloads Ruby in Node and installs them, installs Node modules, installs Ruby gems, export, uploads all those layers. And then in the second build, if just parts of that are updated, just say package JSON changes and your gem file changes, we read information about the previous layers. We decide, oh, we're gonna rebuild the Node modules and gems. We just update those individual layers and the app layer on the registry and everything else stays where it is and we don't have to regenerate it. And that's sort of the process. So the goals here are increased portability from what Cloud Foundry is. We don't have droplets anymore, which are kind of a Cloud Foundry-specific thing. We have OCI images, which will run anywhere. We kind of decouple that build process from Cloud Foundry so you can run it anywhere. It's sort of a more flexible model. You have lots of smaller build packs that are simpler and easier to understand and more transparent. And we can really reduce the build time and the data transfer where some builds are now milliseconds or before they were 30 seconds. It's been a kind of impressive thing to see. So if you want more information, the CNCF project is at buildpacks.io. Just to clarify a little bit, the CNCF project has the infrastructure and tools and specification for build packs now, but the Cloud Foundry build packs are still part of Cloud Foundry and they'll be that way for the foreseeable future. And that's all we got. Thanks. Anybody have questions? So we worked on this effort along with Heroku and sort of a collaborative engineering effort. The infrastructure and tools, though, like we have a CLI now that'll build build packs into OCI images. We have a formal specification for it. All that's part of the CNCF project, but the Cloud Foundry build packs are going to continue to be part of Cloud Foundry and the Cloud Foundry Foundation. The Heroku build packs are going to continue to be part of owned by Heroku in their respective places. So you're asking about compatibility. So if you build new V3 build packs on the CNCF spec, will they run on Cloud Foundry? So they won't run on Cloud Foundry right now. We have a bunch of different options for enabling that. I think the simplest thing that we plan to do really soon is make a wrapper that you can just run on a V3 build pack and actually run on a group of V3 build packs and it would create a Cloud Foundry style build pack for you. That's until Cloud Foundry has native V3 support. And there's compatibility in other directions, too, that we've been thinking about for making V2 build packs run on V3 things. And that's a kind of complicated thing. Any other questions? A little? Yeah, that's a great question. So it's not quite like a Git rebase. In a Git rebase, it's really regenerating the top layers, just gets handling that underneath. In this, we're just swapping out one layer on the registry. So the top layers don't get touched. Their IDs don't change. They're all content addressed. Excuse me. So how do you handle merge conflicts? That's an interesting question. The idea is if you construct your layers so that they don't conflict, then they just apply naturally on top of each other. So part of the difference between the Dockerfile model and the build pack model, this new V3 build pack model, is that in Dockerfiles, you can do whatever you want in each layer. In this, they're restricted to directory so that they all apply cleanly, essentially. Anybody else? Yeah, that's interesting. So in general, we make the build packs provide the dependencies in a way so that they don't need the same directory. There's a little, each build pack, it's a sandbox directory that has a POSIX style root in it with a bin and a lib and all of that. So they're all kind of isolated. And then we set up the environment to string all those together. If that makes sense. We've been thinking about some interesting things we could do with operating system packages to let us kind of take advantage of the same layer rebasing, but that gets pretty complicated. Any other questions? You're asking about Knative and build packs? Yeah. So currently, we have a build template in the Knative official build templates repo for the Cloud Foundry build packs. And that works right now. It's the same V2 stuff. Just kind of, we have a shim layer that makes V2 kind of behave like V3. You get some of those features to work on top of registries and with OCI images. There's a PR in there right now for full V3 support that should hopefully get merged soon. You can check out that PR. I think it works. We're just some wording details that need to get worked out. And that uses Knative's build CRD, which is like the part of Knative that does builds. So if you use those templates, whether you can use that to build apps on that platform. Any more questions? Last one. So Heroku started a build pack registry that they've kind of talked about making a more open community-related thing. I don't think they're ready to announce anything quite yet. But yes, we are looking to create a big community repository build packs. And with nice integrations that would let you easily pull down the build packs you want to use instead of kind of confining them to a list of build packs on each particular platform. That's definitely part of the plan. Sorry, can you say again, do we have an? Yeah, so we're currently converting the Node.js build pack to v3. And we're going to provide a wrapper to make that work on Cloud Foundry 2. The, I think, say that'll be done in a couple of weeks probably. The Java team has been working on splitting the Java build pack into a bunch of different v3 build packs, too. They've made a lot of progress on there. They have some parts that work really well now. So that's when the Cloud Foundry build packs will work on v3. The other part of that question is, when will Cloud Foundry run the v3 build packs? We think we can get that wrapper done pretty soon, but we don't have a timeline for what native support might look like yet. So I didn't hear all of that. You're asking about build pack versioning and how that plays into detection. Can you, there's a question about you have an application and you have multiple build packs of different versions in the same list? And which one gets selected? So the v3 API, the new CNCF API, supports versioning. And so you can construct your, it's now a two by two list of build packs because you have build pack groups and then you have candidate groups. It supports versioning so that inside of one of those groups you can say, always pull the latest version or pull a particular version. And you don't have to list the same build pack at a different version multiple times or if you could, but it would be obvious that you're doing something you shouldn't do if that makes sense. You can have different candidate groups that have different versions of the build pack in it if you wanted to, though. Does that sort of make sense? Does that answer your question? Cool. Anything else? I think we're just out of time here. So thanks, everybody. And feel free to grab us afterwards if you have questions.


I lost him a couple of times. I think he should not have left him. Turn. Stop. Are you ready? You missed. Off right hit. Target five. Yes. Here. Let's go. One. This is a one time. One time? One time. I'm not putting my eyes.


Good morning my friends welcome back to the vlog, so I know that I've been absent for quite some time, but I have been quietly enjoying the beginning of my summer break I did film a couple of little things here and there thinking that I would go on and vlog But I decided not to every time I would start I wouldn't finish so I am gonna finish today Today is Monday, June 15th, and I am four days post op from getting my wisdom teeth removed So if my face is a little swollen That is why I had a hard time last night. I I'm taking ibuprofen and then they prescribed me with a really strong Tylenol I took the Tylenol last night. It did not work. I did not sleep at all. It was awful But I took ibuprofen today, and I'm feeling much better I just have this weird like throbbing in one side of my jaw And I think it's because the dentist said Or the dentist said that my roots are like cowgirl roots So they do this and I think he had to leave a piece of my root in there And I think it might be bumping up against a nerve or something I don't know but I'm not able to go without pain meds yet, and it is day four Thursday morning Friday Saturday Sunday and today's Monday. So actually today is technically day five But anyways, that's enough of that my house is a complete disaster zone, and I am not kidding you We are going out of town We're going to Prescott on Wednesday, and I would really like to have my house looking spick and span Sparkling clean before we leave.  I'm gonna show you some things That I've been working on things that I've already done around the house Show you some really cool stuff that I've gotten and then Montage the crud out of some cleaning But first things first It is about 11 o'clock already Cash is at preschool and Scott's at the gym So I'm going to go out and water my plants my patio is also part of the disaster zone that is my house because it's summertime and It's hot out. So all of the water things are out here and just piling up So I've got like pools and slip-and-slides that are being kept in from the wind So I've got a slip-and-slide a pool another pool Swimming gear and then cash made a disaster of this patio while I was down in bed for two days chalk Potties Sprinklers did want to show you guys one thing though this. Oh my gosh. How? Adorable, so I'm not really a huge fan of this little like faux plant I think that this could been cuter might find something else for that But I got this really cute Alexa stand from house bright And it holds your echo dot. So if you have an echo dot It fits right in there, and I just love how it sits on My little thing like if this was inside this would look really cute on my kitchen counter Because it like looks more like on purpose than just putting her out and I stuck it outside because this gets really dusty out here and It never like if the rains come They don't usually get wet on the patio So I keep an echo dot outside so that when we're out here we can listen to music And so I just put this cute little thing out here It's got a hole in the back for Your echo to be plugged in and it just looks a lot cuter than Her just sitting there. I got this on Amazon I will put it in a link below and I think I might have a coupon code for you for that But anyway, I put this out here. It was in my laundry room But it wasn't really serving any purpose and I really needed something out here to like hold things Because we're out here a lot Not as much in the summertime But like at night we are and I just needed something to like hold stuff so like the chalk and like the potting soil and Usually more things are on there But like I said, it's kind of a disaster zone, but I thought this would be really cute for out here To hold my echo dot. So let's go see how the plants are doing this succulent Thing isn't doing too bad. These guys over here are Just done But the rest of them I think I Moved them out of the direct sunlight because I felt like they were just dying.  I Can't complain too much because for the most part they're still living But a lot of them did die and I had to remove some During the day It's just too hot These little pretty flowers have done well. I don't really remember what these are called But all of them have done really well and I honestly had doubts for them. They were the ones I was afraid We're gonna really not do that Okay, so I'm gonna now show you guys the status of what my house looks like so my living room is honestly just toys New toys that we just got my mom was here and she likes to sit on this beach chair for some reason I think it's cuz it's low to the ground and she could play with cash, but that needs to go somewhere My kitchen really isn't that dirty. I just need to put things away. I got new bedding for my guest room I love it. This is also from Amazon. I will put the link in my Amazon favorites in my storefront down below Just so you guys know I do not get any sort of income from you shopping from my storefront I just like to put them there so that you can access them easier. So anyway, this is from Amazon super cute light pink love it Got this and my guest room is fine. I don't need to clean this up. My parents were just here. They clean up on their own Another thing we worked on and excuse the mess I need to clean up in here too is we changed cash's room around because he's turning three in November And he's been sleeping in his crib, but the crib front was off And he's starting to get really long.  I Love it. It's got these like wooden Slats on the back and then I just pushed up one of his bookshelves here because I don't have a whole lot of space and I don't want things to look too cluttered or too like Burner too heavy like I didn't want to put one here and then have the dresser So I backed one up here and I'm thinking this is where I'm gonna keep like all of his shoes hats things like that Because I'm storing a lot of stuff in the closet Like his crib because we are gonna keep that for if we have another baby down the road And so that's kind of turned into storage So anyway, that is gonna be more like shoes and you know, whatever and then we ordered his bed from Amazon It's just a memory foam mattress six inch nothing special And then I got him one of these foam roller bumpers. You guys can see it there That keeps him from rolling out He loves it. No transitional problems. He just loves his new bed His new room theme is first responders if you guys can't tell Super cute stuff we got this adorable quilt. This is crib size, but we just bought it So we use it. It does fit like perfectly on the bed. So his new room is first responders. These are all Like old family things like this was my dad's fireman Helmet and then these two things were scots when he was little This was a gift for my mother-in-law We have this adorable little statue here and then I do have some things to put up on the walls This is my favorite. This is gonna be like the centerpiece of the whole room this was a Vintage picture that my parents had at the house that they hadn't hung up or anything and what's special about it Is it's one of the only photos of Mickey Mouse shaking someone's hand and looking up at them? Other than Walt Disney, so it's kind of a special photo and then of course all his other pictures We have back here. I will put those up as well, but I'm waiting. I want to go to Hobby Lobby and find some more like first responder stuff To go in here. So that's another project We worked on while I was gone. I've got some more house plants in here These are clippings from my sister's house So if you guys follow me on Instagram a few weeks ago I was at my sister's house and she gave me some Clippings from her plants at her house. So I have transplanted a few of them this one I'm waiting for a route to grow and then I'll transplant that one But a lot of them have been transplanted and they're doing okay, they're staying alive. They're growing new leaves My fiddles growing a new leaf. My snake plant is going crazy. I've never seen one go like out like this before I don't know what's going on there, but I'm fine with it So yeah, I've been a busy bee the last couple of weeks You know Working around the house Getting things done starting to plan for next year. Okay. This is my project today So I have today and tomorrow before we leave for Prescott My project today is gonna be my bedroom. My project tomorrow will be the rest of the house So I'm gonna show you the state of my room and you guys are gonna throw up at the side of this But I'm pretty sure I'm like positive that there are more people out there that have a matching room then don't and If you have a matching bedroom, please comment down below put like a Heart emoji or something if your bedroom matches mine I've been Recovering from surgery for the last four days. So I've been in bed and before that I just had no desire Living out of laundry baskets. Okay. I'm just gonna flip you guys around Okay, so we have clean laundry piles one two Three and there's one in the closet This is like stuff that needs to get put away. I've got like Junk over there. This is so embarrassing. It's so real a lipstick and littles package over there. I ordered some shirts for my new teammates One of my new teammates And then a couple for myself. So she got the teacher teacher teacher She got seat belts everyone and then both of us got the hail you cool cats and kiddos So my new school is actually the cheetahs is our Mascot so I was a little I really wished that she had done this in cheetah print, but I understand why it was tiger So I got one for me and one for Maria.  These are dirty. Those are dirty There's just junk everywhere like I have not cleaned up in Forever I just haven't cared and I'm sure a lot of other teachers can or people in general can relate I Was working so hard right before summer started that right when summer did start I was like I'm not gonna do anything for a while, so This is my project this my bathroom and my closet. Those are my projects for the day I think Christina and my old neighbor and the girls are gonna come over at one So that gives me about two hours to work on this and Then hopefully I can do that So I'm gonna try and start with just picking up trash around the room Then I'm gonna put all of the clean laundry on the bed and start hanging it up and folding it Then I will get to all of the stuff That's everywhere because I feel like the laundry and the trash if I can get that picked up first I'll have a good head start So I might montage a little bit of this and I might also just skip ahead since I'm already like 15 minutes deep into this vlog Okay, so we have some progress here all the laundry is put away all the trash is picked up I just have a few things to put away and Then I will just make the bed and Vacuum I do need to finish cleaning the bathroom now But I am probably going to take a break because my friends are coming over Christina and the girls my old neighbors They're coming over and they should be here soon. We're probably gonna just eat lunch, which to me is like chicken broth Soup whatever Mashed potatoes whatever I can find I have eggs again But yeah, so that is pretty much What's going on here? If they end up leaving and I can get a little bit more done then I will try to do that I think the girls are gonna spend the night and Then their mom will pick them up tomorrow But it is one o'clock and I am starting to feel a little bit of pain in My jaw can see it in there. It's kind of gross um So my pain red is not due until four But I'm hoping fingers crossed that my mouth will not hurt between now and then and I can just It's really only just this side. I don't understand. So anyway, my bedroom is pretty much done I just need to put like my laundry stuff back over there in the corner and Then my friends will be here. So I'll see you guys


Good day everyone. My name is Ngoni Wombashora. Today I'm going to be presenting my topic and the topic name is leveraging next-generation mobile networks for drone telemetry and payload communication. So just to start a little bit about myself like I said, my name is Ngoni and I grew up in Zimbabwe and moved to South Africa to pursue my tertiary education where I did my Bachelor of Science in Mechanical Engineering until 2020 and went on to do my Master's in Electrical and Computer Engineering, which I'm on track to be finishing soon. So yeah, today as the topic said we are leveraging next-generation communications and the key words in that are drone and communication. So where does this lead us? I'm going to start with a brief overview. I'm going to start with drone communications and what options do we have there? We've got a direct link. We've got satellite. We've got ad hoc network and we also have mobile cellular networks. So your direct link is essentially just your remote control communicating directly to the drone. Yeah, an advantage of this is it's relatively easy to set up with nothing complex there and it's a simple link of although it does come with some limitations and the biggest of those is line of sight. So if your drone goes a bit too far or maybe let's say behind a building or cheese or it's in a dense area with a lot of interference you are most likely to lose control of your drone. The other option is satellite communications and this gives your drone internet and communication access via the satellite and although that is good satellite is you've got remote coverage so that's an advantage over the direct link but the drawback of using satellite communications is that you have you've got very complex bulky and heavy equipment on board the drone.  So because of that it tends to be very expensive, very expensive drones and so on. The other option is ad hoc networks and ad hoc networks are bespoke networks that have been set up for like a specific task. The drawback of this when you're using it with drones is that they are again they are for a very specific task and it's like an almost hecky way of setting up a communication to your drone and yeah, the drawback of this is that you run into like very complex routing protocols and ad hoc networks are not transferable to other devices and other use cases as well. So setup time tends up to be really high but yeah, they are quite robust networks. And the other option we have is mobile slash cellular networks. And this is essentially what we are going to be dealing with today. So mobile networks, you have got global coverage. They are available anyway, although you do like they aren't there in some very remote areas. But just like your cell phone, whenever you're moving from city to city, from country to country, wherever you are, you've got network coverage on your cell phone. So because of this, we are going to dive a little deeper into mobile networks for drone communications. So yeah, what are the problems? So understanding the problems with respect to drone communication. Like I had mentioned before, we've got our line of sight limitation. Yeah, if your drone goes too far, you lose control of it. We've got our uplink and downlink data rates. And this is highly dependent on the drone use case itself. When you're just command and controlling it, pretty much just flying it. You don't need very high data rates. About 200 kilobits per second is good enough. But let's say you are the streaming HD video that that becomes a big issue. And you want a communication system that's able to handle those high data rates. Latency is also an issue. Let's say you're flying a drone in real time, you're going to want it to react to your input as quickly as possible. You know, and it also depends on some use cases. Let's say you're delivering medical equipment and or you are doing drone racing. Latency does become an important factor. The other factor to consider is coverage. And yeah, pretty much depending on the use case again. Let's say you're doing farmland mapping or you are doing drone entertainment at a shopping mall, farmland mapping would require very high coverage. Whereas drone entertainment at a shopping mall, it's it's quite a localized thing. So yeah, because of these problems here, like these four issues, these are the four main issues. And yeah, what this ultimately leads to is you've got a limited number of use cases for drones. So yeah, just to mention a few use cases. I've put these use cases according to some of the limitations that we run into. And some of them, the first one here being coverage limitation. Like let's say you are spraying plants and you're on a farm. You're doing pretty much drone farming or power line inspection. Yeah, over here, this is a height constraint. So yeah, if you're doing those first two use cases there, your drone is flying pretty low and it's got an altitude of about up to 10, 15 meters, whereas compared to upper airspace inspection. Your drone is high up in the air and one might be testing, let's say carbon dioxide concentration in the air or yeah. So with regards to this, you've got a height limitation and you need some communication systems that can accommodate for that. When you're flying 10 meters in the air is compared to about 300 or 400 meters in the air and yeah, hotspot areas, you've got stadium shopping mall. That's your aerial entertainment, which is a hotspot area. You don't need much coverage there, whereas when you're doing farmland mapping or logistics and transportation, you need to be able to communicate with your drone from a long, a longer distance. And yeah, so with regards to data rates, like I mentioned before, command and control transmission is not demanding in terms of data rates. 200 kilobits per second is enough. Whereas when you want to do 8K HD video streaming or AR VR streaming or video capture, yeah, you need you need rather about one gigabits per second for AR and VR for 8K video streaming. You're looking at about 500 megabits per second. So that becomes a strong limiting factor on the on the kind of communications you need because it needs to be able to sustain those high data rates and be reliable at the same time. And yeah, in terms of there is also some use cases that are highly dependent on on positioning and accuracy. So for like aerial surveillance, let's say yes. Yeah, flying your drone in the one survey a specific area, you don't need much accuracy there. Let's say about one meter or even two meters is good enough for you to see what's happening in a certain area. Whereas when compared to automatic charging, your positioning accuracy needs to be, you know, maybe even within 10 centimeters. So these are just some drone use cases. And yeah, some of their limitations that come along with them as well. Yeah, so just some images there. You've got your aerial entertainment. You've got drone deliveries of medical equipment. In the picture here, you see Mark Zuckerberg. He is demonstrating how Facebook just added live streaming from every device. And yeah, he's waving at the drone there and it's directly streaming, of course, like that would require high data rates for you to be able to stream high quality videos. And on the right side, you've got your automatic charging pad. So when your drone is landing, they needs to be pretty accurate on where it's going to land and yeah, make making sure that it doesn't miss the landing pad there. So your GPS accuracy accuracy needs to be really good. So why did we go with mobile networks? The first reason is mobile networks have an almost ubiquitous accessibility. Like I mentioned before, they're everywhere, right? Wherever, wherever, wherever you are, they've got coverage. They've got superior performance as well in terms of data rates and latency, which you are going to get into a bit later. They're highly scalable and they're based on evolving standards. They're highly interoperable and they're backwards compatible. What I mean by this is that wherever you are, let's say your phone has got 5G and you know, you're connected to your mobile network service provider via 5G. If you reach an area where that connection is not strong enough or 5G is not available, it refers back to 4G and it refers back to 3G and so on. So, yeah, they're backwards compatible and they're everywhere. And for these reasons, we're going to look to dive a bit more into how we can leverage mobile networks for drone communication. And with regards to mobile networks, you are going to be specifically focusing on 5G. And the reason for this is that not much experimental research has taken place over research in terms of using 5G mobile networks for drones. And, yeah, 5G has come with a lot of buzzwords. And, yeah, for this reason, I've chosen to look at 5G for drone usage. The first one there being network slicing. And network slicing is essentially when your phone connects to a network, the network kind of picks up the kind of quality of service that you want from the mobile network and it creates a slice or like an instance of that network and then connects you there. So it's not like 4G, let's say, when you when you connect your quality of service is essentially what everyone else is getting or any other device that connects there is getting the same quality of service, which is which helps differentiate things. And we can leverage this in terms of drone usage because, for example, let's say I am doing a video call, right? I would probably need very high throughput as compared to latency. It's not as important. So I'll probably get a slice of the network with with preference to throughput as compared to latency. So, yeah, two things are ultra reliable, low latency, massive machine type communication. So 5G, the 5G core network itself is is capable of interacting with other machines using a specific protocol. And it also comes with enhanced mobile broadband. They pretty much make better use of the available frequencies and the frequency channel itself. And we're going to get into more about that. This one is my personal favorite and this is 3D beam for me. So the best way to describe this is using this picture there. As you can see, you've got your network tower, your 4G network tower there. And what this essentially was is you've got your one antenna pointing in some certain direction, some are unidirectional, but everyone is getting the same beam. So if you are further away, you're going to get a weaker signal and so on and so forth, whereas 5G instead of having one antenna, you have what they call an antenna array. And through the process of interference, what these antenna iris do can pick out your location where you are and concentrate a beam towards a specific user equipment. So that means you've got a more robust communication line in that regard. So that's really interesting because drone communication, for drone communication, because a drone is flying, it's a high mobility device and it's flying in the 3D space and you always need to have that strong communication channel also considering the interference that would come from your propellers and this 3D maneuvering as well. So the other one is 5G spectrum and frequency utilization. So 5G has made better usage of the spectrum and the frequency utilization and one of the things that it does that is via numerology. So what is numerology? Numerology is a technique that also is used to really bring out that ultra low latency. So in mobile networks, we have a thing called a radio resource and what a radio resource is is pretty much an OFDM signal, OFDM standing for orthogonal frequency division multiplexing. And yeah, it's a way of propagating data over the air. And what it does is that each radio resource has got a chunk of 12 subcarriers and let's say in the example here, we've got a 15 kHz subcarrier spacing and a one millisecond signal that takes one millisecond to transmit. Let's say it's some piece of data. And yeah, mobile networks up to 4G LTE, this is essentially what they use. And now with 5G, what they do is that you can change or increase the number, the subcarrier spacing that you use. So you can use 15 kHz, 30 kHz, 60 kHz, all the way up to 240 kHz. And as you can see in the diagram, what it means is that that one millisecond that was essentially used to transmit 14 OFDM symbols keeps reducing in turn. So 15 kHz subcarrier spacing as compared to a 60 kHz subcarrier spacing, you have reduced the latency from one millisecond to 0.25 milliseconds. So using this 5G is making better use of the frequency bandwidth it has and also really drastically reducing the latency. Hence that's where the ultra-reliable low latency is coming from. So yeah, so that's a brief introduction and background. And what am I going to be talking about today? So today I'm going to be talking about the implementation of an SDR-based open source 4G 5G network for drone communication. And SDR stands for Software Defined Radio. It's essentially a piece of hardware equipment that kind of implements all of the hardware that's required for radio technology for mobile networks. So instead of having your big antenna tower and with its amplifiers and attenuators and modulators, all that hardware is now implemented in software on the Software Defined Radio. And yeah, essentially we get a relatively cheaper piece of equipment that can essentially do the same thing as a radio tower. So the way I'm going to do this, I'm going to start with a 4G test bed. So these are indoor test beds that I've set up, a 5G test bed and then I'm going to talk about the drone setup itself. And finally I'm going to talk about how I've been able to implement a 5G mobile network for drone communication, essentially. And whilst I'm doing this, I'm going to be giving an insight into the kind of performance you would expect from a 4G mobile network, a 5G mobile network as well. And yeah, these insights are going to be comparable to your commercial mobile network providers. So yeah, what is a mobile network comprised of? So here we've got an image of our indoor mobile network set up and it's made up of a core network and an E0B. An E0B stands for Evolved Node B and EPC stands for Evolved Pocket Core, which is the core network of the mobile network. So the easiest way to think about it is that the core network is like the big end and your E0B is your front end. So in the core network you've got HSS, MME and a few containers there and your HSS pretty much handles all the subscriber data. So every SIM card that's supposed to connect in the network is saved and your MME is pretty much handles authentication. So whenever you connect to a mobile network it goes and checks on the HSS database. If this user with this specific number and this SIM card IMEI is allowed to be a part of the network. And you've got your base station which is the front end and your SDR there. We are using an Eters B210 SDR from new instruments. And yeah that essentially becomes your your mobile cell phone tower essentially. And the user equipment we're using I was using a Huawei P40 Lite for this and a Raspberry Pi Hat, a 3G, 4G and 5G capable Raspberry Pi Hat. Which is just a dev board which comes with a SIM card module and a SIM card slot. So you can just program your own SIM card according to your core network specifications.  So from this we carried out some tests and what are some of the key performance indicators that we realized. We realized a throughput of 75 megabits per second on the downlink and 30 megabits per second on the uplink. A latency of 16 milliseconds and an RSSI of minus 51 dBm to minus 25 dBm. So just for context for RSSI which is your received signal strength index is just a comparison of the strength of the transmitter signal and the strength of the received signal. And just for context an RSSI value of minus 50 dBm in mobile networks is considered really good. And obviously zero dBm would be the ideal value, would be the best value. And yeah minus 50 dBm RSSI indicates a value that your mobile network is pretty much like commercially viable in that in that regard. And from then on we went to set up a 5G test bed. You'll see that our 5G test bed is quite similar to the 4G test bed because that's because the 5G test bed is a non-standalone test bed. A non-standalone test bed is essentially a mixture of 4G and 5G and I'm going to explain that how that is because in 5G we've got non-standalone and we've got standalone. So a standalone 5G test bed is essentially quite similar to a 4G test bed but instead of having a 4G coordinate work we've got a 5G coordinate work in the 5G base station. So here in non-standalone mode we use our 4G core network, we use our 4G base station and we use our 5G base station. So a 5G base station is added on there and what this essentially means is that we've got two cell phone towers and the way this works is let's say your phone would look for available mobile networks that it can connect to it will find this one to connect via 4G and once it has connected via 4G your 4G base station would receive user information user equipment in information and if your phone is 5G capable it would then transfer that connection on to the 5G base station and hence now your phone is directly connected to 5G and communication is done via that. So yeah what are some of the key performance indicators? We have 90 Mbps on the downlink so the downlink is from your base station to your user equipment and on the uplink we've got 30 Mbps a latency of 5 ms so when you compare that to the 4G latency that's less than half it went down from 16 ms to 5 ms so yeah that's also like that low latency that I was talking about when it comes to the implementation of the 5G mobile network and we've got the same RSSI reason being that channel communications are the same transmit power for the base stations are the same as well and just for comparison I've compared my test bed to some of the commercial mobile network suppliers here in South Africa and yeah so for our test bed you'll see that our 4G test bed is performing much better than a commercial mobile network in this case I was using MTN whereas we've got a downlink of 75 Mbps and it's compared to the 40 Mbps in the uplink the throughput was the same and you'll see that the throughput in the uplink also for the 5G was essentially the same and the reason for that is that the uplink the limitation does not become what network you are using or the channel conditions themselves but the limitation is now based on the hardware in your mobile network device so in this case in our phone the hardware is the limitation because the antennas in the cell phone can only transmit a certain amount of maximum power they can only use a certain type of modulation so there is on the downlink more mobile networks use OFDM and yeah orthogonal frequency division multiplexing or yeah multiple access OFDMA orthogonal frequency division multiple access whereas in the uplink they use OFDMA SC and that's orthogonal frequency division multiple access single carrier so much like that numerology I was talking about on the uplink mobile phones only have the capacity of using single carrier whereas on the downlink you've got more compute power more electrical energy and more transmit power so that's where you realize that even though we have changed a lot of things on the uplink it's too pretty much the same because the limitation is now the hardware used to implement that on the mobile device so yeah you can see the 5G obviously with better performance than the 4G there 5G test bed with a downlink of 90 megabits per second approximately 90 megabits per second as compared to the commercial one which is 252 megabits per second and yeah the reason for this again is we're using an open source we're using open source open interface to implement these and they're still currently in the development stages although they have managed to implement much of the stuff for the non-standalone desk they are still working on improving the throughput state although yeah we did have better latency and that's probably to do with the channel conditions themselves this is an indoor test bed and was done indoors whereas yeah with the antennas pretty close to the phone and all of that so that would affect the latency as well so yeah let's move on to joint communication we've covered mobile network so okay what do we do now that we've got our own non-public mobile network running right let's now go and fly the drone using that and yeah I'll just start with a bit of setup so you've got a typical drone there this is one of the drones that we used and yeah you've got your motors you've got your GPS we're using a year two GPS you've got your electronic speed controllers you've got your propellers you've got your battery and what we care about the most here for us in terms of communication is our telemetry module and the cube orange which is our flight controller it's an open source flight controller px4 pxhawk code cube cube pilot and yeah so essentially your direct link is the most common one you just fly your drone with your remote controller and yeah you can put payload data in there but the telemetry module would be used so a telemetry module is essentially just an antenna on the drone you would have an antenna attached to your laptop as well and the telemetry module there it's using eight eight six eight megahertz frequency and that's where you would transmit either your command your control data or like your command and control data as well as your payload data so like sensor information die die directly to your ground stations for so for the ground station we're using mission planner or cube ground control these are all open source drone ground control stations so yeah so another slide just a bigger picture there so yeah how do we make our drone a mobile network user equipment the way I went about this is by attaching an an onboard companion computer onto the drone and we use the raspberry pi 3b plus for this and yeah just attached via usb to the autopilot itself so now the raspberry pi can send commands to the autopilot and receive commands and receive commands or control information from the drone so the autopilot px4 which is your cube pilot your autopilot is essentially now you're now able to get access to it using the raspberry pi from then on we went to attach a pirate so the pirate is on top of the raspberry pi and yeah the pirate essentially is what makes the drone part of the mobile network itself the pirate comes with a sim card that can connect to the mobile network so yeah so that's your setup there this is the drone that we used um and just to zoom in there you'll see that we've got our flight controller there at the bottom and this case here on top is our raspberry pi attached to the pirate and yeah we've got our five antennas there um essentially for mobile network communication and yeah so yeah what does the full picture look like the full picture looks something like this we've got our 5j mobile network here which is everything on the left which you will see that we went through except that we only added mission planner so the core network itself and the mission planner computer are the same computer they are running on the on the same computer and so yeah so on the right side that's our mobile network um yeah and on the left side we've got our drone and with the pi with the pirate there so the pirate can go ahead and communicate to the mobile network and yeah all data is moved to and from so in terms of drones um there's a communication they use the communication protocol they used is called mavelink and that's almost a standard communication protocol used for open source drones and uh yeah that's what we were using here and we're using mavelink router and mavelink router is just a piece of software that enables you to route to listen to the autopilot so over here on the left on the left hand side here if you look with what a mavelink router container which is dockerized um it listens to the px4 and and and and sends that information to a specific ip address and yeah anything that comes to this ip address as well it forwards it to the autopilot so mavelink router they and within the core network we have added into what is called the application layer of the core network we've added a container a dockerized container they called mavelink traffic generation and what that does is essentially essentially also just an instance of mavelink router so when anything comes to the core network it's directly routed to the mission planner application or the q ground control application which is your ground control stations and yeah that's this is essentially it's this is how we we we get our drone um to communicate with our ground station via the mobile network so you'll see here we've got our red lines then that's essentially how traffic would move to and from the drone to your ground control station um the red solid lines being your 5g so from the piet antenna to the 5g base station to the core network and and to your mission planner application and the red dotted lines those are your that shows the channel communication for the 4g so the good thing about this is like i said mobile networks are being backward compatible in the fact that our mobile net net net networks has got our mobile network has got um 5g available as well as 4g so whenever it's flying whenever your drone is flying and you have got your 5g communication channel deteriorating or the channel conditions are not too great it will always back it will always revert back to 4g and 4g because of the frequencies that we're using um 4g is operating at a lower frequency than 5g and like the communication channel is is less uh susceptible to um to attenuation and uh yeah 4g pretty much has got a longer a longer range of communication as well so it will always interchange between the between the two depending on which one is the preferred or the better channel to use so yeah that's essentially it and what we've been able to do um what i've been able to do with regards to this setup i have been able to pretty much uh command and control the drone so i can arm and disarm the drone i can tell you to do an auto mission um yeah i i can i can do all sorts of things it says essentially there is a full and proven communication to the drone using this and uh yeah it is it is great and yeah currently what we are what i'm working on is uh going onwards we're going to do some bit of flight tests um so your the flight test will include both the 4g and the 5g non-standalone mobile network and we're going to be measuring some drone communication key performance indicators and what this essentially will be is that um um you know is using um a mobile network that much better and is it worth it uh throughout like uh you know is there a future way and as it stands with our indoor test beds that we have set up there definitely is a future and the drone industry can definitely um gain a lot from what mobile networks have to offer and then yeah ultimately this will pave way for the 5g stand alone test so the reason why we even use the stand alone 5g mobile network is because yeah it's it's still under development and although it does exist um yeah the connection will only last a few seconds and um stuff that i mentioned there like network slicing and beamforming and uh the low latency using different numerologies uh that's still currently being implemented and yeah it's this it's the it's the same it's even in the commercial scene as well um commercial mobile network suppliers are currently only deploying the non-standalone version but yeah so this um this set of experiments and vision will enable us to pave way for for 5g stand alone tests and really um leverage mobile networks for drone communication and yeah just to mention yeah it would be good to see how from my from my current tests which i've currently run i even put the data there because i'm still replicating those tests and um yeah making sure that i've got reliable data but yeah you can see that sometimes like when your drone is flying and they say it's making a sharp movement because of the current draw of the propellers you see that even your throughput is highly influenced by that by that interference like your throughput might be it an average of 70 megabits per second and it just drops down to zero like when you're making a sharp turn or something like that so it's all it's all in interesting data to see and yeah i can't wait to really um feel into these test flies and look into that so yeah that's me for today um yeah just my acknowledgement i'd like to thank alfred peace loan foundation uh for sponsoring my master's degree and send tech solutions for providing the radio equipment that i've been using for these experiments thank you so much thank you for your time and yeah thank you for your interest in my in my in my presentation as well if you need to know more um this is my name there and i'm available on linkedin and yeah which would be good if you have any questions i would have wanted to make the presentation in person but yeah there were some visa difficulties and um yeah uh the visas were not processed quickly enough but i would have been likes to be there in person and see everyone especially after seeing um the number of people we had booked to attend this lot today have definitely been good to see all of you um in person and uh yeah talk about this and see what you have to say but if you've got any questions or need further clarity um you can always um look for me via that link and um yeah definitely get back to you thank you so much