Josh Long on Fast, Scalable, Cloud Native Services in Java
Duke’s Corner Podcast — September 21, 2022
Jim Grisanzio with Josh Long
Duke’s Corner Podcast with JavaOne 2022 speaker Josh Long from San Francisco. Josh is a Java Champion and a Spring Developer Advocate. In this conversation he previews upcoming session on Kubernetes Native Java. He also talks about his experiences becoming a developer and working with the Java community around the world.
https://dukescorner.libsyn.com/josh-long-writes-fast-scalable-cloud-native-services-in-java
Transcript:
(00:00:00):
Hey, it’s Jim.
(00:00:01):
We’re back.
(00:00:01):
We’re back here for another conversation to talk about Java 1,
(00:00:04):
upcoming in,
(00:00:05):
I guess,
(00:00:06):
about three,
(00:00:07):
four weeks now,
(00:00:08):
in mid-October.
(00:00:09):
Java 1 is in Las Vegas this year, and it’s October 17th through 20th.
(00:00:15):
So looking forward to seeing everybody there.
(00:00:17):
There’s links in the description for everybody to register.
(00:00:21):
And it’s going to be a great show.
(00:00:23):
So to preview this conversation, this is with Josh Long.
(00:00:26):
He is a spring developer advocate.
(00:00:28):
He’s also a Java champion.
(00:00:29):
He’s a podcaster.
(00:00:30):
He’s huge on Twitter.
(00:00:32):
He’s all over the place.
(00:00:33):
Conference speaker.
(00:00:34):
Everyone knows Josh.
(00:00:36):
And in this conversation, we talk a little bit about his blistering, fast, scalable cloud-native skills.
(00:00:43):
Services all written in Java.
(00:00:46):
And so Kubernetes Native Java is the name of his session.
(00:00:49):
And so he gets into that in some detail here.
(00:00:53):
But we also talk about the community,
(00:00:54):
of course,
(00:00:55):
and some of his experiences in the Java community at Java 1 specifically,
(00:00:59):
but also at various conferences around the world since he talks a lot.
(00:01:05):
At conferences, yeah.
(00:01:07):
So that’s Josh Long.
(00:01:08):
I think this is number seven.
(00:01:09):
We have one more to come after this, and we’ll talk to you soon.
(00:01:18):
Josh, Josh Long from San Francisco.
(00:01:21):
Welcome to Duke’s Corner.
(00:01:22):
Thank you so very much for having me, Jim.
(00:01:24):
I’m glad to be here.
(00:01:26):
It’s great to see you here for the first time.
(00:01:28):
And I’ve been following you on Twitter for a while.
(00:01:30):
I’ve heard a lot about you and came across your name on the speaker list with Java 1.
(00:01:37):
Java 1 is coming up in a few weeks now.
(00:01:40):
Can you believe it?
(00:01:40):
I’m glad you said it because I wouldn’t have believed it, you know?
(00:01:43):
yeah yeah i know it’s gonna be interesting and uh so it’s in las vegas this year so
(00:01:48):
that’ll be different and it’s mid-october october 17th through 20th so uh well it’s
(00:01:54):
close for you it’s far from me but um yeah let’s just let’s just talk let’s just
(00:01:59):
start off talking about your speaker let’s just go over what you’re talking about
(00:02:02):
and then we’ll talk a little bit about uh some other stuff so what are you talking
(00:02:06):
about
(00:02:07):
Right.
(00:02:07):
I’ve got a talk called Kubernetes Native Java,
(00:02:09):
which is a look at how to build better apps using Spring destined for production,
(00:02:16):
where today,
(00:02:16):
as often as not,
(00:02:17):
production is Kubernetes.
(00:02:18):
And so there’s a lot of things that fall out of that, right?
(00:02:21):
You want to be able to take advantage of that dynamic self-service ad hoc production environment.
(00:02:26):
And in order to do that,
(00:02:27):
You need to move quickly.
(00:02:28):
So there’s a lot of things that fall out of that sort of let’s move quickly because
(00:02:33):
we want to improve quickly.
(00:02:34):
If we move stuff to production, it breaks.
(00:02:36):
We iterate based on that.
(00:02:38):
We improve and then redeploy and then over and over again.
(00:02:41):
Right.
(00:02:41):
And so that’s,
(00:02:42):
If that’s the goal,
(00:02:43):
if going quickly to learn to improve quickly is the goal,
(00:02:46):
there’s a lot of patterns that fall out of that.
(00:02:48):
Things like microservices and continuous delivery,
(00:02:50):
continuous integration,
(00:02:51):
cloud computing,
(00:02:52):
test driven development.
(00:02:53):
All these things are part of a larger discussion around agility.
(00:02:56):
And in particular,
(00:02:58):
if you’re trying to go quickly,
(00:03:00):
you want to work with the production platform,
(00:03:01):
Kubernetes.
(00:03:02):
You don’t want to be swimming against the stream, so to speak.
(00:03:05):
So we’re going to talk about things that you can do to better integrate with Kubernetes.
(00:03:11):
interesting i was reading your description a little bit earlier session description
(00:03:15):
talk about you know blistering fast cloud native scalable services so talk to me
(00:03:21):
about blistering fast and scalable well you know we’re at a unique point in uh
(00:03:27):
java’s uh history 27 odd years now um and
(00:03:33):
It’s now,
(00:03:33):
I mean,
(00:03:33):
Java has always been,
(00:03:35):
uh,
(00:03:36):
if you give it a choice between being fast and small,
(00:03:40):
it’s always,
(00:03:41):
always,
(00:03:41):
always,
(00:03:42):
always chosen fast.
(00:03:43):
Right.
(00:03:44):
Uh, and so the JVM is, I know it’s, I cannot believe they give it away.
(00:03:48):
That’s gotta be billions of dollars of R and D that they put in there.
(00:03:50):
I don’t know.
(00:03:51):
Nobody’s ever told me,
(00:03:51):
but I just imagine 27 years,
(00:03:53):
full team of engineers from all around the,
(00:03:55):
and then all these contributions from all these different engineers.
(00:03:58):
all around the open source community as well.
(00:03:59):
It is a miracle of software.
(00:04:02):
Look at the market that it’s created.
(00:04:04):
Oh, yeah.
(00:04:06):
Whole companies with billion-dollar market caps just around serving that particular technology community.
(00:04:12):
It’s a miracle, and I love Java, but it has done this by being as fast as possible.
(00:04:19):
One way it’s done this…
(00:04:21):
is that it has a just-in-time compiler.
(00:04:23):
The just-in-time compiler is embedded in your production code and it takes the
(00:04:28):
successively accessed,
(00:04:30):
frequently accessed code paths,
(00:04:31):
turns it into native images,
(00:04:33):
operating in architecture-specific native code.
(00:04:36):
And the results can actually be that if you write a mediocre Java program,
(00:04:40):
In a lot of cases,
(00:04:40):
it can actually be faster in terms of transactions per second and so on than a
(00:04:45):
well-written C or C++ program written by somebody in those languages,
(00:04:49):
just because the native compiler does the work and the memory management,
(00:04:54):
the garbage collector is able to see all of the memory.
(00:04:58):
Rather than having these
(00:05:00):
little spikes of activity that are so typical of C and C++ applications where you
(00:05:06):
have resource acquisition is initialization where you malloc some memory,
(00:05:10):
do something with it,
(00:05:11):
and then free that memory.
(00:05:13):
That creates little hiccups of memory in those applications.
(00:05:16):
With Java, you’ve got the garbage collector.
(00:05:18):
It’s cleaning the memory off to the side.
(00:05:20):
It’s one big contiguous chunk of memory.
(00:05:22):
You don’t have to worry about it.
(00:05:24):
Older people might remember defrag in Windows.
(00:05:27):
The same thing is true for RAM.
(00:05:28):
Somebody’s got to clean up the RAM.
(00:05:29):
Somebody’s got to keep things in order.
(00:05:32):
Java does all that.
(00:05:33):
Between the native compiler,
(00:05:36):
the just-in-time adaptive compiler,
(00:05:38):
and the memory management,
(00:05:39):
Java can be blazing fast.
(00:05:42):
But it does this by shipping a lot of extra stuff in the runtime footprint of the application.
(00:05:51):
The question then is if the native image compilation,
(00:05:53):
is so useful,
(00:05:55):
and it is,
(00:05:55):
it’s inarguably useful,
(00:05:57):
if it’s so useful,
(00:05:57):
why not proactively compile everything to native code,
(00:06:01):
right?
(00:06:01):
And that’s the core conceit of the GraalVM native image compiler,
(00:06:05):
which is also an Oracle innovation,
(00:06:07):
right?
(00:06:08):
And so yeah, that thing is
(00:06:10):
It’s amazing, and you can do amazing things, and it has another quality, which is it’s also small.
(00:06:16):
Somehow they’ve managed to make things even faster and smaller, right?
(00:06:20):
And so that’s what I’m going to show is how to package applications using GraalVM,
(00:06:25):
using GraalVM native image compilation mechanism to take your extremely fast Java applications,
(00:06:31):
which are already plenty fast,
(00:06:32):
make them plenty fast and small so that they take,
(00:06:35):
you know,
(00:06:35):
a tenth of their regular RAM footprint.
(00:06:38):
interesting well i’m looking forward to your session um sounds interesting before
(00:06:43):
we were chatting a little bit earlier you talking you were saying that you might
(00:06:47):
have uh something to preview is that is that something you can talk about can we
(00:06:51):
break some news here or not yeah also absolutely i mean i’m it’s no secret at the
(00:06:58):
end of this year 2022 uh
(00:07:01):
we’re releasing Spring Boot 3, and that’ll build upon Spring Framework 6.
(00:07:05):
This is a new sea tide change in the Spring ecosystem.
(00:07:10):
Spring Framework 6 is the next generation, new baseline that’ll be here with us for years.
(00:07:16):
I don’t know how long,
(00:07:17):
but if you extrapolate,
(00:07:18):
if you look backwards,
(00:07:19):
the last major release of Spring was Spring Framework 5 in 2017,
(00:07:24):
where we assumed a Java 8 baseline for all the people that are building apps on top
(00:07:27):
of Spring.
(00:07:28):
Now, here we are, 2022.
(00:07:30):
It’ll have been more than five years by the time we release Spring Framework 6.
(00:07:34):
And we’re assuming a Java 17 baseline because Java 17 is awesome.
(00:07:38):
It’s the right thing to do in 2022.
(00:07:41):
So that’s going to be a big change, right?
(00:07:43):
We’re going to have a, you know, there’s a new,
(00:07:46):
baseline revision there.
(00:07:48):
It implies a lot of benefits for the community as well.
(00:07:51):
And that’s going to have also built-in support for a Gravium native image compilation.
(00:07:56):
And then there’s just a bunch of other stuff that,
(00:07:58):
again,
(00:07:58):
around Kubernetes,
(00:07:59):
it’s about taking all these bits that are interesting in and of themselves and then
(00:08:03):
packaging them so that they benefit us in a production environment like Kubernetes.
(00:08:08):
Cool.
(00:08:08):
Cool.
(00:08:08):
All right.
(00:08:09):
Great.
(00:08:09):
Listen, we’ll see.
(00:08:12):
Excellent.
(00:08:12):
Excellent.
(00:08:13):
So talk, talk a little bit about your experiences at Java one.
(00:08:17):
I mean, you,
(00:08:19):
you know you’re you’re very animated about your session and um i would imagine that
(00:08:26):
you know when you do other conferences around the world because there’s some great
(00:08:30):
java conferences around the world you know and and you know the community is truly
(00:08:35):
global and there’s older people that have been around for
(00:08:39):
you know 25 years the whole time and there’s new younger people that are like 20
(00:08:44):
years old you know so yeah uh give me a sense of your experiences around the
(00:08:51):
community so Java one so for okay I work as a developer advocate on the spring team
(00:08:56):
right um before the pandemic when travel was
(00:09:00):
uh you know as big as it’s ever been i was doing 650 000 miles every year right a
(00:09:05):
million kilometers every year on planes i set foot on six of the seven continents
(00:09:10):
and you mentioned by the way how global java is that should be a testament to that
(00:09:14):
uh but i will say nobody’s invited me to antarctica and i don’t know why not you
(00:09:17):
know there’s no job conference that i know of there but we should work on this if
(00:09:21):
you’re listening oracle um but uh yeah i did a million kilometers every year
(00:09:24):
visiting
(00:09:26):
dozens and dozens of countries every year, hundreds of cities every year.
(00:09:30):
I flew more than 0.1% of all pilots and people on the planet basically.
(00:09:38):
And that was all without, everything I did was in terms of Java.
(00:09:43):
I did that all year round.
(00:09:45):
24-7.
(00:09:46):
I was talking to people about Java.
(00:09:48):
It’s not like I did the same conference.
(00:09:51):
It’s not like I was at the same show twice.
(00:09:53):
There was a different show.
(00:09:54):
If I came back to the same city, there’s a different reason to be there.
(00:09:59):
I say that to say that Java truly is this global phenomenon.
(00:10:02):
It’s this incredible, wonderful community, but Java 1, that’s special.
(00:10:06):
It’s
(00:10:09):
That’s the place,
(00:10:10):
that’s where I meet people,
(00:10:12):
where I’ve always met people who then invite me to other places,
(00:10:14):
you know?
(00:10:16):
So I’ve got, you know, I’m a Java champion, so I love seeing all my fellow Java champions at Java 1.
(00:10:22):
That’s usually a big event for me right there.
(00:10:25):
I was in a keynote once at Java 1, I think, and that was a ton of fun.
(00:10:29):
I mean, I just have so many great memories.
(00:10:30):
I’ve made friends,
(00:10:31):
long-lasting friends that I’ve known for more than a decade in some cases,
(00:10:36):
all at Java 1,
(00:10:36):
right?
(00:10:37):
And you talk about…
(00:10:39):
25 years, I’ve been using Java since the 90s.
(00:10:41):
I have close to 25, if not more, years writing Java code.
(00:10:46):
And it’s just this…
(00:10:48):
The fact that I still feel like I don’t know anything,
(00:10:50):
the fact that I’m standing before you now and I feel humbled to have learned all
(00:10:53):
this new stuff.
(00:10:54):
And again,
(00:10:54):
the reason that people can glom onto all this stuff,
(00:10:57):
the reason that they have a way to learn all this stuff is things like Java 1.
(00:11:00):
You go there, it’s the zeitgeist.
(00:11:03):
It’s just incredible…
(00:11:05):
energetic, exciting place to be.
(00:11:07):
But you can’t say that about most languages that are 25 plus years old in age,
(00:11:11):
you know,
(00:11:12):
the fact that there’s still brand new stuff that is paradigm changing every year.
(00:11:16):
What a good time to be alive, you know?
(00:11:18):
Yeah, I had no idea.
(00:11:19):
I joined Sun in 2000, just a few months before Java 1.
(00:11:24):
And I had no clue what I was getting into.
(00:11:27):
I came to Sun in San Francisco from 3Com in Boston,
(00:11:33):
which was,
(00:11:34):
at the time,
(00:11:35):
probably 3Com was probably one-fourth the size of…
(00:11:40):
of Sun and it didn’t have a big developer community and that kind of thing.
(00:11:44):
So I just I just jumped into, you know, and I remember the
(00:11:49):
The keynote, getting into the keynote, the line was snaked around Moscone, you know.
(00:11:54):
And I says, oh, this is, I don’t know what I’m doing here, you know.
(00:11:57):
And so, but it was, I met so many people.
(00:12:00):
I knew nobody.
(00:12:01):
Didn’t know any of the issues or anything like that.
(00:12:04):
But I very quickly sussed out who the cool people were,
(00:12:08):
who were the people that involved in developer communities and open source.
(00:12:13):
And at that time, not a lot of stuff was open source at Sun.
(00:12:17):
But eventually we opened up everything.
(00:12:20):
and um right so yeah no it was just the people around the technology was what i
(00:12:27):
noticed right and it was certain personality a certain just a certain ethic you
(00:12:33):
know was very very cool and uh so you know i just kind of stumbled into this you
(00:12:40):
know in terms of community building kind of stuff
(00:12:44):
at at you know Sun but what about you how how did you get involved I mean to do to
(00:12:50):
scale it up to the level that you just described in terms of going so many
(00:12:53):
conferences around the world working with the community dumb luck I’m by no means
(00:12:59):
qualified I have no idea why I still have a job they they haven’t fired me yet uh
(00:13:03):
in 2010 I was just a pure play engineer which is hard enough I suppose and uh
(00:13:09):
I was contributing to the Spring Integration open source projects and the then
(00:13:16):
project lead,
(00:13:17):
Mark Fisher,
(00:13:18):
lovely but foolish person,
(00:13:21):
offered me a job,
(00:13:22):
which is why I say he’s a fool.
(00:13:24):
And I was like, and he said, we’ve got this new thing called developer advocacy.
(00:13:28):
Would you like to do this job?
(00:13:29):
I was like, what’s that?
(00:13:30):
I can’t do that anymore.
(00:13:32):
Is that like James Ward or Arun Gupta or something?
(00:13:35):
He’s like, nah, that’s not me.
(00:13:36):
I couldn’t do that.
(00:13:37):
And so I walked away.
(00:13:37):
I closed the Skype session.
(00:13:38):
You remember Skype?
(00:13:40):
Yeah.
(00:13:41):
I closed the Skype session and walked away like, silly man.
(00:13:44):
And then I got five minutes away.
(00:13:45):
I almost got to the kitchen to pour a cup of coffee.
(00:13:47):
I’m like, what am I doing?
(00:13:49):
And I ran back and I said, yes, I’ll take it.
(00:13:50):
Of course I’ll take it.
(00:13:51):
I want to work with the spring team.
(00:13:53):
I want to be where that energy is.
(00:13:56):
And it’s been just one heck of a ride since then.
(00:14:00):
I’ve…
(00:14:02):
been able to be a part of the evolution of spring since 2010 officially and
(00:14:06):
unofficially before I was already an author that had written books.
(00:14:08):
I was already talking on the circuit and so on.
(00:14:11):
So to be able to go out there and just,
(00:14:13):
uh,
(00:14:14):
just be a part of it and be the biggest fan to be a witness to all this and,
(00:14:18):
and what a privilege,
(00:14:18):
you know,
(00:14:19):
and then Java of course is the reason for the season Java eight in 2014,
(00:14:22):
uh,
(00:14:24):
huge,
(00:14:24):
you know,
(00:14:25):
a huge change,
(00:14:25):
the energy around the community.
(00:14:26):
And then also in 2014 spring boot,
(00:14:29):
came out.
(00:14:29):
So between these two things,
(00:14:30):
there was just this incredible,
(00:14:32):
wonderful sort of a renaissance,
(00:14:36):
if you will.
(00:14:37):
Just truly an amazing experience.
(00:14:39):
So you mentioned that you were an engineer and then you got this huge opportunity
(00:14:42):
to do developer advocacy.
(00:14:43):
What about before then?
(00:14:45):
Why did you become an engineer?
(00:14:46):
Did you just like software development?
(00:14:48):
Did you just like solving problems?
(00:14:49):
Did you just stumble into that as well?
(00:14:53):
I stumbled into it.
(00:14:54):
I wanted to do…
(00:14:58):
Computer graphics.
(00:15:00):
So many of us start with that fast feedback.
(00:15:02):
Like, I want to see pixels move.
(00:15:04):
I want to see them dance, you know?
(00:15:06):
As soon as you start drawing on the computer,
(00:15:07):
as soon as you start editing photos on the computer,
(00:15:10):
that’s cool,
(00:15:11):
you know?
(00:15:11):
But what if I could automate it?
(00:15:12):
What if I could, you know, integrate it?
(00:15:15):
What if I could do things with it, you know?
(00:15:17):
Make it not just a moment in time, but make it something interactive in some way.
(00:15:20):
And that was the late 90s and, you know, I started learning Java and applets and, you know, it just…
(00:15:28):
It just got better from there.
(00:15:30):
You know,
(00:15:30):
it’s just that I didn’t even know I liked or had a proclivity for engineering and
(00:15:34):
software and all this.
(00:15:36):
But Java made me feel like I could do amazing things with a little bit of effort, you know.
(00:15:42):
So you mentioned that you were sort of, I mean, after all the work you’ve done, you were still humbled.
(00:15:49):
You were still learning.
(00:15:50):
Always.
(00:15:52):
More so than ever.
(00:15:53):
I know.
(00:15:54):
I mean,
(00:15:54):
I certainly realize that,
(00:15:56):
especially in tech,
(00:15:57):
really anywhere in tech,
(00:15:58):
but particularly in software,
(00:15:59):
things obviously change very,
(00:16:00):
very rapidly.
(00:16:01):
But not everybody always expresses it like you did in terms of being humble and always having to learn.
(00:16:07):
This is the reason I got into…
(00:16:08):
know tech is because i’m a lot older you know i got in late and but i always i mean
(00:16:13):
i realized that things change very very rapidly so if you don’t keep up you know
(00:16:18):
there’s in other words it forced there’s always new opportunities for people who
(00:16:22):
embrace that change right jump on the train absolutely there’s always a next stop
(00:16:26):
and just because you started 10 years before i did does mean you know
(00:16:30):
more useful things for software today than i do there’s just no guarantee of that
(00:16:35):
at all and that’s a really interesting distinction between software and some other
(00:16:41):
fields yeah that really is absolutely and and what a wonderful thing too because of
(00:16:47):
course like i i’m gonna you know i’m gonna hate myself for saying this but
(00:16:53):
I hope that people like us who are software engineers and all that, I hope we’re useless.
(00:16:57):
I hope the world looks at us as just people who can read and write in not too far.
(00:17:01):
You know,
(00:17:02):
the fact that this is like a rarefied air or whatever,
(00:17:04):
the fact that we get paid these obscene salaries to write code when,
(00:17:09):
when teachers make a pittance in America,
(00:17:10):
for example,
(00:17:11):
that’s just,
(00:17:12):
it shouldn’t be that way.
(00:17:12):
Right.
(00:17:13):
Software.
(00:17:13):
I think people should be able to read and write and write software, right?
(00:17:16):
Software computers control the world.
(00:17:17):
He or she who controls the computers therefore controls the world.
(00:17:20):
Right.
(00:17:21):
And so I,
(00:17:23):
The more open, the more accessible this stuff gets, the better.
(00:17:25):
Absolutely.
(00:17:26):
And if that means that I take a demotion, great.
(00:17:30):
Cool.
(00:17:33):
Well, all right.
(00:17:34):
I’m looking forward to meeting you live instead of through Zoom.
(00:17:37):
Are we going to make the journey?
(00:17:39):
Yeah, I’ll be there.
(00:17:41):
Sure.
(00:17:41):
Axel Schlepp.
(00:17:43):
You’re in Japan, right?
(00:17:44):
I just saw that they’re opening up just today in the news.
(00:17:48):
Yeah, well, one.
(00:17:49):
Yeah, slowly.
(00:17:51):
It’s slowly.
(00:17:51):
Maybe we’ll see each other twice this year.
(00:17:55):
yeah well i was i was in stockholm for j focus and i was at dev nexus but i don’t i
(00:17:59):
don’t know if we crossed paths um i was not in stockholm but i wasn’t dead nexus
(00:18:03):
boomer okay yeah j focus is i was i went there in 2019 right before yeah fun
(00:18:11):
started and i was just blown away i just it has a certain personality i mean all
(00:18:16):
conferences have great personalities i should say have unique personalities and
(00:18:20):
yeah
(00:18:21):
I mean,
(00:18:22):
if they thrive throughout time and,
(00:18:24):
um,
(00:18:25):
I just thought it had,
(00:18:26):
it was just outrageous sort of a,
(00:18:29):
you know,
(00:18:29):
it was everything’s space and this and that,
(00:18:32):
you know,
(00:18:33):
I just,
(00:18:33):
I just liked it.
(00:18:34):
I just realized it was, it was a good size to about a thousand or so people.
(00:18:38):
It wasn’t, it was manageable, sort of like San Francisco.
(00:18:42):
You can manage the city.
(00:18:43):
It’s small.
(00:18:44):
You can get around, you know?
(00:18:45):
Um, but it’s high quality.
(00:18:49):
Right.
(00:18:49):
So, um,
(00:18:51):
Yeah.
(00:18:52):
I love the idea of, uh, what is it?
(00:18:53):
Pika, right?
(00:18:54):
The stop and smell the coffee.
(00:18:55):
Yeah.
(00:18:56):
You know, that whole coffee break, just, you say Pika and people know, okay, let’s take a break.
(00:19:00):
Let’s go get some coffee.
(00:19:01):
You know, I love Java.
(00:19:03):
I love coffee.
(00:19:03):
It works for me.
(00:19:05):
Cool.
(00:19:05):
All right, Josh, we’ll see you in a couple of months, October 17th in Las Vegas.
(00:19:09):
Talk to you soon.
