Open Liberty Microservices Game Demo
Key Points
- The episode introduces a demo application built with Open Liberty that combines a gesture‑controlled tabletop game with a full microservices backend.
- The project migrated from legacy Java EE to Jakarta EE after the Eclipse Foundation took stewardship, making the stack fully open source.
- Core services—including the game logic, a leaderboard, and a UI—are each deployed as separate Open Liberty microservices, illustrating a modular architecture.
- Using MicroProfile APIs on top of Jakarta EE provides cloud‑native features (such as fault tolerance and health checks) that simplify development and integration of diverse components.
- Operational visibility is achieved with Prometheus for metrics collection and Grafana for real‑time dashboards, showcasing best‑practice observability in a microservices environment.
Sections
- Open Liberty Game Demo - In this segment, host Dan introduces Open Liberty developer Harry Hoots, who explains a gesture‑controlled microservice game built with Jakarta EE and a suite of open‑source technologies.
- Websocket-Controlled Rover Game Architecture - The speaker outlines a system where player gestures are sent via bi‑directional websockets to a game service that routes commands to an Arduino‑powered rover, whose RFID/NFC sensors report damage back through REST APIs to the UI and leaderboard, demonstrating the benefits of separating functionality into microservices.
- Extending IoT with Microservices - The speaker highlights how microservice architecture enhances IoT projects and directs viewers to Open Liberty resources, a Space Rover GitHub repo, and calls for engagement.
Full Transcript
# Open Liberty Microservices Game Demo **Source:** [https://www.youtube.com/watch?v=bURqsxP5gEY](https://www.youtube.com/watch?v=bURqsxP5gEY) **Duration:** 00:07:07 ## Summary - The episode introduces a demo application built with Open Liberty that combines a gesture‑controlled tabletop game with a full microservices backend. - The project migrated from legacy Java EE to Jakarta EE after the Eclipse Foundation took stewardship, making the stack fully open source. - Core services—including the game logic, a leaderboard, and a UI—are each deployed as separate Open Liberty microservices, illustrating a modular architecture. - Using MicroProfile APIs on top of Jakarta EE provides cloud‑native features (such as fault tolerance and health checks) that simplify development and integration of diverse components. - Operational visibility is achieved with Prometheus for metrics collection and Grafana for real‑time dashboards, showcasing best‑practice observability in a microservices environment. ## Sections - [00:00:00](https://www.youtube.com/watch?v=bURqsxP5gEY&t=0s) **Open Liberty Game Demo** - In this segment, host Dan introduces Open Liberty developer Harry Hoots, who explains a gesture‑controlled microservice game built with Jakarta EE and a suite of open‑source technologies. - [00:03:05](https://www.youtube.com/watch?v=bURqsxP5gEY&t=185s) **Websocket-Controlled Rover Game Architecture** - The speaker outlines a system where player gestures are sent via bi‑directional websockets to a game service that routes commands to an Arduino‑powered rover, whose RFID/NFC sensors report damage back through REST APIs to the UI and leaderboard, demonstrating the benefits of separating functionality into microservices. - [00:06:14](https://www.youtube.com/watch?v=bURqsxP5gEY&t=374s) **Extending IoT with Microservices** - The speaker highlights how microservice architecture enhances IoT projects and directs viewers to Open Liberty resources, a Space Rover GitHub repo, and calls for engagement. ## Full Transcript
Welcome to Tech Talk!
Today's topic is Open Liberty.
For those that follow this channel, you may have seen my video on cloud-native Java and
how it helps enterprise developers extend their investment in tools and skills into the future.
Well, today we're joined by Harry Hoots, one of the developers from Open Liberty.
He's going to show us how they implemented a fun demo that knits together lots of technologies
using Open Liberty and a host of other open source projects.
For those who haven't seen the game, the way it works is that you have a play table, which
is with some planets and obstacles.
The players use hand gestures that are detected by a camera to navigate the game board.
They have a fixed amount of time and they have to avoid taking on damage on the way
to a destination planet.
That's the game itself.
This topology diagram shows the different microservices that it uses on the back end,
as well as a web server on the front end.
With that intro out of the way, Harry, can you explain how this Java EE project got started
and what were your goals?
Sure Dan!
One little correction up front though.
So instead of Java EE, it's now Jakarta EE.
Java EE was Oracle's and they gave that over to the Eclipse Foundation around the end of 2017, beginning of 2018.
So now it's controlled by them as an open source project to gives you Java EE functionality.
Well, I've been around a little longer,
so thank you for that historical note.
You're welcome.
All right.
So if you want to know more about the game service.
So, first off, we have the game service itself, which is basically the brainchild behind all this.
We also --and it runs on Open Liberty --we've also got the leaderboard service; again, an
Open Liberty service.
We've got Prometheus and Grafana servers so that we can scrape metrics and display them
on a dashboard.
We also have a front-end UI where the user walks up and types in their name and sees
their score, that kind of thing.
So you divided this into a number of different services and some other components.
Why do you choose to do that?
How did it help you?
Yeah.
So microservices architecture gives you a lot of flexibility.
If you think about your typical IoT or your Java enterprise application, usually there's
a lot of legacy things in there and new things.
And so you want to be able to tie all those together.
Microservices give you that flexibility to take pieces, different architectures, different
languages, different hardware and put all those together.
And so that's why we did it.
We wanted to highlight a MicroProfile-- excuse me --microservices type of project that highlighted
Open Liberty and using MicroProfile and Jakarta EE APIs.
So MicroProfile, you mentioned that a few times [that I mentioned in the prior video--
if you haven't seen it, be sure and check it out].
Where was the payoff there for your team?
Yeah.
So, again, MicroProfile in Jakarta EE give users a bunch of APIs developed for cloud-native
applications --streamlined, that sort of thing.
It takes a lot of the time of programming from the developer and gives them back time
to actually focus on the logic of the game.
And speaking of the game, now that we've got the big picture, could you kind of walk us
through from the user's point of view all the way through these different services.
What's going on?
Sure.
So again, we've got web sockets that are bi-directional servers on the hardware and the game service.
So when a user, for example, indicates a gesture of left, a message is sent to the game service
and then it's routed over to the physical rover.
So on the physical rover, the Arduino board takes that message, parses it, figures out,
"Oh, it's turn left".
And so then it turns the wheels and the appropriate fashion.
And so that loop repeats until the player runs out of time in the game.
And then throughout the gameplay, there is an RFID sensor in the rover and then on the
different planets that you visit are RFID cards.
And then on the obstacles, there's NFC stickers so that damage can be calculated.
And so that information is fed back to the game service and again goes to the UI to see
your score and damage, etc..
And these two, I presume, communicate with each other.
That's correct.
They communicate via REST APIs.
Okay.
And then on this end, same deal?
That's the same thing.
A REST API to the leaderboard service.
So by separating this out from your microservices and Open Liberty components, you were able
to have your web developer focus just on that.
That's right.
So that's the nice thing about microservices.
Typically, you would have an individual person working on a particular service, or a small
team, depending if it's a larger type service.
But, for example, one person worked on the game service and the leaderboard service,
another worked on the UI, another worked on the rover, another worked on the physical
map board that was hardware.
Now, I gather you use Prometheus for pulling statistics and showing some sort of things
that the developer is interested in?
We do.
So Prometheus, the way we have an implemented right now, is it's pulling JVM information
so we can see performance.
We also have a timer there so that we can see latency between the hand gestures and
the hardware.
Well, speaking of latency, I imagine that the whole goal of this was to deploy this
at a conference on a showroom floor.
What did that deployment look like?
Yeah.
So, typically at a conference, WiFi is going to be terrible.
So we usually run it on a local box on-prem.
The beauty of it is though, we've also ran it at conferences in the cloud and you can
mix and match those pieces too if you wanted to.
That's the flexibility of the microservices architecture.
Run a few pieces in the cloud, run a few pieces local.
Just depends on your needs.
That's really the hybrid cloud story, right?
That's correct.
And so, to kind of wrap this up: What was the stack that you used? Because there's an awful lot of components.
Can you kind of summarize what they were and what they did?
Sure. So let's focus on the Open Liberty.
And so what Open Liberty offers is a full open source stack.
So we use OpenJ9 as the JVM. We use IBM Semeru Runtimes as the SDK.
Open Library sits on top of that as our Java runtime server.
And then on top of that, Open Liberty implements the specifications for both Jakarta EE and MicroProfile.
But for the enterprise developers who are out there watching this, they're probably wondering:
How do I take the lessons you learned from this game development and apply it to a business application that they might be doing?
Sure. So, again, it fits really well-- this type of thing for an enterprise application.
This is an IoT implementation, but yet having this microservice architecture and having
different components fits very well there.
Okay. That's a great way of extending it.
That is for now a wrap.
Since you stayed to the end of this video, I bet you want to know more.
So let me point you to a couple of great resources related to cloud-native Java, microservices,
and of course Open Liberty.
First, check out the GitHub repo with the Space Rover mission.
You can check out the source code and see the services that Harry just covered.
And if you're new to Open Liberty, you can get started quickly with their hands-on guides.
They cover how to build your first microservice and then go deeper into cloud-native applications
featuring MicroProfile, Jakarta EE and more.
Be sure to check it out in the links below.
Before you leave, be sure and leave a Like and a Subscribe.
If there are other topics you'd like see on Tech Talk, be sure to also drop a comment below.