.NET Conf 2023 Keynote - Welcome to .NET 8

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome to netcon over the next 3 days you'll hear from our team partners and theet Community about what's new inet and things people are building with net today to meet their needs of Tomorrow our goal with net is to build a unified development platform that developers love and businesses trust it enables developers to build any kind of application with best-in-class runtime programming languages development tools and a vast ecosystem that is powered by amazing developers around the world I want to thank all of you for the energy that you put into supporting and sustaining theet community and of course building on top of it now let's talk a little bit about Net's momentum we continue to grow at an astonishing Pace net is used by more than 6 million Developers and they are adopting the latest version of net faster than ever over 50,000 people have contributed to net till date not only are developers adopting and contributing to net but they also love using it we are the most admired framework on the stack Overflow survey C is amongst the top grid Hub languages and we continue to be one of the highest velocity open source projects we are so excited to launch Neta today one of our largest releases yet and it couldn't have been done without you thank you for all your trust and contributions to help make net what it is today every single developer that is building with.net building open source libraries submitting issues fixing documentation or helping Drive the future as part of net Foundation thank you now let's go over to Damian and other members of our team to learn more about net 8 thanks gav all right it's another year and that means another net release and another net com net 8 is the biggest release of net yet with improvements across the runtime Frameworks and programming languages including asp.net core Entity framework core Maui Blazer and C 12 today we're going to show you just a small taste of what we've got in store for you with net 8 let's start out by looking at performance performance is very close to my heart and is always top of mind for each release of net and donet 8 is no different for the last several years we've been publishing a blog post that highlights the core performance improvements with each release of net this year with net 8 we are delivering more than 1,250 performance improvements it's no wonder that blog post is getting so long we'll touch on some of these improvements throughout the keynote today but if you haven't read those posts you should check them out we've been sharing our progress on the techempower web framework benchmarks for quite a few years now with net 8 we're seeing improvements in the Json API scenario of 18% hitting nearly 1 million requests per second using asp.net core minimal apis in the fortune scenario which is closer to a real world workload including database access and servicei HTML rendering we see an even larger Improvement 24% hitting over 300,000 requests per second with asp.net core our goal with net is to ensure that Developers have a delightful experience building for the web be it full stack web apps or Web apis building client apps that can run on desktop and mobile devices and building powerful Cloud native apps that are resilient and scale to meet your demands we'll cover some key features across these workloads this morning but you'll hear a lot more about them throughout the rest of the day now for the rest of this keynote we're going to hear from members of the team talking about four key areas of net 8 building full stack web apps and apis crafting apps for mobile and desktop infusing new and existing apps with artificial intelligence and finally how we are evolving net into a world-class platform for cloud native development to better highlight feature enhancements in net 8 in these workloads and more the team has been working hard on a significant new iteration of the eShop architecture sample that we'll be highlighting throughout the keynote and throughout netcon this is a full-fledged reference app that utilizes Cloud native microservice architecture fronted by some greatl looking web and client applications we're going to start by looking at full stack web development so let's head over to see safia and Dan talk about what's new in esp. netcore in donet 8 hey Dan hey sfia hey Damian I hear you're going to tell us about all the new stuff in asp.net core for full stack web development that's right take it away thank you Damian asp.net core inet 8 has everything you need to build modern web apps whether you're building browser-based web apps or scalable backend Services asp.net core provides everything you need right out of the box there's no need to stitch together a solution from multiple different Frameworks that's right you can be more productive by leveraging the same Frameworks languages and tools for your entire app ASP net core is built for security and optimized for performance so you can handle any scenario with ASP nut core every developer is a full stock web developer asp.net core includes Blazer our front-end web framework for net with Blazer and net8 you can use the server and client together to handle all of your web UI needs it's full stack web UI Blazer now includes enhanced server side rendering capabilities including static server rendering enhanced navigation and inform handling and streaming rendering so you can optimize page load time and Elevate the user exper experience you can then add Rich interactivity wherever it's needed in your app either from the server using Blazer server or from the client via Blazer web assembly running your net code on web assembly from a browser is significantly improved in net 8 components render 20% faster there are lots of new edit types supported by hot reload and a new web-friendly packaging format called Web Cil streamlines deployment new built components for displaying data for defining section outlets and handling authentication help you stay productive and get the job done fast that's right now as always we take performance seriously and those dividends pay off to you with lightning fast apis and services asut core is packed with new apis in Donna 8 that allow you to be more productive so you can focus on the code that matters most yours and if all that wasn't enough visual studio and visual studio code come with new tooling to enhance the developer experience let's see all that in action we're just about ready to ship the eShop app but there's one more API endpoint we need to add before we can do so it's an endpoint that will allow our users to browse items in the catalog by their brand and type let's take a look at the code that I'm adding here now the first thing I'll notice is that all of the route patterns in my code are lit up this is thanks to the new route Tooling in Donna 8 it allows me to see the parameters in my route template and any annotations that I might add there's something else that's going on here too you'll notice that I get a helpful warning about an unused route parameter in my code in this case it's this ID parameter right here I can go ahead and remove this parameter to get rid of that warning fantastic an analyzer that helps me write better code before we ship to production now if we take a look at the implementation for my endpoint we'll notice that it's taking advantage of quite a few services that are available in the DI container I've captured these Services into a catalog Services type now let's go to definition on this type and we're going to spot something super Nifty it's the new primary Constructors feature in C2 it's concise syntax that allows me to declare a Constructor with parameters that are available in the entire body of the class this is really helpful for types that take advantage of di Constructor injection that's really cool safia yeah I gotta say though but I can't help but be intrigued by this Visual Studio painting that you have on the left side there yeah what is that oh great question Dan so this is the new endpoints Explorer in Visual Studio I can use it to browse all of the routes that are currently registered in my application now what's pretty neat is that I don't need to build or run my application in order to see these routes they're all discovered statically pretty nifty but there's more I can select any of the endpoints that I've created here's my new one and right click to generate a request for it this request will show up in visual Studio's new builtin HTTP request client now I'm going to run my app great now that my app is running I can go ahead and click Send request and I'm able to send a request to my application and view the response right from within Visual Studio I don't need another window at all you know I think we're almost ready to ship this new API Dan sounds great uh but before we do that should we do some testing on that API endpoint first good point Dan I would never ship code to prod without writing tests in fact I've already gotten started on this let's head over to our tests you'll notice that I've added a new test to exercise the API endpoint that I've just introduced and I'm using another cool new C 12 feature collection Expressions collection expressions are tur syntax that allow me to initialize collection values in this case I'm using collection Expressions to provide a parameter to a method that takes an I numerable pretty nifty right cool let's go ahead and run this test right click run test H darn my test is failing uh it looks like it was not able to find the route associated with the new endpoint that I just added let me go ahead and try and debug this now what I'm going to do is set a break point right here at the entry point for my application after I've registered all of the routes associated with my catalog API then I'm going to start debugging my test see if I can figure out what might be going on cool we've just hit our breakpoint now what I'm going to do is examine this app type right here now if you've got a Keen Eye you'll notice that there's something new in Donna 8 the debugger display for this type and quite a few others in asp.net has been improved in this particular case I can take a look and examine the endpoints that are registered in my application I can see the total number of end points and get information about the http P method route template and Handler name that's associated with my methods and endpoints pretty nifty it's a small detail that dramatically improves the debugging experience for my application and in this case I can use it to figure out that I think I might have made a typo in my test it should be plural items in my route not item let me go ahead and stop debugging fix that typo and rerun my test all right fingers crossed oh great a green check the new test passed all right Dan I think we're almost ready to ship to prod for real but first do you want to show us what we're doing on the front end here yeah thanks sopia that Dev experience for building that new uh endpoint API looked amazing totally all right here's the UI for the web app here on the homepage we can see the product catalog and thanks to that new API endpoint that sopia added we should now be able to filter on product types let's look at some Footwear yes it's working and we should be able to filter on Brands excellent we can then pick one of these products and look at its details this transparent hiking boot looks intriguing it looks like it' be great for showing off your sock collection this whole web app is built using Blazer and Blazer component components if we bring up the browser Dev tools we can see how this is all working let's refresh the homepage okay now let's filter on websockets do we have any websockets in this app nope there are no websockets what about web Assembly not downloading any web assembly is there even any JavaScript there's no JavaScript this Blazer web app is being fully rendered from the server so it ready to load fast and scale Blazer in on 8 supports static server rendering let's look at the code to see what that looks like so here's the catalog component for that homepage if we scroll down we can see it looks like a normal Blazer component but in this app this component is set up as an asp.net core endpoint that renders HTML directly in response to requests with blazer and.net 8 you can handle all of your server side rendering needs of course Blazer can do much more than static server rendering we can now use Blazer to enhance the page loading experience to make it much faster to do that let's go over here to the root component for the app and I'm going to uncomment the Blazer script we'll apply that to the running application all right so now if we go back to the app so now when I filter let's filter on Footwear again or on a particular brand it's fast and it's smooth and I don't lose my scroll position on the page that's because Blazer is enhancing the page navigations and instead doing a fetch request right there so instead of doing a full page reload Blazer's intercepting the request doing a fetch request and then intelligently updating the Dom with the retrieved content from the server this means we also don't have to redownload any stylesheets fonts or other assets that were previously retrieved reved my app feels fast and responsive like a single page app even though it's still using serers side rendering now we can enhance form requests too to do that let's add a couple of products to my shopping bag let's add maybe this watch and first I'm going to have to log in there we go so now we can add this watch The Shopping Bag there it's showing up let's add a few more things let's add this bike helmet looks good and then maybe also this backpack awesome okay so we can see in our shopping bag we now have all of our products and we have these little forms that we can use to update how many of each product that we want to buy for example maybe I decide I want another backpack now when I submit that form you may have noticed there was a BRI blip and I lost my scroll position that's because it's doing a full page reload when I submitted that form but with blazer we can do better we can enhance that form uh form post so it's much much smoother let's go find that form in the cart page component there it is and I'm going to go ahead and enhance this form save that and we'll apply it to the running app great now if I submit this form again let's click update you can see it's fast it's smooth and I no longer lose my scroll position if we look in the browser T tools we can see what's going on with that form request again when I submit Blazer is intercepting that form request and doing a fetch request instead of doing a full page reload and we don't have to redownload all of the web assets so that's enhanced navigation and form handling it makes my app feel fast and smooth even though it's still doing server side rendering okay let's go back to the homepage now on this hom page we have to download uh all of this product catalog data by making an API call and that might take a little while it's pretty fast in my development environment like if I just refresh the page right now it's pretty quick but when I deploy this to production that API request might take a little while uh to simulate that let's go back to the code and I'm just going to add a artificial task. delay to the catalog component for those times when the API request just takes a little longer than we H for okay let's go ahead and apply that to the running app now if we go back if we refresh the homepage now you can watch the the tab up above I click about 1 1000 and then it loads or if I apply a filter that's filter on Footwear click 1 1,000 then it finally loads we have this 1 second delay now while we're making that API call to get the uh product catalog data we can make this experience better using streaming rendering in Blazer uh to enable streaming rendering is really easy we just go back to the component and up at the top we're going to add this stream rendering attribute we'll go ahead and apply that with streaming rendering Blazer will render the component immediately with some placeholder content let's let's go ahead and refresh the page and see that there right there you see how we can now have loading dot dot dot almost immediately while that API call is being made then once the API call has been completed Blazer will render the component again and stream the updated content down to the browser and Patch it into the page so you get those streamed updates automatically the page loads fast and you see the streamed updates as they become available for a much better user experience if I refresh now we see loading and then an automatic update that is pretty cool Dan now does that stream rendering require a websocket connection to work nope there are no websockets required at all the streamed updates are actually sent on the same response that was used for the initial request wow that's Nifty yeah now of course with blazer we can also Al build richly interactive components for example this app has this uh store chatbot that I want to be a rich interactive and responsive user experience we can do that in Blazer using either Blazer server or Blazer web assembly wherever in the app we need it like just for this component to show how you set that up let's go find that chatbot component here it is and all we need to do is apply an interactive render mode I've already done that here using the new render mode razor directive attribute and then I'm here using interactive server rendering which is Blazer server I'm also disabling pre-rendering in this case and that's just because I don't want that chatbot animation of it sliding in from the side to happen twice okay so that means that this chatbot is now an island of interactivity in an app that is otherwise just using server side rendering so we should be able to add a little uh question here like what is your best bike helmet and wait a second to see what it says there we go so now we got our response and we have a nice interactive chatbot now what's really cool is at the same time I can still go over here and you know filter and browse the product catalog and I don't lose the chatbot State that's again thanks to Blazer support for enhanced navigation also if I close this chatbot and let's bring up the browser Dev tools and let's see what happens when I open the chatbot and now I'm going to filter on websockets again now we do have a websocket in this case because we're using interactive server rendering and we can see that the webside connection is active it hasn't been closed yet but once we close the chatbot watch for it there it goes now the web stock connection has been automatically closed and the request completed we're only paying for interactivity when it's in use awesome so our web application now has a great user experience and it looks fantastic so that's how asp.net core in donet 8 makes it easy to build full stack across your entire web app thanks that was really great it's amazing to see how far asp.net has come all these years that's right whether you're building web uis with blazer or back ends with minimal apis ASP n core in don8 has everything you need to be more productive and that was just a small amount of the features in asp.net core in this release if you want to learn more about the other great features that we've been working on check out the rest of the talks uh over the rest of this conference let's talk about client development for mobile and desktop with net net Maui is our platform for building mobile and desktop applications for multiple platforms use a single C code base and access native apis to build world-class applications we've seen great adoption of Maui since we released it 18 months ago and here to talk more about Maui is Maddie thanks Damien we have had so much fun seeing all the things you've built with Maui so far I have loved hearing about the apps and the projects and of course all the feedback you've had which is why in net 8 there were a few key areas that you told us were most important to you that we focused on not only has Net's performance increased but so has Maui's we've continued improving our overall startup time our memory management and our layout optimization across all of Maui's platforms another really big Focus has been on quality we've squashed over 600 bugs and worked closely with our community to accept over, 15500 PRS across a bunch of different areas many of these were highly requested desktop app features and of course plenty of improvements when building Blazer hybrid apps with Maui more importantly we could not be successful without you we've been really grateful to our open source community members our library maintainers and our control vendors who have really come together to help Maui's ecosystem flourish in the past 18 months now my favorite thing to talk about with net 8 is developer productivity we continue to ship amazing things in Visual Studio to make it easier than ever to build and debug and deploy your Maui apps but we also wanted to give you a lightweight consistent experience across any development platform that you want to work on which is why today I am excited to share with you the new net Maui extension for visual studio code theet Maui extension alongside the new C devkit and updated C extension makes it easier than ever to develop your crossplatform net Mau apps in vs code it's currently in preview so you can try it today and let's take a look so I am in uh the same eShop app that you saw from sopia and Dan earlier but this is the Maui version so we rebuilt this to render with Native UI controls on your desktop and mobile platforms this one project has all of the code needed to run the app on iOS Android Mac and windows um it's part of the bigger eShop codebase but I opened a solution with just the Maui projects so that we can look at those and you can see that there's actually a solution Explorer in VSS code this is brought in from C devkit it's able to show me my file structure the same way I'd expect to see it in VSS code so my zaml files have their C files nested in them and anything that you need there you can see all of the different shared resources and platforms we're targeting in this app right in these folders here so we have our resoures folder and we have our platforms folder um and you can see we are sharing things from the app icon to images to even fonts all in one place with this code base and we're targeting all four platforms that Maui targets and you have all of the platform specific code you need right here in those folders too so it's really easy to drop down and get to the native layer if you need to so this is all part of the net Maui the C and the C devkit extensions all you have to do is install the Maui extension it will pull in the other ones for you and we have all your instructions that you need to get set up once you have the Maui workloads you can then start writing your mobile apps and debugging them and trying them on any Target platform that your device supports so on my Mac here I have um xcode installed and I have my Android SDK installed so I can actually see all of those things when I zoom in down here to what we're calling our language status item um and it's telling me the project that I'm deploying to and also the target I'm deploying to so I'm going to go up and pin this so I can see it um and then when I click on this that says my Mac I can see all of the valid places I can deploy this app to so I have my pixel emulator and then I have all of the different simulators that xcode gives me we are going to run this on my Mac all I have to do is hit run and debug if I want to create a launch Json file I totally can but it's really easy to just hit run or hit F5 if that's what you like to do give it a second and then you see that the debugger launches and the app is going to pop right up for me so again this is the same eShop app we were just looking at but I rebuilt the UI in Maui so it's a little bit different I took some creative liberties with it but I can just go ahead add things to my cart and then go look at my cart and see all of that in the total if I pop up my iOS simulator alongside this I already have the app running again and you can see it's the exact same crossplatform even things like the app icon this purple Northern mountains logo is the exact same as it is on my Mac so it's all part of Maui I didn't have to do anything custom to get that to work both places um and then I also customized the code so that on the cart page there's a delete button only on the desktop app because on a mobile phone I might want to swipe right swipe to delete that's something that people do but on my desktop app I probably don't want to swipe with my trackpad as much so I just created this delete button does the same thing and all I had to do to make that work was actually go into the zaml go to the zaml for my basket item and use a couple lines of code to create a button that says on desktop it's visible that's it that's all I had to do to customize this based on desktop or mobile apps and thanks to C devkit I can actually also go and see my testing project and run my unit tests right with inv Visual Studio code so I have everything I need right here to get started with Maui and to start working on all the different platforms that has been a sneak peek into the do net Maui developer experience with Visual Studio code like I said it's in preview today so you're more than welcome to download and try it out and you can also join me and my teammate David Orton now later this afternoon for a deep dive into all of the amazing features of dunet Maui and net 8 definitely make sure you check out the rest of the amazing Maui sessions at netc this year back at you Damian thanks Maddie so teams at Microsoft have been adopting net Maui over this past year including the micros moft 365 admin app and the Microsoft Azure app which have millions of downloads and excellent ratings across the platforms that they ship to there are companies around the globe that have adopted net Maui as their platform for multiplatform development let's take a look at the MBC Sports Journey with net Maui for the last 10 plus years we have leveraged a multitude of Microsoft engineering Technologies specifically the net platform has been as productive as it has been innovative for us and our products as we continue to build crossplatform Solutions across the board we're always looking to become more and more efficient and that's where doam Mai comes in it has allowed us to coordinate and share code across web mobile and our apis leading to Features being delivered to the market faster having used Microsoft's traditional crossplatform approach for mobile for more than eight years we have learned to streamline not only Cod productivity but also better collaborate and communicate within our product and Technology teams in 2022 our team embark on re right in the sports andap we would attract to the dnet Maui as it promises simpler and scalable development compared to other crossplatform Frameworks and with Microsoft fully behind Maui we decided to use it for this project this choice help us to finish the work much quicker releasing the app in record time the success of this project underscores mau's productivity boost reaffirming our choice to embrace this technology in my experience net Maui is intuitive and a timesaver it opens up the door to integrate with blazer on the web D Mai has allow us T unify our co-base making us highly productive and flexible that was a great video now let's change focus and talk a little bit about AI in the last year we've seen open AI generate a lot of excitement around the globe with developers thanks to the transformative power of AI to enhance their applications I'm going to introduce Maria to talk a little bit more about net and AI thanks Maria you Dam large language models like open AI chat GPT have transformed the field of natural language processing and opened up new possibilities for software development you can build amazing applications whether you are building a chat app summarizing your data or creating a translator seamlessly with net but when you think about integrating AI into your application today you as a net developer might be saying it's too complicated or too much code well I have some good news for you it's actually quite easy the net team is making it simple for you to leverage AI in your applications today by continuing to provide first class outof the-box AI features in the net SDK providing seamless integration with the Azure SDK so you can leverage Azure open air and Azure cognitive search as well as making it easy for you to integrate into these large language models with the semantic kernel SDK but most importantly we want to make sure that we meet you where you are we are working with AI ecosystems across the world to deliver these emerging AI Technologies like vector databases for example we worked with milis to ship the very first C client and cordant will be coming soon so I'm going to switch over to my computer and show you a quick demo on how we built a customer service chatbot inside of the eShop application so we're back on the eShop website and I want to give you a fun fact about this demo every single image and every single product C Cog that you see on the page was generated using AI but I'm going to show you the interaction that we built into an existing doet application to make it more intelligent so I'm going to launch my chatbot over here and I'm going camping this weekend so I'm going to ask for suggestions I'm going camping what do you suggest so as you can see I have a list of items that have popped up with Rich images and Rich descriptions I want to add a couple of these to my cart so I'm going to use a very natural language that I would use in a store because I like the tent to number one I like the backpack that's number three um I'm going to add those to my card so I'm going to say can you add the first and third item to my card so both items were added to my card and as you can see we have a very natural response and if I go over to my card we have both items and I'm ready to check out so let's go and see what makes this old magic under the hood we're here in visual studio so I can show you some code in our existing application we added a route that queries our catalog using AI this is achieved by creating an embedding from the chat search and then ordering it by cosign distance what this means is that we are ordering the results from the closest to the farthest in relevancy only the chatbot is able to access this endpoint and I'm going to show you how we do this in our chatbot we have a set of semantic functions that tells the AI what to do so for example this semantic function gets a description the AI invokes the search catalog function and hits the get semantic relevance endpoint that I showed you earlier so just in a few lines of code you too can make your app intelligent before I hand it back to Damian I wanted to share how developers at Microsoft and across the globe are leveraging AI to personalize their user experiences one of the most popular AI assistants in the world is Bing chat it is setting industry standards on how you build large scale AI applications and guess what it's built withn net in addition to Bing we also have developers across the world who are leveraging AI within their net applications stack overfall builds on.net now they trustnet to bring AI powerered offerings to their community we're also collaborating with industry Partners like Intel to push the performance boundaries across a set of scenarios thanks Maria it really does seem like it's that easy to integrate AI with net it is that easy thank you very much thank you Daman I think we should go often find Glenn and fer to talk about Cloud native we aspire to make net the best platform for building Cloud native applications ensuring developers can build observable resilient applications that scale along with their business needs and are easy to manage using Rich Telemetry theet team has been working really hard this release on lots of features in this space so I want to hand over to Glenn and F to tell us more thanks Daman first thing I want to call out is a large set of capabilities that we build up in conjunction with a set of high scale Service Partners here at Microsoft people doing billions of requests with millions and millions of customers we went through several code bases and we tried to extract the most useful components to help you building cloud services today there's a lot in there but it falls into basically these four categories resilience particularly built on the new version of poly that we collaborated with the poly team on health checks testing and fakes and observability you should check out all of this if you're building cloud services but I want to particular talk about observability Donnet has always had deep integration with open Telemetry and inet 8 we adopted open Telemetry semantic conventions and had a t T of new metrics and data points for you to be able to observe what is going on in your application as you can see on the screen we created this beautiful graina dashboard for you to be able to grab and get started quickly with seeing what's available in net 8 and then because we're bending on Open Standards and or because of their own or existing deep integration you're also going to be able to get that data without bin sites or whatever apim vendor that you're using today now let's change focus and talk about containers containers are the unit deployment for the cloud and because of that net is always working on improving our container story in net 8 we've hardened the security of our default container Story by making sure that you're not running as root in containers we've tried to improve the size of your containers and made sure that all of that works with our existing SDK publish feature to try and get you into containers and into a registry as fast as possible let's zoom in a little bit on the size so not only does size help with a tax surface area by not having as many dependencies inside your application it also helps with deployment speed and density and many aspects of building a cloud native application in this image you can see on the left the improvements we've made and options you have for just the size of your base images we worked hard with Partners like canonical in this case to make that real and on the left you see the runtime options for different sizes of of your net application inside those containers and if you look far to the right you see this really tiny application running in the Chisel day and what that is is our aot investments over the course of net 8 so aot stands for ahead of time and that's when you compile your application to native code and get a small self-contained execut that you can run we think that Partners really nicely with Cloud native because you often have small microservices that you want to run lots of in a cluster and so in net 8 we created a sample application that was meant to simulate a small HTTP API the idea being that we Model A small microservice that does something useful um and then we try to get a better profile for that in terms of publish size working set and startup so you can see here how where we started we had nearly 100 megabytes and 90 megabytes working set and then now at the end ofet 8 you can see the massive improvements that we've made or less than 10 megabytes on disk and a very small impact to your request per second you're going to be able to pack many more of these onto a cluster than what you were able to before but this is still just phase one of aot for us uh you can we this is a HTTP API using a database so you can still do real work but larger libraries like signal R and Entity framework and a lot of ecosystem packages aren't ready for an aot world yet and so you're going to might have to wait and we're going to continue to work on this from release to release show you what this looks like and talk about that a little bit more David is is going to demo aot in one of the eShop uh services that you've seen thanks Glenn the team has been hard at work making native alt work for aset core services in donet 7 we started the alt Journey with console applications and inet 8 we made a lot of progress making aset core applications ready for for publishing to aot so let me show you an example of the ESOP application we're going to take one of these services and Native aot pet the basket API is a very simple microservice that uses grpc and reddis I did one small change to my application I set publish aot to true in my project file that's all you have to do to aot enable any application now it's not that easy because if your dependencies aren't native aot compatible then it won't work let me show you an example of the publish size of this application before native aot so to get this application I made this application a single file publish I set publish single file to true and the end result was 102 megabyte uh binary this contains the entire framework and every dependency required to run the application but it's not very small aot lets us trim the application to its bare minimum dependencies um and compile the native code so it doesn't have any dependencies on the runtime and just on the OS all right so I made the application publish a true let's head to the command line and Run net publish it's compiling it's going to build the application to ilil and then it will turn that I into native code so there's no jit you'll see a sentence saying generating native code soon and there it is is all right during this phase of compilation you will get warnings if your app or any of your app dependencies are not native aot compatible so if you're using libraries like Auto mapper autofac and any framework you'll get a ton of warnings that typically are really hard to fix um but remember this is a journey and as Glenn said we're working with the ecosystem and partners to make libraries more aot compatible as time goes by so I expect there to be a slow progress in in getting that out all right the app finished compiling and the app that was 102 Megs is now 23 megabytes that's amazing and you're going to be able to fit a lot more of those onto a cluster when you're trying to achieve high density Cloud native apps well thank you David and thank you for watching our well- win tour of the cloud native features that we have in net 8 and back to you Daman thanks Glen F I know you and I worked on the aot feature it's fantastic to see all that come together at the end of the release and I'm really looking forward to customers getting that stuff you've seen so much great content about Cloud native work in net 8 today please check out the rest of the talks that are going to be available during netc about this uh the teams worked really really hard on this stuff in net 8 up next let's hear from vestus wind systems who are harnessing Net's Cloud native capabilities to build more efficient Solutions in sustainable energy here investors as a global leader in sustainable energy through our wind energy and hybrid projects we have kept 1.9 billion cubic tons of CO2 out of the atmosphere fast Innovations require digital twins at scale and that is where we lean on the Net Technology the qual native capabilities of net effortlessly orchestrate our workloads requiring 400,000 cores and petabytes of data it is a natural fit for our high performance Computing like our vest turbine simulator application with web API we could easily integrate existing systems and streamline our data exchange to meet our requirements with blazer we used our existing neet skills to develop an interactive admin dashboard we use aure functions for serverless event processing letting us focus more on the code than infrastructure and when it comes to understanding performance or troubleshooting application insights give us a vital tele on our distributed net apis sustainability is always front and center for vestors through contributions to the open- source carbon aware SDK written in net we dynamically allocate Asia resources based on carbon intensity which aligns directly with our sustainability goals net provides the scalability and flexibility to run applications that help fastest make the world a Greener place it's great to see net increasing performance while reducing environmental impact aiding investors's sustainable efforts now with that being said we are always seeking to innovate as the cloud native landscape continues to evolve and Delight developers the most important aspect of that is listening to you and having you tell us what you need as we've talked to customers and partners both internal and external here's what we've found cloud computing is fundamentally hard getting started is really hard developers need to make a lot of choices and net today does not have a golden pave path available to you to build Cloud native apps and that is why we are so excited today to announce net Aspire a new stack for building production ready observable distributed applications with net asp.net I used to work on that I think Aspire is one of the biggest Innovations Inn net in the last couple years I'm very excited about this awesome well Glenn and fer are going to tell us more thanks random guy uh we are happy to be able to show you a Spire for the first time the uh the team has been working really hard on it and we've been really trying to streamline Cloud native development and try and solve some of those problems that Daman talked about earlier so I'm going to give you a bit of a whirlwind tour of some of the features of the stack and then David is going to take it away to show you how it all comes together in a demo in EOP so the first thing I want to talk about is the components Spire includes a curated set of components to try and address some of that choice and complexity problem that we heard about earlier components are configure client libraries for resiliency Telemetry configuration they all have a rich schematized configuration system they don't wrap the client library but they configure it for production Readiness in a cloud environment and get it into di as much as possible so if you're going to use SQL client you're still using SQL client but it's configured to be ready with timeouts resiliency and so on next I'm going to talk about the developer dashboard so the developer dashboard we've discovered is really your first line of debugging for a distributed application it's become extremely useful for us in debugging all the apps that we've shown you today and we think for just going to become the centerpiece of your debugging efforts and Diagnostics efforts as your running applications as well and then finally you can run an entire distributed solution in a single command you can express your application topology in a language you're familiar with with the Concepts that you're familiar with like references and then you can deploy it to the cloud either using things like the SDK container build we talked about earlier or via integration with other ecosystems like radius a or terraform to map your application needs to a cloud environment but that's a lot and to show you what that really looks like in an actual demo I'm going to hand you back over to F all right Glenn thank you let's talk about Aspire if you've been paying attention during the keynote you would have noticed this little purple triangle hanging hanging out in various slides that's the Aspire icon and this is the Aspire apphost project I can add aspire orchestration to any existing Net Solution by either right clicking going to add and clicking add Aspire orchestrator support that lets me add these two projects the solution. apphost and service defaults to my current application I can also go on the command online and do net new aspire to create these projects as well all right let's dive into the apphost project and see what it does here's my programing of the appost project and I am constructing my application by adding containers and projects and as Glenn said I am adding a reference to these containers from my project not once have I had to mention a connection string a URL a port that's all handled for you by the Aspire orchestration process so you can see right here my basket API is referencing the reddis container and the one for rabbit mq that will inject the appropriate connection strings into the application when it runs now eShop has about 13 or so projects and they're all wired up in about 63 lines of code pretty cool right normally I would have had to use doer compos which requires me to build container images during development for every single project what a pain also I could have gone to visual studio and configured multiple startup projects and that only helps with launching it doesn't help me configure connection strings or ports Aspire handles all that for you I can run the entire application in a single run of the app post let's do it I ran the app post and it launched the orchestrator which will launch the containers and projects and pop up this beautiful dashboard the dashboard shows me an overview of all the projects containers executables in my entire application it shows me things like errors that may be occurring in the logs I can see a ton of Errors um I see the end points for my application I can visualize environment variables I can see values being passed in I can even look at console logs it's pretty awesome let's run the application and create traffic to see what the app is actually doing so I'm going to buy a watch so I can tell time going to log in right here now with my super secure password and I can add to cart to BU and check out and then hit place order so the app is functional that was cool but but let's see what happened behind the scenes in the dashboard I can click on traces to see a list of requests that happened for the application I want to see what happened during checkout this Trace hit five Services out of the box the aspired dashboard shows me a distributed trace of the operation which shows me calls to every dependency including post reddis rabbit mq and I can also see that there's a lot of stuff going on a lot of queries happening let's check on that later but how did the dashboard get this info in the first place let me switch over to a brand new Aspire project in visual studio so I can do file new search for Aspire and there's two templates I'm going to create the Aspire starter application we can see familiar projects we just learned about the Aspire apphost but there's a new project here called Aspire do service defaults I'm going to dig into the extensions uh CS file and I see a method called ad service defaults the intent behind this method is that it's called from every single application to configure the default things like Telemetry health checks service Discovery and resilience in every application we are by default using open Telemetry we're going to wire up default traces for HTTP grpc and all the things required to build a cloud ready application we also expose health check endpoints by default so that any modern Cloud platform can get the health of your application out of the box now this project is meant to be yours to customize it's in your app so that if your company or team has their own defaults you you can express those as part of your service default application let's take a look at the program CS for the Blazer project I'm using the redus output cach Aspire component passing in the connection name cache and I'm also wiring up a typed HTTP client hitting the backend service API service how did this work if you recall if you look at the apphost project we get to name our components our resources so in the app apphost project I named my red container cache and I named my API service API service API service I can use those names in the project as the connection names for both reddis and for the htpm point in my weather API client this takes away the pain of having to find ports and connection strings that's all handled for you out of the box this demo wouldn't be complete without deploying to a cloud so let's see what that looks like I'm going to pull up the command line and I'm running a preview build of the Azure developer CLIA this build understands Aspire projects natively so I can run ACD in it and it will ask me to scan the code in my current directory and it will eventually find the Aspire project awesome so it found my Aspire app post project and if you recall my appst project describes my app's dependencies so we're going to confirm that we're going to confirm one more thing we're going to expose this one endpoint and we're going to call this the keynote DF keynote perfect now I can run ACD up and it will ask me a couple of questions like where they wanted to deploy it to I'll pick this I'll pick that awesome that kicked off the process of deploying it to Azure so it it took about 5 minutes to deploy that application and I have one here prepared ready for the keynote so let's jump to the resource Group and see what got created in Azure so with just the Aspire project isy a the a developer s I was able to understand the application its dependencies and it deployed containers to container apps and also deployed the r instance to Azure and the app should be running awesome one more thing the weather endpoint is the important one and we're up in Azure with just two commands all right we just saw how you can add aspire to existing projects use the dashboard to gain a deeper understanding of your application use aspire components to make calling dependencies robust and observable and of course deploy it to any cloud back to you Damian the first preview of net Aspire is available today and we can't wait to see what you build with it it's open source on GitHub so please do let us know what you think let's go catch up with gav thank you Damian it is always so humbling to be part of these Keynotes and to see the outcome of so much hard work from the teams across Microsoft and the community members there is so much in net 8 and it is available today so head over to the net website to get started alongside the release of net 8 we have also released the 178 version of Visual Studio 2022 which supports net 8 the latest cop 12 features and improves developer productivity across the board including several new enhancements to GitHub co-pilot go to visual studio.com and download it today in collaboration with free Cod camp we recently announced the foundational cop certification co-authored by Microsoft and free Cod camp this certifications help you gain practical skills and knowledge to start building applications with c and net this certification is completely free and is available today on free code cam now speaking of learning Microsoft learn is another great platform to learn all things.net if you are new to net looking to add a new skill to your developer toolbox or just looking to brush up on on the latest and greatest in.net then head over to Microsoft learn where we are launching new and updated content for you to start learning today for the rest of this conference we have a packed and exciting agenda with sessions from teams across Microsoft our partners and the net Community I want to close out this keynote by thanking all of you for joining us today giving us your feedback and all the support that you provide around Net thank you you and have a great net [Music] gon
Info
Channel: dotnet
Views: 59,362
Rating: undefined out of 5
Keywords: .NET
Id: mna5fg7QGz8
Channel Id: undefined
Length: 57min 4sec (3424 seconds)
Published: Wed Nov 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.