3. 3
Quiz
You’ve been deploying Java applications for years and want to move to
a cloud-native approach. Do you?
a. Decide cloud-native is so different you should throw out everything you
know and have done and start over again.
b. Decide cloud-native is just a “storm-in-a-teacup” and hunker down till the
clouds have passed.
c. Understand how modern Java runtimes let you re-use and extend what
you have in order to create new cloud-native applications.
5. What ‘Cloud’
promises
a virtual, dynamic environment
which maximizes use, is infinitely
scalable, always available and
needs minimal upfront
investment or commitment
Take your code – host it on someone else's
machine and pay only for the resource you
use for the time you use it
AND be able to do that very quickly and
repeatedly in parallel
7. Cloud computing:
compute == money
Money changes everything
With a measurable and direct relationship
between $£€¥ and CPU/RAM, disk etc the
financial success or failure of a project is
even easier to see
And that means…
Even more focus on value for money.
20. 20
Quiz
Is Cloud so different that the JVM is no longer relevant?
a. Yes - lets move everything to Node.js.
b. Maybe – even re-tuning the JVM isn’t going to cut it.
c. No – Not all JVMs are the same…
25. 25
Java ME requirements
Small footprint
–On disk and runtime.
–Very limited RAM, usually more ROM
Fast startup
–Everybody wants their games to start quickly
Quick / immediate rampup
–Your game should not play better the longer you play
26. 26
Java in the Cloud requirements
Small footprint
–Improves density for providers
–Improves cost for applications
Fast startup
–Faster scaling for increased demand
Quick / immediate rampup
–GB/hr is key, if you run for less time you pay less money
27. 27
Results
Hotspot OpenJ9 OpenJ9 -Xshareclasses -
Xquickstart
Hotspot OpenJ9 OpenJ9 -Xshareclasses -Xquickstart
Startup time is 30% faster with OpenJ9 –Xshareclasses -Xquickstart
28. 28
Results
Footprint is 60% smaller with OpenJ9
Hotspot OpenJ9 OpenJ9 -Xshareclasses -
Xquickstart
Hotspot OpenJ9 OpenJ9 -Xshareclasses -Xquickstart
33. Eclipse
Open J9
Designed from the start to span all the
operating systems needed by IBM products
This JVM can go from small to large
Can handle constrained environments or
memory rich ones
Is used by the largest enterprises on the
planet
If any JVM can be said to be at the heart of
the enterprise – its this one.
@spoole167
36. 36
Quiz
Cloud-Native Java. Are we done then?
a. Yes - nothing to see. Move along.
b. Not really – still need to re-architect my application
c. No – actually Cloud-Native introduces some new challenges
61. 61
Quiz
A team wants to use your service and has asked you to document it.
Do you?
a. See it as an opportunity to try out that Asciidoc thing you heard about at a
conference.
b. Suggest they fire a few REST requests at it. With an infinite number of
monkeys, they’ll get there eventually.
c. Use the OpenAPI Java support because it documents your API with little to
no effort.
62. 62
Quiz
You’re deploying microservices that depend on other teams’ services
and have noticed occasional errors from them which cause your
service to fail. Do you?
a. Blame the other team every time your service fails. They need to sort their
act out!
b. Hold firm, you trust that they’ll fix all the problems eventually then
everything will be fine.
c. Take responsibility for gracefully coping with instabilities in the services
you depend on.
d. a & c
63. 63
Quiz
You’re about to be the proud owner of a live production microservice.
You like your weekends and want to minimize the time spent resolving
issues. Do you?
a. Decide it’s a no-op due to encapsulation. The great thing about
microservices is you never need to know what’s going on inside.
b. Write everything to stdout. Factor XI of 12factor.net tells you that’s all you
need to do.
c. Instrument your service for health and metrics and use open tracing to
track request flows.
68. 68
Making the most of Docker
O/S
JVM
Libs/Server
Application
O/S
JVM
Application
thin war/jar fat jar
Libs/Server
69. 69
Being ready for cloud-native Java
• Open standards-based with wide
open source vendor support?
• JVM Optimized for the cloud
• Application framework designed
for cloud-native Microservices
70. 70
Final Quiz – Are you ready for cloud-native Java?
You’re boss asks you to recommend an open technology stack for
developing and deploying cloud-native microservice applications. Do
you?
a. Recommend Eclipse OpenJ9 to optimise your runtime characteristics and
costs for the cloud
b. Recommend Eclipse MicroProfile to add resilience, monitorability, security,
and more, in a vendor neutral way
c. Recommend a right-sizable runtime with broad open spec support (e.g.
Open Liberty :D ) to optimize your deployments for the cloud
d. All of the above.
Make a big deal about the license
Very open, very easy for anyone and everyone to contribute.
Operating at the Eclipse Foundation means operating under a set of rules that ensures the project is open, accessible to all, and not controlled by any single company.
This is one of the first projects under the EPLv2 which is really cool
Additionally, EPLv2 has secondary licenses that make it compatible with the GPL
Mention this is a JVM
Are you aware of AdoptOpenJDK?
London JUG created
“No one competes on build farms” – common infrastructure for all JDK builders
A place to get certified builds, of known good quality.
Test suites
JCKs
Tracking the OpenJDK patch levels (Security fixes)
And most importantly, they provide binaries for Eclipse OpenJ9
And OpenJ9 was the first set of binaries to have passed certification there.
Make a big deal about the license
Very open, very easy for anyone and everyone to contribute.
Operating at the Eclipse Foundation means operating under a set of rules that ensures the project is open, accessible to all, and not controlled by any single company.
This is one of the first projects under the EPLv2 which is really cool
Additionally, EPLv2 has secondary licenses that make it compatible with the GPL
Mention this is a JVM
The ability to put something into production every couple of week or even every commit led to infrastructure pressure. An application deployment isn’t possible without infrastructure, and cloud was here to help. The availability of hardware or platforms on tap through cloud mean buy cycles of months were no longer necessary.
Java EE 8 progress was very slow.
Cloud-native requirements not being addressed quickly enough
MicroProfile set up in Mid 2016 as an industry collaboration.
@GET
@Produces(MediaType.APPLICATION_JSON)
@APIResponse(
responseCode = "200",
description = "host:properties pairs stored in the inventory.",
content = @Content( mediaType = "application/json",
schema = @Schema( type = SchemaType.OBJECT,
implementation = InventoryList.class)))
@Operation( summary = "List inventory contents.",
description = "Returns the stored host:properties pairs.")
public InventoryList listContents() { return manager.list(); }
@GET
@Produces(MediaType.APPLICATION_JSON)
@APIResponse(
responseCode = "200",
description = "host:properties pairs stored in the inventory.",
content = @Content( mediaType = "application/json",
schema = @Schema( type = SchemaType.OBJECT,
implementation = InventoryList.class)))
@Operation( summary = "List inventory contents.",
description = "Returns the stored host:properties pairs.")
public InventoryList listContents() { return manager.list(); }
Alasdair
Talk about exploiting docker and docker layers.
FAT jars are not your friend.
Docker, and kube are your friend and really the future for deployment