thorntail (formerly wildfly swarm) eclipse microprofile with · thorntail (formerly wildfly swarm)...

36
Eclipse MicroProfile with Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software Engineer

Upload: others

Post on 28-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Eclipse MicroProfile withThorntail (formerly WildFly Swarm)

John ClinganSenior Principal Product Manager

Ken FinniganSenior Principal Software Engineer

Page 2: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Support Services

> Smart Routing> API Management> Caching Service> Configuration> Messaging> SSO> Registry

2

Application Logic

> Client-side Load Balancing> Service Registration> Circuit Breaker> Distributed Tracing

EVOLUTION OF MICROSERVICES (2014 - ?)

2014 Config Server

NETFLIX Ribbon

Page 3: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

WHAT WE ARE HEARING FROM CUSTOMERS

1. Cloud and microservices distributed architectures leads to the need for multiple runtimes, frameworks and languages

2. Microservices and distributed application development is hard. Need a platform that can abstract away complexity and simplify development.

3. While enterprise developers want choice of runtime/framework, the enterprise needs a way to standardize, support, and plan

4. Cannot just turn off or replace existing(legacy) apps. Need modernization ramp to harvest more value from existing apps.

5. Do not want cloud lock-in and restricted to specific application framework, architecture style, languages etc.

3

Page 4: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

4

RED HAT OPENSHIFT

RED HAT OPENSHIFT APPLICATION RUNTIMES

APPLICATIONS LIFECYCLE MANAGEMENT

CONTAINER ORCHESTRATION & MANAGEMENT (KUBERNETES)

Amazon Web Services Microsoft Azure Google CloudOpenStackDatacenterLaptop

YOUR INFRASTRUCTURE

YOUR APPS AND SERVICES

SUPPORTING MIDDLEWARE SERVICES

ReactiveVert.x

MicroProfile WildFly Swarm

Spring BootTomcat

JavaScript Node.js

Java EE JBoss EAP

Launch Service✓ Simplified

development

✓ Strategic flexibility

✓ DevOps automation

RED HAT OPENSHIFT APPLICATION RUNTIMESProviding curated set of integrated runtimes and frameworks that standardizes Cloud Native App

Page 5: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Support Services

> Smart Routing> API Management> Caching Service> Configuration> Messaging> SSO> Registry

5

Application Logic

> Client-side Load Balancing> Service Registration> Circuit Breaker> Distributed Tracing

Application Logic

> Client-side Load Balancing> Circuit Breaker

Support Services

> Distributed Tracing> API Management> Caching Service> Messaging> SSO

> Registry> Configuration> Server-side Load Balancing

EVOLUTION OF MICROSERVICES (2014 - Current)

2014 Current

Page 6: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Support Services

> Smart Routing> API Management> Caching Service> Configuration> Messaging> SSO> Registry

6

Application Logic

> Client-side Load Balancing> Service Registration> Circuit Breaker> Distributed Tracing

Application Logic

> Client-side Load Balancing> Circuit Breaker

Support Services

> Distributed Tracing> API Management> Caching Service> Messaging> SSO

> Registry> Configuration> Server-side Load Balancing

EVOLUTION OF MICROSERVICES (NEAR FUTURE)

Support Services

> API Management> Caching Service> Messaging> SSO

Application Logic

> Registry> Configuration> Server-side Load Balancing> Client-side Load Balancing> Distributed Tracing> Circuit Breaker> Fault Injection

2014 Current Near Future

Page 7: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software
Page 8: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

For Java EE, how does this change how I write my code?

Page 9: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Architecture vs API vs Implementation

9

Microservices is an architectural approach

Java EE and MicroProfile are specifications enabling innovation on implementation

Java EE applications can be built as collaborating microservices on a lightweight runtime

Jakarta

Jakarta

Page 10: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

10

● Defines open source Java microservices specifications● Industry Collaboration - Red Hat, IBM, Payara, Tomitribe, London Java Community,

SouJava, Oracle, Hazelcast, Fujitsu, SmartBear...● WildFly Swarm is Red Hat’s implementation● Minimum footprint for Enterprise Java cloud-native services (v1.3) :

JSON-P 1.0

Health CheckCDI 1.2 JAX-RS 2.0

JWT Propagation

Fault Tolerance Metrics

Config

OpenTracing

OpenAPI RESTClient

Common Annotations

Page 11: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Thorntail (formerly WildFly Swarm)

Page 12: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● Formerly WildFly Swarm

● Rename process in community

● New name announced last week

● Rename work still to be done

What’s Thorntail?

Page 13: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Demo

Page 14: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● Showcases Eclipse MicroProfile specifications

● Three services: Greeting, Boring Name, Cute Name

https://github.com/kenfinnigan/RedHatSummit-2018

What’s in the Demo?

Page 15: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

What’s in the Demo?

Greeting

Boring Name

Cute Name

Greeting

Page 16: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Eclipse MicroProfile

Page 17: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● January 2018 - 1.3○ MP 1.2 + OpenTracing + OpenAPI + Type Safe REST Client

● June 2018 - 1.4/2.0○ MP 1.4

■ Updates to Config, JWT Propagation, Fault Tolerance, OpenTracing

○ MP 2.0

■ MP 1.4 + Java EE 8 base for CDI, JAX-RS, JSON-P, (+JSON-B?)

Roadmap

Page 18: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Config

@Inject

@ConfigProperty(name = "myapp.default-name")

private String defaultName;

Page 19: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

@Health@ApplicationScopedpublic class GoodHealthCheck implements HealthCheck { public HealthCheckResponse call() { return HealthCheckResponse .named("MyHealthCheck") .withData("someKey", "aValue") .up() .build(); }}

Health Check

Page 20: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● @Counted

● @Gauge

● @Metered

● @Timed

Metrics

Page 21: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

@Counted(name = "hCount", absolute = true, description = "# calls to /myendpoint", monotonic = true)

@GET

@Path("/myendpoint")

Public Response myEndpoint {}

Metrics

Page 22: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● @OpenAPIDefinition

● @Operation

● @APIResponse

● @Content

● @Parameter

Open API

Page 23: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

@OpenAPIDefinition(info = @Info(

title = "My REST Application",

version = "1.0"

))

@Operation(

operationId = "getSomething",

summary = "Get some data over REST"

)

Open API

Page 24: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● @Asynchronous● @Retry● @Fallback● @Timeout● @CircuitBreaker● @Bulkhead

Fault Tolerance

Page 25: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

@Retry(maxRetries = 2)@Fallback(fallbackMethod = "greetingFallback")public Response greeting() {}

public Response greetingFallback() { return Response.ok() .entity(new Greeting("Greetings from a fallback")).build();

}

Fault Tolerance

Page 26: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● Define interface of external service. As JAX-RS would

● RestClientBuilder instead of JAX-RS ClientBuilder

Type Safe REST Client

Page 27: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

@Path("/api")

public interface CuteNameService {

@GET

@Produces(MediaType.TEXT_PLAIN)

@Path("/name")

String getName();

}

Type Safe REST Client

Page 28: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

CuteNameService service =

RestClientBuilder.newBuilder()

.baseUrl(new URL(NAME_SERVICE_URL))

.build(CuteNameService.class);

String name = service.getName();

Type Safe REST Client

Page 29: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● Add jaeger-core dependency to activate

● @Traced for fine grain control

● Set jaeger configuration

Open Tracing

Page 30: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

@Injectprivate JsonWebToken jwtPrincipal;

@Inject@Claim(standard = Claims.raw_token)private ClaimValue<String> rawToken;

JWT Propagation

Page 31: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Thorntail

Page 32: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● “org.wildfly.swarm” -> “io.thorntail”

● 2018.6.0 -> 2.0.0.Final

● Update documentation, examples, etc

● Follow Google Group community for updates

Thorntail Rename

Page 33: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

Not current WildFly Swarm!

Page 34: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

● 2.0.0.Final release in June

● PoC -> Thorntail 4.x [timing tbd]

● JDK 10 / 11 support

● Java EE 8 / Jakarta EE

● MicroProfile 1.4 / 2.0

Thorntail Roadmap

Page 35: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

QUESTIONS

Page 36: Thorntail (formerly WildFly Swarm) Eclipse MicroProfile with · Thorntail (formerly WildFly Swarm) John Clingan Senior Principal Product Manager Ken Finnigan Senior Principal Software

plus.google.com/+RedHat

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHat

THANK YOU