Introducing Spring Boot 3.0

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I I I'm excited about that song it gives me Good Vibes uh no pressure here following you again I'm not nervous at all I am jazzed to be here really uh thank you for setting this up thank you for putting this on uh this is real special I'm DeSean uh today's magical day 333 days in this role uh I've done some other things before that uh I want you to use a hashtag I've I've seen the phones out I want you to hashtag I want you to tell everybody all the things that you've learned uh use either one of those that would help a bunch we want to do this again it's a great time to be a developer man I'm just does anybody else feel that I know a couple of them in the back anybody else feeling that like it is a great time it went GA spring framework six just went GA and right around the corner are you guys aware of this calendar.spring.io did you guys know that existed everybody knew about start.spring.ail right from my good friend Josh second best place to be calendar.spring.io this we're going to give you the calendar it's out there it's available you can always see and just right around the corner spring boot three spring boot oh man I was so excited when I first learned about spring boot uh I had this opportunity the best thing about it was the actuator the actuator like I was able to take things in production I didn't need somebody else to give me the the nagios or whatever it was gonna measure oh we got it we're gonna give you a dashboard we're gonna tell you all the things you need to do uh I was building things that needed a bigger Heap I wanted to maximize my Heap I wanted that actuator there so I could see my own metrics and I wasn't getting that from the dashboard that was provided by me so again spring boot it it took my career into a new dimension it's just been wonderful the whole way uh let's keep going it is a great time to be a developer I make some assumptions coming into this group uh the assumptions are you like Java Java users any yeah you like spring where's Spring oh not all the hands are up but that's okay well I'm gonna help you along the way uh another assumption better software is better than worse software agree go guys and we are limited in some things time is there anybody only raise your hand anybody that has unlimited time oh boy that is amazing I want to speak to you afterwards anybody have unlimited infrastructure I can stand up as many VMS as I want right now anybody anybody no hello all right go ahead um money who's got unlimited money I can spend as much as I want item instructor as much as I want to process my cloud build doesn't matter anybody not a single wait wait one I want to talk to you we're gonna have a nice conversation at the happy hour spring framework six is GA spring boot three next week we saw it on the calendar this is so exciting uh I do office hours so you have questions you're getting covered a lot there's a lot of new things that I have not touched there's a lot of things I'm excited about and I'm assuming that you're excited about them too I run the spring office hours it's every Tuesday uh 10 30 your time let us know use that hashtag and let us know we would like to do more shows we'd like to make it available and do your time zone we've got to find something that fits but we're doing this every week if you've got questions about spring framework anything spring you can bring we do live interactive channels we've got people coming from all over the world and it's a great show I highly recommend it mean time to dopamine how many of you heard this metric it's as a developer how how long do I have to work on something before I can see it in production how long do I have to work on something before I can smile that's a very important measure I want you to consider anybody using m1s or Raspberry Pi arm64 anyone hands I got one two three wait put your hands all the way up I want to get an idea we got about 200 people in the room I got about 25 that are using either M1 or Raspberry Pi I'm going to take 26. oh we got M2 M2 not humble we're going to do a quick little demo this is Raleigh if you've got your laptops out this is what we're doing we're going to go ahead and start a project feel free to play along and yeah let's just jump into it we're gonna go build a quick little project I'm going to do this copy and paste right can you see that screen all right you can also go to start.spring.io just all I'm doing is grabbing the web dependency and the actuator dependency I'm choosing to build a maven project and I'm using Java 17 while we're talking about Java 17. how many people are using Java 17 right now oh maybe almost half or or how about Java 17 or higher 17 or higher about half okay who's still I don't know how to ask this nicely who's having difficulty upgrading from java 8. it's a safe place I'm but there's a strategy we have a way to work around that your your account team will definitely help there's a way there's a safe way to go forward we're doing this uh I have a project let's take a look at it uh it works uh the next thing I want to do is we're going to see how long does it take to build this project remember meantime developing I'm doing development how long does it take to do stuff I'm gonna use Maven W uh clean package whew this is my normal process actually my default is I do mavenclean install I don't know why that's just the history one but you'll see why I do this later okay it took eight 8.3 seconds okay meantime we can fix that a little bit so we're going to show you another way I'm using a program called Maven d clean package so same thing I get Maven W packaged in when I get take it from the initializer maven d runs locally starts a little thing very similar to Gradle but as I'm doing my inner loop development I can get that time a little bit faster okay I made a change I changed a typo and I run it again and I'll see it should be a little bit faster than five seconds oh you know what I didn't do I didn't 5.7 seconds eight seconds of 5.7 seconds but I'll be honest this is what I do all right I'm so glad that I'm with my people I mean these are you guys you get me I felt that way since the moment I walked here I got I didn't walk to Tel Aviv the moment I got into Israel I felt like I was surrounded by my people in the office everybody this team is amazing so this is much faster right just Maven D I made a little type of change cool we're moving forward um what else we want to do let's see how long it takes to start up I'm gonna do it this way you increase it uh is that better yeah we'll be able to see all the magic so let's just take a little bit I've got plenty of time and it looks like it took 1.461 seconds everybody can see that yeah that's good so hey do a build iterate go test it that's what we should do we should test it so let's go and do I think that's what I said next yeah http 8080. actuator health and it's up and running it works so my app cool that's fast right it's a really simple app but I have something that was built from the initializer built using my compiler and it's running locally and everything is kind of in seconds wonderful some other metrics let's look at the memory at runtime so with my startup I get a process ID I'm on a Mac I'm going to copy that process ID and I'm going to say VM map the process ID and I just want to see the physical memory 119 Megs real small that's not doing anything cool um let's do a build pack how many people are using build packs hands build packs well let's talk about build packs for a second because there's not a lot of hands up uh billpack is a way of building my image uh I like to quote Cora and say in the container is the new artifact right I've been in that position where hey I'm building jar files or War files I think a lot of you are wearing the T-shirt make jar not war and now I'm going to say maybe make container not jar uh I can deliver to everybody so what we're going to do is we're going to build this image the build pack gives me a consistent way let's do it over here yeah this is over here I'm going to stop my process I'm gonna build it I'm gonna do spring boot build image this is going to take a while uh the magic about using this I have a 16 gig AMD laptop and I I use this one on purpose for showing some of these mean time to dopamine things what this is doing is it it's pulling down a build image here and everything is in a Docker image so it's going to pull that down it's going to do all the building inside of that image later we're going to hear about test containers one of the things that we can do if I was really really pressed for time I could actually use this test container Cloud to go and and run these builds using build packs have a consistent way of doing these build-time things not on my machine and that's pretty special especially when you're you know trying to do a demo right but demos are it's easy so this has taken a long time I don't know why it's pulling down the same image I think it's because I changed the network um but yeah what is doing all the stuff inside how many people are using Docker files you have a Docker file sitting right all the way oh boy wow oh ah so just to be honest I'm sharing I feel real comfortable with you guys Java 8 and Docker files they kind of have the same bucket for me because I had the the scar tissue right the not happy memories of hey there was a change I wanted to upgrade I wanted to do spring framework six and I was having to go and upgrade the docker files for all of those projects anytime a cve came out I had to update the docker or build the image for all those projects I lived that life for a while I did not like it and I found build packs I like build packs because I have a consistent way of delivering artifacts to production and to my friends Into You this one took a minute and 36 seconds a minute and 36 seconds that seems like a long time but we were pulling down things if I do it again it'll go much meantime it shouldn't take that long now that we're pulling things down but yeah the idea of delivering this artifact to my friends to my team to production uh that's magical having a consistent way and I get to lean on the smart people that are building those build packs and I can contribute to those build packs if I find something wrong they're open source so that's fun um if you have an M1 or an M2 feel free to play along I want to see how long it takes to build on your M1 or M2 all right anybody that has that feel free I'll I'll even give you a little cheat code this code uh my slides are up here on GitHub uh my GitHub is DeSean and yeah so if you want to play along I want to hear how long it takes for somebody to build this project with their M1 or M2 or Raspberry Pi so go the clock's starting all right so cool 17 seconds but that 17 seconds means I have a Docker image let's take a look at that oh you know what I just broke something oh boy this is gonna be fun uh if I do Docker images oops I'm gonna find it it's just that demo image obviously like this ammo whoop I'm so not nervous following Jurgen all right so I have an image out there that was at zero zero one snapshot that we just created that took 17 seconds um and let's pump that back up so I said I made a mistake I didn't want to actually build that but I wanted to show you and it's a demo like what could possibly go wrong so I showed you a few metrics let's go back to our slides and let's keep on going roll the m has this just in time compiling like we just showed I'm using the girl VM and uh Java Dash version right I'm using 22.3 which you need with spring framework six well to do the cool things with the spring boot three uh and it's I'm using JavaScript needs so you can do nothing else you can switch your jvm your jdk you can switch it to grow VM and you're going to get a performance boost that's it so if you do nothing else my first action for you to do is switch to the girl VM it's really nice I think you'll like it just to get performance increase nothing else don't you don't have to make any other changes just try that and it'll be very similar to your experience today now there's two approaches and yoga did a great job of kind of setting that up there's negotiations meantime the dopamine is the important one my local development I'm going to be doing just in time compiling I'm going to have that closed loop interloop development cycle but I've got friends you're my friends sometimes I want to be you know a good teammate sometimes I want to do other things and I want to do this ahead of time this girl VM ahead of time processing that's provided with spring boot 3 and spring framework six so let's do a native build now this is the tough part this is going to take a while so I'm gonna have to dance a little bit in between here okay is everybody comfortable with that um actually I'm not even going to do this one yeah no because it's too long thank you with that six minutes we have yeah let's just do it listen what could possibly go wrong uh in BMW um I have to use that native so you get this out of the box this is something that's pretty neat you get it out of the box you don't have to add anything else the parent Palm has this native profile hey I want to use that native profile I want to do things so I'm going to just do Native compile and it's going to take a little bit but M1 machines it's going to go really really fast right somebody's going to do that demo this is a Intel 2020 type of Mac sure and yeah you guys can see that maybe it says 2020 Mac 16 gigs of memory while you're doing this memory is important processor is important for your machine it's going to take a little while this is not the loop that I want you to be in we remember the xkcd oh it's compiling right what are you working on no it's compiling we don't want that that's boring so this is going to go we're gonna let that run it's doing its native build it takes a long time more than a minute but we're gonna look at some other things all right startup time so while that's compiling on the one side I have a pre-compiled version here's the cake out of the oven and we're going to run it uh we're gonna run it let's look at Target demo all right it says 0.79 seconds so that's pretty cool and now this is again I told you that memory is intensive CPU is intensive so I've got the other girl VM building going on at the same time and I'm still sub second startup time when that's done we'll do this again it'll be much faster but still that's quite an improvement if you've got workloads that could benefit from that fast startup time this is a really good option for you maybe you've got a team of 10 or maybe even 200 that you guys are sharing work you'd like to test and evaluate each other's work it would be really nice if the images that you're running on your laptop started up faster instead of slower so you could have that mean time to dopamine so I want you to consider a few things so this is now running Let's test it same way I'm going to hit that end point I can just do this and I can see hey it works and it's up cool it's the exact same output it's the same thing but this time we took a lot of time up front to do that ahead of time processing there's some negotiations there's some things that I I trade I can't do things like agents I can't attach anything to a jvm because the jvm's baked in to a statically linked binary but because we've added the observability at the ground level with spring framework six you get all the things that you need out of the actuators you can get the things you need out of the actuators instead of attaching an agent so now let's take a look this is are you guys ready this is the one you want to take pictures of let's take a look at that via map what was my PID spring boot gives that to me oops I forgot to pipe rip this is cool um so do you guys remember what the first number was for the exact same amount 119 right and now it's 38 but again this is a simple application simple application right the bigger the application the more savings right so I'm going to ask you this question let's say you were running a bunch of jbm apps that that really could benefit from this aot processing ahead of time compiling let's say that your your infrastructure person is in the building or in the room would you get a pat on the back if you could just take maybe one two three of your applications and you could save 50 60 or more on your infrastructure on your just memory footprint would you get a pat on the back if you did that maybe maybe this is it so the reason that I'm excited about this the reason I'm having such a good time with this native processing is because now I have this uh my hobby is Raspberry Pi's uh now I have this opportunity where I can build these tiny little spring boot apps I don't have to change my language I can build these spring boot apps I can run them on 15 computers and I'm connected that's it right the idea of running spring boot app on something that has 512 megabytes of memory that's pretty awesome that's pretty awesome and we were building containers right how many people are the docker file hands which was most of everybody the docker file hands how much do you sign to your process to your jvm how much memory do you assign by default one gig one gig 40s one two one gig that's risky I think but yeah it's possible depending on your your jvm 4 gig that's yeah that's very comfortable 2gig is kind of a minimum that's kind of the minimum bar but now your images we can throw out that jvm layer I'm getting a stack of length binary what does that mean like what's the difference it's a massive difference I can deliver these images container images on any infrastructure I have to make sure it's the right architecture right the image that I create for a native image will not run this is built on a AMD on an Intel this image will not run on an M1 because it's for the architecture that was built on this image is going to run on and because I did a command line and I didn't use the build pack this image is only going to run on Darwin Intel this binary friend will only run on Darwin intel if I use the build pack if I use the build pack um hey it only took four minutes so that's the Builder build pack image that we were running before that I knew was going to take a while only four minutes to go uh but that was the command line one right that's what we did now we're going to do that same thing uh and we're going to give it just that profile and spring Dash boot build image so now I'm building an image native image I'm doing all this inside of that Docker file oops and I'm gonna have a container and this is gonna take a little bit so it took four minutes to build the image without the native compiling the native processing and now it's going to do that image but it's going to use that P native profile and we're going to keep on going so that's going to run so we saw some pretty good improvements in startup time we went from like 1.19 to 0.79 which that was also running something in the background um and we did the build pack so this is what's running right now so this is what it took when I was out in the Hall 5 36. let's see if we can go faster than that so keep in mind it's architecture specific but there's a there's a path here right you're doing your interloop development do you really need to be creating those images uh for others do you need do you need to take that time off your desktop in order to do that no you put it into a pipeline you put that thing into a pipeline you use something like build packs so you don't have to even think about its output you can use those build packs to generate those Dynamic images for any architecture and that's going to work so what else the paper production starts at your laptop does that make sense all the things from that you're doing as a developer day to day it really starts your laptop you want to have that good experience so be mindful when you're looking at aot versus just in time component be mindful what what are you trying to do what are you trying to accomplish I highly recommend that you put your aot built put them into a pipeline don't do it on your desktop don't do it on your laptop and I'll help I kind of pulled you and I kind of teased the paquetto build packs don't support arm64 today but like I said it's open source so I'm happy to say hey you can do this uh I've been making an arm 64 build packs for a while and it's really not a tough process and just last week actually it was kind of the day that I got here I pushed out a multi-architecture build pack so I can have one build pack and I'm going to push this up to paquetto I've been working with Danny mccusa very closely the idea of having this build pack and I can build images for arm64. or for amd64 using the same build pack having that consistent path to production and having it start on my laptop and I can make those choices I can choose to do the dash PE profile that native profile or not now I want you to get into this I want you to deploy all the things on your laptop I worked for a large company and I had a large team and that large team was working on a lot of things did everybody see the elon's Tweet the other day he's like oh I'm going to get rid of these microservices we don't need those I mean if you cut your team you know by 80 yeah then you probably don't want to be taking as many things to production but if you've got a big team everybody has that path of production everybody wants that pass and they can deploy independently well sometimes it's hard to keep up it's hard to keep up with what everybody else is doing so this is what I'm proposing to you I don't know how you're deploying on your laptop I like to use k-native running on top of a kubernetes cluster locally and with k-native I get I get some really cool features I can scale to zero so imagine if you will service a through service Z that the rest of my team is building I want to run all of those things on my laptop yep when I'm doing my inner loop development I want to test I want to just hit it and have it stand up the idea is I can have all the service deployed on my laptop scale to zero when I'm not using them but when I need them when that call comes in they'll listen so I don't have to run a test Suite to do it I'm going to do my same loop I do make my typo change I'm going to build it and I'm going to run it and if I call these other services they're running on my laptop and they start up in less than a second and they respond and then they're done so now that's the way I live that's the way I want you to live this is just one of those cheat codes you heard it here first that path to production starts in your laptop you can share that with your friends if you're building these native build packs with your pipelines then everybody gets to pull down the native Bill packs those oci images they're even smaller when you build them with that aot processing so that the amount of time it takes to get over the wire even if you guys all pushed a new version right now I can get those really quickly because the oci image is so much smaller and my team can always be using the latest and it's easy it's a hard thing sometimes to keep up with head especially with spring there's so many projects so many things are moving but your teammates are doing the work and as those things are going forward I want you to grab them it's just an opportunity it's a it's a a way of life that I didn't have before right we didn't have the ability if you had more than a dozen spring boot apps that you were deploying to production you didn't really have a way of running a lot of things locally and having a good experience and now it's here it is a great time to be a developer because of spring framework six spring boot three how fast it is to get things up and running the other thing about spring boot 3 is I don't have to worry about my uh dependencies right I just grab them and I know that they're going to work together I don't ever have to do that that magic of oh is this version compatible with that one I get to move forward so now and I I really didn't realize that we're going to get two versions of spring boot every year did you guys hear that did you guys did you guys catch that part from Jurgen I get two not one I get two every year this is amazing so I'm gonna say be a better consumer take the time understand what your workload looks like this is not something that's going to work for every use case right it is faster it does have a faster startup but there are trade-offs depending on the the characteristics of your workload there are trade-offs not every workload is going to be faster the the performance characteristics that you get with an ahead of time uh processed workload they're consistent it's going to work the same at startup as it does a day from now how many people are doing like a a soak test on the things they put to production they go extended to reduction it's going to run for an hour some kind of load test to get that just in time compiling to get the jvm to optimize your code does anybody do that anything similar a couple hands yeah we get those benefits with just in time compiling your performance can actually increase and improve over time because the jvm is going to do a lot of optimization for you ahead of time we're looking at all the branches of everything that we think can happen and that's what we're going to give you statically linked compiled for your architecture those are some of the trade-offs if you can save 50 60 70 or more on memory maybe you'll get a pat on the back maybe you'll get a race if you can make that that startup time if you can improve performance for your customers at even at peak times maybe you'll get a pat on the back but always you can be a better consumer of that infrastructure one of the things about scaling to zero you know the spring framework has done a lot of work to make that startup time faster for those types of workloads that want to scale to zero and then come up as needed and respond quickly now you got more options get more options spring boot three juice you guys have an opportunity here to kind of get on it early the release candidate two is out and I say juice because I want you to join us in creating excitement that's my thing you guys are here I'm asking of you I want you to take what you've learned and what you're going to continue to learn throughout the day I want you to take that and I want you to take it back to your teams I want you to take it back to your teams and show them have them help you go forward with it learn things come to Spring Office hours and thanks I went really fast let's go take a look at our thing hey it took four minutes and 16 seconds is there anything else I need to show uh what's that uh so this is the I built a container image so uh let's go take a peek at I'm gonna copy paste because my hands are shaking hey we did this uh yeah let's ruin that so now I'm starting up the container image oh this one's running hello no pressure it's a demo of course it's gonna work right hello let's see if we can do it there we go all right so we did the Native image startup with a static link binary for Darwin on AMD and it took 0.79 seconds well now we're doing a container an image container we're running it on docker natively or it's a it was an aot compiled it used Linux but that's okay on Intel amd64 and to start it up in 0.08 I mean that's a if we're talking about performance Improvement 1.3 seconds down to 0.08 that's that's pretty good okay um so yeah that this is this is this is me this is I'm excited about this you can imagine some of the things that that this opens up uh for spring boot for spring framework uh I want you to remember four your workloads for your development experience I want you to realize like hey you can do some really really cool things like deploy 20 instances have them scale to zero I'm going to add one more thing this is a great opportunity I don't know if you guys know but this is over capacity uh for those of you that can't see we've got people sitting on the stairs we've got people downstairs watching a live feed but you have an opportunity your tonsu team here in Israel they can actually set up something like this for you at your company for your org specific direct smaller version but get you the things that you need to get you over whatever hurdle you're facing so yeah three four more six is GA string boot three release candidate two is out right now if you take it for a spin right now you're actually helping us make sure we don't miss anything because it's going ga next week we want your feedback um spring off is ours right now it's every Tuesday 10 30 local time I want to hear about it uh you can find me you can find my slides you can also find this multi-architecture build pack and how to take that for a spin uh for those of you that are using m1s or m2s yeah I'm looking right yeah uh and yeah I think that's it I have time for questions I rushed through I was trying to squeeze it down but I've got time for questions yeah dude that's a totally valid question uh so if I wanted to look at the container image size uh uh am I gonna what's how am I gonna look at the container image size oh I could do what I'm looking right at you what oh doctor uh LS oh um uh where's this oh there it is so this 103 megabytes that's my oci image so can I uh so because I gave him the same name I can't show the other image but let's take a look and see if I have a similar so this is a similar project you gotta trust me that didn't do the native compilation so what's the difference what is that 100 Megs who knows what that 100 Meg difference might be I think I heard the jvm layer the runtime layer right I don't in that base image you know if I got a base image to do a Java project to deliver something Java I've got to deliver something to run that jar file on that bytecode it has to have that jvm so that's the size of the image um I always look at disk size doesn't really mean a whole lot but what where it matters is when you're transferring it over the wire if you're delivering 10 000 of these images over the globe that makes a difference 200 Megs versus 100 Megs right if that if you're releasing multiple times a day to 10 000 instances over the globe that makes a difference not so much on disk cost right disk is nothing right but how many people are aware of their Ingress egress across different Networks right those types of things make a big difference that was a great question I hope I answered it debugging so we're getting there so I know that there's options right now I haven't done a whole lot of the debugging the native images and I'll tell you why because I'm not going to be doing that in my inner loop so this is a yep it works uh I just haven't done a whole lot and the point is when I'm doing things natively when I have those images that's not what I'm messing with right I'm gonna put that under a pipeline and that's going to be something that I'm running to production but I'm not doing that type of interloop development locally that's the only reason I haven't got the experience but Olga's here to tell me that it's already in preview we have options jetbrains are supporting it already you can already do it so yeah that's a great thing that I think I'm gonna do it on Spring Office hours seeing this and that something maybe so the question was hey grow VM girl VM we've been hearing about girl VM for years uh is it actually catching on with Frank I'll tell you first of all it's the reason that I'm here it's the reason that I was excited to come and be a part of the spring team because I was passionate about these Raspberry Pi's I'm passionate about things going fast I like to clean up behind myself I have a little bit of startup entrepreneur history I'm a proud founder of 12 failed startups so yep so the idea that spring is making these moves I started with spring 2.7 we had the spring native experimental project so I've been working on this and I've been building Bill tax and taking these out to the edge and I've got customers of relationships where we're taking these native images yep we're with customers taking these native images out to the edge on arm so I I can tell you this that that is definitely growing uh yeah I don't know if I'm allowed to say stuff but we can talk about this and yeah this is definitely a space that is growing for all of these reasons the other place where it's growing where I'm taking a lot of questions is in the cloud right for those serverless workloads as things scale as I have spiky workloads right I don't want jvms sitting there right jvm performance is great but yes the question is really hey is it catching on well now let's ring framework six is GA now that spring boot three is right around the corner I can say that that multi-architecture build pack is very popular and there are it's tons of good feedback for some that I released November 12th five days ago so yeah there there is some demand there from what I can see but we can't really see from initializure statistics what people are doing in production but it takes people like you to tell us use those hashtags or you know how to find me what's the status of cves for these versions I don't know how to answer that question so in my in my pipelines you know I I really look I don't want to take care of a bunch of things I don't want to Fork a lot of things uh one of the things that I find with spring is if hey if I can't find it if I can't figure it out this seems like something that should be there A lot of times it is and I just need to ask but my pipelines I like to look for those cves and look for those critical things you're going to hear later about tap and one way of identifying CDs and getting those patched and getting notified you're gonna learn about that later but I don't know how to answer that for this particular topic I think you're gonna get more on that later any other questions thank you so much thank you guys so much we have a break oh excellent all right thank you
Info
Channel: SpringDeveloper
Views: 13,749
Rating: undefined out of 5
Keywords: Web Development (Interest), spring, pivotal, Web Application (Industry) Web Application Framework (Software Genre), Java (Programming Language), Spring Framework, Software Developer (Project Role), Java (Software), Weblogic, IBM WebSphere Application Server (Software), IBM WebSphere (Software), WildFly (Software), JBoss (Venture Funded Company), cloud foundry, spring boot, spring cloud
Id: H6HwoWZtngs
Channel Id: undefined
Length: 41min 41sec (2501 seconds)
Published: Thu Dec 08 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.