00:10
Hello spring one my name is Michael manla I'm a longtime engineer and on the spring team and the lucky person To Be your MC for this morning as we get started be sure to participateintheconversationbygoingonslack@springonedoslack.com。I can't think of a better way to start offspring one than to learn about what is spring with glen runn f。Well hello spring one IAM so glad to see all here well this talk is about what is spring so you're saying what are we looking for here and the goldest talk is if it's been a long time since you'VE actually play with spring you want to kind of know little bit what's new going on this talk is for you if you said I have never touch spring before in my entire life what is it this talk is for you if you're kind of saying you know I need a kind of a place to maybe help me guide me to see what new projects are new this talk will be helpful to you but before we get too much further I have to click the right screen there we go yeahy and ah we before we can kick off anywhere we have to have our attorneys give us something right so in this case we have our forward looking statements if you want to catch a great take a screen shot of this and read it at your leisure you can't or you can wait till the end of my presentation I will share you link to these slides and you can read it then but I think it is time for。
01:35
To Get started well who is this loud person talking a tea right now well my name is glen Ren f I am one of the engineers。At vmware I work on the spring sweet projects specifically I work on spring cloud data flow spring task spring batch ah and ah kind of well anywhere else they need me in my coious free time when I'm not doing that I'm out kayaking or working in my garden and yes it is true plants like technical podcast so when you're planting listen to your favorite technical podcast because they like it well maybe not but mind do and when I'm not doing that I'm also on the board of directors for thelanta Java user group and I'm also on the which means I'm on the board directors for dev Nexus one of the largest Java conferences in u s and the good thing about this is it's all community driven right so with that conversation。
02:29
Let's begin looking at what this community the Java community feel or how does it feel about spring you're getting kind of brought this in but I'm going to put take different tact and sneicks twenty twenty one Java ecosystem report they say that it is still a spring dominated world over half of the market using spring boot and another third using spring mvc as we could see in this chart now keep in mind that um。If you don't know what spring boot is or spring nvc don't worry will give you a primer on it so that is what's cool about it now you're saying is spring being used a lot the answer is yes hundreds of millions of maven downloads for spring ah every month and we have seen a sixty two percent year over year increase so I think spring is being used by a lot of Java developers out there or cotland developers right so let's keep that going now。
03:28
One thing is to pull it down but do people really kinda like it well if you look at the star count for spring boot it's gone it's now fifty six thousand nine hundred stars I had to update the slide today because the last time I had when I started this presentation well but you know and updated a a few a weeks ago it was like。Like I forgot how much lower and it's like man it's just you just see it keep increasing and I'm like wow people really love spring good I do but I didn't know other people like as much as I did so I do should say so。
04:01
Now we'VE kind of got Pakistan numbers we know how the community feels about it how many people are using it so what is spring well I went to my friend and spring bootle。Phil and I said our Phil web and I said Phil。What how would you describe spring well I didn't really hit him up I looked at one of his talks so when one of his talks he put it the best I ever heard he said spring is an integration framework designed to take lots of different technologies and allow you to combine them ways that feel natural。It gives you a consistent programming model what's important about those like two things it's a natural let's go back one not forward back back um。It gives you a ways that feel natural right and then consistent so it feels natural and gives you that consistent model so no matter if I'm pulling in kafka or casandra against ara framework or sorry springra BOO the way in which I use them has it consistent field no matter what new third party technology or new style of development springri gives us that ability to have that natural feel。
05:16
And again that consistency so that helps you with your learning curve right so the next question is where did all this get started where there were two folks that kind of kicked off the spring ecosystem the first was rod Johnson and the others uran hoer well if you look at uran hoer we heard from him earlier but if you look on joshus desk at the kind of the right side for us you're going to see a bobble head of RA Johnson so if you're looking the bobble head that's who it is but。What we want to look at here is how they got started so basically what they were doing at the time back in two thousand and two they were working with a lot of um。Companies they were consultants and they would said you know we keep hit these consistent issues so they created a framework on how to improve the performance of developing applications and what the next thing that happened was is they found it To Be successful in rod wrote a book now mind just is two thousand two so go back into our way back machine and we can say that the book title was gen two EE design and development and then that f and it was a hugely popular book and then they took that framework and from that that they were created in they created the spring framework the foundation pieces。
06:35
I have the spring framework well get there there we go come on you can do at that。Okay come on you can do it。There we go took a second is um in version of control and dependency injection so what are these things what version of control basically so back in two thousand and two when we would right apps we had to write the APP we had to write the control flow how that application would flow to capture all the events do all the work like a web application right and they said what if we could take and allow you to put dependency and framework would give you that flow automatically and it would call your beans your beans that have the business logic an。
07:24
At the right time so what that means is as a developer I focus on the business problem and I can write that code into a class or like again we say a bean and as I put right that code in that's it I'm done then spring and turn will call that be at the right time so。If you will now I can focus on the business problem and that flow us managed by spring it goes with the idiom don't call us we call you meaning I don't have to worry about calling all my beans with all the business logic all that stuff is done by the spring framework the next part really came from was dependency injection what does that mean well no bean lives an isolation I might have a be that what a data source right well how do I inject that data source into my be well I spring a lot does the following it will look at like your constructor and say oh this this class or this being needs a data source so it will inject that data source into that constructor or you can say I really don't want it to come to the constructor I'd rather come in to an attribute in my be spring helps you there you can annotate your。
08:39
Attribute with a something called at autot art and it will inject that in there so the injection of the dependencies that your bes or your business logic needs is done by spring so spring takes care again that control flow。It takes care of making sure that all your objects that you hit you need or your beans you have have all the bits that they need and that they're called at the right time the next thing they provided was utilities they said what kind of tools can we give our developers that will help them save time and not have to worry about doing all this bowder plate coding well they provided those for us then they said well our developers are going To Be writing test how can we help them with that and similarly they did the same thing they provided utilities to help us rewrite our tests and then it gave us a basic suite of database tools。
09:29
Which was pretty awesome then they said you know there's a ton of people writing web applications out there and what we want to provide is something to help them right their web applications well a concept came out called mvc and you're like well what's mvc if you already you know what it is you have a SIP of coffee and just wait just one moment so that folks like I who know need to know what it is or maybe we need a common DeFinition we can at least ah give that chance out there so what m bc stands for is model view controller and basically what that does is it separates the concerns to write web based application these concerns are the model of you in the controller what do each of these do well the controller。
10:14
Is the piece that that separation are that concern let should say that concern that receives request from the user it then passes that request to the model the model then goes out and takes action with it it might go lookup data it applies its business logic to that data and when it complete it hands hand that result back to the view the view and turn transforms that data and to something that's useful for the user who requested it and then the controller send that result back out so spring gives you an implementation of the mvc model。Now。What's also happened is I said I want to show folks what it we look like if I had to write an envc from soup to nuts meaning what would it take to write it and so I started hitting the Internet and I said okay folks somebody's got to have something out here where they show how they wrote an n bc framework or you know if you will application and the answer was I couldn't find one。
11:15
Long story short was no one writes their own flow like that anymore as far as en b c they are like we use framework to do that framework like spring so。Imagine instead of having to write you know we know as I'VE said a lot of coach write an application that does this mvc if I home roll it myself。All I have to do if I'm using the spring framework is to use three small configurations in this case you see I have it written as ex and milk because spring framework at its foundation supports both Java configuration so I can configure these using Java or can use xml I chose xml because well。I wanted to show you some goodness that from there and then I'm going to show how we can improve that overall in future the first is basically our webl the second。
12:06
Is the beans what beans do we need for our application to work and then lastly the controller the stuff that actually does that work for us。So now that we have this kind of foundation understanding of what。Spring brings us how it reduces our code how it allows us to focus on the business problem。What the spring look like now today right this is from like again have back in two thousand two thousand six right well since in springs grown quite a bit so much so that medora one of our managers and lead developers on spring boot project。Is even kind of shocked at spring has grown that much over the fat of these years we have everything from spring data cloud spring session spring security spring batch oh my goodness the list goes on and then we says we kind of hurt spring native graph spring graph you out the list goes on and on and you're going。
13:06
Okay that's a lot and I'm like yeah it is but what if we could just take and isolate that down。Let's start off with our foundation our foundation is spring framework spring framework is the foundation for all spring based projects so you get all that dependencyjection that I c the version of control all that comes in with it at the foundation all the utilities all that good stuff。But then spring said you know hold on。There are some features we can ADD that some applications need but not all of them you know we don't want to roll all this in the spring framework we'd rathert that people ADD it as they need so they created a series of spring projects that you can ADD if you need them for example spring security right so spring security is a a powerful highly customizeable authentication and access control framework is to defect of standard for securing all web spring based applications。
14:09
What if I'm writing batch applications or ephemeral applications so in this case ephemeral meaning and application wakes up does something in terminates well there's alot of boiler plate codeat that has To Be written have to think about transactions I have to think about what how to read the data in write and I have to write all that code na you don't have to write all that code spring bad to provide you I series of wonderful builders that simplify you a need to write readers writeers even even you can even create steps using these builders that are provided by spring that it also gives you the transaction support that you can just configure it also gives you the ability to restart an APP if it fails oh we'LL talk a little bit more about it later but lots of power get lot of let coding。Then you say well what about enterprise integration patterns if you remember the big thick black book that we all have on our desk at somewhere around my house somewhere it's um I couldn't know most of them now but we either got in college or we got it you know when we were working and this book shows us all these wonderful patterns how to how our route our data through our applications and like things like scatter gather taps routing itself well。
15:25
What spring did was they said what if we could take this powerful book these powerful patterns and create an implementation for it that implementation was spring integration so if you're looking at implementation for enterprise integration patterns you found it now。We said okay spring up To Base set of tools for accessing databases but now databases have grown from JP you know from l l To G bc to SQL store the no SQL stores To Graph databases oh my gosh the the they're out there。Springs is what if we could give you again you know what tell I'm going to read the what we call a project we call spring data and I'm going to read you what it says it's goal is if it sounds familiar spring data mission is to provide a familiar and consistent spring based programming model for data access while still retaining the special traits of the underlying data store so no matter if I am hooking into j p l APP j To Bc that whole list of you know as we see up here casan or geo to solar I have that same consistent coding model that feels natural and gives me a consistent approach to utilizing all these various types of data stores but the key to remember。
16:40
Is that I still have the each one has a powerful underlying infra in it that we can take advantage of spring data gives that to you while reducing your code and giving you the a sense of familiarity to access。我天。So we have all these wonderful tools out there but then people start writing a lot of code and it became a little bit more complex and we started seeing where people reporting that they were getting collisions where I'm pulling in this third party this APP this third party APP and so it became a point where they're like you know we'getting dependency complications um we don't know what good defaults are you know we're kind of guessing here what are good defaults just to start our apps off with well。
17:22
A first named DR David siryer came up with spring boot and was spring boot it said skull was to create a stand allowed you to create a stand loan production grade spring based application that just runs spring boot provides you a set of opinionated starter dependencies that simplify your build configuration so no matter if I'm ammp pulling in like I talk about that spring kafka I ammp praying it pulling in spring CLA spring data casandra whether I am pulling in maybe even a q p right and pulling all the stuff together into this application。
18:01
If I use these starters I don't have to worry about dependency collisions and then what it also does is it gives us a good set of defaults that I can say alvo box this will work for a kickoff point of view or to again get me ready To Get to production and then I began my testing and all that and then I can tweak it from there what's good about what spring boot does is it does this without having to do an eo generation I don't have To Go through and look at all the code that generated for me it's done that off for me all you know I don't'have to worry about doing that it says I give you the tools that you need to quickly write your code that you need to write。And you say well you know sometimes spring BOO may put in those those default said I don't need or I don't want to quite have it work this way that's fine spring BOO easily move out of your way so you can do what you want to do again that magic for not having to deal with code generation。
19:00
And all this comes available to you right out the box。So。Let's give example what spring boot does again it gives you kind of that opinionated view of framework it says for example we're going to want to write in a few minutes a spring mvc APP right and we show you that this codeat that we had to hear was really a lot smaller than what I have to writetify home rolling it right or doing it you know just writing it from scratch。What if spring boot changed this code that we see here。To that。All I have to do is ADD a dependency and write this little controller right here and I'm de。To do the same thing we saw back over there isnt that pretty cool。Well I'm going to DEMO that to you in a few minutes but I need to cover a couple more things first off our apps do not live in isolation we were talking about at the keynote our AIA talking of the keynote we'VE got micro services applications don't live in isolation right they live in an ecosystem of other applications where I am writing micro services or something called a monolith。
20:14
As you know as I write these they're going be communicating with other apps in our ecosystem and these apps are going To Be in the cloud on prem a blended of on cloud and on prem and also what across cloud platforms because I may have more than one cloud platform right so。In order to do this we need some special tooolling to allow apps to work in a distributed environment well that's where spring cloud comes in spring cloudvi tools were developers to quickly build some of those common patterns for distributed systems right like configuration management service discovery circuit breakers intellIgEnt routing on the list goes on and on and on so whether you need to you are working with something like I need To Be able to create data pipelines of streaming data through a messaging framework I'm going to use something like spring cloud stream or you know glen I'm receiving。
21:11
I need to have something can route my API request to the right lo to the right service that can handle it we have spring cloud gateway you know if you're writing batch applications that are going To Be to point to cloud and they need To Be good citizens in the cloud you have spring cloud task we can go on and on and on about all the things that spring cloud can help you with but we're going to save a little bit of of that file for later。But going back to the lastit I want the we'down to the home stretch on this guide right here what if I am creating those data pipelines right where I am taking in data from from like a social media or from I OT devices and I need To Be able handle those events as soon as they occur but I cannot afford to lose that data that I'm receiving I need To Be able To Get that data process data put it and some kind of messaging framework so that it can be delivered to the right services that can actually take advantage of it these Dis messaging framework maybe kafka canneis。
22:17
Google pubs m qp u name and azure messaging service right。What how can I uh take and be able to create this pipeline with without writing lot of code well springri cloud stream allows us to that but how can I orcheststrate all these streams right I'm not just going have one stream I'm going to have thousands of streams or hundreds of streams spring cloud data flow help you orcheststrate these streams or pipelines spring cloud data flow also allows you to orchchestrate the launching of your batch applications in a cloud platform and orchestrates that for you so you don't have to worry about that and we're going talk a little bit more about how it does that。
23:00
And I'LL go talk a lot today are I but before I go we mentioned reactive coding in the keyut from urgen so if I want to write imperatively or reactively spring is there for you because if you look the latest icon I added spring framework works directly with spring or works directly with reactor project so every project from spring framework up or should say most projects from spring framework up you can write imperatively we can write reactively it's up to you or if you're blending it it's up to you spring is there to help you。Well no APP no presentation I do is done until I give you a DEMO I like the code even though I cheat a little bit when I'm doing live coding so。The question is I'm going to write the DEMO but where do I start and dang at Josh took my thunder because I stillle his thunder was the second best place To Go on her Internet。
24:00
It start at spring do IO and let's give you a quick tour what that looks like and what's the first best place To Go on their ne josha would say it's production well let's start off writing our application。So the first thing I'm going to do is I am going To Go to my browser。And we will put in the magic start that spring do IO now from start dot spring dit IO I can create a naven project or a graal project I'm going choose maven I can choose the language I want basically what spring initializer does is it will generate the foundation project which I'm going be working on I guess I should said that start but it allows me to check check what project type it is I can select what language I want to use like Java cotinent or groovy it allows me to pick which of。Version I want I'm going to use the latest release or GA which is two do five do four I can choose whether I want a jar or war I'm going to select jar I can do JA I choose Java eight eleven or sixteen we're going to choose eleven。
25:03
And soon that will be seventeen as we heard with who I can't wait。And then we're going To Go ahead start I'm gonna set my group IO got spring。I'm going to set my artifact to DEMO。That one。Call s one a just forot and then I need to ADD my dependencies what dependencies do I need for web web based application on this case I can I have a whole list of starters I can choose from if I was I spring batch APP I could type in batch。If I was writing a graphq l APP。I can write I think it's ah I forgot what what it is but if I wanted our stream APP I can do stream。And you could see I could put it a cofka spring Co stream cofka application but in this case I'm writing a web APP。Weip。And now I can create a basic spring in VC APP now I'm going To Generate our project and you see that download zip file for me I'm going to UN zip that file。
26:06
And from there what we're going to do is going to open up our IDE。And I'm going to open that application that just our application that project is created for me I'm going To Go to downloads。Come on come on I'm zooming here。Okay。I'VE got the beach ball of happiness here what happened no。Okay so when we get the beach ball happiness we're going to force quit。And we're going to restart our IDE。Sorry about this folks things happened here in demos don't they and let's see where wear yeah we're starting so this time we're going To Go back we're To Go back and open。There we go we're going regionual back get to downloads we're going do DEMO one a we'open that and it says you can as you can tell it's the first time opening do you trust this project I hope so I created it so in this case we're going To Go ahead and open my APP。
27:10
And let the IDE kick in really quick。I said really quick maybe it won't be really quick。There we go and it's doing all the good dependency magic here and we go as you can see I'm looking on the side because I'VE got the screen right here and my cameras are here so in this case we see that demos one is ready and we see that provides us the foundation of project including the poalm file right so we can look at the poalm file and we can see that it gave us the starter web right we created a parentrot this is going To Be our spring BOO application Java eleven is'going to use a web dependency even give us little testing dependency here so we see that we are ready to rock and create our first spring BOO application。In that case we will go open our spring one our DEMO s one a APP and this is all the code there remember I said there's not no code generation the only code that we provide here is what our main APP so with that being said。
28:10
What I'm going to do is cheat a little bit since we lost a little bit of time on getting started here I would normally like to try to code this out but my coding is bad and。When I'm doing live of coding I should say live coding my coding is good just coding when I'm going live it'really bad。And what we're going to do is we're gonna say rest controller。And what we have just added is what。Our controller this is all the code I have to write right here。So from ground up I have now have a basic spring boot application that is that is a mvc。And I'm going to change this to hello spring one okay now what we're going to do is I'm going To Go to my terminal。And n might be a little hard to see。But I'm at the bottom I saying maven clean package we're going To Build our project。
29:06
We see that executing a test which is cool I didn't have to write the basic test it did that for me and now I'm going to launch it now Java dash jar target。Like a spring and we go and DEMO one。And we're going launch our APP now what's going to happen to spring boots going to startup it's going to have has inbed a Tom cat in it when I bring in into spring web native uh dependency and I'VE got a homework for summit for you all that we're going ask you at the end of the presentation with with having zoom and all the running my it took two seconds for this APP to kick off and get started I need for you all to remember two seconds okay because I will forget。And we're going To Go back here and we're going to take the result look at the results of our application。And we look at and if we buy out the box all spring boot apps start off at at local host。
30:03
Port eighty eighty。And we had the an we had the end point of hello and we can see that it produced hello spring one so within about a few minutes a barring IDE hick IDE hiccup in my overpowering voice we were able to create an APP in just a few minutes。Now。What we're going?Is we're going to kick back off。And not start from the beginning oh my goodness is like I didn't practice this at all wasn't folks and we go and we are going To Go back here。And what we're going to do is we going I want to suggest you if you're interested in more about spring boot please join us for the production boost which is tomorrow tomorrow to eleven am you can learn more about spring boot and how To Get that production boost if you're looking at a way in which I can write spring boot applications more efficiently beam a IDE feel free to jump on the spring tooling for the masses tomorrow at eleven thirty five am all my dates on my presentation are easter standard time okay so just give you a heads up now to take the next step what we want to also be able to do is look at so I see we have all these projects I kind of got an idea of the grouping of projects if I have a specific business problem or specific software goal。
31:30
What spring projects can help me with that software goal well let's get started on that。Well the first one is is let's go back to original example which is the。You know just a basic web application now in my web APP it missed a few things right the first is I didn't secure it right we want To Be able to have security as one of our first in primary goals when we're writing our application what do we use for our security in this case we're going use of project called spring security and spring security is if you want to think of it this way is when it's time for me to write my web APP spring security sports many industry standard authentication protocols including samal o off and lda but you and it also gives you protection from top o o type attacks like session session fixation click jacking cross site request forgery and way more so it's time for me to secure my applications use spring security。
32:33
The next is how can I get access to data again in a consistent easy way a smooth way To Be able to utilize all spring um there the spring way of development again its natural andconsistent I'm going use a project called spring data and spring data helps developers to connect to their web applications to a number of data source it supports net relational non relational databases map reduce framework and cloud based database services yes so if you're hooking into a cloud based data source spring data can help you with that as well on top of all the other ones we talked about before。
33:12
Now like we said once our APP is in production how can we observe it how can we monitor it well through spring boot out the box we have integration to a project called mycometer that catches metrics and these metrics allow are can be stored to a times series DB or to something like tanzi observability so all this stuff comes to you from spring and increases your ability to write effective code and do so more efficiently。So if you want to learn more or have a kind of a prar to what spring security can do for you spring security five point five from taxi to take off is to at four o'clock eastern time spring data guide to persist it our great kicko for spring data as well that's tomorrow September second at ten o five am and you have a talk on tracing issues for you in your application if you're looking more to how they're track how your apps behaving how they're behaving in the ecosystem ah September second tomorrow and one or five martine and Jonathan will be given to talk on that and a handnt please catch tomorrow's kick offff because martine Jonathan are going to have a great of reveal and are going talk about a new project we're going to have that concerns observability so hint catch that now I would be greatly remis if I did talk about spring graph q l spring has worked with the graph q l Java attributors to create a the facto easy way to able to intrate。
34:41
Graph ql into your ecosystem so if you don't know what graph q l is it's a it's relatively new but it's a well established alternatives to rest for exposing web API's in does rapidly becoming a popular choice for web and mobile clients due to ease of use and To Grve control if you won't learn more about that who is join us for the spring graphfuel talk today at eleven o five am。
35:05
Now there's two words that all presentations have to have these days it feels like at least the ones I present one。Is micro services and if so we have a common DeFinition of what micro services are micro services are a modern approach to softwareby application code is delivered in a small manageable pieces independent of others we can think of it this way I in traditionally we'VE wrote written monoists right and our monolith applications did several things。I'm gonna give you an example of an invoice application so let's say I have an invoice application that has three primary goals the first goal is to capture the invoice and save it the second goal price that invoice the third goal is to write out that Bill。Now let's say in our invoiccing application the pricing takes a long time right and so we have to horizontally scale our invoice application well while that works there's some side effects to that while in by making two or three copies of application I'm in I'm if you will increase the footprint of not only the pricing but also what the storing the cap storing of the invoice and the writing that result out to a writing out the Bill or sitting out the bills right what if we were to split it into its separate concerns right and we would have an invoice APP that captures invoice and saves it a pricing APP that prices and then the third the APP that sends out the Bill now what happens is if we know now that the pricing takes a lot of time we can have one instance of the invoiccing one instance of the Bill but the pricing we can bump up horse。
36:56
Scale that as as we need but also gives us another advantage if we need to update the pricing we don't have to update the entire application we just have to update what the pricing component so we see the strengths of micro services but spring provides you a lot of too a lot of link to you with your micro services development we'talk about that but if you are writing modelist。
37:23
That is fantastic spring supports you there whether you're writing monoists or micro services we are there for you but going back to the micro service conversation with micro services to write them you have To Be able to have certain rules that we apply so you write good micro services and is called to twelve factors some of these twelve factors include external configuration statelessness logging connecting To Backing services and in order to have a real micro service you have to follow these twelve factors now when I deploy my apps to some。Ah cloud providers they give me some of those services some of them don't some of times I want To Be able to have more power of how I handle some of those things that I need to meet that twelve factor require so that's where spring cloud comes in so spring cloud provides you those services to write successful applications distributed environment and some and many of those are what micro service micro services so whether you are needing a service registry spring cloud provides that for you if you need a configig server for your ex experimentnal configuration spring cloud provides it for you something that's not of a part of that's twelve factor but is just as important is ability to know how my messags are going from service to service to service because sometimes we detect that there's a problem and how messaging is being transferred between various services so we have a project spring cloud sleth that goes in allows you to track your messages so you can identify those problem areas。
38:56
And then what about those cases where I'm receiving I OT mobile browser API request how can I fulfill those by knowing how to route that API Co request to the correct service spring cloud gateway that is there for you。
39:12
If you want to learn more about this and if you want to learn more about how to do this using like。On the azure framework joshlo today at one o five is going To Give you a discussion on rapid development with azure spring cloud if you want to learn more about API gateway how to twelve thirty five today if you are looking to write re adapt to adaptable systems with cloud native of API'。We just missed it because you were listening to me well don't worry you could catch it on YouTube will be posting these out to YouTube but I highly recommend that you stay and watch the sessions live because as Michael said you can ask questions live on slack and ask the call you can also talk to the。
40:00
The speaker on a live zoom session and feel free to ask questions about their presentation now the second word that all presentations have to have is what cuanis right so cuis if you are interested in learning how we can write um quick be able to write our applications with spring boot and see how spring boot helps us f application deploy to cuonities I ask you to join jave sir on the inner loop development talk he also gives you some tools so you can be able to deploy your apps a little bit faster so you can see those little wiggles and be able to try stuff and work with stuff in that case。Um we missed that one but don't worry it's available on YouTube and we'LL be posting those out also if next generation cloud native apps with spring cloud and cuanities today at eleven o five。Now。As we talked about before we need To Be able to create data pipelines right we need To Be able to receive data processes data those events if you will and be able to handle those data pipelines the messaging framework like again the cof goes right and so what happens are how can we be able to write these apps if you will to hook into these messaging framework if you will that provide us our foundation for our pipelines again without having right bower plate code but rather focus on the business problem。
41:27
Let me state one problem and this is coming from my mainfra talk one of the things that we have a CDC where I can actually go in and capture events from a mainfras are sorry database source and they're using a product like the deessium where it captures the events from the log of a database。And then sends that data onto a kafate kafka messaging framework but I want to write two apps I want To Be able to write a APP that captures that data filters it and transforms it and then once it's done send that off down line to other apps that could take advantage of it in this case like we see here um update database how can we do that where I can focus on the business problem without having to worry right on that boiler plate code to hook into kafka right well that's where spring cloud stream kicks in spring cloud stream offers us the ability to hook into。
42:21
These framework and focus on just writing functions that on how we want to transform store or transform that data filter that data andri that data focus on that but hooking in the framework is done by just a series of properties and also again how can it orchchestrate that for you know how can it orchchestrate the deployment of all these streams including upgrading rolling back spring cloud data flow helps us out with that if you are interested in this topic please join us for full stackservability for I OT event streams and pisky pisky will be doing this presentation tomorrow at three o'clock if you want to see another customer example driving the data pipelines connected for connected vehicles ah with springri cloud data vote to more at three thirty five we also have a great talk on that now we talked about writing functions using spring cloud stream well we also have a project called spring cloud function and spring cloud function allows。
43:21
You promotes you To Be able to write。Basically allows you to deco the development of life cycle business logic from any specific runtime target so that your specific same code you right for a function can be used in a web endpoint a stream processor a task or。Deploy directly to a service service provider like Microsoft azure a d a ws lambda and Apache open whis and what it does by doing this you get all those rich feature spring boot offers like auto configuration dependency injection and metrics you get all that。
44:02
And be able to focus on the function that function could be used in any of these locations so I write once and use that same function in different locations it also provides you transparent Type Conversion so whether what type of data I'm coming in it could do that Type Conversion for you and when sending the data back out it again do that it does that for you transparently you can write it your functions imperatively or reactively right it goes back to that foundation we're talking about and。If you want to learn more about this。Feel free to jump on the spring cloud function where we were where we are and where we going and that is tomorrow at eleven o five am。Now I project that I'm really excited about because I work on it sometimes and also some other projects but this one I love and is called spring batch spring batch is an application。That allow a project that allows you to write boot applications and with these boot applications um sorry allows you write batch applications not boot application batch applications and with these batch applications。
45:10
I don't have to worry about writing a bullet plate code so if we look at a step and a step being I have a reader I have a writeer now I might want to read from a JD bc source and I want to write out to a flat file well what if I could instead of me write all that border plate code I could use a builder To Be able to just quickly configure how I want a reader To Go read the that JD bc source and similars a write out that Fla file spring boot offer spring batch offers that for me this other thing that spring batch does is it provides me the ability to。Um be able to restart my application so if my application fails let's say out of a four million record runs it fails at two record two million it allows me to pick up where I left off it gives you that abilitying to conffigure that it also gives me the be to set my transactions by configuation instead me having to right and try to figure all that out so when I am writing that step the only code that this effectively be written site conffiguring my reader and my writer is。
46:15
The code that it takes to transform that data and then I can take a step that step that'set reader processor writer and I can have multiple steps and the steps can be run in sequence I can run them in parallel all that is done。Not by me writing a lot of code but be using builders to configure that so。If you want to learn more about spring batch。Feel free arth thought there's one more thing the other thing that you want To Be able to do is be able to orchestsrate that batch those batch appps because batch apps oftentimes don't just run one you running hundreds or thousands how can you orcheststrate though management of running out those hundreds of thousands of jobs spring cloud data flow allows you to orchchestrate the launching of those apps and gives you a common place to check the status of how those apps as batch apps are running so if you all learn more about how to orchchesrate your batch applications feel free to join my talk tomorrow at five o'clock and its application modernization migrating mainf frameme apps to the cloud using spring。
47:21
Now do you remember your homework assignment how many。Seconds did it take for us to start our application。I'LL give you a hint。Two seconds right well now why do I say that there's been a heavy duty focus on making our apps take up less memory。And what we mean by that is I want to have the ability to run an APP and instead of taking hundreds of eggs of memory I want take tens of mix and when we talk about things like fast like when we'were talking about spring cloud function putting its APP so that you can run it where anywhere you want whether it's on。
48:04
A stream a task on fast provider I those seeing some of those start really fast like my hundreds of a second right well we saw when we are kicking off our APP it took two seconds。What if I could compile our Java code to native binary well there's a project out there called spra rawl andra rawl has a native image compiler so it will take your BAT or you your application and compil it to executable it does that by statically analyzing to compil time it discards all stuff it says it doesn't need。Which is cool but sometimes it discards a little bit too much and we're like okay we need that stuff back and what we want To Be able to do。Is To Be able to。Configure that um uh the gro uh native coniler to say I need these other pieces back and it offers you the ability right the configuration but you're like mlen I'VE just written all this code now I'VE got right configuration to tell native capillo how to pull that stuff back in now spring native to the rescue spring native provides you at the serious dependencies which you can ADD at start that spring do IO by just adding the native starter and when you build your APP and you can specify a dash p native it will first off analyze your project。
49:28
Create those configurations and then compile start the native compilation so you again focus on your business problem not worrying about the compilation we will probably have some announcements on this project but。Remember the two seconds I'm going to step out of my。Presentation really quick and I'VE already done a pre compile remember the demos one a it takes five minutes to six minutes to compile it from to a。
50:01
Binary executable so I will stop my previous run of the Java version。And I'm gonna kick off。A natively compiled version of what we just wrote。And we see that it started。In point one five seconds a significant increase and our decrease in time and actually it runs a lot fast about gotla stuff running right now I machine now the other thing is is that without any configuration changes before it took five hundred me for that at to run now it takes less than thirty meg。Five hundred me down to thirty neck so let's hurry up and finish our talk here were running a little bit out of time play from a current slide。If you want to know more jump on the spring native talk tomorrow at ten oh five a if you will learn about how To Go serve。In the spring frame markico systemstem tomorrow at two o five and we have a talk on that ah if you want to know the future like you good set join to his talk at five thirty but the future is in the past we missed it so catch it on YouTube I think it's a must watch if you want to learn more about spring please join us on spring do I am where you can learn more about our projects gather some guides look at who what team members are out there learn about the community it's so great great place To Get kicked off at。
51:23
If you have a little extra time and you you can feel free I highly recommend these two talks spring for architects by n shoota it is click the link or you can do a screen out of this I highly recommend please join us for a talk product protively designing for diverse equity and inclusion this is a great talk to also join folks thank you for joining me here is a link to the PDF。For this presentation and I appreciate you join me。
52:00
Glen thanks for that huge roadmap of all of the things that are spring if you want to learn more about what glen talked about or to just talk To Glen and ask questions check out the join the discussion link that's on the screen next to the talk。One's mind blown yet。If you're interested in spring in the things that going talked about be sure to spend the rest of the next two days checking out whatever sessions you want。Now the big question though are you intrigued about the next shiny new thing TIA Jesus up next and she's me presenting on exactly that we're going to take a short break the law everybody refill their CA favorite caffeine beverage and we'LL see at eleven o five eastern。
我来说两句