SlideShare a Scribd company logo
COPYRIGHT (C) 2020, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1
12 May 2020
Emily Jiang, Liberty Microservice Architect @IBM
Twitter: @emilyfhjiang
Building 12-factor Cloud Native
Microservices
Contents
Basic concept of 12 factor app
Live coding 12 factor microservices using MicroProfile
12 Factors in a nutshell
– A Methodologie
– Best Practices
– Manifesto
https://12factor.net/ by Heroku
Why 12 factor?
• Define the contract between applications and infrastructure
Application Infrastructure
What is a Twelve-Factor App?
In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service. The
twelve-factor app is a methodology for building software-as-a-service apps that:
Use declarative formats for setup automation, to minimize time and cost for new developers joining the project;
Have a clean contract with the underlying operating system, offering maximum portability between execution
environments;
Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems
administration;
Minimize divergence between development and production, enabling continuous deployment for maximum
agility;
And can scale up without significant changes to tooling, architecture, or development practices.
The twelve-factor methodology can be applied to apps written in any programming language, and which use any
combination of backing services (database, queue, memory cache, etc).
From https://12factor.net
THE FACTORS
1. Codebase
2. Dependencies
3. Config
4. Backing Services
5. Build, Release, Run
6. Processes
7. Port binding
8. Concurrency
9. Disposability
10.Dev / Prod parity
11.Logs
12.Admin Processes
How to build 12-Factor App?
MicroProfile and Kubernetes come to rescue!
Community
Driven
Lightweight, Iterative
Processes
Specs, APIs, TCKs
NO Reference
Implementation
MicroProfile Community
● Over a dozen vendors and
Java user groups
● Around 178 individual
contributors and growing
● Around a dozen
independent
implementations
 Open specifications
 Wide vendor support
 REST Client
 OpenAPI support
 Security
 Fault Tolerance
 Configuration
 Metrics
 Health
 Open Tracing
https://wiki.eclipse.org/MicroProfile/Implementation
Quarkus
12
MicroProfile 1.0 (Fall 2016)
JAX-RS 2.0
CDI 1.2
JSON-P 1.0
MicroProfile 1.1 (August 2017)
microProfile-1.0
Config 1.0
MicroProfile 1.2 (Sept 2017)
MicroProfile-1.1
Config 1.1
Fault Tolerance 1.0
Health 1.0
Metrics 1.0
JWT 1.0
2017
2018
MicroProfile 1.3 (Dec 2017)
MicroProfile 1.2
Config 1.2
Metrics 1.1
OpenApi 1.0
OpenTracing 1.0
RestClient 1.0
MicroProfile 1.4 (June 2018)
MicroProfile 1.3
Config 1.3
Fault Tolerance 1.1
JWT 1.1
Open Tracing-1.1
Rest Client-1.1
2019
MicroProfile 2.0.1 (July 2018)
MicroProfile 1.4
JAX-RS 2.1 // Java EE 8
CDI 2.0 // Java EE 8
JSON-P 1.1 // Java EE 8
JSON-B 1.0 // Java EE 8
MicroProfile 2.1 (Oct
2018)
MicroProfile 2.0
OpenTracing 1.2
MicroProfile 2.2 (Feb
2019)
Fault Tolerance 2.0
OpenAPI 1.1
OpenTracing 1.3
Rest Client 1.2
MicroProfile 3.0
(June 2019)
MicroProfile 2.1
Metrics 2.0
Health Check
2.0
Rest Client 1.3
MicroProfile 3.2 (Nov
2019)
MicroProfile 3.0
Metrics 2.2
Health Check 2.1
2020
MicroProfile 3.3 (Feb
2020)
MicroProfile 3.2
Config 1.4
Metrics 2.3
Fault Tolerance 2.1
Health 2.2
Rest Client 1.4
I. Codebase
• Dedicate smaller teams to individual applications or microservices.
• Following the discipline of single repository for an application forces
the teams to analyze the seams of their application and identify
potential monoliths that should be split off into microservices.
“One codebase tracked in revision control, many deploys.”
Use a single source code repository for a single application (1:1
relation). Deployment stages are different tags/branches
i.e. use a central git repo (external Github/GitHub Enterprise
also suitable)
II. Dependencies
A cloud-native application does not rely on the pre-existence of dependencies in
a deployment target.
Developer Tools declare and isolate dependencies
• Maven and Gradle for Java
“Explicitly declare and isolate dependencies”
Each microservice has its own dependencies declared (e.g.
pom.xml)
III. Config
“Store config in the environment”
 Changing config should not need to repackage your application
 Use Kubernetes configmaps and secrets for container services
 Use MicroProfile Config to inject the config properties into the microservices
App Password=blah
MicroProfile Config
Why?
– Configure Microservice without
repacking the application
How?
– Specify the configuration in
configure sources
– Access configuration via
• Programmatically lookup
Config config =ConfigProvider.getConfig();
config.getValue(“myProp”, String.class);
• Via CDI Injection
@Inject
@ConfigProperty(name="my.string.property")
String myPropV;
IV. Backing services
“Treat backing services as attached resources”
Application
My SQL Amazon S3 Twitter
MicroProfile REST Client
BA
@Inject
@RestClient
private SystemClient
defaultRestClient;
@Dependent
@RegisterRestClient
@RegisterProvider(UnknownUrlExceptionMapper.class)
@Path("/properties")
public interface SystemClient {
@GET
@Produces(MediaType.APPLICATION_JSON)
public Properties getProperties() throws
UnknownUrlException, ProcessingException;
}
io.openliberty.guides.inventory.client.SystemClient/mp-rest/url=http://localhost:9080/system
V. Build, release, run
“Strictly separate build and run stages”
 Source code is used in the build stage. Configuration data is added to define a
release stage that can be deployed. Any changes in code or config will result in a
new build/release
 Needs to be considered in CI pipeline (e.g. Tekton)
VI. Processes
“Execute the app as one or more stateless processes”
Stateless and share-nothing
Restful API
From “CERN Data Centre Evolution”
VII. Port binding
“Export services via port binding”
 Applications are fully self-contained and expose services only through ports.
Port assignment is done by the execution environment
 Ingress/service definition of k8s manages mapping of ports
 Use MicroProfile Config to inject ports to microservices for chain-up invocations
port=80
@Inject @ConfigProperty(name=”port”, defaultValue=“9080”)
VIII. Concurrency
“Scale out via the process model”
 Applications use processes independent from each other to scale out (allowing
for load balancing)
 To be considered in application design
 Cloud autoscaling services: [auto]scaling built into kNative
 Build microservices
IX. Disposability
“Maximize robustness with fast startup and graceful shutdown”
 Processes start up fast.
 Processes shut down gracefully when requested.
 Processes are robust against sudden death
 Use MicroProfile Fault Tolerance to make it resilient
MicroProfile Fault Tolerance
A solution to build a resilient microservice
 Retry - @Retry
 Circuit Breaker - @CircuitBreaker
 Bulkhead - @Bulkhead
 Time out - @Timeout
 Fallback - @Fallback
X. Dev/prod parity
“Keep development, staging, and production as similar as possible”
 Development and production are as close as possible (in terms of code, people,
and environments)
 Can use Operators to deploy in repeatable manner
XI. Logs
“Treat logs as event streams”
 App writes all logs to stdout
 Use a structured output for meaningful logs suitable for analysis. Execution
environment handles routing and analysis infrastructure
XII. Admin processes
“Run admin/management tasks as one-off processes”
 Tooling: standard k8s tooling like “kubectl exec” or Kubernetes Jobs
 Also to be considered in solution/application design
 For example, if an application needs to migrate data into a database, place this
task into a separate component instead of adding it to the main application code
at startup
THE FACTORS
1. Codebase
2. Dependencies
3. Config
4. Backing Services
5. Build, Release, Run
6. Processes
7. Port binding
8. Concurrency
9. Disposability
10.Dev / Prod parity
11.Logs
12.Admin Processes
How to get started?
https://start.microprofile.io/
https://appsody.dev/
Demo
Service-a
Service-b
12 factor app
• Use MicroProfile and K8s to build a microservice => 12 factor app
microservice
Infrastructure
THE FACTORS
1. Codebase
2. Dependencies
3. Config
4. Backing Services
5. Build, Release, Run
6. Processes
7. Port binding
8. Concurrency
9. Disposability
10.Dev / Prod parity
11.Logs
12.Admin Processes
References
• https://microprofile.io
• https://openliberty.io
• https://quarkus.io
• https://www.12factor.net/
• https://kubernetes.io/
• https://start.microprofile.io/
• https://appsody.dev/
• https://github.com/Emily-Jiang/vsummit-12factor-app-a
• https://github.com/Emily-Jiang/vsummit-12factor-app-b
• https://github.com/Emily-Jiang/vsummit-12factor-deployment
microservice
Infrastructure
K8s
@emilyfhjiang
Thank you!
COPYRIGHT (C) 2020, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0)
@emilyfhjiang

More Related Content

What's hot

Writing Java EE microservices using WildFly Swarm
Writing Java EE microservices using WildFly SwarmWriting Java EE microservices using WildFly Swarm
Writing Java EE microservices using WildFly Swarm
Comsysto Reply GmbH
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
Azilen Technologies Pvt. Ltd.
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...
Codemotion
 
WebLogic and GraalVM
WebLogic and GraalVMWebLogic and GraalVM
WebLogic and GraalVM
Michel Schildmeijer
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with Testcontainers
Rudy De Busscher
 
Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot! Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot!
GlobalLogic Ukraine
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Serhat Can
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
Manav Prasad
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016
Charles Moulliard
 
Cloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , KeynoteCloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , Keynote
rajdeep
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
Ryan Cuprak
 
Should i break it?
Should i break it?Should i break it?
Should i break it?
Gal Marder
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology Stack
Eberhard Wolff
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
NexThoughts Technologies
 
JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End Frameworks
Ian Hlavats
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
natashasweety7
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
Ryan Cuprak
 
Building web applications with Java & Spring
Building web applications with Java & SpringBuilding web applications with Java & Spring
Building web applications with Java & Spring
David Kiss
 
Connect JavaEE to the cloud with JCA by Steve Millidge
Connect JavaEE to the cloud with JCA by Steve MillidgeConnect JavaEE to the cloud with JCA by Steve Millidge
Connect JavaEE to the cloud with JCA by Steve Millidge
Payara
 

What's hot (20)

Writing Java EE microservices using WildFly Swarm
Writing Java EE microservices using WildFly SwarmWriting Java EE microservices using WildFly Swarm
Writing Java EE microservices using WildFly Swarm
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...
 
WebLogic and GraalVM
WebLogic and GraalVMWebLogic and GraalVM
WebLogic and GraalVM
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with Testcontainers
 
Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot! Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot!
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016
 
Cloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , KeynoteCloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , Keynote
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
Should i break it?
Should i break it?Should i break it?
Should i break it?
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology Stack
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End Frameworks
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Building web applications with Java & Spring
Building web applications with Java & SpringBuilding web applications with Java & Spring
Building web applications with Java & Spring
 
Connect JavaEE to the cloud with JCA by Steve Millidge
Connect JavaEE to the cloud with JCA by Steve MillidgeConnect JavaEE to the cloud with JCA by Steve Millidge
Connect JavaEE to the cloud with JCA by Steve Millidge
 

Similar to Building 12-factor Cloud Native Microservices

Live Coding 12 Factor App
Live Coding 12 Factor AppLive Coding 12 Factor App
Live Coding 12 Factor App
Emily Jiang
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
Emily Jiang
 
Master a Cloud Native Standard - MicroProfile.pdf
Master a Cloud Native Standard - MicroProfile.pdfMaster a Cloud Native Standard - MicroProfile.pdf
Master a Cloud Native Standard - MicroProfile.pdf
EmilyJiang23
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020
Emily Jiang
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020
Emily Jiang
 
Master a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptxMaster a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptx
EmilyJiang23
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
Oracle Korea
 
TechEvent Eclipse Microprofile
TechEvent Eclipse MicroprofileTechEvent Eclipse Microprofile
TechEvent Eclipse Microprofile
Trivadis
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
Jupil Hwang
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
Emily Jiang
 
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby AnandanPivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
PivotalOpenSourceHub
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
Emily Jiang
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
Oracle Korea
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
DonghuKIM2
 
Pivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookPivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First Look
VMware Tanzu
 
Spring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour DallasSpring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour Dallas
VMware Tanzu
 
Cloud-Native Workshop New York- Pivotal
Cloud-Native Workshop New York- PivotalCloud-Native Workshop New York- Pivotal
Cloud-Native Workshop New York- Pivotal
VMware Tanzu
 
CI and CD with Spinnaker
CI and CD with SpinnakerCI and CD with Spinnaker
CI and CD with Spinnaker
VMware Tanzu
 
Introduction to Eclipse Microprofile
Introduction to Eclipse MicroprofileIntroduction to Eclipse Microprofile
Introduction to Eclipse Microprofile
Red Hat Developers
 

Similar to Building 12-factor Cloud Native Microservices (20)

Live Coding 12 Factor App
Live Coding 12 Factor AppLive Coding 12 Factor App
Live Coding 12 Factor App
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
 
Master a Cloud Native Standard - MicroProfile.pdf
Master a Cloud Native Standard - MicroProfile.pdfMaster a Cloud Native Standard - MicroProfile.pdf
Master a Cloud Native Standard - MicroProfile.pdf
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020
 
Master a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptxMaster a Cloud Native Standard - MicroProfile.pptx
Master a Cloud Native Standard - MicroProfile.pptx
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
TechEvent Eclipse Microprofile
TechEvent Eclipse MicroprofileTechEvent Eclipse Microprofile
TechEvent Eclipse Microprofile
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby AnandanPivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
Pivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookPivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First Look
 
Spring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour DallasSpring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour Dallas
 
Cloud-Native Workshop New York- Pivotal
Cloud-Native Workshop New York- PivotalCloud-Native Workshop New York- Pivotal
Cloud-Native Workshop New York- Pivotal
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
CI and CD with Spinnaker
CI and CD with SpinnakerCI and CD with Spinnaker
CI and CD with Spinnaker
 
Introduction to Eclipse Microprofile
Introduction to Eclipse MicroprofileIntroduction to Eclipse Microprofile
Introduction to Eclipse Microprofile
 

More from Jakarta_EE

Applied Domain-Driven Design Blueprints for Jakarta EE
Applied Domain-Driven Design Blueprints for Jakarta EEApplied Domain-Driven Design Blueprints for Jakarta EE
Applied Domain-Driven Design Blueprints for Jakarta EE
Jakarta_EE
 
Shorten All URLs
Shorten All URLsShorten All URLs
Shorten All URLs
Jakarta_EE
 
The Eclipse Transformer Project
The Eclipse Transformer Project The Eclipse Transformer Project
The Eclipse Transformer Project
Jakarta_EE
 
Eclipse Transformer
Eclipse TransformerEclipse Transformer
Eclipse Transformer
Jakarta_EE
 
Eclipse GlassFish 6.0.0-M1
Eclipse GlassFish 6.0.0-M1Eclipse GlassFish 6.0.0-M1
Eclipse GlassFish 6.0.0-M1
Jakarta_EE
 
Jakarta EE 9 Platform Project
Jakarta EE 9 Platform ProjectJakarta EE 9 Platform Project
Jakarta EE 9 Platform Project
Jakarta_EE
 
Jakarta EE 9 Milestone Release Party - Overview
Jakarta EE 9 Milestone Release Party - OverviewJakarta EE 9 Milestone Release Party - Overview
Jakarta EE 9 Milestone Release Party - Overview
Jakarta_EE
 
Jakarta EE 9 Platform Report
Jakarta EE 9 Platform ReportJakarta EE 9 Platform Report
Jakarta EE 9 Platform Report
Jakarta_EE
 
Cloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse FoundationCloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse Foundation
Jakarta_EE
 
JakartaOne Livestream CN4J: Driving Jakarta EE Success
JakartaOne Livestream CN4J: Driving Jakarta EE SuccessJakartaOne Livestream CN4J: Driving Jakarta EE Success
JakartaOne Livestream CN4J: Driving Jakarta EE Success
Jakarta_EE
 
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
Jakarta_EE
 
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise DevelopersJakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
Jakarta_EE
 
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native CompanionJakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
Jakarta_EE
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Jakarta_EE
 
Jakarta for dummEEs | JakartaOne Livestream
Jakarta for dummEEs | JakartaOne LivestreamJakarta for dummEEs | JakartaOne Livestream
Jakarta for dummEEs | JakartaOne Livestream
Jakarta_EE
 
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne LivestreamJakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta_EE
 
Turbocharged Java with Quarkus | JakartaOne Livestream
 Turbocharged Java with Quarkus | JakartaOne Livestream Turbocharged Java with Quarkus | JakartaOne Livestream
Turbocharged Java with Quarkus | JakartaOne Livestream
Jakarta_EE
 
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Jakarta_EE
 
Jakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne Livestream
Jakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne LivestreamJakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne Livestream
Jakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne Livestream
Jakarta_EE
 
Cloud Native Java Community Day | EclipseCon Europe 2019
Cloud Native Java Community Day | EclipseCon Europe 2019Cloud Native Java Community Day | EclipseCon Europe 2019
Cloud Native Java Community Day | EclipseCon Europe 2019
Jakarta_EE
 

More from Jakarta_EE (20)

Applied Domain-Driven Design Blueprints for Jakarta EE
Applied Domain-Driven Design Blueprints for Jakarta EEApplied Domain-Driven Design Blueprints for Jakarta EE
Applied Domain-Driven Design Blueprints for Jakarta EE
 
Shorten All URLs
Shorten All URLsShorten All URLs
Shorten All URLs
 
The Eclipse Transformer Project
The Eclipse Transformer Project The Eclipse Transformer Project
The Eclipse Transformer Project
 
Eclipse Transformer
Eclipse TransformerEclipse Transformer
Eclipse Transformer
 
Eclipse GlassFish 6.0.0-M1
Eclipse GlassFish 6.0.0-M1Eclipse GlassFish 6.0.0-M1
Eclipse GlassFish 6.0.0-M1
 
Jakarta EE 9 Platform Project
Jakarta EE 9 Platform ProjectJakarta EE 9 Platform Project
Jakarta EE 9 Platform Project
 
Jakarta EE 9 Milestone Release Party - Overview
Jakarta EE 9 Milestone Release Party - OverviewJakarta EE 9 Milestone Release Party - Overview
Jakarta EE 9 Milestone Release Party - Overview
 
Jakarta EE 9 Platform Report
Jakarta EE 9 Platform ReportJakarta EE 9 Platform Report
Jakarta EE 9 Platform Report
 
Cloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse FoundationCloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse Foundation
 
JakartaOne Livestream CN4J: Driving Jakarta EE Success
JakartaOne Livestream CN4J: Driving Jakarta EE SuccessJakartaOne Livestream CN4J: Driving Jakarta EE Success
JakartaOne Livestream CN4J: Driving Jakarta EE Success
 
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
JakartaOne Livestream CN4J: Cloud Native Runtimes - Revolution or Evolution?
 
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise DevelopersJakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
JakartaOne Livestream CN4J: Bringing Reactive to Enterprise Developers
 
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native CompanionJakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Jakarta for dummEEs | JakartaOne Livestream
Jakarta for dummEEs | JakartaOne LivestreamJakarta for dummEEs | JakartaOne Livestream
Jakarta for dummEEs | JakartaOne Livestream
 
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne LivestreamJakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
Jakarta EE Meets NoSQL at the Cloud Age | JakartaOne Livestream
 
Turbocharged Java with Quarkus | JakartaOne Livestream
 Turbocharged Java with Quarkus | JakartaOne Livestream Turbocharged Java with Quarkus | JakartaOne Livestream
Turbocharged Java with Quarkus | JakartaOne Livestream
 
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
Building Interoperable Microservices With Eclipse MicroProfile| JakartaOne Li...
 
Jakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne Livestream
Jakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne LivestreamJakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne Livestream
Jakarta RESTful Web Services: Status Quo and Roadmap | JakartaOne Livestream
 
Cloud Native Java Community Day | EclipseCon Europe 2019
Cloud Native Java Community Day | EclipseCon Europe 2019Cloud Native Java Community Day | EclipseCon Europe 2019
Cloud Native Java Community Day | EclipseCon Europe 2019
 

Recently uploaded

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Building 12-factor Cloud Native Microservices

  • 1. COPYRIGHT (C) 2020, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 1 12 May 2020 Emily Jiang, Liberty Microservice Architect @IBM Twitter: @emilyfhjiang Building 12-factor Cloud Native Microservices
  • 2. Contents Basic concept of 12 factor app Live coding 12 factor microservices using MicroProfile
  • 3. 12 Factors in a nutshell – A Methodologie – Best Practices – Manifesto https://12factor.net/ by Heroku
  • 4. Why 12 factor? • Define the contract between applications and infrastructure Application Infrastructure
  • 5. What is a Twelve-Factor App? In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service. The twelve-factor app is a methodology for building software-as-a-service apps that: Use declarative formats for setup automation, to minimize time and cost for new developers joining the project; Have a clean contract with the underlying operating system, offering maximum portability between execution environments; Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration; Minimize divergence between development and production, enabling continuous deployment for maximum agility; And can scale up without significant changes to tooling, architecture, or development practices. The twelve-factor methodology can be applied to apps written in any programming language, and which use any combination of backing services (database, queue, memory cache, etc). From https://12factor.net
  • 6. THE FACTORS 1. Codebase 2. Dependencies 3. Config 4. Backing Services 5. Build, Release, Run 6. Processes 7. Port binding 8. Concurrency 9. Disposability 10.Dev / Prod parity 11.Logs 12.Admin Processes
  • 7. How to build 12-Factor App?
  • 8. MicroProfile and Kubernetes come to rescue!
  • 10. MicroProfile Community ● Over a dozen vendors and Java user groups ● Around 178 individual contributors and growing ● Around a dozen independent implementations
  • 11.  Open specifications  Wide vendor support  REST Client  OpenAPI support  Security  Fault Tolerance  Configuration  Metrics  Health  Open Tracing https://wiki.eclipse.org/MicroProfile/Implementation Quarkus
  • 12. 12 MicroProfile 1.0 (Fall 2016) JAX-RS 2.0 CDI 1.2 JSON-P 1.0 MicroProfile 1.1 (August 2017) microProfile-1.0 Config 1.0 MicroProfile 1.2 (Sept 2017) MicroProfile-1.1 Config 1.1 Fault Tolerance 1.0 Health 1.0 Metrics 1.0 JWT 1.0 2017 2018 MicroProfile 1.3 (Dec 2017) MicroProfile 1.2 Config 1.2 Metrics 1.1 OpenApi 1.0 OpenTracing 1.0 RestClient 1.0 MicroProfile 1.4 (June 2018) MicroProfile 1.3 Config 1.3 Fault Tolerance 1.1 JWT 1.1 Open Tracing-1.1 Rest Client-1.1 2019 MicroProfile 2.0.1 (July 2018) MicroProfile 1.4 JAX-RS 2.1 // Java EE 8 CDI 2.0 // Java EE 8 JSON-P 1.1 // Java EE 8 JSON-B 1.0 // Java EE 8 MicroProfile 2.1 (Oct 2018) MicroProfile 2.0 OpenTracing 1.2 MicroProfile 2.2 (Feb 2019) Fault Tolerance 2.0 OpenAPI 1.1 OpenTracing 1.3 Rest Client 1.2 MicroProfile 3.0 (June 2019) MicroProfile 2.1 Metrics 2.0 Health Check 2.0 Rest Client 1.3 MicroProfile 3.2 (Nov 2019) MicroProfile 3.0 Metrics 2.2 Health Check 2.1 2020 MicroProfile 3.3 (Feb 2020) MicroProfile 3.2 Config 1.4 Metrics 2.3 Fault Tolerance 2.1 Health 2.2 Rest Client 1.4
  • 13. I. Codebase • Dedicate smaller teams to individual applications or microservices. • Following the discipline of single repository for an application forces the teams to analyze the seams of their application and identify potential monoliths that should be split off into microservices. “One codebase tracked in revision control, many deploys.” Use a single source code repository for a single application (1:1 relation). Deployment stages are different tags/branches i.e. use a central git repo (external Github/GitHub Enterprise also suitable)
  • 14. II. Dependencies A cloud-native application does not rely on the pre-existence of dependencies in a deployment target. Developer Tools declare and isolate dependencies • Maven and Gradle for Java “Explicitly declare and isolate dependencies” Each microservice has its own dependencies declared (e.g. pom.xml)
  • 15. III. Config “Store config in the environment”  Changing config should not need to repackage your application  Use Kubernetes configmaps and secrets for container services  Use MicroProfile Config to inject the config properties into the microservices App Password=blah
  • 16. MicroProfile Config Why? – Configure Microservice without repacking the application How? – Specify the configuration in configure sources – Access configuration via • Programmatically lookup Config config =ConfigProvider.getConfig(); config.getValue(“myProp”, String.class); • Via CDI Injection @Inject @ConfigProperty(name="my.string.property") String myPropV;
  • 17. IV. Backing services “Treat backing services as attached resources” Application My SQL Amazon S3 Twitter
  • 18. MicroProfile REST Client BA @Inject @RestClient private SystemClient defaultRestClient; @Dependent @RegisterRestClient @RegisterProvider(UnknownUrlExceptionMapper.class) @Path("/properties") public interface SystemClient { @GET @Produces(MediaType.APPLICATION_JSON) public Properties getProperties() throws UnknownUrlException, ProcessingException; } io.openliberty.guides.inventory.client.SystemClient/mp-rest/url=http://localhost:9080/system
  • 19. V. Build, release, run “Strictly separate build and run stages”  Source code is used in the build stage. Configuration data is added to define a release stage that can be deployed. Any changes in code or config will result in a new build/release  Needs to be considered in CI pipeline (e.g. Tekton)
  • 20. VI. Processes “Execute the app as one or more stateless processes” Stateless and share-nothing Restful API From “CERN Data Centre Evolution”
  • 21. VII. Port binding “Export services via port binding”  Applications are fully self-contained and expose services only through ports. Port assignment is done by the execution environment  Ingress/service definition of k8s manages mapping of ports  Use MicroProfile Config to inject ports to microservices for chain-up invocations port=80 @Inject @ConfigProperty(name=”port”, defaultValue=“9080”)
  • 22. VIII. Concurrency “Scale out via the process model”  Applications use processes independent from each other to scale out (allowing for load balancing)  To be considered in application design  Cloud autoscaling services: [auto]scaling built into kNative  Build microservices
  • 23. IX. Disposability “Maximize robustness with fast startup and graceful shutdown”  Processes start up fast.  Processes shut down gracefully when requested.  Processes are robust against sudden death  Use MicroProfile Fault Tolerance to make it resilient
  • 24. MicroProfile Fault Tolerance A solution to build a resilient microservice  Retry - @Retry  Circuit Breaker - @CircuitBreaker  Bulkhead - @Bulkhead  Time out - @Timeout  Fallback - @Fallback
  • 25. X. Dev/prod parity “Keep development, staging, and production as similar as possible”  Development and production are as close as possible (in terms of code, people, and environments)  Can use Operators to deploy in repeatable manner
  • 26. XI. Logs “Treat logs as event streams”  App writes all logs to stdout  Use a structured output for meaningful logs suitable for analysis. Execution environment handles routing and analysis infrastructure
  • 27. XII. Admin processes “Run admin/management tasks as one-off processes”  Tooling: standard k8s tooling like “kubectl exec” or Kubernetes Jobs  Also to be considered in solution/application design  For example, if an application needs to migrate data into a database, place this task into a separate component instead of adding it to the main application code at startup
  • 28. THE FACTORS 1. Codebase 2. Dependencies 3. Config 4. Backing Services 5. Build, Release, Run 6. Processes 7. Port binding 8. Concurrency 9. Disposability 10.Dev / Prod parity 11.Logs 12.Admin Processes
  • 29. How to get started? https://start.microprofile.io/ https://appsody.dev/
  • 31. 12 factor app • Use MicroProfile and K8s to build a microservice => 12 factor app microservice Infrastructure
  • 32. THE FACTORS 1. Codebase 2. Dependencies 3. Config 4. Backing Services 5. Build, Release, Run 6. Processes 7. Port binding 8. Concurrency 9. Disposability 10.Dev / Prod parity 11.Logs 12.Admin Processes
  • 33. References • https://microprofile.io • https://openliberty.io • https://quarkus.io • https://www.12factor.net/ • https://kubernetes.io/ • https://start.microprofile.io/ • https://appsody.dev/ • https://github.com/Emily-Jiang/vsummit-12factor-app-a • https://github.com/Emily-Jiang/vsummit-12factor-app-b • https://github.com/Emily-Jiang/vsummit-12factor-deployment microservice Infrastructure K8s @emilyfhjiang
  • 34. Thank you! COPYRIGHT (C) 2020, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) @emilyfhjiang