SlideShare a Scribd company logo
Building Modular
Cloud Applications
in Java
Lessons Learned
Bert Ertman
Fellow at Luminis in the Netherlands
JUG Leader for NLJUG and a Java Champion
Paul Bakker
Architect at Luminis Technologies
@BertErtman
@pbakker a presentation for
The case
PulseOn
Educational system
focussed on personalized
learning
Used in high schools in
the Netherlands
Expand to other countries
in the near future
Re: Cloud Applications
Some characteristics:
Application as a service over the internet
Impact on some non-trivial non-functionals
Availability
Scalability
Extensibility
Observations
Extremely agile
Architecture (and code base) should
be able to cope with change
The case for modularity
Modularity is the
ultimate agile tool!
Small, disposable, components
Prevents code rot on the
architectural level
Isolate problems, focus work
Prevent
(tight)
coupling
What we learned about OO design in university :
Promote
cohesion
coupling
cohesion
Whatdoweneed?
design
consequences
High-level
enterprise APIs
Architectural
focus on
modularity
Runtime
dynamic
module
framework
Right now,
OSGi is the
only option
let’s not
reinvent the
wheel
OSGi is the de-facto
standard module
system for Java
OSGi != modularity
What about Jigsaw?
OSGi is the de-facto
standard module
system for Java
OSGi != modularity
What about Jigsaw?
remember!
Modularity is
an architectural
principle
OSGi is the de-facto
standard module
system for Java
OSGi != modularity
What about Jigsaw?
remember!
Modularity is
an architectural
principle
Modularity
does not come
for free with a
framework
demo
Profiles Rest
Profiles API
Profiles
Service
MongoDB
Progress Rest
Progress API
Progress
Service
MongoDB
Curriculum
API
Curriculum
Service
MongoDB
... Rest
... API
...
Service
modularity
in action...
Back to the cloud...
HTML 5 + JavaScript
RESTful services
OSGi services
Mongo
Apache Felix
S3
Typical architectureRequirements:
Modern web app
UI mostly offloaded to
clients or devices
Document driven
interaction
Integration via REST
API
Web scale data store
Multi-tenant
Elasticity
HTML 5 + JavaScript
RESTful services
OSGi services
Mongo
Apache Felix
A
m
d
a
t
u
S3
Typical architecture
Let’s Add AMDATU
to our stack
Architectural focus
on modularity
Runtime dynamic
services
High level API
Auth
Blob stores
MongoDB
Multi-tenancy
OpenSocial
Search
Remote Services
REST
Template
Web
...
Components
What about
deployment?
PaaS Offerings out there:
Not good:
Proprietary platform
Vendor lock-in
White list / black list
OS Limitations
No support for modular
runtime
Solution: roll our own PaaS
Modular PaaS:
IaaS image
OSGi runtime
Deployment/provisioning
PaaS Building blocks
Pro:
freedom
Con:
no vendor support
Amazon EC2
Apache Felix
Apache ACE
Amdatu
Deployment
Load
Load Balancer
PulseOn node
PulseOn node
PulseOn node
School A
Mongo
Mongo
Mongo
Load
Load Balancer
PulseOn node
PulseOn node
PulseOn node
School B
Mongo
Mongo
Mongo
Availability zones
Horizontal scaling requires stateless nodes
HTML5 clients need less server side state
Any state should go to some kind of store
Horizontal scalability
Auto scaling
Considerable higher loads during school hours
Enough
capacity
Without paying
for idle servers
at night...
Load Balancer small node
Cluster per school
Always use a load balancer because we don’t want
downtime during scaling
Early morning...
Load Balancer small node
Early morning...
Load Balancer small node
large node
large node
End of the day...
Load Balancer small node
large node
large node
End of the day...
Load Balancer small node
But how do we install
our software on a node?
Some numbers
190
bundles
in a deployment
120
PulseOn
bundles
Provisioning servers
Building Modular Cloud Applications in Java - Lessons Learned
Provisioning servers
Node
AWS Auto Scaling
1. Start
Load Balancer
Apache ACE
2. register
3. register
4. provision
deployment
package
./as-­‐create-­‐launch-­‐config	
  demo	
  
	
  	
  	
  	
  	
  -­‐-­‐image-­‐id	
  ami-­‐0ee8e07a	
  
	
  	
  	
  	
  	
  -­‐-­‐instance-­‐type	
  m1.small	
  
	
  	
  	
  	
  	
  -­‐-­‐region	
  eu-­‐west-­‐1	
  
	
  	
  	
  	
  	
  -­‐-­‐group	
  sg-­‐ce1420ba	
  
	
  	
  	
  	
  	
  -­‐-­‐user-­‐data-­‐file	
  userdata.txt
./as-­‐create-­‐auto-­‐scaling-­‐group	
  demo	
  
	
  	
  	
  	
  -­‐-­‐launch-­‐configuration	
  demo	
  
	
  	
  	
  	
  -­‐-­‐min-­‐size	
  1	
  
	
  	
  	
  	
  -­‐-­‐max-­‐size	
  1	
  
	
  	
  	
  	
  -­‐-­‐availability-­‐zones	
  eu-­‐west-­‐1a	
  
	
  	
  	
  	
  -­‐-­‐load-­‐balancers	
  demo	
  
	
  	
  	
  	
  -­‐-­‐tag	
  "k=Name,v=demo,p=true"
Or by UI configuration...
Provisioning servers
Nodes are completely disposable
Automated cluster recovery
Nodes do not require maintenance
No “big” container
Developer Tools
Educational system focussed on
personalized learning
Used in high schools in the
Netherlands
Expand to other countries in the
near future
Development tool stack
IDE with fast turn arounds
Version Control
Continuous Integration Server
Issue tracker
WIKI
what do we need?
Continuous integration
All BndTools projects support
headless builds
Build on git push
Measure test coverage
(both unit and integration tests)
Wrap up
what have we learned?
Modularity is the ultimate agile tool
Modularity is no longer difficult
(BndTools / Amdatu)
Stateless architecture is the only
scalable way
Cloud deployments made easy with a
provisioning server
Shameless self-promotion...
Our book
Building Modular Cloud
Applications in Java
Published by O’Reilly
Due: end of summer this year
under
construction
Building Modular Cloud Applications in Java - Lessons Learned
Building Modular Cloud Applications in Java - Lessons Learned
Want to try this yourself?
Tomorrow: 10 AM - 12.30
Hands-on Lab:
Building Modular Cloud Applications in Java
Venue: Hotel Wyspiański
ul.Westerplatte 15
31-033 Kraków
Cloud provisioning
http://ace.apache.org/
Eclipse OSGi plugin
http://bndtools.org/
That’s us
http://luminis.eu/
Bert Ertman
bert.ertman@luminis.eu
@BertErtman
Cloud OSGi services
http://www.amdatu.org/
Amdatu
Paul Bakker
paul.bakker@luminis.eu
@pbakker
Takk
Grazie
Thank
you
Obrigado
Mahalo
Danke
Dank U
Merci
Gracias

More Related Content

PDF
VJUG - Building Modular Java Applications in the Cloud Age
PDF
JDD2014: Introduction to OSGi - Paul Bakker
PPTX
椒鹽小聚分享 20141117
PDF
Eco Integrated Systems
PPT
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
PPT
The Eff monad, one monad to rule them all
ODP
HTTP/2 and Java: Current Status
PDF
Microservices for Mortals
VJUG - Building Modular Java Applications in the Cloud Age
JDD2014: Introduction to OSGi - Paul Bakker
椒鹽小聚分享 20141117
Eco Integrated Systems
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
The Eff monad, one monad to rule them all
HTTP/2 and Java: Current Status
Microservices for Mortals

Similar to Building Modular Cloud Applications in Java - Lessons Learned (20)

PDF
Lessons learned from a large scale OSGi web app
PDF
Lessons learned from a large scale OSGii web app - P Bakker & J de Vreede
PDF
practical-guide-to-modularity with Java osgi
PDF
Run your Java apps on Cloud Foundry
PDF
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
PDF
Modular Java EE in the Cloud
PDF
Java on AWS Without the Headaches - Fast Builds, Cheap Deploys, No Kubernetes
PDF
Modularity in the Cloud
PDF
Instant Access to Continuous Delivery in Java Essential Tools and Best Practi...
PDF
Run your Java code on Cloud Foundry
PDF
Calling all modularity solutions
PDF
[Ebooks PDF] download Continuous Delivery in Java Essential Tools and Best Pr...
PDF
Calling All Modularity Solutions: A Comparative Study from eBay
PDF
Build, run, and scale your Java applications end to end
PDF
From ci to cd - LavaJug 2012
PPTX
Are you ready for cloud-native Java?
PPTX
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
PDF
Serverless Java: JJUG CCC 2019
PDF
Cloud Native Application Development
PDF
Continuous Delivery in Java Essential Tools and Best Practices for Deploying ...
Lessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGii web app - P Bakker & J de Vreede
practical-guide-to-modularity with Java osgi
Run your Java apps on Cloud Foundry
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Modular Java EE in the Cloud
Java on AWS Without the Headaches - Fast Builds, Cheap Deploys, No Kubernetes
Modularity in the Cloud
Instant Access to Continuous Delivery in Java Essential Tools and Best Practi...
Run your Java code on Cloud Foundry
Calling all modularity solutions
[Ebooks PDF] download Continuous Delivery in Java Essential Tools and Best Pr...
Calling All Modularity Solutions: A Comparative Study from eBay
Build, run, and scale your Java applications end to end
From ci to cd - LavaJug 2012
Are you ready for cloud-native Java?
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
Serverless Java: JJUG CCC 2019
Cloud Native Application Development
Continuous Delivery in Java Essential Tools and Best Practices for Deploying ...
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
A Presentation on Artificial Intelligence
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation theory and applications.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
20250228 LYD VKU AI Blended-Learning.pptx
Machine learning based COVID-19 study performance prediction
Ad

Building Modular Cloud Applications in Java - Lessons Learned