Bryan Kopta
Hello and welcome to Code(ish), an exploration of the lives of modern developers. Join us as we dive into topics like languages and frameworks, data and event-driven architectures, artificial intelligence and individual and team productivity, tailored to developers and engineering leaders.
Bryan Kopta
This episode is part of our Tools and Tips series.
Julián Duque
Here we are on a new edition of the Code(ish) podcast. We are so honored and happy to have today as our guest, the one and only Josh Long.
Julián Duque
He’s the first Spring developer advocate, is recognized as our Thor Java champion, and if you aren’t into Java, you probably might know him. So, Josh, welcome to Code(ish).
Josh Long
Hi, how are you?
Julián Duque
I’m pretty good, thank you very much for joining us today and for sharing all your knowledge with our audience.
Josh Long
You know, it’s my pleasure. And people who don’t know, we have to record a little audio sample in the beginning of this. I know why they’re doing that. They’re using something like Adobe Audition. And if you capture like an audio print, they can use that to extract out the background noise from the foreground noise. And while we were recording that, my dog, who’s sleeping a meter away from me, woke up and just started scratching himself very, very, very loudly.
Josh Long
And so, I’m kind of wondering what the final podcast will look like. I hope it wasn’t captured. I’ve got the voice isolation on.
Julián Duque
I cannot hear, but I have a very, very important question.
Josh Long
Oh, yeah.
Julián Duque
What’s your dog’s name?
Josh Long
Oh, his name is Peanut. He’s not a good dog. He’s a terrible dog.
Josh Long
He’s like 10 years old. 11 He’s not, not a good boy.
Julián Duque
There are no such things as a bad dog.
Josh Long
No, no, no. You haven’t met yet. Peanut is terrible. But we keep him for three reasons, you know, in my home. One is, first, even terrible dogs deserve good, loving homes. So, so there’s that. And then two, there’s an ego component to it. In my home, my partner and my daughter all speak five languages.
Josh Long
I only speak three and a half. So, if we didn’t have that stupid, stupid dog, then I would be the stupidest in the house. That will not stand. Right. And then the third reason is he is very, very cute. So we keep him for those reasons around. But he’s not a good boy. Did you ever see that ad for this dog named Prancer during the pandemic?
Julián Duque
I don’t recall it. No.
Josh Long
This woman was trying to find a new home for her dog. And the dog’s name is Prancer. P-R-A-N-C-E-R. This is back in 2021, actually. Oh, I’m so excited. Today is [the] four-year anniversary [of] the post that just changed my life because it made me understand four-year anniversary of Prancer. So it made me understand that not all dogs are cute and adorable.
Josh Long
Some are problems, but that’s okay. They deserve homes too. Just because they’re a little spicy doesn’t mean they can’t be fun to have around. She wrote this post, very, very funny post. She says, “Okay, I’ve tried.” She’s looking for a new home for the dog, right, she’s trying to rehouse the dog. So she says, “I’ve tried for the last several months to post this dog for adoption and make him sound palatable.
Josh Long
The problem is there’s not a very big market for neurotic, man-hating, animal-hating, children-hating dogs that look like gremlins.
Josh Long
But I have to believe there’s someone out there for Prancer because I’m tired, and so is my family. Every day, we live in the grips of the demonic Chihuahua hellscape he has created in our home. If you own a Chihuahua, you probably know what I’m talking about.”
Josh Long
And then she continues that he was quiet and just laid on the couch. Didn’t bother anyone. “I was excited to see him come out of his shell and become a real dog. I’m convinced at this point that he’s not a real dog, but more like a vessel for a traumatized Victorian child that now haunts our home.”
Julián Duque
That’s genius.
Josh Long
And then she goes on and on, she continues, “…is only two years old, and will probably live to be 21 through pure spite. So, take that into account. And if you look at the photos, he’s a very cute dog. I’d totally pet that dog. But it sounds like he can be a little spicy, too.”
Julián Duque
You need to send me that link so we can add it to the blog post that’s going to companion this episode, so everybody can see it.
Josh Long
Prancer. They’re the best. Not good dogs. They’re just the best dogs because they make life more interesting.
Julián Duque
Awesome. Well, there’s definitely we do hear Peanut, and I’m pretty sure all the magic behind producing these is going to take care of that.
Julián Duque
Speaking of which, I tried this tool from Adobe podcast and it can do like some magic with voice, even though I have a professional microphone and try to have like a proper setup here with sound isolation and everything, I still need to use certain tools and the power of AI to make a recording, kind of like a professional level.
Josh Long
Oh yeah, you’re a better podcaster than I am. I have a podcast. I actually had our friend Betty came on the show. We were in Singapore a few years ago. She’s always been an executive as long as I’ve known her.
Julián Duque
She’s our Chief Marketing Officer for Heroku.
Josh Long
And she’s amazing. I was very, very excited to get somebody that important to come on my little show. And that’s the only time I felt embarrassed because, unlike you, I don’t care about the audio of my podcast, because what happened was I went down this path for years and years and years.
Josh Long
I’ve been doing this podcast since 2018, and I’ve been doing videos on YouTube since 2015, and I’ve been doing all sorts of public appearances for decades. So people have heard my voice. And so I’m finally doing these podcasts, and the number one complaint I would get for years and years is the audio sounds terrible. You’re cracking up. The voice doesn’t sound good.
Josh Long
And I would get these very expensive microphones and I have very expensive recording equipment and I would soundproof the room. Nothing. People still complain and now I think maybe they just don’t like my voice. It doesn’t matter, you know, it doesn’t matter what I do. They will always complain. So now I’m using a cheap RØDE lavalier mic.
Julián Duque
RØDE are pretty good. I have RØDE myself. So, Josh, you have been working on Spring for a while. Do anything. I remember using the old school Spring. I think before Spring in B.C. was a thing I was using just a Spring framework for dependency injection and stuff. So that was most of the Java I did. I think I tried Spring Rouge, which was a new thing back in the day for building quick applications with Java, but that’s it.
Julián Duque
I transitioned to Node.js and never did anything with Java, but we just had almost an hour chat before recording this podcast and Josh showed me around the latest and greatest things in Java and the Spring world. And I can say I’m amazed.
Josh Long
Aw shucks. Well, thank you.
Julián Duque
So you have been witness of that evolution since 2010. How has been that whole process for you while being part of developer advocate for the Spring project?
Josh Long
So I did join, I joined the Spring team. I was officially using Spring, and I was part of the community from 2003 maybe, I was using Spring very, very early before it was even GA 1.0., and I started contributing code back in 2007, 8, 9, but they didn’t hire me. They tried to hire me 2009, but then there was a hiring freeze or something like this.
Josh Long
They interviewed me in 2009, but I didn’t get the job until 2010. Through that entire time, remember Spring has been around since GA 1.0 since 2004, but there was books about it before that and the early access beta builds and all that. It was really nice, that’s why I was very excited to do this demo for you, because if you haven’t seen it in 15 years and the world is completely different, and it’s always nice to see people’s expressions and their attitudes change around where Java and Spring have arrived compared to where it’s been.
Josh Long
You asked me what that’s been like and, there’s no single point where I can say, okay, this is totally different. There’s nothing along the road. The metaphor with the boiling frogs, you don’t know you’re being cooked. I didn’t know that things were changing so dramatically, but if you take the long-term sort of perspective and look at how things were 10 years ago, 15 years ago, and how they are now, it’s night and day.
Josh Long
And for me, the single most important turning point in that evolution was 2014. I can’t say that that was like the only thing, but it was certainly an amazing year because Spring Boot 1.0 came out and Java 8 came out.
Julián Duque
Mmm, yes.
Josh Long
These two things are symbiotic. Spring Boot, I don’t think it’s very arrogant or presumptuous to say that Spring Boot has been very successful in the Java community.
Josh Long
Doesn’t matter who you ask. Most people of this Java community are using Spring Boot, it’s even bigger than Spring Framework was and Spring Framework was already the single largest thing in the Java community. That 2014 year, that’s when it really arrived. And then Java 8 gave us lambdas. It gave us streams, not great but decent functional programming support. We had an amazing opportunity and I think amazing platforms like Heroku and Cloud Foundry on my side, which were application first, the idea that you can take an application and get it deployed really quickly on these platform-as-a-service offerings, it all happened around the same time and it was just such a perfect storm. So I look back at that and I think, Wow, if this didn’t happen, if Java 8 didn’t arrive, would it be the same? Or what if Spring Boot had come out a year later? We also added a project called Spring Cloud in 2015. And Spring Cloud, it builds on Spring Boot, so it’s Spring Boot plus, plus, Spring Boot plus support for microservices.
Josh Long
And now we’ve got Spring AI, which is Spring Boot plus support for AI. And these things are hugely popular. Lightning in a bottle kind of moments in time. Yeah, it’s just been very, very strange to see this. Do you have kids?
Julián Duque
I don’t. I don’t have kids.
Josh Long
Okay. I’ve got a daughter and she’s much smarter than I am. She’s growing.
Josh Long
She’s now 19 and a half and she’s off in university and we miss her all the time, of course. But at university, she’s gone for six months or three months or whatever. She comes and sees us a lot, but not every day. And so now we see her, and she’s different. It’s obvious you can see the differences. Maybe she’s gotten a little taller, or maybe she’s the way that she is, is very obviously different from the way that she was.
Josh Long
And I feel like it’s hard to see that with something that you’re staring at every day like I have been. But even I can see a few very important moments in time.
Julián Duque
That’s amazing. So I can understand a little bit because I’ve been away many, many years from the Java ecosystem to put in a little bit of context.
Julián Duque
In my time, the most modern thing that was released was Java Generics.
Josh Long
Huge, Java 5, yeah.
Julián Duque
Yeah, Java 5. So imagine that. So what exactly is Spring Boot? Because you have been talking about like Spring Cloud, the Spring AI being based out of Spring Boot. I see Spring Boot, it is the core, but the core of, of what? What exactly is the Spring Boot project?
Josh Long
Well, okay. So I didn’t mean to mislead. Spring Framework is the core and then Spring Boot builds on that and then Spring AI, Spring Modulith, Spring Cloud, they all build on Spring Boot.
Julián Duque
Okay.
Josh Long
So the core concept of Spring, back in the early days, and it doesn’t seem like a big deal now, obviously, and that’s because it’s been commoditized, it’s become something that everybody takes for granted. But when it first came out, we talked about the Spring triangle, three very important things that we use to help deliver value so that people can build applications. First of all, it’s a framework. And what I mean by that is we provide the essential scaffolding that all applications need before they can do anything useful.
Josh Long
There’s lots of different frameworks and lots of different opinions about how much or how little should be included in the framework. But it is a framework. It’s not just a library. The framework controls the lifecycle. And when you hear people talking about frameworks, what is that definition? It’s open for extension, closed for modification. So it is open source.
Josh Long
So of course you can fork it, you can make changes to it. It’s Apache 2 license, be our guest. But the point is because it’s got well-known extension hooks, you don’t need to change it. You can just add in different objects of these well-known types, and they’ll get plugged into the machine, and they can sort of affect the behavior of the final thing.
Josh Long
In the old days, we talked about dependency injection, which again, not a new thing, very, very easy to take for granted today. It just means writing code using constructors. Make sure that your objects are instantiated in a valid state once they’re constructed. And there’s also setter dependency injection. But really, today most people are doing constructors. There’s dependency injection, there’s aspect-oriented programming.
Josh Long
Basically, you can use this extra layer to decorate existing objects with new capabilities. So in Python, for example, you have the ability to do that kind of thing, where you can add new capabilities just by adding in Java, we call them annotations for example, in Java they’re attributes.
Julián Duque
Or decorators.
Josh Long
The idea is that you can add new capabilities, and you can do so in a cost-cutting kind of way so you solve it once, and you can just easily tell other objects to have this behavior in capability. An example might be transaction demarcation, or auditing, or observability, or setting up HTTP endpoints. And the benefit of this is that it’s easy to create an object and then have the methods of that object mounted as HTTP handlers. The benefit of that is that we can take any regular Java object and add to it, decorate it, add to the methods of that object’s capabilities.
Josh Long
So whenever this method gets called, send a metric to my time series database. Whenever this URL gets called, call that method. It doesn’t have to have a strict interface, or we can work with the recalled plain old Java object. So, aspect-oriented programming allows you to add capabilities to plain-old Java objects. And then finally, we have portable service abstractions.
Josh Long
So the idea there is that there are certain things that you need to do, which are common. So, for example, data access and messaging and AI. You want to talk to Kafka, you want to talk to your database, you want to talk to an AI model. It’s very useful to have a level of abstraction, sufficiently abstract that you can write code concisely and elegantly, while also keeping, wherever possible, the full power of allowing you to drop down.
Josh Long
So those three pillars, those three tenets, are the most important parts of Spring Framework. But you had to configure everything. What I mean configure I mean you have to write all the objects yourself. You have to describe to Spring how all these objects are wired together, and that’s complete flexibility. That Spring Framework approach definitely says you have all the power, but also, you have all the responsibility.
Josh Long
If you want to do anything, it has to be you that configures it. We had some shortcuts here and there. You can one line, you could get transactions, another line, you could get a chron method or whatever, but it’s still, you had to opt in. You had to say, I want this. And if you look at the prevailing trend of frameworks around this time, 2004, 2005, especially with Ruby on Rails, you get this convention-over-configuration approach.
Josh Long
And here, with convention over configuration, the idea is that you’ll get a lot of defaults, and the defaults will give you the power to move very quickly towards a particular goal. The problem is that Ruby on Rails, in particular, bakes those defaults so deeply into the code that every time you wanted to unwind or do something slightly against the grain of those defaults, the work became very, very difficult.
Josh Long
It was almost impossible in some cases, and you ended up having to throw away a lot of code-generated code and start from the very bottom. And so we didn’t want to do that. We tried something like that with Spring Roo, but that didn’t quite work. And so finally here comes Spring Boot and Spring Boot adds this new mechanism, this new point on the polygon called the auto configuration.
Josh Long
So now it’s not really a Spring triangle, is it? It’s a Spring square or something like that. A Spring rectangle and auto configuration gives you the ability to have things that are on the class path, that are on the library path, that are linked in your program, and that’s it. And by virtue of the fact that they’re present when the program starts up, they contribute things to the running application and they can determine, they can ask questions of their environment, which allow them to determine things about the environment so they can say, okay, is this environment variable set, is this property set, is there a class of this type on the library path?
Josh Long
Has somebody already defined another object of this type in the application context? And these cues, also they can determine, am I running inside of a Cloud Foundry or Heroku? If I’m not, then don’t bother doing A, B, and C. So we have this very dynamic configuration model that can look at the external environment in which the program is operating and the internal one, and re-adjust the the basic behavior of the program.
Josh Long
What this means is that for a Spring Boot user, if I want a web server, I just add one dependency. Spring Boot start on web, add that to the build, and then suddenly I’ve got an embedded web server that starts up. I don’t have to write a line of Java code. If I want easy data access, talking a sequel database, for example, there’s a dozen different options.
Josh Long
But I could use Spring Boot starter data JDBC, that’s one of a dozen different, equally interesting options. And so, if I want observability, I just say Spring Boot starter actuator, and then I have metrics and distributed tracing and all this stuff. So now that is auto-configuring, it’s automatically configuring these objects for you. But, the benefit is that these configurations are written in this dynamic style that will back off if the user provides their own thing.
Julián Duque
Okay.
Josh Long
Let’s say I’m using Spring Boot starter data JDBC. It’ll automatically configure a data source for me based on some properties or if I have an embedded database like H2 or whatever. But what if I don’t have an embedded database? And what if I want to have two databases? Okay, well, fine. As soon as you define a bean of type datasource by yourself, then the default one that Spring Boot will provide doesn’t get created, it backs off.
Josh Long
So it’s the best of both worlds, you have full automatic convention, but at any point in the road, if you want to just change an object, if you want to override the default behavior for one object here or one object there, fine. Just define the object yourself and then Spring Boot will defer to you for that one particular thing.
Josh Long
And so you get the best of both worlds. And it’s not just for web apps, babysitting databases, as in the case of Ruby on Rails. We do this for everything. If you want to build AI services, if you want to build microservices, if want to build CLIs, if you want to build shell applications, if you want to build batch processing or messaging and integration and Kafka or secure applications are OAuth or Samwell or whatever, there’s a starter for literally everything. So now you get this convention over configuration, but it’s not intractable. You can always just undo some default assumption, which I think has been a very powerful thing for people.
Julián Duque
It seems like a very good approach because you’re adding on top of something instead of removing or cleaning up.
Julián Duque
One of the problems that I had before with technologies like Rails or Django or Pheonix, these full-feature frameworks that gives you a web application, like an ABC Web application for certain applications that I want to build, but I don’t need all of that.
Josh Long
Yeah.
Julián Duque
I just need to have, let’s say, one row that does one thing. This is what I like about Node, for example.
Julián Duque
I kind of start from scratch building exactly what I need instead of cleaning up after doing on its scaffolding.
Josh Long
Right.
Julián Duque
And the thing is that sometimes you don’t know the framework that much to start deleting things that you don’t know if it’s going to be used or not.
Josh Long
Right.
Julián Duque
That’s very good. Yes. You show me a I think it was a website, maybe it will be good to share for people that don’t know anything about Spring Boot where you were pretty much bootstrapping the application. This is all the different plug-ins or libraries we were going to use, and it gives you a maybe configuration file for you to start a project.
Josh Long
Or Gradle. I like Maven or Gradle though, either one.
Julián Duque
Can you build also with the other JVM languages with Spring Boot.
Josh Long
Yeah, Kotlin and Groovy are supported out of the box as well. Kotlin is even more, I showed you the code we built an express JS style, two HTTP endpoints, one of which used AI, and it had a web server, and it had a data access layer, including the public static void Main and the imports, it was like 45 lines of code and that was with Java.
Josh Long
You couldn’t do that in Node, you couldn’t do that in Python, you couldn’t do that in Ruby, you can’t do that that quickly. But with Kotlin it’s even less because it’s a more concise syntax, so it’s just a very, very nice experience, I think for people. If you don’t want to type a lot, then you can use Spring Boot. If you don’t want to type a lot of types, Spring Boot in Java is if you don’t want to type a lot and you don’t want to type a lot of types, but you want to type systems, then use Kotlin with Spring Boot as well, which is a very popular choice, still the number two choice. I think most people are still using Java, but Kotlin is a gorgeous language. I love it.
Julián Duque
Wonderful. I mean, it has evolved a lot. Like what I saw you were using Java 24, is way different than the Java I remember.
Josh Long
Yeah, that’s true. And Kotlin is still just a bit more concise. But yeah, you’re right. Java has gotten a lot better. You remember Java had generics. I’m laughing because it seems a little silly that a language would not have generics today, but obviously go just a few years ago they only got it, so maybe it’s not so silly. Yeah, it’s come a long way.
Julián Duque
You gotta use the right tools for the job, of course. I mean, there are like many, many options out there for building applications. You gotta use the right one.
Josh Long
And I think the thing that’s really nice about Spring is that we take a lot of inspiration from other things.
Josh Long
Obviously, one of the things that’s nice about Spring Boot is that it has self-contained binaries, and so that way you can actually just do Java minus jar, and then the program starts up. That sounds obvious right now, but it wasn’t such a big thing when Spring Boot came out. The first real use case I heard of people wanting to have this was Heroku.
Josh Long
Heroku did a very good job there and then of course Cloud Foundry and, and then the other thing that was kind of interesting is that we have built in support for building Docker images or that built in support for building Docker images comes from build packs, which started with Heroku and became a collaboration between our teams and your teams.
Josh Long
Actually, I remember seeing my friend James Ward. Did you ever meet James Ward?
Julián Duque
Yes, of course.
Josh Long
Okay. Lovely human being. He used to work at Heroku, and I remember seeing him doing talks using Dropwizard, which is another amazing piece of technology. It didn’t start at Heroku, obviously, but it created self-contained jars. And that was such a novel thing back then.
Josh Long
At the time, James Ward was one of your amazing developer advocates. He was out there showing people how to build these Dropwizard services for Heroku. You know, it’s like, Oh, that’s really novel. So the Spring Boot team took a lot of inspiration from Dropwizard as well. I love Spring Boot, but obviously, to be fair, you have to look at the incredible lineage of all these amazing things that inspired it and that continue to inspire it.
Julián Duque
You also show something today I miss in Node.js ecosystem, but I can find it with Bun or Deno, which are the other two alternative nodes like JavaScript runtimes for backend and server-side applications, which is compiling or building a binary, like a self-contained binary with the runtime dependencies and the application. And that’s something that you could do that with node it is not native are like some tools that can take you there.
Julián Duque
But to be honest, I was not expecting to see that for Java. For me, Java was always like this huge thing that you required this huge runtime to run an application, and you just with one command showed me that that was not the case.
Josh Long
So we’ve had GraalVM support in the Java community for I think the 1.0 release of GraalVM came out in 2018, but it was available as an early access thing.
Josh Long
Actually, the guy who created it, he’s a vice president at Oracle, and there’s a whole division that works under him, lots and lots of people. But he worked on the Just in Time compiler for the V8 JavaScript engine at Google. His name is Thomas Wuerthinger. And then of course, he decided to take his magical powers and apply them for Java a decade ago.
Josh Long
It’s been this thing that’s been there for a long time. The Spring team added support for it. We had Spring Native, we had this project that you could use as early as like 2020. It must have been 2020. You know why, I remember doing the demo for everybody to see back in March of 2020, and of course…
Julián Duque
Everything went down after that.
Josh Long
And nothing else happened that month, right?
Josh Long
I remember that demo being very rough, but now it’s so easy to do and so, so clean and awesome.
Julián Duque
I have to give it a try for sure.
Josh Long
And it makes it easy to deploy on Heroku.
Julián Duque
Nice. Oh yeah. That’s something that I want to experiment.
Josh Long
Yeah, super good.
Julián Duque
So there is this personal misconception of using Spring just for web applications, but that seems not to be the case.
Julián Duque
What other type of applications or solutions can I build with the Spring Boot? For example?
Josh Long
It’s easier to think of things that I cannot build.
Julián Duque
Okay.
Josh Long
So right now I would not try to build an iOS application. I think Spring Boot would be a very tough thing to use. But you know, with GraalVM, you can export your JVM code as a DLL or a .DYLIB or. SO.
Josh Long
So they can be linked onto iOS. You can actually link to them from iOS. There’s actually GraalVM also gives you a, they just showed a preview feature just two weeks ago where you can take Java code and target web assembly. Maybe this is three weeks ago.
Julián Duque
Ooh.
Josh Long
Now you can imagine linking to that web assembly from your Rust or your or your C code, but that’s not yet ready for prime time.
Josh Long
It’s still very early days, but give it a little while, maybe we’ll see amazing things. So if I wanted to do kernel extensions and see Spring is terrible.
Julián Duque
I can imagine.
Josh Long
Yeah, it’s not going to be a good choice, but that doesn’t tell you much. I’m not going to cry about two people that wanted to do kernel extensions in Java not being able to do that.
Julián Duque
What about a C-like tool?
Josh Long
Well, we have a project called Spring Shell, which gives you full tab completion readline support. It gives you parameters. You can run it as a shell or you can run it as a CLI, just run the program and then exit or it gives you a console where you can actually have cursor prompts and all that kind of stuff.
Josh Long
I can build up a shell, a usable shell in five lines of code or something like that. It’s really powerful. It’s built in Spring Booot and of course you can use GraalVM native images. So now you can ship somebody a my CLI.exe or my CLI, Mac and Linux. So you can do that. You can do batch processing, big data, no SQL.
Josh Long
We have Spring Data and we have Spring Batch for those use cases. And of course Spring Batch can do distribution of data. So I’ve got billions of records I need to process in concurrence and I need to make sure that we don’t lose track of which data has been read or write. You can do that. We have Spring integration for event-driven architectures and messaging.
Josh Long
So if you want to do a Kafka or Apache Pulsar, JMS, RabbitMQ or literally anything TCP IP, you want to do Twitter, you want to do email, there’s a framework for that set of bind. You don’t have to buy typical rendezvous or web methods or whatever, you can just use this. If you wanted to do web services. We talked about that, fine, you can do Spring MVC and Spring Boot, but if you want to build microservices, want to do distributed computing, client-side load balancing, you want to do a centralized configuration, federated oAuth centralized configuration, you want to do a circuit breakers and bulkheads and all that stuff, we have this project called Spring Cloud. Spring Cloud in turn provides abstractions for different infrastructure-as-a-service providers, and those are maintained with one exception by the individual company. So there’s Spring Cloud for GCP, there’s Spring Cloud for Azure, Spring Cloud for AWS, Spring Cloud for Aliyun, which is Alibaba, and those all provide idiomatic bindings to these different infrastructure pieces on these different platforms. In terms of the Spring interfaces, the only one that isn’t maintained by the original company is the AWS integration. So all the other cloud providers maintain their own Spring Cloud distribution built on top of our basic Spring Cloud, you know?
Josh Long
There’s security so you can do SAML, oAuth federated login, the best security technology for any developer, in any period. It’s been around for 20 years. It’s the richest ecosystem and it can do pass keys. You can do magic links, you can do NIM password, you can do all sorts of things with Spring Security. You can build desktop apps using JavaFX.
Julián Duque
Oh yeah, I remember JavaFX for sure.
Josh Long
I contributed the support for building Kubernetes Java clients and making that work in GraalVM. So basically, you can build a Kubernetes operator or a controller using Spring Boot very, very easily. You can build a service broker in Spring Boot. So it’s just endless.
Julián Duque
Whatever you can imagine.
Josh Long
Yeah. Oh, and AI. We have this whole, we have the AI.
Julián Duque
Exactly. That’s what I was going to go to leave the most interesting topic right now for a lot of people to the last one to discuss, which is AI. You show me this example, just doing a basic chat completion, a call to OpenAI. But what about the good stuff, like can I be that NCP server client right now with Spring?
Josh Long
So Spring AI is a toolkit that’s meant to make it easy for you to interface with dozens of different LLM models and transcription models and image models. And it also provides support for all the useful patterns in AI engineering like RAGS. We have integration for dozens of different vector stores or RAG pipelines.
Julián Duque
pgvector, of course,
Josh Long
pgvector, the one I use all the time in my demos, I love that one
Julián Duque
And we support them by the way, so.
Josh Long
Yeah, there you go. That’s right there because Heroku Postgres is awesome. Beyond that, you’ve got a couple of things. First of all, MCP. So MCP, for those that don’t know, is a protocol created by Anthropic, the people that made Claude desktop, and this was back in November of last year. I don’t know if people can remember that far back, but it’s only been four and a half months, five months.
Josh Long
They created this originally for their desktop, Claude desktop software. The idea is that the, the MCP service would run on the same platform, on the same host, and so they communicate via standard in/standard out. So this is really useful. I mean, people have got demos of using Claude desktop to control Blender 3D or to control music synthesizers or whatever.
Josh Long
So you can actually just type into Claude desktop or use your voice, like in Star Trek, you can say render a scene of people sitting in a cafe in 1920s Paris and just give it a few minutes and then it will do it, right? So that’s interesting in of itself and people can say, okay, I want music, play jazz, give me some jazz from 1920s Paris as well.
Josh Long
But the real interesting possibility is having that stuff centralized like over HTTP and so Anthropic actually defined another version of the protocol that is network aware and that’s over HTTP using service and events. And that version is, I think, way more interesting for the most enterprise developers. It’s also a protocol, so it’s not, strictly speaking, just Anthropic. You can use anything that can speak then, act as an MCP client, can talk to an MCP service.
Josh Long
So the Spring AI team in the week that they announced this MCP protocol, we built a Java SDK for MCP, and that code was so good that that’s become the official SDK from Anthropic from the model context protocol that IO project. So if you download the Java SDK from that project, you’re using our code.
Julián Duque
Ooh, I’m seeing that right now.
Josh Long
Yeah. And so if you use now Spring AI plus our support for MCP, what you’re getting is the Spring Boot style auto configuration, which I just described earlier in the Spring AI project for MCP, but it pulls in the core libraries from the official MCP project that we donated. So not only can we support it, but it’s actually one of the best ways to do it on the planet right now and it’s one of the easiest, most elegant, most powerful ways to do it. And it’s also one of the earliest, right? We were there literally weeks after we started discussions with Anthropic to donate that code last year.
Julián Duque
Amazing. One thing, I’ve been building an agentic AI applications recently. This is what I’ve been studying. What about agents like React Agents, full calling now a little bit more advanced AI apps.
Josh Long
The idea behind agentic is that you’re going to let AI control AI. You let the model direct its own flow, so to speak, in response to a bigger task, a more ambitious task. They have so-called one-shot AI where you can make a single request and get a single response. And that’s good enough. But the real question is how much better a result can you get if you let the model refine or iterate or evolve or change, if you let it try multiple times and then improve upon things.
Josh Long
So the classic example is you have one model that can write some code, and then you have maybe the same model in a new session, or a different model looks at the code and says, “Oh, that’s pretty good, but maybe improve this.” And then the model tries again and generates with the new changes allowed. And you keep going like this, and then the resulting code is actually much better than the thing you would get if you did one-shot.
Josh Long
So this is a simple example, and maybe it’s a little silly because most people aren’t generating, they’re not using AI to generate their own code unless you’re CoPilot or whatever. But the idea is very simple. It’s a wild loop. While the model has suggestions, implement a suggestion. And the same thing for a very common example is I have a request that comes in.
Josh Long
It uses a cheap, very, very fast, very small model to do basic categorization. Is this request for customer service? Send it that way. Order? Send it that way. If it’s for something else, send it this way. And so you can use an AI model to look at the text and the request and do categorization, and then that can send it to another model that’s more properly trained or that’s more sophisticated or that speaks more languages or whatever.
Josh Long
It might be a little slower, but you don’t want the categorization itself to be slow. So you put that smaller AI model there. And that’s that’s a content-based routers, basically from the enterprise integration world done in this agentic style. The point is you can do all this kind of stuff. There’s two different kinds of patterns these days. There’s agents and then there’s workflows.
Josh Long
And I think for most people, workflows are actually the better bet. Workflows are basically, here’s the ten steps I want you to do, and I want the output of one step to be the input of another. And if you do it in concurrence, if you do it in whatever, then that’s fine. That basically, it’s easy to kind of govern.
Josh Long
You kick it off, and you wait until the response is done. It can interact with you if it needs to, but basically, there’s a fixed number of steps. There’s the other kind of agents letting AI just take the wheel. You can do that as well, but I don’t know that that’s the safest result for a lot of people.
Josh Long
You should start with a workflows pattern and then see if you can make that work and then it will work. And if that works for you, then keep going maybe, and try the more sort of ambitious, just let it run autonomously by itself as opposed to you kicking it off.
Julián Duque
Totally agree. Oh, my God, Josh, amazing. All these information that we have here. Definitely you piqued my curiosity. There are like a bunch of things that I missed from the Java ecosystem in my current workflow that may maybe…
Josh Long
Let’s write some code together.
Julián Duque
I might be spending some time. For people like me or people that are just like coding some curiosity about this Spring Boot. Where to start? Do you have like a very specific recommendation for us?
Josh Long
Well, as it happens, I have two videos. If you go to my YouTube channel.
Julián Duque
We will share the link with the audience for sure.
Josh Long
YouTube.com/coffeesoftware, @coffeesoftware. There’s two videos there. The two most recent videos, the one that I think people are looking for, a video to learn Spring Boot should look at is the Spring Boot End-to-End Tutorial, new for 2025, and that was published four weeks ago.
Josh Long
And it’s 2 hours, and it goes through everything. It starts at basic Spring dependency injection and it works through AI and security. And then there’s another video I did about 30 minutes long, and it’s more than a month ago. It’s called MCP, it’s easy as ABC. This is a hot topic, right? The Spring Boot tutorial has 186,000 views. The MCP one is 96,000, and that’s all just people going, okay, I want to learn about this stuff right now.
Josh Long
Yeah, go check that out, my YouTube channel, and it’ll get you started. And then if you want to learn via text, obviously Spring.io/guides will get you there. There’s tons of good stuff there as well.
Julián Duque
In the episode node, you’re going to find all the links to the videos, everything that we have shared here.
Julián Duque
And last but not least, I kind of have a complaint.
Josh Long
Another one? I can only handle two per year.
Julián Duque
Checking your website, I see there’s a phone thing on your about page. You have 27 different translations of your name, all of those contributed by the community, but I don’t see a Spanish, why?
Josh Long
Josue. I have Portuguese, which is kind of the same.
Josh Long
Okay, do you want to send it and I’ll add it?
Julián Duque
Of course, representation matters here.
Josh Long
Yes. I’m sorry if people send it to me, I add it. I have no reason to say no. Of course.
Julián Duque
Of course I will reply the thread.
Josh Long
Please.
Julián Duque
Josh, thank you very much for sharing all this amazing content to our audience. It seems that you are like very passionate about it, then. I’m infected right now.
Josh Long
Aw, amigo. That makes me so happy to hear that, truly, you and I. I can’t wait to code together, we can teach each other stuff.
Julián Duque
We might have some opportunities to do some life coding in the near future and happy to have you again here in Code(ish).
Josh Long
Yes. Sign me up. I can’t wait.
Julián Duque
Of course. Well, thank you so much, and see you in the next one.
Bryan Kopta
Thanks for joining us for this episode of the Code(ish) podcast. Code(ish) is produced by Heroku. The easiest way to deploy, manage, and scale your applications in the cloud. If you’d like to learn more about Code(ish) or any of Heroku’s podcasts, please visit Heroku.com/podcasts.