38
1 Practical Cloud-native Java with Eclipse MicroProfile Alasdair Nottingham @NottyCode

e MicroProfile - EclipseCon 2020 | EclipseCon 2020 › sites › default › files › ... · 40 Summary •Consider both organizationaland technological changes to increase likelihood

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

1

Practical Cloud-native Java with Eclipse

MicroProfile

Alasdair Nottingham

@NottyCode

22

Background to Cloud-native

3

Agile

4

Agile & DevOps

+

5

Agile & DevOps & Cloud

+ +

6

Agile & DevOps & Cloud & Microservices

+ + C

B

A

+

77

Good characteristics of a cloud-native environment

8

Provides APIs for distributed computing

9

Starts fast and shuts down clean

10

Has a (proportionately) small footprint

11

Facilitates dev/prod parity, including through externalized config

12

Can be easily containerized

1313

Being fast, small and open

14

Middle-aged spread

https://www.slideshare.net/delabassee/java-ee-8-february-2017-updatehttps://medium.com/@alextheedom/java-ee-past-present-future-8bf25df7b6a3

15

Liberty Features

<packaging.type>minify,runnable</packaging.type>

server

build

<featureManager><feature>jaxrs-2.0</feature> <feature>openapi-3.0</feature>

</featureManager>

16

Wildfly Swarm Thorntail Fractions

<dependency><groupId>org.wildfly.swarm</groupId><artifactId>jaxrs</artifactId>

</dependency><dependency>

<groupId>org.wildfly.swarm</groupId><artifactId>swagger</artifactId>

</dependency>

build

1717

What does it mean to provide microservice technologies?

18

19

There’s a good chance you’ll use REST APIs.

20

Eclipse MicroProfile

JSON-B 1.0JSON-P 1.1CDI 2.0Rest Client 1.1 JAX-RS 2.1

21

Demo of REST support

22

Demo of REST support Service C/props/{propName}

Service A/props/{propName}

23

Handling “100s” of collaborating services requires a strong operations focus

24

Eclipse MicroProfile

HealthCheck 1.0 Metrics 1.1Open Tracing

1.1Open API 1.0

JSON-B 1.0JSON-P 1.1CDI 2.0Rest Client 1.1 JAX-RS 2.1

25

Demo openapi, health & metrics

26

Handling ”100s” of collaborating andfrequently evolving services requires new APIs

27

Eclipse MicroProfile

HealthCheck 1.0 Metrics 1.1Open Tracing

1.1Open API 1.0

Config 1.3FaultTolerance 1.1

JWT1.1

JSON-B 1.0JSON-P 1.1CDI 2.0Rest Client 1.1 JAX-RS 2.1

28

Demo of config and Fault Tolerance

28

29

Fault Tolerance in microservices

© 2018 IBM Corporation

Circuit breaker

New capabilities for microservices

service A

service C

@CircuitBreaker( failOn=IOException.class,

delay = 500)public void callServiceC() {

// call the service}

30

Fault Tolerance in microservices

© 2018 IBM Corporation

Bulkhead

New capabilities for microservices

service A

service C

@Asynchronous@Bulkhead(value = 10,

waitingTaskQueue = 15)public void callServiceC() {

// call the service}

31

Can’t I do all this with a service mesh?

32

Fault Tolerance in microservices

© 2018 IBM Corporation

App Container can defer to Cloud Platform• Then Cloud Platform takes over:

New capabilities for microservices

service A

service CMyFallbackfallback

@FallbackApplication still provides:

@Retry@Timeout@CircuitBreaker@Bulkhead

Kubernetes Control Plane

333333

What is next?

34

• Reactive• Data access• Istio integration• Updates to existing specs

34

3535

Packaging for deployment

39

Making the most of Docker

O/S

JVM

App Server

Application

O/S

JVM

Application

thin war fat jar

40

Summary

• Consider both organizational and technological changes to increase likelihood of success• Leverage MicroProfile to solve cloud-native challenges• Choose appropriate packaging for your cloud• Reduce overheads and cost with a right-sizeable runtime• In Docker, strive for a thin application layer• Learn more with Open Liberty guides

https://ibm.biz/mpGuides

41

Thank You