SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Otavio Santana
@otaviojava
Modern Cloud-Native
Jakarta EE Frameworks:
tips, challenges, and trends
Otavio Santana
@otaviojava
DevRel Engineer
+ Java Champion
+ JCP-EC-EG-EGL
+ Apache Committer
+ Eclipse Committer
+ Eclipse Project Leader
+ Book and blog writer
Speaker
History
● Mainframe
● Personal computer
● Multiple devices
● Cloud
● Services
Information
ages
● Mainframe
● One Tier
● Three tiers
● Microservices
Tiers ages
● Year
● Monthly
● Daily
● Instantly (even on
Friday)
Deploy ages
Java
● Cold start
● Serverless
● Memory
What is wrong
with Java?
● Native
● Virtual VIP
Threads
● Spotify
● Twitter
● Netflix
● +64,000
Java shops
● Cassandra
● Hadoop
● Apache Kafka
● Apache Lucene
Big data
● 80% of code
Java
frameworks
● Mapper
● Pluggability
Java
frameworks
public class God {
private String id;
private String name;
private Integer age;
//getter and setter
}
<entity class="entity.God" name="God">
<table name="God"/>
<attributes>
<id name="id"/>
<basic name="name">
<column name="NAME" length="100"/>
</basic>
<basic name="age"/>
</attributes>
</entity>
We need to be more intuitive!!
Metadata
● Introspection
● Dynamic
● Several languages
Reflection
● Annotations
● Java 5 Tiger
(2004-10-04)
● JSR 175
Metadata
facility for
Java
@Entity
public class God {
@Id
private String id;
@Column
private String name;
@Column
private Integer age;
}
● Runtime
● pluggability
● Dynamic
● Encapsulation
Metadata
facility for
Java Class<Good> type = ...;
Object value =...;
Entity annotation = type.getAnnotation(Entity.class);
Constructor<?>[] constructors = type.getConstructors();
T instance = (T) constructors[0].newInstance();
for (Field field : type.getDeclaredFields()) {
field.setAccessible(true);
field.set(instance, value);
}
● Runtime
● Cache
● ReflectionData
Reflection
issues
//java.lang.Class
ReflectionData<T> rd = reflectionData();
private static class ReflectionData<T> {
}
● PhantomReference
● WeakReference
● SoftReference
● StrongReference
Reflection
issues
● We need more memory
Reflection
@Entity
public class God {
@Id
private String id;
@Column
private String name;
@Column
private Integer age;
}
Framework Metadata
Framework Metadata
Framework Metadata
● Java Compiler API Java
1.6
● Nightmare start
● Dependencies
● JIT
● Start-up ~20x slower
Reflection
JavaSource<Entity> source = new JavaSource() {
@Override
public String getName() {
return fullClassName;
}
@Override
public String getJavaSource() {
return source;
}
};
JavaFileObject fileObject = new JavaFileObject(...);
compiler.getStandardFileManager(diagnosticCollector, ...);
● We need cold start
Reflection
Compiler
Issues @Entity
public class God {
@Id
private String id;
@Column
private String name;
}
● Geoffrey De Smet
@GeoffreyDeSmet
● Java Reflection,
but Faster
Fast
Benchmark Score Error
DirectAccess 2.590 ± 0.014 ns/op
JavaCompiler 2.726 ± 0.026 5% slower
Reflection 5.275 ± 0.053 104% slower
MethodHandle 6.100 ± 0.079 136% slower
* Units ns/op
● Geoffrey De Smet
@GeoffreyDeSmet
● Java Reflection,
but Faster
Bootstrap
* Units ns/op
Benchmark Score Error
Reflection 268.510 ± 25.271 0.3µs/op
MethodHandle 1519.177 ± 46.644 1.5µs/op
JavaCompiler 4814526.314 ± 0.053 4814.5µs/op
● JSR 269
● Javac
● (AoT) JPE 295 Java 9
Java
Annotation
Processor @SupportedAnnotationTypes("org.soujava.medatadata.api.Entity")
public class EntityProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) {
//....
}
}
● Now, the compiler
is the issue
Java
Annotation
Processor @Entity
public class God {
@Id
private String id;
@Column
private String name;
}
J
A
V
A
C
● Pluggability
● Encapsulation
● Start-up
● Memory footprint
Java
Annotation
Processor
● Native
● Serverless
● GC
● JIT
Native image
Hardware
ISA
SO
JVM
App
Hardware
ISA
SO
App
● Optimizations on GC
● Improvements Containers
(OCI)
● Release 6 months
● Application Class-Data
Sharing (JEP 310)
Java
● Which one should I
choose?
Metadata
Plug Cold Warm Encapsulation
Reflection
Java Comp
Annot. Proc.
Native
● Uncertain
● Container
● Modules
● Java Annotation Process
● Native
● Reflection
Future
● Startup
● JIT
● Memory
● Processor
Performance
Platform.sh was built
on the idea that your
application comes first
It’s what your customers care about.
It’s what drives you and your team.
We handle the rest.
Platform.sh provides
an end-to-end PaaS
to build, run, and maintain
polyglot fleets of digital
experience applications
Developers can then focus on what matters
to the organization: shipping great web apps
and sites
Container Orchestration
Infrastructure
Continuous Deployment
Data Services
App Runtimes
Routing + Edge Security
Continuous Integration
Application Code
Application Data
Provisioning APIs, Integrations, Template Libraries
Web Console
…
Source Operations™
Develop
Git-native: instantly clone your code
and infrastructure for every branch
Services snap-in with a line of
code—from MySQL to Kafka to
Elasticsearch
Build in virtually any runtime or
framework
Build
CI/CD built in: run tests, compile
dependencies
Extensible with webhooks to
integrate with any workflow
Declarative infrastructure, versioned
like your code
Package
Fully managed databases, queues,
networking, storage
Migrate between service versions
with a single line of configuration
Services patched and secured by
Platform.sh
Provision
One-click deployment of new
applications in an instant
Custom template libraries
API control over RBAC, app
provisioning, deployment
Deploy
Apps and services are automatically
containerized and deployed to our
grid
Supports stateful and stateless apps,
worker processes
Integrates with your current DevOps
processes
Run
Production cloud hosting included
Multicloud support: AWS, Microsoft
Azure, Orange, Google, and regional
partners
Run without modifications between
regions and clouds
Manage
Update your fleet with a single
command
Support everything from
microservices to enterprise CMS to
static sites
Maintain governance over process,
code, and infrastructure across
distributed teams
Secure
All changes to code and
infrastructure fully auditable
SOC 2-certified
Strict data localization available
Integrated with Includes the best of Replaces Faster and far less costly than
Works like We partner with Capabilities you won’t find with 24x7 data security and privacy
Platform.sh is end-to-end
1000s
e-commerce, life sciences, government, education,
media & entertainment, and high-tech customers
$47m
invested by top-tier international partners
Platform.sh at
a glance
Java
Q&A Thank you! Your contact:
Otavio Santana
DevRel Engineer, Platform.sh
@otaviojava

Contenu connexe

Tendances

Scaling monitoring with Datadog
Scaling monitoring with DatadogScaling monitoring with Datadog
Scaling monitoring with Datadog
alexismidon
 
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
Legacy Typesafe (now Lightbend)
 

Tendances (20)

Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
 
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
 
Building occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcingBuilding occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcing
 
Javantura v4 - CroDuke Indy and the Kingdom of Java Skills - Branko Mihaljevi...
Javantura v4 - CroDuke Indy and the Kingdom of Java Skills - Branko Mihaljevi...Javantura v4 - CroDuke Indy and the Kingdom of Java Skills - Branko Mihaljevi...
Javantura v4 - CroDuke Indy and the Kingdom of Java Skills - Branko Mihaljevi...
 
All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...
 
Scaling monitoring with Datadog
Scaling monitoring with DatadogScaling monitoring with Datadog
Scaling monitoring with Datadog
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
Datadog- Monitoring In Motion
Datadog- Monitoring In Motion Datadog- Monitoring In Motion
Datadog- Monitoring In Motion
 
Unreal Engine 4 Blueprints: Odio e amore Roberto De Ioris - Codemotion Rome 2017
Unreal Engine 4 Blueprints: Odio e amore Roberto De Ioris - Codemotion Rome 2017Unreal Engine 4 Blueprints: Odio e amore Roberto De Ioris - Codemotion Rome 2017
Unreal Engine 4 Blueprints: Odio e amore Roberto De Ioris - Codemotion Rome 2017
 
Monitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudMonitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloud
 
Cqrs and event sourcing in azure
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azure
 
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
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to Gradle
 
Database deployment: still hard after all these years - Data Saturday #1
Database deployment: still hard after all these years - Data Saturday #1Database deployment: still hard after all these years - Data Saturday #1
Database deployment: still hard after all these years - Data Saturday #1
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
 
Effective Java applications
Effective Java applicationsEffective Java applications
Effective Java applications
 
Netflix OSS Meetup Season 5 Episode 1
Netflix OSS Meetup Season 5 Episode 1Netflix OSS Meetup Season 5 Episode 1
Netflix OSS Meetup Season 5 Episode 1
 
Be DevOps Ready
Be DevOps ReadyBe DevOps Ready
Be DevOps Ready
 
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
 

Similaire à Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.

Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
DataArt
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
Akshaya Mahapatra
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with spark
Alex Zeltov
 
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
Craeg Strong
 
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
Craeg Strong
 
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
Craeg Strong
 
Typesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and PlayTypesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and Play
Luka Zakrajšek
 

Similaire à Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends. (20)

Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Struts2-Spring=Hibernate
Struts2-Spring=HibernateStruts2-Spring=Hibernate
Struts2-Spring=Hibernate
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Java on Windows Azure
Java on Windows AzureJava on Windows Azure
Java on Windows Azure
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with spark
 
Ml2
Ml2Ml2
Ml2
 
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
 
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
 
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211202 NADOG Adapting to Covid with Serverless Craeg Strong Ariel Partners
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Azure serverless architectures
Azure serverless architecturesAzure serverless architectures
Azure serverless architectures
 
Typesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and PlayTypesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and Play
 
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 

Plus de Otávio Santana

Plus de Otávio Santana (20)

Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com JavaArquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com Java
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to endBuild, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to end
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the CloudJakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud AgeJakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud Age
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
 
Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
 
The new generation of data persistence with graph
The new generation of data persistence with graphThe new generation of data persistence with graph
The new generation of data persistence with graph
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabaseEclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
 
Polyglot persistence
Polyglot persistencePolyglot persistence
Polyglot persistence
 
Management 3.0 and open source
Management 3.0 and open sourceManagement 3.0 and open source
Management 3.0 and open source
 
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EEBuilding a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EE
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!
 
Disasters of the century NoSQL
Disasters of the century NoSQLDisasters of the century NoSQL
Disasters of the century NoSQL
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.

  • 1. Otavio Santana @otaviojava Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends
  • 2. Otavio Santana @otaviojava DevRel Engineer + Java Champion + JCP-EC-EG-EGL + Apache Committer + Eclipse Committer + Eclipse Project Leader + Book and blog writer Speaker
  • 4. ● Mainframe ● Personal computer ● Multiple devices ● Cloud ● Services Information ages
  • 5. ● Mainframe ● One Tier ● Three tiers ● Microservices Tiers ages
  • 6. ● Year ● Monthly ● Daily ● Instantly (even on Friday) Deploy ages
  • 8. ● Cold start ● Serverless ● Memory What is wrong with Java?
  • 9.
  • 10. ● Native ● Virtual VIP Threads
  • 11. ● Spotify ● Twitter ● Netflix ● +64,000 Java shops
  • 12. ● Cassandra ● Hadoop ● Apache Kafka ● Apache Lucene Big data
  • 13. ● 80% of code Java frameworks
  • 15. public class God { private String id; private String name; private Integer age; //getter and setter } <entity class="entity.God" name="God"> <table name="God"/> <attributes> <id name="id"/> <basic name="name"> <column name="NAME" length="100"/> </basic> <basic name="age"/> </attributes> </entity> We need to be more intuitive!! Metadata
  • 16. ● Introspection ● Dynamic ● Several languages Reflection
  • 17. ● Annotations ● Java 5 Tiger (2004-10-04) ● JSR 175 Metadata facility for Java @Entity public class God { @Id private String id; @Column private String name; @Column private Integer age; }
  • 18. ● Runtime ● pluggability ● Dynamic ● Encapsulation Metadata facility for Java Class<Good> type = ...; Object value =...; Entity annotation = type.getAnnotation(Entity.class); Constructor<?>[] constructors = type.getConstructors(); T instance = (T) constructors[0].newInstance(); for (Field field : type.getDeclaredFields()) { field.setAccessible(true); field.set(instance, value); }
  • 19. ● Runtime ● Cache ● ReflectionData Reflection issues //java.lang.Class ReflectionData<T> rd = reflectionData(); private static class ReflectionData<T> { }
  • 20. ● PhantomReference ● WeakReference ● SoftReference ● StrongReference Reflection issues
  • 21. ● We need more memory Reflection @Entity public class God { @Id private String id; @Column private String name; @Column private Integer age; } Framework Metadata Framework Metadata Framework Metadata
  • 22. ● Java Compiler API Java 1.6 ● Nightmare start ● Dependencies ● JIT ● Start-up ~20x slower Reflection JavaSource<Entity> source = new JavaSource() { @Override public String getName() { return fullClassName; } @Override public String getJavaSource() { return source; } }; JavaFileObject fileObject = new JavaFileObject(...); compiler.getStandardFileManager(diagnosticCollector, ...);
  • 23. ● We need cold start Reflection Compiler Issues @Entity public class God { @Id private String id; @Column private String name; }
  • 24. ● Geoffrey De Smet @GeoffreyDeSmet ● Java Reflection, but Faster Fast Benchmark Score Error DirectAccess 2.590 ± 0.014 ns/op JavaCompiler 2.726 ± 0.026 5% slower Reflection 5.275 ± 0.053 104% slower MethodHandle 6.100 ± 0.079 136% slower * Units ns/op
  • 25. ● Geoffrey De Smet @GeoffreyDeSmet ● Java Reflection, but Faster Bootstrap * Units ns/op Benchmark Score Error Reflection 268.510 ± 25.271 0.3µs/op MethodHandle 1519.177 ± 46.644 1.5µs/op JavaCompiler 4814526.314 ± 0.053 4814.5µs/op
  • 26. ● JSR 269 ● Javac ● (AoT) JPE 295 Java 9 Java Annotation Processor @SupportedAnnotationTypes("org.soujava.medatadata.api.Entity") public class EntityProcessor extends AbstractProcessor { @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { //.... } }
  • 27. ● Now, the compiler is the issue Java Annotation Processor @Entity public class God { @Id private String id; @Column private String name; } J A V A C
  • 28. ● Pluggability ● Encapsulation ● Start-up ● Memory footprint Java Annotation Processor
  • 29. ● Native ● Serverless ● GC ● JIT Native image Hardware ISA SO JVM App Hardware ISA SO App
  • 30. ● Optimizations on GC ● Improvements Containers (OCI) ● Release 6 months ● Application Class-Data Sharing (JEP 310) Java
  • 31. ● Which one should I choose? Metadata Plug Cold Warm Encapsulation Reflection Java Comp Annot. Proc. Native
  • 32. ● Uncertain ● Container ● Modules ● Java Annotation Process ● Native ● Reflection Future
  • 33. ● Startup ● JIT ● Memory ● Processor Performance
  • 34. Platform.sh was built on the idea that your application comes first It’s what your customers care about. It’s what drives you and your team. We handle the rest.
  • 35. Platform.sh provides an end-to-end PaaS to build, run, and maintain polyglot fleets of digital experience applications Developers can then focus on what matters to the organization: shipping great web apps and sites Container Orchestration Infrastructure Continuous Deployment Data Services App Runtimes Routing + Edge Security Continuous Integration Application Code Application Data Provisioning APIs, Integrations, Template Libraries Web Console … Source Operations™
  • 36. Develop Git-native: instantly clone your code and infrastructure for every branch Services snap-in with a line of code—from MySQL to Kafka to Elasticsearch Build in virtually any runtime or framework Build CI/CD built in: run tests, compile dependencies Extensible with webhooks to integrate with any workflow Declarative infrastructure, versioned like your code Package Fully managed databases, queues, networking, storage Migrate between service versions with a single line of configuration Services patched and secured by Platform.sh Provision One-click deployment of new applications in an instant Custom template libraries API control over RBAC, app provisioning, deployment Deploy Apps and services are automatically containerized and deployed to our grid Supports stateful and stateless apps, worker processes Integrates with your current DevOps processes Run Production cloud hosting included Multicloud support: AWS, Microsoft Azure, Orange, Google, and regional partners Run without modifications between regions and clouds Manage Update your fleet with a single command Support everything from microservices to enterprise CMS to static sites Maintain governance over process, code, and infrastructure across distributed teams Secure All changes to code and infrastructure fully auditable SOC 2-certified Strict data localization available Integrated with Includes the best of Replaces Faster and far less costly than Works like We partner with Capabilities you won’t find with 24x7 data security and privacy Platform.sh is end-to-end
  • 37. 1000s e-commerce, life sciences, government, education, media & entertainment, and high-tech customers $47m invested by top-tier international partners Platform.sh at a glance
  • 38. Java
  • 39. Q&A Thank you! Your contact: Otavio Santana DevRel Engineer, Platform.sh @otaviojava