Mani Sarkar and Daniel Bryant give a snapshot of what’s going on with OpenJDK. Although it’s been kicking around for over a decade, with the latest disruptive happenings brought about with the advent of containers, OpenJDK remains as relevant as ever. Filmed at Devoxx UK 2015. Read the full transcript below, or check out the video above.
Voxxed: I know we caught up about your work at JavaLand recently, building Java and getting the community involved – what’s the latest update?
Sarkar: So we had a workshop the day before yesterday during the Adopt a JSR and Daniel and I ran the workshop. We showed a synopsis of where we came from, what we did in the past, and what we’re doing now. The previous presentation became an embedded presentation of the current one, and we walked people through the history of things like, in the past we would have stuff like command line stuff, or virtual machine stuff we would give away, and they would build that environment on their local machines and then play with it. But, as time passed by, we learnt better tricks to deliver this OpenJDK environment to the end users so that they can play around with it.
The next thing that we picked up was Vagrant. Vagrant is a provisioning system that allows you to create virtual boxes. The virtual boxes which you used to make by hand are now automatically made and there’s a recipe from a cookbook that we execute, and there’s a standard recipe that everyone executes the same way and it is platform independent, so it works on various platforms, and it actually saves the trouble of creating those system specific things.
Bryant: It’s very DevOps isn’t it Mani? Automatic stuff happening.
Sarkar: Yes it is! So that was something we did – and then, with the new Docker buzz, we’re also Docker.
Voxxed: You can’t have a conference in 2015 without mentioning Docker.
Bryant: We have to mention Conway’s law somewhere too Mani.
Sarkar: Exactly, to make things more interesting for OpenJDK, because I hear sometimes, “Oh OpenJDK is boring,” or it’s a bit old school, and I think it is not. With Docker it’s no longer boring or old school, it’s brand new and shiny.
Bryant: To be fair, the old school nature of its is kind of in the genes. Java is 20 years old, and the build system was state of the art a few years back, but it hasn’t necessarily evolved because it works. But doing the Docker stuff, it adds that element of coolness.
Sarkar: Absolutely, so what we did, the lessons we learnt from the Vagrant systems, what we did with Vagrant and the virtual machines, we applied that on Docker and we have quite a few advantages there. The Docker images are smaller yet faster, and we are now also able to host a lot of things we used to host inside the machine outside the machine, which is fairly important, because people can now use their IDEs to log their source code from outside the machine.
Bryant: That used to be a real pain didn’t it Mani? Because we used to have to have images with IntelliJ or Eclipse or whatever.
Sarkar: Yeah, and now all of that is going to go away.
Voxxed: So when people say it’s disruptive, it really is a disruptive thing to your workflow?
Sarkar: Absolutely. And with Docker now, we can basically do that, plus with Docker, the advantage is that because they’re layered images, the images are much smaller that change. The base images don’t change so much, so they download once, and they only download the changes later on, so it’s not like passing 300GB of data every time, it’s probably a couple of hundred or even less sometimes.
And that’s the world we want to be in – where something else around the OpenJDK environment takes care of provisioning the OpenJDK environment on to your machine so all you end up doing is just work with the OpenJDK environment and not worry about how it’s set up on your machine or how you end up setting up with manual demands and getting it wrong and all that stuff. So in short, we work towards removing all of the pain in setting up the OpenJDK environment.
In the old days, Daniel knows, we used to end up running BASH scripts to do all of this – create the virtual machines…download it…the virtual machines are like six to nine GB, people can’t even download it at home sometimes…But with this system, we’re going to keep it with both Vagrant and Docker available, because some people can’t install Docker…You know, it doesn’t work that well on Windows and Mac…caveats there.
It does work, but there are quite a few issues. We are aware of that. And we can also tweak the Vagrant script so it works quite like Docker, but it will not have the advantages of Docker as we would think. It is quite lightweight thought, so we’re quite happy about that, because now we can focus on the next thing. Which brings us to…Java 9. Modularisation.
Voxxed: And again, this is a big thing that there are issues about breaking code – Mark Reinhold brought this up in his session I think.
Sarkar: Well said – and then for that we have the test outreach program, which is part of the Adopt OpenJDK program. And the purpose of that is to make tools and systems and processes available to end users, and make library writers, framework writers, vendors, and you name it, able to test the early access release of Java 9 way, way before Java 9 is going to be released, and feed that back to the community, to Oracle, to the OpenJDK team, and to the rest of the developers so that we’re aware of the issues there are and can intervene and do a workaround or a fix or something else about it.
Voxxed: So it’s really in your interests at this stage to get involved, if you have this code that’s not going to work with Java 9 – you need to know.
Bryant: The big thing with Java 9, for the people at home who haven’t seen any Java 9 stuff, it’s going towards modularisation with Project Jigsaw, and that’s presented quite a few challenges. Java 8 brought in quite a lot of cool stuff for developers – lambdas, streams, date time API, that kind of stuff – that was all cool for us. The Java 9 stuff is going to open up so many more possibilities in the future, but it’s not really a dev focused change. It’s more under the hood, if that makes sense, breaking the JDK up, which has gone fantastic benefits for the future.
Mark Reinhold’s talk yesterday yesterday was a really good insight into what we can do in the future. But it’s going to break a lot of tools in terms of the RT jar – the runtime jar that everyone’s comfortable with – IDEs, you use them a lot to introspect on what the platform’s got – that’s all going away.
Sarkar: It’s going to be JImages.
Voxxed: That is unusual isn’t it? Because Java is conservative in its movement. People might not even be used to having to think about that with Java.
Bryant: I think that’s true – because Java is so amazing in terms of binary compatibility, backward compatibility, but to change a few things up, Jigsaw is just going to be a paradigm shift. And it’s tempting to think, “Oh Java’s so backwards compatible you’re fine,” but I totally agree. The outreach program is really important.
Sarkar: We are also trying to use Docker to do that, and we’ll have Vagrant version as well, so people can actually take that component. And we’ll have of course instructions and everything to support them with that, and we’ll test it out in the community by giving it to them so that they can plug in the early access JDK 9 – which is probably the one that the OpenJDK team want us to test – and plug their projects into that system and with the press of a couple of buttons, run this.
And basically, they should be able to run that in their cloud environment or Jenkins server or continuous integration server, overnight or whenever and check if their system compiles, builds, runs, all the tests run, and in the runtime, basically have runtimes to see if that doesn’t create any new issues. So if you can go all the way through those five milestones, your JDK is JDK 9 compliant already.
Bryant: And setting up something automated is really good Mani because they you can have regression as well. So as JDK 9 evolves, I think a lot of the work’s been done already, but as the JDK evolves, and as your project evolves, if you set something up in Jenkins or whatever, then you’ve got something repeatable, which we love.
Sarkar: Exactly. The purpose is to come up with an example, show it to them, and also have a skeleton which can be used to create new examples, and they can just take that and apply it to their continuous integration environment and just keep watching how their program behaves. Maybe with a certain version of JDK 9 early access it builds fine and then has been broken, and they can compare the release notes and say, “Hm, what’s changed here?” and all that stuff is possible once we enable and empower the people to do be able to do that. Developers and SysAdmins and you name it.
People have been talking about the breaking changes, but that’s not just it. In our slides we mention that it’s not the end of the world. I’ve also tweeted – someone else had written an article on the Java 9 changes – and I tweeted to him saying actually it’s not the end of the world because we have a test outreach program, do you want to be a part of it?
Bryant: Always looking for recruitment Mani!
Sarkar: Well if he’s the one who’s concerned about it, he can help us solve the problem. And we already have a solution in the making that we can take forward. So basically we need the help from the community to solve this thing. It’s not a one person, or a one company, or a one team type of thing. We can’t expect OpenJDK/Oracle to fix it all.
Voxxed: I think that wraps up nicely to Daniel’s keynote where he said, “There is no I in team.”
Bryant: Right, shared responsibility, exactly.
Sarkar: Team Java is 10 million developers plus, and anyone who’s concerned with Java.