Artwork

เนื้อหาจัดทำโดย Herding Code เนื้อหาพอดแคสต์ทั้งหมด รวมถึงตอน กราฟิก และคำอธิบายพอดแคสต์ได้รับการอัปโหลดและจัดหาให้โดยตรงจาก Herding Code หรือพันธมิตรแพลตฟอร์มพอดแคสต์ของพวกเขา หากคุณเชื่อว่ามีบุคคลอื่นใช้งานที่มีลิขสิทธิ์ของคุณโดยไม่ได้รับอนุญาต คุณสามารถปฏิบัติตามขั้นตอนที่แสดงไว้ที่นี่ https://th.player.fm/legal
Player FM - แอป Podcast
ออฟไลน์ด้วยแอป Player FM !

Herding Code 245 – Catching up on Java dev with Bruno Borges and Mark Heckler

 
แบ่งปัน
 

Manage episode 322963891 series 2512967
เนื้อหาจัดทำโดย Herding Code เนื้อหาพอดแคสต์ทั้งหมด รวมถึงตอน กราฟิก และคำอธิบายพอดแคสต์ได้รับการอัปโหลดและจัดหาให้โดยตรงจาก Herding Code หรือพันธมิตรแพลตฟอร์มพอดแคสต์ของพวกเขา หากคุณเชื่อว่ามีบุคคลอื่นใช้งานที่มีลิขสิทธิ์ของคุณโดยไม่ได้รับอนุญาต คุณสามารถปฏิบัติตามขั้นตอนที่แสดงไว้ที่นี่ https://th.player.fm/legal

Jon talks to Bruno Borges and Mark Heckler about Java development.

https://herdingcode.com/wp-content/uploads/HerdingCode-245-Catching-up-on-Java-dev-with-Bruno-Borges-and-Mark-Heckler.mp3
What? On video now?!?!

Download / Listen: Herding Code 245: Catching up on Java dev with Bruno Borges and Mark Heckler

Links:

Transcript:

[00:00:00] Jon Galloway: Hello and welcome to Herding Code. This episode is being recorded on March 11th, 2022. Today I’m talking to Bruno and Mark, and they’re going to teach me all about Java because I don’t know a thing about it. So welcome folks.

[00:00:22] Bruno Borges: Hey, Hey, Jon, how’s it going? Thanks for having us.

[00:00:26] Jon Galloway: Yeah. And so can you introduce yourselves, tell, tell us tell us your background.

[00:00:30] Bruno Borges: Yeah, I said something, you go first.

[00:00:35] Mark Heckler: Well, hi, I’m Mark Heckler. I’m a Java developer for well, a long time now. Java champion Kotlin developer expert. We won’t talk about that too much today, but but deepen the JVM and, and loving it and still loving it. So, and I, I work, I guess, on, on the, as an aside, I work in developer relations here at

Microsoft engineering cloud advocate for a Java and JVM languages.

[00:01:00] Jon Galloway: Cool. All right. And Bruno.

[00:01:02] Bruno Borges: Yeah, I’m a PM manager at Microsoft. I lead some of the projects on the BM side, like Microsoft to beautiful JDK and Microsoft’s involvement in the Java community. Like our work with the consolidation process. I am also a Java champion. And for those who don’t know, Java champion is a program similar to Microsoft MVP, but for Java developers and yeah, it’s, it’s, it’s been my career for, for a long time too long, I would say.

[00:01:33] Jon Galloway: Okay. Well, let me start off with just when one thing, which is like Microsoft Java, how does that fit together? Like why, why is that a.

[00:01:47] Bruno Borges: Five to 10 years because. Because of cloud computing, right. Developers wants to bring stuff to the cloud and Microsoft became a cloud vendor hosts any kind of application. And that includes Java applications. Right. But it’s also through the history of Microsoft. And I don’t want to go back in time too much because like some experienced Java developers will remind a few things, but in more recent times in the history, Microsoft did a welcome some companies and came up with some solutions that ended up either being developed in Java or using Java based technologies.

So. The big, big data exploded about a decade ago. And in projects like attaching spark and Hadoop that are implemented in Java, ended up being used by every major company, including Microsoft. So, so those systems are in, used in use internally whether it’s Microsoft being service or office or Azure infrastructure to behind the scenes, we see those Java based technologies in use.

I’ve actually cost them more recently. So, so Java and the Java ecosystem and tools are needed for scalable systems. And, and that happens to Microsoft as well. And then Microsoft also welcomed LinkedIn and . And those are technologies that are heavily implemented in Java with thousands of Java developers that now work here in the conflict.

So not only Java is a matter of like, we use the technology, but we also of course offer our tools and services to the customers outside. And the way that they host applications is through Azure at the end of the day.

[00:03:41] Jon Galloway: Okay. Yeah. I was going to say that the big, my main exposure to job over the past several years, thinking about it has been helping my kid with Minecraft, like when she wants to install all the mods and all that kind of stuff. So

[00:03:53] Bruno Borges: Yeah. And the interesting thing is Minecraft today, if you’re playing with Minecraft Java tradition, the binary of Java that that is shipped with Minecraft is actually the binary that we build ourselves, the Microsoft beautiful and it’s players and developers. Are in sync with their release. They will see that monograph is running on Java 16 already, if not 17 on I’m not sure if the 17, but they did two 16 at the end of last year.

So it’s pretty modern, pretty up to date with the Java release history.

[00:04:32] Jon Galloway: Okay. So you mentioned open JDK and what’s kind of the, what’s the ecosystem like now, as far as like who’s developing Java.

[00:04:40] Bruno Borges: Primility who develops. Java is still Oracle. Oracle is the steward of the technology and the platform is the steward of the open JDK. And open JDK is the open source implementation of the Java platform, which enclose the Java language specifications, the JVs pacification, and the Java API. So those three things combined to form the Java platform.

It opens you the key is the open source implementation GPL. But there are lots of contributions. Red hat is a major contributor to the opening, to the key project. IBM Azule systems, bell soft Twitter did some contributions Ali-Baba of Amazon Google in the past. And now Microsoft in, in recent times companies that we imagine like they were, you know, competitors, but still because they saw this technology as a great piece of, of software to do several things at scale, they all got together and said, Hey, let’s, let’s make something.

And the open JDK where it says a true open source project with a very high quality professionals evolved in major companies behind supporting its development.

[00:05:51] Mark Heckler: And if I can interject something here I, everything is in terms of Java kind of builds around and revolves around the Java community process. And that’s not just in names. So you have a lot of, a lot of participants at an individual and corporate and organizational level that kind of come together and help guide, steer, develop specifications and you know, kind of suss out and test out different technologies as they start getting incorporated into Java the specifications. So specifications, I should say. So it’s, it’s very community driven Oracle kind of services that the central point and, and kind of is the force behind continued development. But there are a lot of, a lot of contributors to that entire process start to finish.

[00:06:33] Jon Galloway: Okay. So let me ask, w let me tell you what I did trying to like get up to speed a little bit with Java, and you can tell me what I should have done. Instead. I am Googled around and I, I saw a Microsoft Java get started, whatever, and I went over to the vs docs page and I installed, or excuse me, the vs code page.

And I installed the extension the Java extension pack, and it installed a bunch of extensions. And then I. a new project. Well, first I went on and I downloaded the open JDK just to make sure that it was installed in the newest thing and stuff. And then I also played with J hipster a bit just cause I’m a web developer and it seemed fun and I was pretty impressed with all of it.

I, you know, there’s the usual kind of trying to figure out what is, what is Maven and what is grateful and what is, where’s my Java home pointed and that sort of stuff, but it was pretty smooth. And you know, a couple of hours, what, what do you recommend for people getting started with Java development?

[00:07:35] Mark Heckler: That’s all, I’ll start off with this because that’s something that I feel like, and we’re certainly not alone in this, but I feel like we could do a better job on getting people. That, that kind of, that first experience you, you, you did a lot of good things there. I don’t know that I could necessarily suggest improvements just because there are some rough edges there.

I mean, when, when you’re talking about a build tool, if you’re not within the Java ecosystem, and if you’re not within the Java realm, you’re like, what’s Maven. What’s great. All, you know so you know, vs code with the with a small handful of plugins knocks down, a lot of those mirrors for you if you install the JDK, that would be something that would be kind of awesome.

If we had some kind of like drop this in and everything just works, but there are a couple or three steps that you mentioned I know some folks are very, very fond of rebels and, and J shell and, you know, et cetera. But but ultimately I think it comes down to just finding some good materials that you can kind of get at that gentle introduction, you know, a step at a time.

And it sounds like you’re already there. And if, of course, if you have a frame of reference that you’re going from, like you mentioned J hipster, which by the way, a Julian Dubois, who is well, my manager is the lead of that project. You know, so he’s, he’s a Microsoft in as well and heavily involved with community.

So that’s that’s something that is, if you’re coming from a frame of reference, it should be easier to pick up in that regard, but everybody doesn’t share the same frames of reference. So that’s part of the, I guess, struggle that we’re all trying to help help solve, help make better.

[00:08:58] Bruno Borges: Yeah. Ecosystem can be frightening. After you spend an hour

reading blogs and articles and try to make us some sense out of it because, because it’s a. Diversified equal system. There’s no single technology vendor for any component in the Java ecosystem. Oh, I need, I need the JDK. Right? That’s the basic component you need.

There are seven vendors, right?

[00:09:27] Mark Heckler: maybe more

[00:09:28] Bruno Borges: Or, or, or, or more, oh, I need a, I need an IDE or EDS or, well, there are five options out there. Right. And then I need a framework to build my application. Well, there are probably two. And then finally, okay. I chose, I selected my JDK, my enter, or IDE I have a framework in mind.

I still don’t know what that means, but it has some pity and meta choice, but it’s there. And I see me to build that project, so I need to build. Right. And there are actually more than two Maven in great are the most, most used ones. But is that true? Important too. There is a patchy and Apache Ivy and, and babble or not double, sorry, something like

[00:10:14] Mark Heckler: I’m going to paraphrase. We don’t talk about those

Bruno.

[00:10:17] Bruno Borges: too many, too many. So it can be frightening. But what

Mark said, I think it touch if a person doesn’t know, doesn’t know anything about Java. Just go online search for something that says getting started with Java and something that does not involve building a level of education on the very first step and then get started with that.

Okay. Here’s my first job application. Here’s my first hello board application. And if a developer is already familiar with an IDE or editor, try to see if that’s technology supports Java. And if it does use that once you got a good sense of here’s my hell award application, I’m reading a file. I’m counting lines in the file, or, you know, doing some math, get some sense of the language.

Then next step is okay. I actually want to do a web server. I want to get each to be required to then provide HTP responses. Then there is again, a multitude of frameworks that can do that, because that is ultimately the majority of systems that are built today, but just go and get started with anything and then start learning from there.

And once you pick a framework and you feel like, oh, this is interesting. This is cool. And your criteria was probably, oh, this is the most usable, or this is, has the nicest website. I don’t know, whatever criteria. Right. And try to dive in a little bit on data, want to understand concepts and understand what are the features capabilities.

Cause the reality is most frameworks can do the same thing. Last there’s a lot of overlap of features and, and, and back to what I said before, it can be frightening because yeah. Dot net is awesome because you know, it is opensource, but it’s also coming from a single company, right? There’s no, you don’t how many web frameworks aren’t out there for.net it’s it’s not there, right?

[00:12:13] Jon Galloway: There’s a few, but you’re right?

It’s basically there’s one.

[00:12:16] Bruno Borges: Yeah, exactly. So, so that can help for, for beginners and developers that have to get through that barrier for the Java ecosystem. For sure. So follow Mark’s advice. So if something gets started,

[00:12:30] Mark Heckler: Yeah. And I don’t want to chase this down this rabbit hole too far, but I mean, what are the, I mean, you, you always, what you’re familiar with, you always see the, the pros and you also see the glaring. I hate to say deficiencies, but you can see the gaps. right.

So one of the strengths and weaknesses of Java is exactly what Bruno said.

You, you know, oh, I need a JDK. I need, I need a version of Java. Well, what version and where do I get it? Which one? But you have options. And, and the good news is that means it’s open. I mean, you can, if you want to use the Microsoft, build them up in JDK. If you were using yesterday, if you’re using somebody else’s new swap in this one and it’s like, wow, it just, everything just works, which is amazing.

But when you’re coming at it fresh and you’re new and you’re like, okay, where do I go to get this? Well, pick one. Oh, okay. Which one do I pick? And why? You know, so it it’s, it gets a little weird at times. Bruna mentioning the tons of frameworks and stuff. I mean, we’re not JavaScript, so there’s not a new desert every day and, you know, 22 of them who die the next day, you know, so I guess there’s that.

But but yeah, it’s the same things that make it so flexible in, in many ways, make it a little more imposing for somebody coming into the ecosystem new, but, you know, I mean, like every ecosystem, we have tools that help with a lot of these things. I, I couldn’t live without SDK man, so I can choose between various different SDKs just with, you know, a simple command at the command line.

And then I’m using something else or somebody else’s built or a different version or, or whatever. And it just takes a lot of the pain out of that. But again, if you’re new to the ecosystem, you’re not aware of that. So then you’re manually doing some of the steps that you wouldn’t necessarily have.

[00:14:08] Bruno Borges: Yeah. Mark mentioned the command line tool called SDK man. And it’s one funny enough. It’s one of the many tools that we can use to manage JD case. So, so there are actually important online. So there’s always that meme, right? These 14 standards are bad. We need a new one. Now you have 15 standards. It’s the same thing, the Java ecosystem.

But the, this goes. Well, all the way back to in Java store and Java became open source with with Eva actually, before Jon became open source, because the way the Java was offered by some of Microsystems as a, as a free technology from day one, not necessarily open-source, but free for production allowed developers in the world to build products on top of Java.

And that’s why lots of libraries came to B to B, lots of build tools were got created and frameworks for applications that stuff, applications, lab applications of all kinds, they were bored. So that, that allowed this ecosystem to exist the way it exists today. And it only gets better for whatever definition of battery or you look for.

[00:15:22] Mark Heckler: 15 standards.

[00:15:23] Jon Galloway: Yeah. Yeah. There you go. Yeah. So, so like he came in and that makes me think, like there’s, you

know, Python as virtual environments and, you know, NPM that’s got accommodate, like, is that the idea where you’re setting a, like for this project or this directory I’m using this SDK.

[00:15:42] Bruno Borges: Yes.

[00:15:42] Jon Galloway: Okay,

[00:15:43] Bruno Borges: Yes. That’s the, that’s the idea. I’m not sure if that’s he came in and has that capability right now. I would double-check but there are some other projects that allow the jams is another command line tool that does exactly that. I want to say this folder here. I don’t want to use that command that JDK.

So Jones is a shell snip that configuring your shell, and it will update the JDK based on your current directory automatically. So there is a dear AMS, which is another generic tool for doubt. And you can do the same thing for Java, with your amp and clutter tools.

[00:16:22] Jon Galloway: let me see. So, so then we, you know, we did talk about like there’s Maven and Gretel. Is, is there like a cliff notes for like, is it just pick one or is there a significant difference between them?

[00:16:34] Mark Heckler: my goodness. You don’t want to get in the middle of that.

[00:16:38] Bruno Borges: I want more. I want, I want, so let me get started. Both tools are great. First of all, both tools are great. They will deliver what the developer is looking for. If the developer doesn’t know what they are looking for, but if they do know what they’re looking for, it’s either one or the other. So Maven it starts with convention over configuration. You define your build using XML, and it’s very descriptive of the things that you want to do using the XML specifications of the build file

[00:17:17] Jon Galloway: Was that the pom.xml file that I…

[00:17:20] Bruno Borges: yes, correct. So you can, you can use a variety of plugins that are official plugins maintained in the Apache project or third party plugins maintained by other folks outside the catchy foundation. And then there is great though, which is a default on Android studio. So Android developers that are already coding in Java, and now they want to do a server side application.

I highly recommend that they use a greater for that because you’re already familiarize with the deal tool in greater has some interesting capabilities, like a built cache that builds demon that is running in the back in the background. So your compilation that happens a lot faster when, whenever you’re rebuilding your project.

But great is a little bit different when you, the way you configure your build file, it comes with a programmatic way of doing things. It uses a language called groovy. And with that, you can write code with the instructions of how you’re going to build. So it’s, it’s different. Even know how to use it. You go to the documentation, just copy and paste, make it work and learn along the way.

And for an exit for XML and Maven, it’s more like, yeah, this is the only way of doing it.

[00:18:34] Mark Heckler: yeah. I I’m going to jump in and correct Bruno and it’s some things he got all wrong. No, I’m kidding. No, I’m going to expand on something like what it’s kind of interesting because the, the two approaches are pretty different because Maven is more declarative and in, in the era of, of Yamhill and Kubernetes and, and a much more declarative infrastructure as code type of mindset the Maven mindset fits a lot better in that, because it is, you, you, you literally lay things out in XML, as Bruno said, and it’s just, you’re declaring it.

And then it does the rest. Now, Maven is pretty pretty minimal. It’s the plugins that really do a lot of the work. for a developer is largely irrelevant. You just want to make sure your stuff gets built right. But a great or actually uses either grooving or Kotlin depending on, you know whether you, which script you use, groovy script Kotlin script and, and Greeley, or excuse me, a grade.

As Brenda mentioned programmatic. So it’s a, it’s an execution of a program that if you have a very simple build is very clean, very elegant. If you have a very crazy complex bill, it can, as Bruno also mentioned dramatically, reduce your bill times. But the, as they say, the devil’s in the details, it’s a program.

So there are ways that things it’s hard. It’s easier to get things wrong. It’s easier to mess things up. And, and in many cases hope I’m getting mad at me for saying this, but when, when versions change with, with grateful, several times, you have folks who have issues very quick to be resolved and stuff typically, but with Maven, again, being more declarative and you typically don’t have a lot of those.

So everybody’s got a very strong opinion. It appears either one of the others, you get this really hard partisan fight, but they’re both excellent tools that both enjoy very wide industry support. And you know, they, they just work generally. So.

[00:20:19] Bruno Borges: Yup. Yup. If the development doesn’t like XML using greater, if the

[00:20:24] Jon Galloway: there you

[00:20:25] Bruno Borges: does it block, doesn’t like to write codes to do build, then go back to the XML.

[00:20:31] Mark Heckler: Well, knowing your love of XML, I’m sure that you always use maven, right?

[00:20:38] Jon Galloway: Because. XML is like, you know, considered old and busted whatever. But as you’re talking about the more declarative style of con configuration, now it’s kind of come back around to that. So it’s funny. I’d be surprised if there’s not like some Yammel based configuration way for, you know what I mean? That compiles, that text ML for you or

[00:21:01] Mark Heckler: Oh, Jon, no, that’s a bridge too far.

[00:21:04] Bruno Borges: But I can say that. I can say that unfortunately, there is a product out there called poli holy Gluck maze, which you can use Jamo the finder Palm Todd.

[00:21:20] Mark Heckler: no. Nope. Nope.

[00:21:23] Jon Galloway: So you mentioned Groovy and Kotlin, and I think part of the, the thing that I’ve heard about JVM, that’s interesting. Java, but then you can run multiple different languages on the JVM. And that’s something that, you know, you technically can do in.net, but you don’t see it as much as I’d hope, you know?

But so, but, but like Kotlin and groovy are both like they’re full. Like my understanding is Android development is basically all on Kotlin now. Right. Or

[00:21:54] Bruno Borges: not really. Costly coddling wants to the teams behind the teams at Google and Jack rains that develop Android studio and costly. They’re the reason intent on making clear coddling the default language of Android applications. But there’s also floater and darts

[00:22:16] Jon Galloway: wow.

[00:22:17] Bruno Borges: and other languages. So sort of that intent got fragmented with multiple choices now as well for Android.

Right? So Java remains the primary choice for the majority of Android developers. We can see that just by looking at stack overflow tax for Android. But the, the interesting thing about genre, as you were saying the JPL actually for any developer, who’s documented with the JVM, but is familiar with web assembly these days. It’s the same concept. You’re right. SEM coach. And then your rights, a compiler that translates that into a buys code. And then the JVM interprets the code, just like web assembly. Was invented in 1998 and Weber sander was invented like five years ago, et

[00:23:02] Jon Galloway: yeah.

[00:23:03] Mark Heckler: that’s, that’s all fair. That’s all fair. And that you took that in a different direction than what I was kind of thinking. So I’ll, I’ll concede that to you. However, that that’s it, you did make one misstatement, which is interprets because in, in the original or early stages of, of Java, everything was interpreted, therefore it was slow, but we have now just in time, compilers ahead of time, compilers and things that make it actually very competitive with native code, sometimes faster, sometimes a little slower. We have actually native code compilers now. So Java has and I know that was just kind of you know just a conversational thing, but I want to make sure that we know it is not an interpreted language per se in the same vein as things like Python. Although again, I know exceptions even there, so it gets tough to know about this stuff.

[00:23:48] Bruno Borges: Yeah, we can say, we can say Java code Java. I write some Java code that code can either run in interpreted modes initially, and then getting native compilation with Justin time. Compilation. I had a time, which is native all the way from, from the get go actually not really actually still compiles into byte code and then the byte code compiles offline into native code.

And then you run ahead of time. But those are the models. And for, for a hell of time, there is another project. And then you’re just getting to the rabbit hole of the Java ecosystem and a project called So grow all the Alma is a product from Oracle that combines open JDK with a truffle framework that allows code to be compiled natively.

And even the truffle knocks are not truffle. Truffle is a framework that allows any language to run on. Yes, so they’re all the homies is a virtual machine that is polyglot. The tropical framework allows that, and there is truffles for Ruby, for pricing, for JavaScript. And then there is the native image program that compiles code into native and grow VMs, that feature.

So if I’m a Java developer, I can run Java coding several ways. And it’s really about use case, understanding the scenario, understanding the needs of where this code will run if it’s in the felon or, or on the server on a desktop or on an embedded device, all sorts of targets. It really yeah, it’s confusing. I’m sorry, folks.

[00:25:27] Jon Galloway: So that’s interesting too, because like, you know,

the stigma of Java, it can be that it’s big, slow bloated enterprise, whatever for big servers. But like you’re saying, it runs on small devices, it runs on phones, it’s all sorts of things. So you really do need to have a small, tight battery, efficient, all those sorts of things.

And so yeah, I don’t do you. And so that’s something you basically are right in the same code. And then the compiler is kind of handling that depending on where you’re deploying.

[00:25:59] Bruno Borges: Yeah. I mean, th the way the JVM works, the GVM is this, there is a specification of the JVM on how the JVM needs to behave, but you can actually write a JVM in any language. As long as we implement the instructions as per the specification. And there are JV hours that were developed for different kinds of hardware, of different kinds of resources, embedded devices mainframes AIX, for example, right.

Or Solaris. So also does a hardware gods, a JVM implementation with different, sometimes you’re different, even constructions. W once you write that coach, the Java code, according to the Java language specifications that code wants compiled can run in any JVM that implements the JVM specifications, mapping out to that same version of the Java language specifications.

So that allows them. Jonathan Barbara can write Java code for pretty much any Cod deployed anywhere. Now there’s lots of gotchas and exceptions and you know, maybe this doesn’t exactly work as you think you, but that is a principle and it’s been working quite well since the beginning of the technology.

[00:27:15] Mark Heckler: Yeah.

And just to add onto that a little bit generally, when we talk about Java developers or Java development and, and deployments. So the deployable artifact typically you’re talking about deploying, using a Java virtual machine, a JVM, and that’s where you sometimes get the whole, well it’s. Larger.

It’s a bigger footprint. It’s slower startup because when you start an application, it has to spin up that and warm up that JVM and, and execute the application. It does a bit of you know, again that just-in-time compilation and kicks things off. So that’s kind of the large majority of the use cases.

When you want to build native code. That’s, that’s a, maybe a small subset of all use cases and the reason because Java, well, again, excluding for, for the moment, any mobile and Android you’ve got a large preponderance of job applications, which are enterprise applications. They are robust. They’re, they’re always running they’re out there, you know servicing.

Gazillions of requests every, every minute. And, and, and when it comes to applications like that, whether it takes five seconds to start up or one second to start up, it doesn’t matter. Cause it’s going to be running for days, weeks, whatever, and processing millions and millions of messages and, and your, your big focus is not on the, the four seconds you can save on start-up it’s on throughput and it’s on, you know, making sure that, you know, continues to run well and, and whatnot.

So there are different use cases that necessitate different tools, but generally speaking for that, kind of the vast majority of use cases, you are talking about the standard JVM,

which is fast and garbage collection. It’s fast on response and, and having, you know, high on.

[00:28:50] Jon Galloway: Okay. Yeah. You mentioned garbage collection and that’s something too where people worry about that

for performance. What’s the, is there anything kind of new on like when I follow.net releases, they’re working on things to do like multipass or, you know, to like continue as over the, what is it PGO PA or performance guided optimization or things like that.

Is there, is there new stuff happening or happened recently on garbage collection performance?

[00:29:20] Bruno Borges: Yeah.

[00:29:24] Mark Heckler: No. Well, I was going to hit him that the whole different in terms of different JD Ks, because the community, while I say community in general, but different different builds different approaches to garbage collection can be employed by different different JDK. So if, if you want to have very exceedingly low latency maybe that won’t be necessarily as efficient overall, but it keeps things moving along faster for things like stock trading and things like that.

And you may have others that are a little bit longer pause for a, an overall, slightly higher level of efficiency might make more sense. So you have options in that regard. That that was kind of all, I was going to say, Bruno, if you want to take it from there, but that’s, again, one of the strengths of, of various different,

Builds of JDK, you can, or you can choose which One suits your particular use case.

[00:30:12] Bruno Borges: Yeah. One of the interesting things that,

Actually discussed this recently, the GKN specifications doesn’t say anything about garbage collection. It’s it’s, it’s, it’s, it’s one of the interesting things that people think, oh, this JV, I must have this garbage collector, actually, no, it must run the Java code.

Garbage collection is not part of this specification, which means, which means you can implement a JVM and not collect anything. And not only that, there is actually a garbage collector that red hat Rhodes that does exactly that it’s a garbage collection that doesn’t collect anything. It’s only for, it’s mostly for testing purposes.

But, but, but there are multiple garbage collectors in, in, in, in the Java ecosystem. That’s the reality in the open JDK project itself, there are five or six garbage collectors that you can choose. Open J nine is a different implementation of the Java virtual machine specifications done by IBM and the consolidation.

And also has they have their own garments collection implementation or multiple implementations. Zol systems has a garbage collection called zinc, also a different implementation. And I think that’s, that is technically a commercial product that they licensed to you. But at the end of the day, there are multiple choices in customers and developers do need to understand if they want to go down that path of performance tuning, they have to understand how the garbage collector works about their workload is behaving and work.

Are there requirements in terms of like business needs and SLS to make the right choice in the right tuning for their application? So this takes us back to the question like is Java slow. It can be, if you don’t do the right thing. Right. But he’s going to be super fast once you have those understandings and we can be extremely fast. Okay.

[00:32:13] Jon Galloway: What you mentioned earlier, some of the Microsoft and Azure? support, like what, what is the Azure? Are people running Java workloads like containerized or what, what’s kind of the main the thing that you see people doing

[00:32:28] Bruno Borges: Mark. You want to

[00:32:29] Jon Galloway: is there like a standard kind of, like you mentioned some of these big, you know, like LinkedIn and you know, like large applications, is it pretty standard now to be running those containerized?

[00:32:39] Mark Heckler: I mean, we have different ways you can, can do that. And of course I suppose like Java developers and environments are all different. Use cases, needs desires but you can containerize them. You can deploy from code via in, into containers, VMs. You can run and managed a platform, something like Azure spin cloud.

So you have, you have a lot of different a lot of different ways to get there, I guess, for lack of a better way to put it. And, and everybody seems to, depending on where they are in their, their journey, I hate to put it that way, because it sounds almost like where you are. Isn’t the final end point.

And maybe it is. And there, there are people who are maybe where they want to be and for the next well for the foreseeable future, but that if you are embracing. Moving things to Azure, let’s say, and you have a significant kind of center of gravity in house or in a private cloud, whatever. You’re probably going to try to mirror your existing setup and that may involve VMs and that’s fine.

You know, we fully support that, but we also have the ability to containerize, to to use something like app service. Bruno, what am I missing? I mean, th the, the upshot, I guess, is that we meet you where you are, and we offer options for where you may want to go.

[00:33:48] Bruno Borges: Yeah. Once, once an application is computerized, developers can deploy that container to five services on Azure, actually six, depending, depending on the application. So, so Azure BMS, Azure, Kubernetes service, Azure container apps, Azure app service as a spring cloud five and actually six, because it gets a function designed application.

You can actually also apply to Azure functions. So, so there is a huge interest in containerizing applications. So you have that flexibility wherever you want to put in, take advantage of the services that your business may need. But from the developer standpoint, it’s still just a container and application.

And that gives that flexibility of deployment model. Now. Yeah. Now just putting a job application inside upon painter is sounds simple at its beginning, but it can be, it can be very tricky once you go to production, but I will pause there. What’s up, Mark.

[00:34:56] Mark Heckler: Well, no, I was going to say because both of us have kind of failed to mention that we actually do have partnering agreements with, with companies who offer applications, servers. So we, we fully embrace and support that as a destination for job applications as well. If you’re using something like Javi Jakarta, EE in terms of enterprise Java, obviously if you’re using spring boot applications, it’s a little different or significantly different a story, which is kind of where we’ve spoken to up to now.

But we also support things like Jay bossy, AP WebSphere WebLogic, and things like that. So if you’re coming from that kind of an environment we have a home for that as well.

[00:35:31] Bruno Borges: And I did forget to mention that as a red hat OpenShift, which is another service also for containers. So when, when, so he’s speaking a little bit more about containers and Java and we have documentation coming soon. I don’t know when this blog is going to be, this podcast will be live. If you’re watching this check out documentation or listening to this checkout position, maybe this is already published, but we have documentation about how to containerize job occupations and the things that you should watch out for, especially in terms of memory constraints and CPU constraints that are applied to the computer and how that impacts performance of the JVs

[00:36:09] Jon Galloway: Okay.

[00:36:09] Mark Heckler: using an older version of java, just I’ll leave.

[00:36:14] Bruno Borges: that.

[00:36:14] Mark Heckler: Yeah, I’ll leave that out there. You know, obviously everybody wants to be on the latest, greatest everybody’s should be on the latest greatest, but there are a lot of times constraints that keep folks from, from again, if they, if they’re migrating something that maybe an older, steady, reliable application, it may be still using Java eight, but you know, it’s so, so the considerations are different as you advance because Java is

advancing and getting better and better about that. as you might imagine. So

[00:36:38] Bruno Borges: yes,

[00:36:39] Jon Galloway: You mentioned the application servers, what, what’s the, what’s an application server? What do I need that for?

[00:36:49] Mark Heckler: I do do I, do I.

[00:36:51] Bruno Borges: I can. So I worked, I worked, I worked at work when I was one of the

PMs where WebLogic and application server is actually very much like two parties, but. In a way that only talks to job, it’s not polyglot, right? Well, at least not polygon in terms of language, if it’s a Java JVM based language, like Scala and closure, coffee still works.

But it’s, it’s a Java based runtime,

but an application server has capabilities like deploying multiple applications having a cluster with lots of nodes managing resources, managing. Connections with databases and messaging systems and identity systems, all of that. So that these applications, once they are deployed, they may have access to these resources more easily.

And the application server manages these resources for the applications. It’s not as simple the application managing those resources. And that is what made the application server model very broadly adopted a vacuum today’s because it was very good instill is a very good model for many customers that are not sitting themselves with these needs.

I will have to go Cooper needs. I want to go from painters. Some customers don’t have that. It’s not like a must do you got to have the business needs? So that’s why we have these partnerships with IBM and Oracle to drink this and rent a house to bring this traditional application servers to Azure as a manager.

So they can, you know, lift and shift as, as executives, like to say, Marketing, lift and shift applications to the cloud more easily.

[00:38:37] Mark Heckler: Yeah. I mean, it’s, it’s one mechanism for

deployment, right? So you have people who love it. You have people who hate it, sort of like the Maven and cradle thing, really. But oh, go ahead, Bruno.

[00:38:46] Bruno Borges: Yeah. There’s there’s a new project called dapper that is, is that you’ve developed with microservice and with vapper. If, if your micro service needs to talk to a database, it actually talks to a sidecar off dapper. And then dapper does a communication with a database. That model is what application servers. But but dapper happens to be the sidecar off dapper happens to be a component inside the application server and application server happens to be Kubernetes at the end of the day.

[00:39:22] Jon Galloway: Okay. So you mentioned things like deployment and, you know management of your application part, like I’m thinking of deploying updates and, and specifically this kind of brings to mind for me, like, like a log for J like recently there are a lot of people needing to kind of patch and maintain an update.

What’s what is the I don’t know, like, what is the approach for managing and maintaining and what was the impact for things that you folks saw with like log for J and needing to make, make these updates?

[00:39:58] Bruno Borges: So funny enough, the, the love for Dave issue was so. Basic. It was not even necessarily a security vulnerability per se, not a bug, actually, it wasn’t going to be ability, but it was not a bug. It was actually a feature by design that was being abused by a separate attack. Right. So because of that, it was actually pretty simple to, to update Java applications or even just secure the feature without even updating the library version.

And when it comes to jumping consistent in general, that happens it did happen pretty fast. The resolution of the problem. But now you’re looking at a very long tail of people that are not completely aware and a sonar type of home managers, Megan central, they have a dashboard that shows number of downloads per log for J version and the affect affected versions are being still being the loaded too much.

The number of downloads of insecure log for J versus these two van high.

[00:41:13] Jon Galloway: yeah.

[00:41:14] Mark Heckler: Now I will say this. I, because I’m more from the spring side of the Java ecosystem and spring’s default is logged back. So unless you specifically over write it, do use log for J this was largely a non event so that, you know, obviously we have good partnership and as your spring cloud, and we, you know, we, we’re a great destination for spring applications, and that was almost a non-issue for a good chunk of the job applications that we, we host and manage here because of that.

It just wasn’t. I mean, it’s something everybody was very aware of and, and wanting to make sure that we were all safe and everybody’s happy and all that, but in many cases, it just, wasn’t an issue.

[00:41:51] Jon Galloway: Okay. I wasn’t aware of the Azure spring cloud. That’s pretty cool. I’ve I’ve heard about spring boot generally. Like there’s a dotnet project to implement. Was like interrupt Steph with spring. So I’m, I’m familiar just from that point of view, but I I’ve heard, I hear a lot about spring boot, just kind of in general, is that still pretty active and.

[00:42:13] Mark Heckler: oh, gosh. Yes. I don’t, I don’t want to you know, push too hard on this because obviously lots of choices in the ecosystem, which is a good thing, but a spring boot is wildly poppy, wildly popular, a spring in general, spring technologies, you have a spring data, spring security and a lot of different spring projects.

And over half of all Java developers, enterprise Java developers. Some or many parts of the spring ecosystem. So yeah, it’s, it’s a, it’s rather huge. And, and I, you know, we at Microsoft should be very proud because we work really well with the spring team first with pivotal and then with VMware, when pivotal and VMware came together.

So yeah, we, we offer, you know, Azure spin cloud is something that nobody else can really there’s no parallel outside of outside of our world jointly developed, jointly supported. And, and it’s just kind of that natural home for spring applications. So yeah, it’s kind of a great success story

for both companies and that giant ecosystem that our spring developers and spring applications,

[00:43:14] Jon Galloway: Okay, I’m going in a totally different direction. Way back when I first looked at Java and experience work with Java was actually desktop applications. And that was a thing, you know, early on, it was like, Hey, we’re going to have cross platform desktop. And I haven’t really like, you know, now it’s all, basically you see electron and you know, you don’t see Java, desktop apps.

I randomly, like I did looking in loading plugins and stuff. I saw Java FX listed. What’s kind of the current state of Java for client and desktop application development.

[00:43:53] Mark Heckler: Well, I’ll, I’ll start off on this Bruno and then you can correct me where I go off the rails here. But you know, again, I think everything has shifted to the, well, okay. Not everything many things have shifted to the browser and, and extensions of said construct. But but there are still some things I know Bruno and I both know folks who work with with NASA and, and with a trading company.

Where you have desktop type of applications or desktop applications, I should say in some capacity that it’s very important to have that raw processing power to have the full control over the rendering that you just can’t match. It’s still unless you do a desktop type of application. So Java FX it certainly doesn’t have a massive Market share, but it has a very strong vocal and an important niche that it fills.

[00:44:41] Bruno Borges: Yeah, not only not one Jon offense would swing is to a critical component for Java graphical development. There is, there is a, there is a software commercial software called spine, and it’s a 2d animation editor. And when you look at the interface, you don’t, you don’t tell it’s Java, but it’s actually a Java based application.

When you’re, when you I think I, I’m not sure which bank or financial corporation in Canada has a, they do have a trading. That is written in Java as well. So you go to their website and downloads, it’s a Java app. It comes with the JVM. My exact job edition is used by mediums off gamers into word, and it’s a Java stuff application and actually 3d Java based application.

Just, just to make sure that people are aware of that. And as, as, as Mark said, in the trading in finance industry, in, in, in manufacturing government agencies in general, we do see that number of Java, desktop applications. They just don’t happen to be something that you download for your parents at home or your brothers and sisters in school.

It’s something that employees actually end up using, or researchers in academic academic world end up using NASA has lots of tools internally that are reasoning Java, but you don’t see those published if you ask for because they are internal use. Right? And I can say there is a big movement, even for EMD gamers in indie games that are using a library called L w X JG.

Something like that. It’s a lightweight L w G Alibaba. JGL lightweight rascal library for job. And it’s used for games. There are some games that are published on steam, perhaps for their reason in, in Java with, in combination with that library to use use open GL. So, so there is a Market for graphical Java applications.

There are a great software libraries and tools to do that, but it’s not, it’s not where startups and companies are doing cloud development. I mean, if it’s a cloud development, it’s going to end up in your browser. Right. But, but there is, if the question is, is there, yeah, there is.

[00:47:06] Jon Galloway: Okay. You had mentioned earlier big data and like Apache spark and that sort of thing. And so that’s, that is a big area of Java development, right? That’s including inside of Microsoft.

[00:47:19] Bruno Borges: Yeah. They, there is a big deal for Java because Java is one of the very few runtimes that is super easy to write an application that will come. A huge amount of data and the JVM will manage that data in memory for you. You don’t have to write codes to deal with that. The JPM we’ll deal with that for you.

And actually the garbage collector will deal that for you, Oracle and red hat are working with two little vertical vectors that can handle very massive heap sizes of object allocation in memory. Oracle has one collector called CGC and XE stands for near zero latency near zero pause time of the collection.

And, and they did publish a benchMark recently in Java 17, where CGC running on a machine with a heap size of 128 gigabytes. That’s the amount of memory reserved for all objects allocation. They had paused times of less than one millisecond. So imagine like real time data, big data, and you need your application to not pause, right?

So CGC achieves that red hat has a not a girl toilet go Shenandoah, and it comes with similar capabilities and a near real time float execution. So, so those are impressive numbers. When we think about the business needs of different companies, especially the world of machine learning AI, you need to process that data and, and Java systems end up being a great option because.

You just need to write the codes that will compare the data process, the data, you know, but you don’t have to manage the memory or manage cleanup and all of that, but you would have to write in C plus plus or other languages. And there’s a lot of projects that are already implemented in Java. So you don’t have, you don’t have to rewrite anything as well.

Right? So you just use Cosco, just use Apache Pino and several other projects that have been written quite a while. And they only benefit from newer versions of Java that gaps more performance improvements. So it’s the same code running on a newer version of the JVM with better performance. You don’t have to rewrite the code. You don’t have to recompile the code. You just need to deploy that same code already compiled or that new version of the JVM and you get better performance.

[00:50:06] Jon Galloway: okay. One more question. As we get close to wrapping up here, what’s what’s new with the Java language itself. Is there, is there much going on with that?

[00:50:16] Bruno Borges: Yes, there is in I was talking to Mark before it is. And Mark said who I want to talk about field classes. I don’t think it would seal classes. Please. Go ahead, Mark. Talk about sealed classes.

[00:50:28] Mark Heckler: Well, that wasn’t exactly what I said. Okay. Let me set this up a little bit because in the old days, and, and prior to what I want, I want to say like three years ago now I’d probably a little longer than that now, because time is kind of fluid over the last couple of years, but but in the, in the old days of Java, typically it was several years between releases.

So you had these big dropped releases, which had a lot of, well, potentially had a lot of changes. And then you waited and you waited a long time and the, you had different patches and updates that came out throughout several years. After that

a few years ago, we went to a six month release cycle with Java, which sounds insane when you, when you’re coming from a three, what?

Three to four year Bruno, I I’m going back. Off the top of my head, a release cycle. So six months, that’s crazy. What can you get in there? But, but what it actually has done is allow us to I say us, I mean, it allows the the JVM designers and maintainers to go ahead and drop things in for kind of a preview type of functionality.

So you have long-term supported releases and then you have in-between those every six months you have these kind of interim releases, if you will. So, so Java 17 is now out, but Java 16 was six months before Java 17 rolled out jive. 18 will be six months after that. 18 will not be a long-term supported release, but we’ll have a few new things in there.

And, and it allows you to iterate and get feedback and Kind of hone things before they become production features. So with Java 17, I was telling Bruno that and to be very specific, the big things that I kind of honed in on where the sealed classes and the better pattern matching with in terms of the switch statement.

So, so some of these things when, when they, they hit production, if you will aren’t huge features, but they are huge time savers. They kind of the fact that they’re small, but incredible useful or something that you wind up using over and over and over again versus like the graphics stuff for Mac.

I mean, that, that may be something that it’ll be nice, but it’s not something I will go, wow. That that’s a, that’s an upgradable thing, you know, but something I’ll use every day for every application I write that’s small feature, huge impact. So with seal classes you can define. The ability or it defined a class and a set of child classes.

And that’s it, you can’t extend that any further than what you’ve already defined the ability to do so upfront. And of course better switch statements where you can do pattern matching on that. And, and more it leads to more concise code. It’s, it’s small, it’s compact, but it’s very easily readable in terms of the choices that are available to you when you’re evaluating something.

So those are, I think those are the things that kind of bubbled at the top of my head with Java 17, because I see them having an outsize impact just because there’ll be so commonly used.

[00:53:17] Bruno Borges: All helpful new point and exception. Any experience of a developer will be like a thing saying thank you. Whoever had this idea and wrote

[00:53:28] Mark Heckler: That is true.

[00:53:30] Bruno Borges: you know, when you have a change to calls like a dot B dot C and you call different methods and attributes, and then you’d have so many chains that you don’t, there’s a no point, et cetera, on that line, you don’t know which part of the chain is no. So, so this contribution is actually written by SAP. SAP is a contributor of the open JDK and they also built their own OB JDK binary. And they wrote this feature and upstream to the project. So now, if there is a new pointer exception or a new value in that chain, their message will say, there’s just a part of your statement.

That is actually not. And everybody was like, oh my God just saved my day. Another interesting feature is records of records have been in development for a few releases already, but if it became final GA on Java 17 and it records, you can basically define a POJO of plain old Java object or I’ll record a class that will hold some attributes.

And you don’t have to write gathered SAPs in equals and hashcode and strength. All of that will be generated by the compiler. You just say public record. And then the attributes that you want, strength name and to germ age and that’s it. And everything will be generated by a compiler for you. There is another one.

Interestingly solve text blocks. Multiline texted blocks. I, my very first application was actually to generate some HTML code. And I can tell you that was not pleasant because you have to break down the string and plus signs. Concatenates the strings, every line it’s super annoying. But then it’s actually even bad for database out applications where you have to write SQL queries, right.

And you have to break that down and multiple lines. That’s super annoying. So now you actually have like three quotes and then you write your text and you multiply the daily closing with three quotes and doc is the support. What else we’ve got here? I, I have a cheat sheet that I’m looking at.

[00:55:29] Mark Heckler: In fairness, while you’re looking up, the next thing some of these things have been in previous releases, but this is the first long-term supported release Java 17, which rolls them all up together, which is, so this we’ll have this, we’ll have the higher adoption. This will have the higher impact just because people are working in a large corporate environment or a government or whatever.

They’re not going to go to the six month release cycles in many cases, because they’re going to wait for that LTS release to make that transition. So that the, even though some of

these things have been incorporated in earlier versions, this is the, this is the money release, I guess you’d say so.

[00:56:03] Bruno Borges: Yeah,

[00:56:04] Jon Galloway: Cool.

[00:56:05] Bruno Borges: there are two, I mean, there’s a bunch of KPIs that change. There is a, there’s a left

side job on the neck that shows all the API changes between virtues. And but there, there are two of the jazz everyone’s off is one. There is now an actual HTP client API that is part of the Java platform.

So if you want to call an HTP and flight arrest, endpoint, Java has that API already implemented in India. And the other one, which is funny, it took this long, but now we have a class that helps you format X of decimal to throw max a decimal, but it’s there finally.

[00:56:45] Jon Galloway: Yeah, well, you know, it is nice to see like, you know, going back to what you were mentioning, Mark, but just the, these quality of life things, you know, where it’s like, you just, some, some things like, I’ll see what that man is like, okay. You’re finally out in this while I’m still happy to have it, you know, but

[00:57:04] Mark Heckler: yeah, it’s weird. I always, I always feel weird when I say something that, something that just is really a minor thing, but you’re like, this is, this is amazing. And people are like, are you out of your mind? No, because I can see a bigger impact even though it’s, you know, a small impact. If you multiply that by a million, it’s, it’s huge.

Then, you know as the old joke goes about a million here, a million there, pretty soon, you’re talking real money. I think upon some talking about it like a government budget or something, but, but at the same thing, if you, if you have a very small feature that is immensely useful and it’s everything you write, it just has an outsize impact.

So, so that the other stuff is really cool and really amazing in certain contexts for the people who need it. But

that for almost every application, there are going to be little things that touch all these apps that that’s what I get excited about. So.

[00:57:49] Jon Galloway: Cool. all right. Well, I think we’re at a good spot to wrap up. Is there anything big

that I forgot to ask about or we didn’t talk.

[00:57:56] Bruno Borges: I’m pretty happy. Like this is a great opportunity to share a little bit about the Java ecosystem with you and the folks that listen to you. I made from, from Microsoft, what I can say is Java learns from dot NACHC dot that version of Java. All these programming languages at the end of the day are ways of protecting people, but also tools that enable these people to develop nice things.

And if, if, if ideas here can go there and make everybody happy everybody benefits from, so we’re getting a good, good shape with, you know, the stories of java.net and JavaScript and calculating enclosure in Scala and Ruby and python PHP.

[00:58:39] Jon Galloway: There was a little pause before a PHP, but yeah, you know, like over, over time, it’s like you know, earlier, earlier on in my career, it’s everyone wants to battle it out. And my, my language is the best or whatever. And it’s kind of nice to be at a spot now where it’s, like you said, we learned from each other, there they’re more tools, especially as things are like, you know, containerized or like you can, you can interrupt back and forth.

And so it’s, it’s fine. You know, it’s not strange to have, like, I was working in an application recently and it had Kubernetes going, I had several, you know, Java Docker instances and say, you know, like in.net and they’re just rest calls back and forth and it’s all, you know, we’re all playing nicely together.

[00:59:21] Bruno Borges: yeah, there is another there. Yeah. Well, the time there is a motor in topic, definitely for another podcast under another session, but I feel if we are not in the debate of languages versus languages now, it’s, I think it’s more runtimes versus runtimes and trying to identify ideas. One time is better for DCS case.

Then when time is better for that use case, because language at the end of the day gets compiled to something that will be Tobar dead or natively compiled later. And we saw this weed growth, you know, left sharp and seashell or JavaScript and TypeScript closure in Scala and coddling and Greedo and Java logs of languages.

But the number of wrong times is actually a lot smaller. So I think we should, I think we should consider starting, comparing round times in terms like use cases instead of languages. I think languages is important because you want to develop, you have to light on something. Right. But when, when the application actually goes out, what matters is if the language, or do you run time for the use case?

And there are use cases where all runtimes.

[01:00:29] Jon Galloway: Yeah. Well, I liked the way you say that too, because it’s, it’s not, which is the best it’s which is the best for a use case or which is, you know, and, and, and, you know, you can build anything in any language, you know, it’s just some, you’re going to have a better time or it’s going to run a little faster or whatever, and,

[01:00:47] Bruno Borges: Yep. And, you know, they say, if it’s going to be a routine in JavaScript, it will be written in JavaScript.

[01:01:02] Jon Galloway: there you go. All right, well, that’s, that’s a great place to wrap up. Thank you. Both of you for your time!

  continue reading

10 ตอน

Artwork
iconแบ่งปัน
 
Manage episode 322963891 series 2512967
เนื้อหาจัดทำโดย Herding Code เนื้อหาพอดแคสต์ทั้งหมด รวมถึงตอน กราฟิก และคำอธิบายพอดแคสต์ได้รับการอัปโหลดและจัดหาให้โดยตรงจาก Herding Code หรือพันธมิตรแพลตฟอร์มพอดแคสต์ของพวกเขา หากคุณเชื่อว่ามีบุคคลอื่นใช้งานที่มีลิขสิทธิ์ของคุณโดยไม่ได้รับอนุญาต คุณสามารถปฏิบัติตามขั้นตอนที่แสดงไว้ที่นี่ https://th.player.fm/legal

Jon talks to Bruno Borges and Mark Heckler about Java development.

https://herdingcode.com/wp-content/uploads/HerdingCode-245-Catching-up-on-Java-dev-with-Bruno-Borges-and-Mark-Heckler.mp3
What? On video now?!?!

Download / Listen: Herding Code 245: Catching up on Java dev with Bruno Borges and Mark Heckler

Links:

Transcript:

[00:00:00] Jon Galloway: Hello and welcome to Herding Code. This episode is being recorded on March 11th, 2022. Today I’m talking to Bruno and Mark, and they’re going to teach me all about Java because I don’t know a thing about it. So welcome folks.

[00:00:22] Bruno Borges: Hey, Hey, Jon, how’s it going? Thanks for having us.

[00:00:26] Jon Galloway: Yeah. And so can you introduce yourselves, tell, tell us tell us your background.

[00:00:30] Bruno Borges: Yeah, I said something, you go first.

[00:00:35] Mark Heckler: Well, hi, I’m Mark Heckler. I’m a Java developer for well, a long time now. Java champion Kotlin developer expert. We won’t talk about that too much today, but but deepen the JVM and, and loving it and still loving it. So, and I, I work, I guess, on, on the, as an aside, I work in developer relations here at

Microsoft engineering cloud advocate for a Java and JVM languages.

[00:01:00] Jon Galloway: Cool. All right. And Bruno.

[00:01:02] Bruno Borges: Yeah, I’m a PM manager at Microsoft. I lead some of the projects on the BM side, like Microsoft to beautiful JDK and Microsoft’s involvement in the Java community. Like our work with the consolidation process. I am also a Java champion. And for those who don’t know, Java champion is a program similar to Microsoft MVP, but for Java developers and yeah, it’s, it’s, it’s been my career for, for a long time too long, I would say.

[00:01:33] Jon Galloway: Okay. Well, let me start off with just when one thing, which is like Microsoft Java, how does that fit together? Like why, why is that a.

[00:01:47] Bruno Borges: Five to 10 years because. Because of cloud computing, right. Developers wants to bring stuff to the cloud and Microsoft became a cloud vendor hosts any kind of application. And that includes Java applications. Right. But it’s also through the history of Microsoft. And I don’t want to go back in time too much because like some experienced Java developers will remind a few things, but in more recent times in the history, Microsoft did a welcome some companies and came up with some solutions that ended up either being developed in Java or using Java based technologies.

So. The big, big data exploded about a decade ago. And in projects like attaching spark and Hadoop that are implemented in Java, ended up being used by every major company, including Microsoft. So, so those systems are in, used in use internally whether it’s Microsoft being service or office or Azure infrastructure to behind the scenes, we see those Java based technologies in use.

I’ve actually cost them more recently. So, so Java and the Java ecosystem and tools are needed for scalable systems. And, and that happens to Microsoft as well. And then Microsoft also welcomed LinkedIn and . And those are technologies that are heavily implemented in Java with thousands of Java developers that now work here in the conflict.

So not only Java is a matter of like, we use the technology, but we also of course offer our tools and services to the customers outside. And the way that they host applications is through Azure at the end of the day.

[00:03:41] Jon Galloway: Okay. Yeah. I was going to say that the big, my main exposure to job over the past several years, thinking about it has been helping my kid with Minecraft, like when she wants to install all the mods and all that kind of stuff. So

[00:03:53] Bruno Borges: Yeah. And the interesting thing is Minecraft today, if you’re playing with Minecraft Java tradition, the binary of Java that that is shipped with Minecraft is actually the binary that we build ourselves, the Microsoft beautiful and it’s players and developers. Are in sync with their release. They will see that monograph is running on Java 16 already, if not 17 on I’m not sure if the 17, but they did two 16 at the end of last year.

So it’s pretty modern, pretty up to date with the Java release history.

[00:04:32] Jon Galloway: Okay. So you mentioned open JDK and what’s kind of the, what’s the ecosystem like now, as far as like who’s developing Java.

[00:04:40] Bruno Borges: Primility who develops. Java is still Oracle. Oracle is the steward of the technology and the platform is the steward of the open JDK. And open JDK is the open source implementation of the Java platform, which enclose the Java language specifications, the JVs pacification, and the Java API. So those three things combined to form the Java platform.

It opens you the key is the open source implementation GPL. But there are lots of contributions. Red hat is a major contributor to the opening, to the key project. IBM Azule systems, bell soft Twitter did some contributions Ali-Baba of Amazon Google in the past. And now Microsoft in, in recent times companies that we imagine like they were, you know, competitors, but still because they saw this technology as a great piece of, of software to do several things at scale, they all got together and said, Hey, let’s, let’s make something.

And the open JDK where it says a true open source project with a very high quality professionals evolved in major companies behind supporting its development.

[00:05:51] Mark Heckler: And if I can interject something here I, everything is in terms of Java kind of builds around and revolves around the Java community process. And that’s not just in names. So you have a lot of, a lot of participants at an individual and corporate and organizational level that kind of come together and help guide, steer, develop specifications and you know, kind of suss out and test out different technologies as they start getting incorporated into Java the specifications. So specifications, I should say. So it’s, it’s very community driven Oracle kind of services that the central point and, and kind of is the force behind continued development. But there are a lot of, a lot of contributors to that entire process start to finish.

[00:06:33] Jon Galloway: Okay. So let me ask, w let me tell you what I did trying to like get up to speed a little bit with Java, and you can tell me what I should have done. Instead. I am Googled around and I, I saw a Microsoft Java get started, whatever, and I went over to the vs docs page and I installed, or excuse me, the vs code page.

And I installed the extension the Java extension pack, and it installed a bunch of extensions. And then I. a new project. Well, first I went on and I downloaded the open JDK just to make sure that it was installed in the newest thing and stuff. And then I also played with J hipster a bit just cause I’m a web developer and it seemed fun and I was pretty impressed with all of it.

I, you know, there’s the usual kind of trying to figure out what is, what is Maven and what is grateful and what is, where’s my Java home pointed and that sort of stuff, but it was pretty smooth. And you know, a couple of hours, what, what do you recommend for people getting started with Java development?

[00:07:35] Mark Heckler: That’s all, I’ll start off with this because that’s something that I feel like, and we’re certainly not alone in this, but I feel like we could do a better job on getting people. That, that kind of, that first experience you, you, you did a lot of good things there. I don’t know that I could necessarily suggest improvements just because there are some rough edges there.

I mean, when, when you’re talking about a build tool, if you’re not within the Java ecosystem, and if you’re not within the Java realm, you’re like, what’s Maven. What’s great. All, you know so you know, vs code with the with a small handful of plugins knocks down, a lot of those mirrors for you if you install the JDK, that would be something that would be kind of awesome.

If we had some kind of like drop this in and everything just works, but there are a couple or three steps that you mentioned I know some folks are very, very fond of rebels and, and J shell and, you know, et cetera. But but ultimately I think it comes down to just finding some good materials that you can kind of get at that gentle introduction, you know, a step at a time.

And it sounds like you’re already there. And if, of course, if you have a frame of reference that you’re going from, like you mentioned J hipster, which by the way, a Julian Dubois, who is well, my manager is the lead of that project. You know, so he’s, he’s a Microsoft in as well and heavily involved with community.

So that’s that’s something that is, if you’re coming from a frame of reference, it should be easier to pick up in that regard, but everybody doesn’t share the same frames of reference. So that’s part of the, I guess, struggle that we’re all trying to help help solve, help make better.

[00:08:58] Bruno Borges: Yeah. Ecosystem can be frightening. After you spend an hour

reading blogs and articles and try to make us some sense out of it because, because it’s a. Diversified equal system. There’s no single technology vendor for any component in the Java ecosystem. Oh, I need, I need the JDK. Right? That’s the basic component you need.

There are seven vendors, right?

[00:09:27] Mark Heckler: maybe more

[00:09:28] Bruno Borges: Or, or, or, or more, oh, I need a, I need an IDE or EDS or, well, there are five options out there. Right. And then I need a framework to build my application. Well, there are probably two. And then finally, okay. I chose, I selected my JDK, my enter, or IDE I have a framework in mind.

I still don’t know what that means, but it has some pity and meta choice, but it’s there. And I see me to build that project, so I need to build. Right. And there are actually more than two Maven in great are the most, most used ones. But is that true? Important too. There is a patchy and Apache Ivy and, and babble or not double, sorry, something like

[00:10:14] Mark Heckler: I’m going to paraphrase. We don’t talk about those

Bruno.

[00:10:17] Bruno Borges: too many, too many. So it can be frightening. But what

Mark said, I think it touch if a person doesn’t know, doesn’t know anything about Java. Just go online search for something that says getting started with Java and something that does not involve building a level of education on the very first step and then get started with that.

Okay. Here’s my first job application. Here’s my first hello board application. And if a developer is already familiar with an IDE or editor, try to see if that’s technology supports Java. And if it does use that once you got a good sense of here’s my hell award application, I’m reading a file. I’m counting lines in the file, or, you know, doing some math, get some sense of the language.

Then next step is okay. I actually want to do a web server. I want to get each to be required to then provide HTP responses. Then there is again, a multitude of frameworks that can do that, because that is ultimately the majority of systems that are built today, but just go and get started with anything and then start learning from there.

And once you pick a framework and you feel like, oh, this is interesting. This is cool. And your criteria was probably, oh, this is the most usable, or this is, has the nicest website. I don’t know, whatever criteria. Right. And try to dive in a little bit on data, want to understand concepts and understand what are the features capabilities.

Cause the reality is most frameworks can do the same thing. Last there’s a lot of overlap of features and, and, and back to what I said before, it can be frightening because yeah. Dot net is awesome because you know, it is opensource, but it’s also coming from a single company, right? There’s no, you don’t how many web frameworks aren’t out there for.net it’s it’s not there, right?

[00:12:13] Jon Galloway: There’s a few, but you’re right?

It’s basically there’s one.

[00:12:16] Bruno Borges: Yeah, exactly. So, so that can help for, for beginners and developers that have to get through that barrier for the Java ecosystem. For sure. So follow Mark’s advice. So if something gets started,

[00:12:30] Mark Heckler: Yeah. And I don’t want to chase this down this rabbit hole too far, but I mean, what are the, I mean, you, you always, what you’re familiar with, you always see the, the pros and you also see the glaring. I hate to say deficiencies, but you can see the gaps. right.

So one of the strengths and weaknesses of Java is exactly what Bruno said.

You, you know, oh, I need a JDK. I need, I need a version of Java. Well, what version and where do I get it? Which one? But you have options. And, and the good news is that means it’s open. I mean, you can, if you want to use the Microsoft, build them up in JDK. If you were using yesterday, if you’re using somebody else’s new swap in this one and it’s like, wow, it just, everything just works, which is amazing.

But when you’re coming at it fresh and you’re new and you’re like, okay, where do I go to get this? Well, pick one. Oh, okay. Which one do I pick? And why? You know, so it it’s, it gets a little weird at times. Bruna mentioning the tons of frameworks and stuff. I mean, we’re not JavaScript, so there’s not a new desert every day and, you know, 22 of them who die the next day, you know, so I guess there’s that.

But but yeah, it’s the same things that make it so flexible in, in many ways, make it a little more imposing for somebody coming into the ecosystem new, but, you know, I mean, like every ecosystem, we have tools that help with a lot of these things. I, I couldn’t live without SDK man, so I can choose between various different SDKs just with, you know, a simple command at the command line.

And then I’m using something else or somebody else’s built or a different version or, or whatever. And it just takes a lot of the pain out of that. But again, if you’re new to the ecosystem, you’re not aware of that. So then you’re manually doing some of the steps that you wouldn’t necessarily have.

[00:14:08] Bruno Borges: Yeah. Mark mentioned the command line tool called SDK man. And it’s one funny enough. It’s one of the many tools that we can use to manage JD case. So, so there are actually important online. So there’s always that meme, right? These 14 standards are bad. We need a new one. Now you have 15 standards. It’s the same thing, the Java ecosystem.

But the, this goes. Well, all the way back to in Java store and Java became open source with with Eva actually, before Jon became open source, because the way the Java was offered by some of Microsystems as a, as a free technology from day one, not necessarily open-source, but free for production allowed developers in the world to build products on top of Java.

And that’s why lots of libraries came to B to B, lots of build tools were got created and frameworks for applications that stuff, applications, lab applications of all kinds, they were bored. So that, that allowed this ecosystem to exist the way it exists today. And it only gets better for whatever definition of battery or you look for.

[00:15:22] Mark Heckler: 15 standards.

[00:15:23] Jon Galloway: Yeah. Yeah. There you go. Yeah. So, so like he came in and that makes me think, like there’s, you

know, Python as virtual environments and, you know, NPM that’s got accommodate, like, is that the idea where you’re setting a, like for this project or this directory I’m using this SDK.

[00:15:42] Bruno Borges: Yes.

[00:15:42] Jon Galloway: Okay,

[00:15:43] Bruno Borges: Yes. That’s the, that’s the idea. I’m not sure if that’s he came in and has that capability right now. I would double-check but there are some other projects that allow the jams is another command line tool that does exactly that. I want to say this folder here. I don’t want to use that command that JDK.

So Jones is a shell snip that configuring your shell, and it will update the JDK based on your current directory automatically. So there is a dear AMS, which is another generic tool for doubt. And you can do the same thing for Java, with your amp and clutter tools.

[00:16:22] Jon Galloway: let me see. So, so then we, you know, we did talk about like there’s Maven and Gretel. Is, is there like a cliff notes for like, is it just pick one or is there a significant difference between them?

[00:16:34] Mark Heckler: my goodness. You don’t want to get in the middle of that.

[00:16:38] Bruno Borges: I want more. I want, I want, so let me get started. Both tools are great. First of all, both tools are great. They will deliver what the developer is looking for. If the developer doesn’t know what they are looking for, but if they do know what they’re looking for, it’s either one or the other. So Maven it starts with convention over configuration. You define your build using XML, and it’s very descriptive of the things that you want to do using the XML specifications of the build file

[00:17:17] Jon Galloway: Was that the pom.xml file that I…

[00:17:20] Bruno Borges: yes, correct. So you can, you can use a variety of plugins that are official plugins maintained in the Apache project or third party plugins maintained by other folks outside the catchy foundation. And then there is great though, which is a default on Android studio. So Android developers that are already coding in Java, and now they want to do a server side application.

I highly recommend that they use a greater for that because you’re already familiarize with the deal tool in greater has some interesting capabilities, like a built cache that builds demon that is running in the back in the background. So your compilation that happens a lot faster when, whenever you’re rebuilding your project.

But great is a little bit different when you, the way you configure your build file, it comes with a programmatic way of doing things. It uses a language called groovy. And with that, you can write code with the instructions of how you’re going to build. So it’s, it’s different. Even know how to use it. You go to the documentation, just copy and paste, make it work and learn along the way.

And for an exit for XML and Maven, it’s more like, yeah, this is the only way of doing it.

[00:18:34] Mark Heckler: yeah. I I’m going to jump in and correct Bruno and it’s some things he got all wrong. No, I’m kidding. No, I’m going to expand on something like what it’s kind of interesting because the, the two approaches are pretty different because Maven is more declarative and in, in the era of, of Yamhill and Kubernetes and, and a much more declarative infrastructure as code type of mindset the Maven mindset fits a lot better in that, because it is, you, you, you literally lay things out in XML, as Bruno said, and it’s just, you’re declaring it.

And then it does the rest. Now, Maven is pretty pretty minimal. It’s the plugins that really do a lot of the work. for a developer is largely irrelevant. You just want to make sure your stuff gets built right. But a great or actually uses either grooving or Kotlin depending on, you know whether you, which script you use, groovy script Kotlin script and, and Greeley, or excuse me, a grade.

As Brenda mentioned programmatic. So it’s a, it’s an execution of a program that if you have a very simple build is very clean, very elegant. If you have a very crazy complex bill, it can, as Bruno also mentioned dramatically, reduce your bill times. But the, as they say, the devil’s in the details, it’s a program.

So there are ways that things it’s hard. It’s easier to get things wrong. It’s easier to mess things up. And, and in many cases hope I’m getting mad at me for saying this, but when, when versions change with, with grateful, several times, you have folks who have issues very quick to be resolved and stuff typically, but with Maven, again, being more declarative and you typically don’t have a lot of those.

So everybody’s got a very strong opinion. It appears either one of the others, you get this really hard partisan fight, but they’re both excellent tools that both enjoy very wide industry support. And you know, they, they just work generally. So.

[00:20:19] Bruno Borges: Yup. Yup. If the development doesn’t like XML using greater, if the

[00:20:24] Jon Galloway: there you

[00:20:25] Bruno Borges: does it block, doesn’t like to write codes to do build, then go back to the XML.

[00:20:31] Mark Heckler: Well, knowing your love of XML, I’m sure that you always use maven, right?

[00:20:38] Jon Galloway: Because. XML is like, you know, considered old and busted whatever. But as you’re talking about the more declarative style of con configuration, now it’s kind of come back around to that. So it’s funny. I’d be surprised if there’s not like some Yammel based configuration way for, you know what I mean? That compiles, that text ML for you or

[00:21:01] Mark Heckler: Oh, Jon, no, that’s a bridge too far.

[00:21:04] Bruno Borges: But I can say that. I can say that unfortunately, there is a product out there called poli holy Gluck maze, which you can use Jamo the finder Palm Todd.

[00:21:20] Mark Heckler: no. Nope. Nope.

[00:21:23] Jon Galloway: So you mentioned Groovy and Kotlin, and I think part of the, the thing that I’ve heard about JVM, that’s interesting. Java, but then you can run multiple different languages on the JVM. And that’s something that, you know, you technically can do in.net, but you don’t see it as much as I’d hope, you know?

But so, but, but like Kotlin and groovy are both like they’re full. Like my understanding is Android development is basically all on Kotlin now. Right. Or

[00:21:54] Bruno Borges: not really. Costly coddling wants to the teams behind the teams at Google and Jack rains that develop Android studio and costly. They’re the reason intent on making clear coddling the default language of Android applications. But there’s also floater and darts

[00:22:16] Jon Galloway: wow.

[00:22:17] Bruno Borges: and other languages. So sort of that intent got fragmented with multiple choices now as well for Android.

Right? So Java remains the primary choice for the majority of Android developers. We can see that just by looking at stack overflow tax for Android. But the, the interesting thing about genre, as you were saying the JPL actually for any developer, who’s documented with the JVM, but is familiar with web assembly these days. It’s the same concept. You’re right. SEM coach. And then your rights, a compiler that translates that into a buys code. And then the JVM interprets the code, just like web assembly. Was invented in 1998 and Weber sander was invented like five years ago, et

[00:23:02] Jon Galloway: yeah.

[00:23:03] Mark Heckler: that’s, that’s all fair. That’s all fair. And that you took that in a different direction than what I was kind of thinking. So I’ll, I’ll concede that to you. However, that that’s it, you did make one misstatement, which is interprets because in, in the original or early stages of, of Java, everything was interpreted, therefore it was slow, but we have now just in time, compilers ahead of time, compilers and things that make it actually very competitive with native code, sometimes faster, sometimes a little slower. We have actually native code compilers now. So Java has and I know that was just kind of you know just a conversational thing, but I want to make sure that we know it is not an interpreted language per se in the same vein as things like Python. Although again, I know exceptions even there, so it gets tough to know about this stuff.

[00:23:48] Bruno Borges: Yeah, we can say, we can say Java code Java. I write some Java code that code can either run in interpreted modes initially, and then getting native compilation with Justin time. Compilation. I had a time, which is native all the way from, from the get go actually not really actually still compiles into byte code and then the byte code compiles offline into native code.

And then you run ahead of time. But those are the models. And for, for a hell of time, there is another project. And then you’re just getting to the rabbit hole of the Java ecosystem and a project called So grow all the Alma is a product from Oracle that combines open JDK with a truffle framework that allows code to be compiled natively.

And even the truffle knocks are not truffle. Truffle is a framework that allows any language to run on. Yes, so they’re all the homies is a virtual machine that is polyglot. The tropical framework allows that, and there is truffles for Ruby, for pricing, for JavaScript. And then there is the native image program that compiles code into native and grow VMs, that feature.

So if I’m a Java developer, I can run Java coding several ways. And it’s really about use case, understanding the scenario, understanding the needs of where this code will run if it’s in the felon or, or on the server on a desktop or on an embedded device, all sorts of targets. It really yeah, it’s confusing. I’m sorry, folks.

[00:25:27] Jon Galloway: So that’s interesting too, because like, you know,

the stigma of Java, it can be that it’s big, slow bloated enterprise, whatever for big servers. But like you’re saying, it runs on small devices, it runs on phones, it’s all sorts of things. So you really do need to have a small, tight battery, efficient, all those sorts of things.

And so yeah, I don’t do you. And so that’s something you basically are right in the same code. And then the compiler is kind of handling that depending on where you’re deploying.

[00:25:59] Bruno Borges: Yeah. I mean, th the way the JVM works, the GVM is this, there is a specification of the JVM on how the JVM needs to behave, but you can actually write a JVM in any language. As long as we implement the instructions as per the specification. And there are JV hours that were developed for different kinds of hardware, of different kinds of resources, embedded devices mainframes AIX, for example, right.

Or Solaris. So also does a hardware gods, a JVM implementation with different, sometimes you’re different, even constructions. W once you write that coach, the Java code, according to the Java language specifications that code wants compiled can run in any JVM that implements the JVM specifications, mapping out to that same version of the Java language specifications.

So that allows them. Jonathan Barbara can write Java code for pretty much any Cod deployed anywhere. Now there’s lots of gotchas and exceptions and you know, maybe this doesn’t exactly work as you think you, but that is a principle and it’s been working quite well since the beginning of the technology.

[00:27:15] Mark Heckler: Yeah.

And just to add onto that a little bit generally, when we talk about Java developers or Java development and, and deployments. So the deployable artifact typically you’re talking about deploying, using a Java virtual machine, a JVM, and that’s where you sometimes get the whole, well it’s. Larger.

It’s a bigger footprint. It’s slower startup because when you start an application, it has to spin up that and warm up that JVM and, and execute the application. It does a bit of you know, again that just-in-time compilation and kicks things off. So that’s kind of the large majority of the use cases.

When you want to build native code. That’s, that’s a, maybe a small subset of all use cases and the reason because Java, well, again, excluding for, for the moment, any mobile and Android you’ve got a large preponderance of job applications, which are enterprise applications. They are robust. They’re, they’re always running they’re out there, you know servicing.

Gazillions of requests every, every minute. And, and, and when it comes to applications like that, whether it takes five seconds to start up or one second to start up, it doesn’t matter. Cause it’s going to be running for days, weeks, whatever, and processing millions and millions of messages and, and your, your big focus is not on the, the four seconds you can save on start-up it’s on throughput and it’s on, you know, making sure that, you know, continues to run well and, and whatnot.

So there are different use cases that necessitate different tools, but generally speaking for that, kind of the vast majority of use cases, you are talking about the standard JVM,

which is fast and garbage collection. It’s fast on response and, and having, you know, high on.

[00:28:50] Jon Galloway: Okay. Yeah. You mentioned garbage collection and that’s something too where people worry about that

for performance. What’s the, is there anything kind of new on like when I follow.net releases, they’re working on things to do like multipass or, you know, to like continue as over the, what is it PGO PA or performance guided optimization or things like that.

Is there, is there new stuff happening or happened recently on garbage collection performance?

[00:29:20] Bruno Borges: Yeah.

[00:29:24] Mark Heckler: No. Well, I was going to hit him that the whole different in terms of different JD Ks, because the community, while I say community in general, but different different builds different approaches to garbage collection can be employed by different different JDK. So if, if you want to have very exceedingly low latency maybe that won’t be necessarily as efficient overall, but it keeps things moving along faster for things like stock trading and things like that.

And you may have others that are a little bit longer pause for a, an overall, slightly higher level of efficiency might make more sense. So you have options in that regard. That that was kind of all, I was going to say, Bruno, if you want to take it from there, but that’s, again, one of the strengths of, of various different,

Builds of JDK, you can, or you can choose which One suits your particular use case.

[00:30:12] Bruno Borges: Yeah. One of the interesting things that,

Actually discussed this recently, the GKN specifications doesn’t say anything about garbage collection. It’s it’s, it’s, it’s, it’s one of the interesting things that people think, oh, this JV, I must have this garbage collector, actually, no, it must run the Java code.

Garbage collection is not part of this specification, which means, which means you can implement a JVM and not collect anything. And not only that, there is actually a garbage collector that red hat Rhodes that does exactly that it’s a garbage collection that doesn’t collect anything. It’s only for, it’s mostly for testing purposes.

But, but, but there are multiple garbage collectors in, in, in, in the Java ecosystem. That’s the reality in the open JDK project itself, there are five or six garbage collectors that you can choose. Open J nine is a different implementation of the Java virtual machine specifications done by IBM and the consolidation.

And also has they have their own garments collection implementation or multiple implementations. Zol systems has a garbage collection called zinc, also a different implementation. And I think that’s, that is technically a commercial product that they licensed to you. But at the end of the day, there are multiple choices in customers and developers do need to understand if they want to go down that path of performance tuning, they have to understand how the garbage collector works about their workload is behaving and work.

Are there requirements in terms of like business needs and SLS to make the right choice in the right tuning for their application? So this takes us back to the question like is Java slow. It can be, if you don’t do the right thing. Right. But he’s going to be super fast once you have those understandings and we can be extremely fast. Okay.

[00:32:13] Jon Galloway: What you mentioned earlier, some of the Microsoft and Azure? support, like what, what is the Azure? Are people running Java workloads like containerized or what, what’s kind of the main the thing that you see people doing

[00:32:28] Bruno Borges: Mark. You want to

[00:32:29] Jon Galloway: is there like a standard kind of, like you mentioned some of these big, you know, like LinkedIn and you know, like large applications, is it pretty standard now to be running those containerized?

[00:32:39] Mark Heckler: I mean, we have different ways you can, can do that. And of course I suppose like Java developers and environments are all different. Use cases, needs desires but you can containerize them. You can deploy from code via in, into containers, VMs. You can run and managed a platform, something like Azure spin cloud.

So you have, you have a lot of different a lot of different ways to get there, I guess, for lack of a better way to put it. And, and everybody seems to, depending on where they are in their, their journey, I hate to put it that way, because it sounds almost like where you are. Isn’t the final end point.

And maybe it is. And there, there are people who are maybe where they want to be and for the next well for the foreseeable future, but that if you are embracing. Moving things to Azure, let’s say, and you have a significant kind of center of gravity in house or in a private cloud, whatever. You’re probably going to try to mirror your existing setup and that may involve VMs and that’s fine.

You know, we fully support that, but we also have the ability to containerize, to to use something like app service. Bruno, what am I missing? I mean, th the, the upshot, I guess, is that we meet you where you are, and we offer options for where you may want to go.

[00:33:48] Bruno Borges: Yeah. Once, once an application is computerized, developers can deploy that container to five services on Azure, actually six, depending, depending on the application. So, so Azure BMS, Azure, Kubernetes service, Azure container apps, Azure app service as a spring cloud five and actually six, because it gets a function designed application.

You can actually also apply to Azure functions. So, so there is a huge interest in containerizing applications. So you have that flexibility wherever you want to put in, take advantage of the services that your business may need. But from the developer standpoint, it’s still just a container and application.

And that gives that flexibility of deployment model. Now. Yeah. Now just putting a job application inside upon painter is sounds simple at its beginning, but it can be, it can be very tricky once you go to production, but I will pause there. What’s up, Mark.

[00:34:56] Mark Heckler: Well, no, I was going to say because both of us have kind of failed to mention that we actually do have partnering agreements with, with companies who offer applications, servers. So we, we fully embrace and support that as a destination for job applications as well. If you’re using something like Javi Jakarta, EE in terms of enterprise Java, obviously if you’re using spring boot applications, it’s a little different or significantly different a story, which is kind of where we’ve spoken to up to now.

But we also support things like Jay bossy, AP WebSphere WebLogic, and things like that. So if you’re coming from that kind of an environment we have a home for that as well.

[00:35:31] Bruno Borges: And I did forget to mention that as a red hat OpenShift, which is another service also for containers. So when, when, so he’s speaking a little bit more about containers and Java and we have documentation coming soon. I don’t know when this blog is going to be, this podcast will be live. If you’re watching this check out documentation or listening to this checkout position, maybe this is already published, but we have documentation about how to containerize job occupations and the things that you should watch out for, especially in terms of memory constraints and CPU constraints that are applied to the computer and how that impacts performance of the JVs

[00:36:09] Jon Galloway: Okay.

[00:36:09] Mark Heckler: using an older version of java, just I’ll leave.

[00:36:14] Bruno Borges: that.

[00:36:14] Mark Heckler: Yeah, I’ll leave that out there. You know, obviously everybody wants to be on the latest, greatest everybody’s should be on the latest greatest, but there are a lot of times constraints that keep folks from, from again, if they, if they’re migrating something that maybe an older, steady, reliable application, it may be still using Java eight, but you know, it’s so, so the considerations are different as you advance because Java is

advancing and getting better and better about that. as you might imagine. So

[00:36:38] Bruno Borges: yes,

[00:36:39] Jon Galloway: You mentioned the application servers, what, what’s the, what’s an application server? What do I need that for?

[00:36:49] Mark Heckler: I do do I, do I.

[00:36:51] Bruno Borges: I can. So I worked, I worked, I worked at work when I was one of the

PMs where WebLogic and application server is actually very much like two parties, but. In a way that only talks to job, it’s not polyglot, right? Well, at least not polygon in terms of language, if it’s a Java JVM based language, like Scala and closure, coffee still works.

But it’s, it’s a Java based runtime,

but an application server has capabilities like deploying multiple applications having a cluster with lots of nodes managing resources, managing. Connections with databases and messaging systems and identity systems, all of that. So that these applications, once they are deployed, they may have access to these resources more easily.

And the application server manages these resources for the applications. It’s not as simple the application managing those resources. And that is what made the application server model very broadly adopted a vacuum today’s because it was very good instill is a very good model for many customers that are not sitting themselves with these needs.

I will have to go Cooper needs. I want to go from painters. Some customers don’t have that. It’s not like a must do you got to have the business needs? So that’s why we have these partnerships with IBM and Oracle to drink this and rent a house to bring this traditional application servers to Azure as a manager.

So they can, you know, lift and shift as, as executives, like to say, Marketing, lift and shift applications to the cloud more easily.

[00:38:37] Mark Heckler: Yeah. I mean, it’s, it’s one mechanism for

deployment, right? So you have people who love it. You have people who hate it, sort of like the Maven and cradle thing, really. But oh, go ahead, Bruno.

[00:38:46] Bruno Borges: Yeah. There’s there’s a new project called dapper that is, is that you’ve developed with microservice and with vapper. If, if your micro service needs to talk to a database, it actually talks to a sidecar off dapper. And then dapper does a communication with a database. That model is what application servers. But but dapper happens to be the sidecar off dapper happens to be a component inside the application server and application server happens to be Kubernetes at the end of the day.

[00:39:22] Jon Galloway: Okay. So you mentioned things like deployment and, you know management of your application part, like I’m thinking of deploying updates and, and specifically this kind of brings to mind for me, like, like a log for J like recently there are a lot of people needing to kind of patch and maintain an update.

What’s what is the I don’t know, like, what is the approach for managing and maintaining and what was the impact for things that you folks saw with like log for J and needing to make, make these updates?

[00:39:58] Bruno Borges: So funny enough, the, the love for Dave issue was so. Basic. It was not even necessarily a security vulnerability per se, not a bug, actually, it wasn’t going to be ability, but it was not a bug. It was actually a feature by design that was being abused by a separate attack. Right. So because of that, it was actually pretty simple to, to update Java applications or even just secure the feature without even updating the library version.

And when it comes to jumping consistent in general, that happens it did happen pretty fast. The resolution of the problem. But now you’re looking at a very long tail of people that are not completely aware and a sonar type of home managers, Megan central, they have a dashboard that shows number of downloads per log for J version and the affect affected versions are being still being the loaded too much.

The number of downloads of insecure log for J versus these two van high.

[00:41:13] Jon Galloway: yeah.

[00:41:14] Mark Heckler: Now I will say this. I, because I’m more from the spring side of the Java ecosystem and spring’s default is logged back. So unless you specifically over write it, do use log for J this was largely a non event so that, you know, obviously we have good partnership and as your spring cloud, and we, you know, we, we’re a great destination for spring applications, and that was almost a non-issue for a good chunk of the job applications that we, we host and manage here because of that.

It just wasn’t. I mean, it’s something everybody was very aware of and, and wanting to make sure that we were all safe and everybody’s happy and all that, but in many cases, it just, wasn’t an issue.

[00:41:51] Jon Galloway: Okay. I wasn’t aware of the Azure spring cloud. That’s pretty cool. I’ve I’ve heard about spring boot generally. Like there’s a dotnet project to implement. Was like interrupt Steph with spring. So I’m, I’m familiar just from that point of view, but I I’ve heard, I hear a lot about spring boot, just kind of in general, is that still pretty active and.

[00:42:13] Mark Heckler: oh, gosh. Yes. I don’t, I don’t want to you know, push too hard on this because obviously lots of choices in the ecosystem, which is a good thing, but a spring boot is wildly poppy, wildly popular, a spring in general, spring technologies, you have a spring data, spring security and a lot of different spring projects.

And over half of all Java developers, enterprise Java developers. Some or many parts of the spring ecosystem. So yeah, it’s, it’s a, it’s rather huge. And, and I, you know, we at Microsoft should be very proud because we work really well with the spring team first with pivotal and then with VMware, when pivotal and VMware came together.

So yeah, we, we offer, you know, Azure spin cloud is something that nobody else can really there’s no parallel outside of outside of our world jointly developed, jointly supported. And, and it’s just kind of that natural home for spring applications. So yeah, it’s kind of a great success story

for both companies and that giant ecosystem that our spring developers and spring applications,

[00:43:14] Jon Galloway: Okay, I’m going in a totally different direction. Way back when I first looked at Java and experience work with Java was actually desktop applications. And that was a thing, you know, early on, it was like, Hey, we’re going to have cross platform desktop. And I haven’t really like, you know, now it’s all, basically you see electron and you know, you don’t see Java, desktop apps.

I randomly, like I did looking in loading plugins and stuff. I saw Java FX listed. What’s kind of the current state of Java for client and desktop application development.

[00:43:53] Mark Heckler: Well, I’ll, I’ll start off on this Bruno and then you can correct me where I go off the rails here. But you know, again, I think everything has shifted to the, well, okay. Not everything many things have shifted to the browser and, and extensions of said construct. But but there are still some things I know Bruno and I both know folks who work with with NASA and, and with a trading company.

Where you have desktop type of applications or desktop applications, I should say in some capacity that it’s very important to have that raw processing power to have the full control over the rendering that you just can’t match. It’s still unless you do a desktop type of application. So Java FX it certainly doesn’t have a massive Market share, but it has a very strong vocal and an important niche that it fills.

[00:44:41] Bruno Borges: Yeah, not only not one Jon offense would swing is to a critical component for Java graphical development. There is, there is a, there is a software commercial software called spine, and it’s a 2d animation editor. And when you look at the interface, you don’t, you don’t tell it’s Java, but it’s actually a Java based application.

When you’re, when you I think I, I’m not sure which bank or financial corporation in Canada has a, they do have a trading. That is written in Java as well. So you go to their website and downloads, it’s a Java app. It comes with the JVM. My exact job edition is used by mediums off gamers into word, and it’s a Java stuff application and actually 3d Java based application.

Just, just to make sure that people are aware of that. And as, as, as Mark said, in the trading in finance industry, in, in, in manufacturing government agencies in general, we do see that number of Java, desktop applications. They just don’t happen to be something that you download for your parents at home or your brothers and sisters in school.

It’s something that employees actually end up using, or researchers in academic academic world end up using NASA has lots of tools internally that are reasoning Java, but you don’t see those published if you ask for because they are internal use. Right? And I can say there is a big movement, even for EMD gamers in indie games that are using a library called L w X JG.

Something like that. It’s a lightweight L w G Alibaba. JGL lightweight rascal library for job. And it’s used for games. There are some games that are published on steam, perhaps for their reason in, in Java with, in combination with that library to use use open GL. So, so there is a Market for graphical Java applications.

There are a great software libraries and tools to do that, but it’s not, it’s not where startups and companies are doing cloud development. I mean, if it’s a cloud development, it’s going to end up in your browser. Right. But, but there is, if the question is, is there, yeah, there is.

[00:47:06] Jon Galloway: Okay. You had mentioned earlier big data and like Apache spark and that sort of thing. And so that’s, that is a big area of Java development, right? That’s including inside of Microsoft.

[00:47:19] Bruno Borges: Yeah. They, there is a big deal for Java because Java is one of the very few runtimes that is super easy to write an application that will come. A huge amount of data and the JVM will manage that data in memory for you. You don’t have to write codes to deal with that. The JPM we’ll deal with that for you.

And actually the garbage collector will deal that for you, Oracle and red hat are working with two little vertical vectors that can handle very massive heap sizes of object allocation in memory. Oracle has one collector called CGC and XE stands for near zero latency near zero pause time of the collection.

And, and they did publish a benchMark recently in Java 17, where CGC running on a machine with a heap size of 128 gigabytes. That’s the amount of memory reserved for all objects allocation. They had paused times of less than one millisecond. So imagine like real time data, big data, and you need your application to not pause, right?

So CGC achieves that red hat has a not a girl toilet go Shenandoah, and it comes with similar capabilities and a near real time float execution. So, so those are impressive numbers. When we think about the business needs of different companies, especially the world of machine learning AI, you need to process that data and, and Java systems end up being a great option because.

You just need to write the codes that will compare the data process, the data, you know, but you don’t have to manage the memory or manage cleanup and all of that, but you would have to write in C plus plus or other languages. And there’s a lot of projects that are already implemented in Java. So you don’t have, you don’t have to rewrite anything as well.

Right? So you just use Cosco, just use Apache Pino and several other projects that have been written quite a while. And they only benefit from newer versions of Java that gaps more performance improvements. So it’s the same code running on a newer version of the JVM with better performance. You don’t have to rewrite the code. You don’t have to recompile the code. You just need to deploy that same code already compiled or that new version of the JVM and you get better performance.

[00:50:06] Jon Galloway: okay. One more question. As we get close to wrapping up here, what’s what’s new with the Java language itself. Is there, is there much going on with that?

[00:50:16] Bruno Borges: Yes, there is in I was talking to Mark before it is. And Mark said who I want to talk about field classes. I don’t think it would seal classes. Please. Go ahead, Mark. Talk about sealed classes.

[00:50:28] Mark Heckler: Well, that wasn’t exactly what I said. Okay. Let me set this up a little bit because in the old days, and, and prior to what I want, I want to say like three years ago now I’d probably a little longer than that now, because time is kind of fluid over the last couple of years, but but in the, in the old days of Java, typically it was several years between releases.

So you had these big dropped releases, which had a lot of, well, potentially had a lot of changes. And then you waited and you waited a long time and the, you had different patches and updates that came out throughout several years. After that

a few years ago, we went to a six month release cycle with Java, which sounds insane when you, when you’re coming from a three, what?

Three to four year Bruno, I I’m going back. Off the top of my head, a release cycle. So six months, that’s crazy. What can you get in there? But, but what it actually has done is allow us to I say us, I mean, it allows the the JVM designers and maintainers to go ahead and drop things in for kind of a preview type of functionality.

So you have long-term supported releases and then you have in-between those every six months you have these kind of interim releases, if you will. So, so Java 17 is now out, but Java 16 was six months before Java 17 rolled out jive. 18 will be six months after that. 18 will not be a long-term supported release, but we’ll have a few new things in there.

And, and it allows you to iterate and get feedback and Kind of hone things before they become production features. So with Java 17, I was telling Bruno that and to be very specific, the big things that I kind of honed in on where the sealed classes and the better pattern matching with in terms of the switch statement.

So, so some of these things when, when they, they hit production, if you will aren’t huge features, but they are huge time savers. They kind of the fact that they’re small, but incredible useful or something that you wind up using over and over and over again versus like the graphics stuff for Mac.

I mean, that, that may be something that it’ll be nice, but it’s not something I will go, wow. That that’s a, that’s an upgradable thing, you know, but something I’ll use every day for every application I write that’s small feature, huge impact. So with seal classes you can define. The ability or it defined a class and a set of child classes.

And that’s it, you can’t extend that any further than what you’ve already defined the ability to do so upfront. And of course better switch statements where you can do pattern matching on that. And, and more it leads to more concise code. It’s, it’s small, it’s compact, but it’s very easily readable in terms of the choices that are available to you when you’re evaluating something.

So those are, I think those are the things that kind of bubbled at the top of my head with Java 17, because I see them having an outsize impact just because there’ll be so commonly used.

[00:53:17] Bruno Borges: All helpful new point and exception. Any experience of a developer will be like a thing saying thank you. Whoever had this idea and wrote

[00:53:28] Mark Heckler: That is true.

[00:53:30] Bruno Borges: you know, when you have a change to calls like a dot B dot C and you call different methods and attributes, and then you’d have so many chains that you don’t, there’s a no point, et cetera, on that line, you don’t know which part of the chain is no. So, so this contribution is actually written by SAP. SAP is a contributor of the open JDK and they also built their own OB JDK binary. And they wrote this feature and upstream to the project. So now, if there is a new pointer exception or a new value in that chain, their message will say, there’s just a part of your statement.

That is actually not. And everybody was like, oh my God just saved my day. Another interesting feature is records of records have been in development for a few releases already, but if it became final GA on Java 17 and it records, you can basically define a POJO of plain old Java object or I’ll record a class that will hold some attributes.

And you don’t have to write gathered SAPs in equals and hashcode and strength. All of that will be generated by the compiler. You just say public record. And then the attributes that you want, strength name and to germ age and that’s it. And everything will be generated by a compiler for you. There is another one.

Interestingly solve text blocks. Multiline texted blocks. I, my very first application was actually to generate some HTML code. And I can tell you that was not pleasant because you have to break down the string and plus signs. Concatenates the strings, every line it’s super annoying. But then it’s actually even bad for database out applications where you have to write SQL queries, right.

And you have to break that down and multiple lines. That’s super annoying. So now you actually have like three quotes and then you write your text and you multiply the daily closing with three quotes and doc is the support. What else we’ve got here? I, I have a cheat sheet that I’m looking at.

[00:55:29] Mark Heckler: In fairness, while you’re looking up, the next thing some of these things have been in previous releases, but this is the first long-term supported release Java 17, which rolls them all up together, which is, so this we’ll have this, we’ll have the higher adoption. This will have the higher impact just because people are working in a large corporate environment or a government or whatever.

They’re not going to go to the six month release cycles in many cases, because they’re going to wait for that LTS release to make that transition. So that the, even though some of

these things have been incorporated in earlier versions, this is the, this is the money release, I guess you’d say so.

[00:56:03] Bruno Borges: Yeah,

[00:56:04] Jon Galloway: Cool.

[00:56:05] Bruno Borges: there are two, I mean, there’s a bunch of KPIs that change. There is a, there’s a left

side job on the neck that shows all the API changes between virtues. And but there, there are two of the jazz everyone’s off is one. There is now an actual HTP client API that is part of the Java platform.

So if you want to call an HTP and flight arrest, endpoint, Java has that API already implemented in India. And the other one, which is funny, it took this long, but now we have a class that helps you format X of decimal to throw max a decimal, but it’s there finally.

[00:56:45] Jon Galloway: Yeah, well, you know, it is nice to see like, you know, going back to what you were mentioning, Mark, but just the, these quality of life things, you know, where it’s like, you just, some, some things like, I’ll see what that man is like, okay. You’re finally out in this while I’m still happy to have it, you know, but

[00:57:04] Mark Heckler: yeah, it’s weird. I always, I always feel weird when I say something that, something that just is really a minor thing, but you’re like, this is, this is amazing. And people are like, are you out of your mind? No, because I can see a bigger impact even though it’s, you know, a small impact. If you multiply that by a million, it’s, it’s huge.

Then, you know as the old joke goes about a million here, a million there, pretty soon, you’re talking real money. I think upon some talking about it like a government budget or something, but, but at the same thing, if you, if you have a very small feature that is immensely useful and it’s everything you write, it just has an outsize impact.

So, so that the other stuff is really cool and really amazing in certain contexts for the people who need it. But

that for almost every application, there are going to be little things that touch all these apps that that’s what I get excited about. So.

[00:57:49] Jon Galloway: Cool. all right. Well, I think we’re at a good spot to wrap up. Is there anything big

that I forgot to ask about or we didn’t talk.

[00:57:56] Bruno Borges: I’m pretty happy. Like this is a great opportunity to share a little bit about the Java ecosystem with you and the folks that listen to you. I made from, from Microsoft, what I can say is Java learns from dot NACHC dot that version of Java. All these programming languages at the end of the day are ways of protecting people, but also tools that enable these people to develop nice things.

And if, if, if ideas here can go there and make everybody happy everybody benefits from, so we’re getting a good, good shape with, you know, the stories of java.net and JavaScript and calculating enclosure in Scala and Ruby and python PHP.

[00:58:39] Jon Galloway: There was a little pause before a PHP, but yeah, you know, like over, over time, it’s like you know, earlier, earlier on in my career, it’s everyone wants to battle it out. And my, my language is the best or whatever. And it’s kind of nice to be at a spot now where it’s, like you said, we learned from each other, there they’re more tools, especially as things are like, you know, containerized or like you can, you can interrupt back and forth.

And so it’s, it’s fine. You know, it’s not strange to have, like, I was working in an application recently and it had Kubernetes going, I had several, you know, Java Docker instances and say, you know, like in.net and they’re just rest calls back and forth and it’s all, you know, we’re all playing nicely together.

[00:59:21] Bruno Borges: yeah, there is another there. Yeah. Well, the time there is a motor in topic, definitely for another podcast under another session, but I feel if we are not in the debate of languages versus languages now, it’s, I think it’s more runtimes versus runtimes and trying to identify ideas. One time is better for DCS case.

Then when time is better for that use case, because language at the end of the day gets compiled to something that will be Tobar dead or natively compiled later. And we saw this weed growth, you know, left sharp and seashell or JavaScript and TypeScript closure in Scala and coddling and Greedo and Java logs of languages.

But the number of wrong times is actually a lot smaller. So I think we should, I think we should consider starting, comparing round times in terms like use cases instead of languages. I think languages is important because you want to develop, you have to light on something. Right. But when, when the application actually goes out, what matters is if the language, or do you run time for the use case?

And there are use cases where all runtimes.

[01:00:29] Jon Galloway: Yeah. Well, I liked the way you say that too, because it’s, it’s not, which is the best it’s which is the best for a use case or which is, you know, and, and, and, you know, you can build anything in any language, you know, it’s just some, you’re going to have a better time or it’s going to run a little faster or whatever, and,

[01:00:47] Bruno Borges: Yep. And, you know, they say, if it’s going to be a routine in JavaScript, it will be written in JavaScript.

[01:01:02] Jon Galloway: there you go. All right, well, that’s, that’s a great place to wrap up. Thank you. Both of you for your time!

  continue reading

10 ตอน

ทุกตอน

×
 
Loading …

ขอต้อนรับสู่ Player FM!

Player FM กำลังหาเว็บ

 

คู่มืออ้างอิงด่วน