Otavio Santana
@otaviojava
Architecting
Cloud Computing
Solutions with Java
Otavio Santana
@otaviojava
DevRel Engineer
+ Java Champion
+ JCP-EC-EG-EGL
+ Apache Committer
+ Eclipse Committer
+ Eclipse Project Leader
+ Book and blog writer
Speaker
Cloud
Cloud Types
Cloud Native
“Cloud-native is an approach to building
and running applications that exploits
the advantages of the cloud computing
model.”
Cloud Native
“Cloud-native is a different way of thinking
and reasoning about software systems. It
embodies the following concepts: powered
by disposable infrastructure, composed of
bounded, scales globally, embraces
disposable architecture.”
Cloud Native
“In general use, ‘cloud-native’ is an
approach to building and running
applications that exploits the advantages
of the cloud-computing delivery model.
‘Cloud-native’ is about how applications
are created and deployed, not where.”
Cloud Native
“Independent DURS ultimately comes up
in every discussion on cloud-native
concepts; to independently Deploy,
Update, Replace and Scale.”
Cloud Native
“Cloud-native is more than a tool set. It is a
complete architecture, a philosophical
approach for building applications that
take full advantage of cloud computing.”
Cloud Native
“Cloud-native technologies empower
organizations to build and run scalable
applications in modern, dynamic
environments such as public, private,
and hybrid clouds. Containers, service
meshes, microservices, immutable
infrastructure, and declarative APIs
exemplify this approach.”
Cloud Native
Cloud-native is a term used to describe
container-based environments.
Cloud Native
A set of good practices to
optimize an application in
the cloud through:
● Containerization
● Orchestration
● Automation
Cloud Native
PORA
Package Once, Run Anytime
WORA
Write Once, Run Anywhere
Containers vs.
Java
The Best Practices
● Codebase
● Dependencies
● Config
● Backing services
● Build, release, run
● Process
● Port binding
● Concurrency
● Disposability
● Dev/prod parity
● Logs
● Admin processes
The 12 Factors App
Old but Gold
“Certainly, we always read great things
about the microservices architectures
implemented by companies like Netflix or
Amazon. So let me ask a question: how
many companies in the world can be
Netflix and Amazon?”
Microservices
Conway's law
Java Cloud Native
● Optimizations on GC
● Improvements Containers
● Better Integration
● Release 6 months
Java
● Generations
● Eclipse Foundation
● Agile
● Cloud Native
Jakarta EE
● Microservices
● Eclipse Foundation
● Agile
● Fast Delivery
Eclipse
MicroProfile
● Jakarta EE8
● Security
● Fault Tolerance
● Much more...
Eclipse
Foundation
Platform.sh
We live in a cloud economy
Use cloud ready
SaaS services
Complexity
Cost
Risk
High
Med - High
Low
Migrate existing
workloads into
cloud
Build new apps
cloud ready
Degrees of risk around
enterprise cloud consumption...
^
^
‘The cloud’ is complex
They need to focus on turning business ideas into
code, and and let somebody else do the rest.
Their energies shouldn’t be consumed
managing various clouds
Challenge
Today’s reality
All companies are now software companies,
expecting to deliver great customer experiences.
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.
We’re a polyglot, multicloud PaaS, with
continuous deployment built in.
At Platform.sh we believe your code
should just run. Monoliths?
Microservices? Stateful? Stateless?
Develop and deliver them all with
consistent tools.
Much more than
hosting
Infrastructure as
code
Add MySQL, PostgreSQL, MongoDB, Kafka,
Elasticsearch, Solr, Redis, RabbitMQ, or
InfluxDB to your project with a few lines of
code. Infrastructure changes are versioned
and auditable.
Service updates and security?
That’s on us. No more effort wasted on
patching your fleet.
Application
name: app
type: "java:11"
disk: 1024
hooks:
build: mvn clean package
relationships:
database: "db:postgresql"
web:
commands:
start: java -jar $JAVA_OPTS $CREDENTIAL file.jar
Services
database1:
type: mysql:10.1
disk: 2048
database2:
type: postgresql:9.6
disk: 1024
Route
"https://{default}/":
type: upstream
upstream: "app:http"
"https://www.{default}/":
type: redirect
to: "https://{default}/"
Config Reader
@Configuration
public class DataSourceConfig {
@Bean(name = "dataSource")
public DataSource getDataSource() {
Config config = new Config();
MySQL database = config.getCredential("database", MySQL::new);
return database.get();
}
}
Config Reader
@Configuration
class DataSourceConfig {
@Bean(name = ["dataSource"])
fun getDataSource(): DataSource {
val config = Config()
val database = config.getCredential("database") { MySQL(it) }
return database.get()
}
}
Config Reader
Config config = new Config();
final MongoDB mongo = config.getCredential("mongodb", MongoDB::new);
final MongoClient mongoClient = mongo.get();
Config config = new Config();
Configuration configuration = new Configuration();
configuration.addAnnotatedClass(Address.class);
Hibernate credential = config.getCredential("database", Hibernate::new);
SessionFactory sessionFactory = credential.getMariaDB(configuration);
Demo Time
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

Arquitetando soluções de computação em nuvem com Java

  • 1.
  • 2.
    Otavio Santana @otaviojava DevRel Engineer +Java Champion + JCP-EC-EG-EGL + Apache Committer + Eclipse Committer + Eclipse Project Leader + Book and blog writer Speaker
  • 3.
  • 4.
  • 5.
  • 6.
    “Cloud-native is anapproach to building and running applications that exploits the advantages of the cloud computing model.” Cloud Native
  • 7.
    “Cloud-native is adifferent way of thinking and reasoning about software systems. It embodies the following concepts: powered by disposable infrastructure, composed of bounded, scales globally, embraces disposable architecture.” Cloud Native
  • 8.
    “In general use,‘cloud-native’ is an approach to building and running applications that exploits the advantages of the cloud-computing delivery model. ‘Cloud-native’ is about how applications are created and deployed, not where.” Cloud Native
  • 9.
    “Independent DURS ultimatelycomes up in every discussion on cloud-native concepts; to independently Deploy, Update, Replace and Scale.” Cloud Native
  • 10.
    “Cloud-native is morethan a tool set. It is a complete architecture, a philosophical approach for building applications that take full advantage of cloud computing.” Cloud Native
  • 11.
    “Cloud-native technologies empower organizationsto build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach.” Cloud Native
  • 12.
    Cloud-native is aterm used to describe container-based environments. Cloud Native
  • 13.
    A set ofgood practices to optimize an application in the cloud through: ● Containerization ● Orchestration ● Automation Cloud Native
  • 14.
    PORA Package Once, RunAnytime WORA Write Once, Run Anywhere Containers vs. Java
  • 15.
  • 16.
    ● Codebase ● Dependencies ●Config ● Backing services ● Build, release, run ● Process ● Port binding ● Concurrency ● Disposability ● Dev/prod parity ● Logs ● Admin processes The 12 Factors App
  • 17.
  • 18.
    “Certainly, we alwaysread great things about the microservices architectures implemented by companies like Netflix or Amazon. So let me ask a question: how many companies in the world can be Netflix and Amazon?” Microservices Conway's law
  • 19.
  • 20.
    ● Optimizations onGC ● Improvements Containers ● Better Integration ● Release 6 months Java
  • 21.
    ● Generations ● EclipseFoundation ● Agile ● Cloud Native Jakarta EE
  • 22.
    ● Microservices ● EclipseFoundation ● Agile ● Fast Delivery Eclipse MicroProfile
  • 23.
    ● Jakarta EE8 ●Security ● Fault Tolerance ● Much more... Eclipse Foundation
  • 24.
  • 25.
    We live ina cloud economy Use cloud ready SaaS services Complexity Cost Risk High Med - High Low Migrate existing workloads into cloud Build new apps cloud ready Degrees of risk around enterprise cloud consumption... ^ ^
  • 26.
    ‘The cloud’ iscomplex They need to focus on turning business ideas into code, and and let somebody else do the rest. Their energies shouldn’t be consumed managing various clouds Challenge Today’s reality All companies are now software companies, expecting to deliver great customer experiences.
  • 27.
    Platform.sh was built onthe 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.
  • 28.
    We’re a polyglot,multicloud PaaS, with continuous deployment built in. At Platform.sh we believe your code should just run. Monoliths? Microservices? Stateful? Stateless? Develop and deliver them all with consistent tools. Much more than hosting
  • 29.
    Infrastructure as code Add MySQL,PostgreSQL, MongoDB, Kafka, Elasticsearch, Solr, Redis, RabbitMQ, or InfluxDB to your project with a few lines of code. Infrastructure changes are versioned and auditable. Service updates and security? That’s on us. No more effort wasted on patching your fleet.
  • 30.
    Application name: app type: "java:11" disk:1024 hooks: build: mvn clean package relationships: database: "db:postgresql" web: commands: start: java -jar $JAVA_OPTS $CREDENTIAL file.jar
  • 31.
  • 32.
  • 33.
    Config Reader @Configuration public classDataSourceConfig { @Bean(name = "dataSource") public DataSource getDataSource() { Config config = new Config(); MySQL database = config.getCredential("database", MySQL::new); return database.get(); } }
  • 34.
    Config Reader @Configuration class DataSourceConfig{ @Bean(name = ["dataSource"]) fun getDataSource(): DataSource { val config = Config() val database = config.getCredential("database") { MySQL(it) } return database.get() } }
  • 35.
    Config Reader Config config= new Config(); final MongoDB mongo = config.getCredential("mongodb", MongoDB::new); final MongoClient mongoClient = mongo.get(); Config config = new Config(); Configuration configuration = new Configuration(); configuration.addAnnotatedClass(Address.class); Hibernate credential = config.getCredential("database", Hibernate::new); SessionFactory sessionFactory = credential.getMariaDB(configuration);
  • 36.
  • 37.
    Platform.sh was built onthe 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.
  • 38.
    Platform.sh provides an end-to-endPaaS 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™
  • 39.
    Develop Git-native: instantly cloneyour 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
  • 40.
    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
  • 41.
  • 42.