building modular java applications in the cloud age · runtime dynamic services high level api....

25
Building Modular Java Applications in the Cloud Age

Upload: others

Post on 17-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Building Modular Java Applications in the Cloud Age

Page 3: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Observations !

Extremely agile (first mover advantage)

!Architecture (and code base)

should be able to cope with change

Trend !

Applications tend to grow bigger and more complex !Agile development and refactoring have become more common

Page 4: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

This leads to a number of challenges :

Maintenance (long term)

Versioning Dependency

Management

Deployment

Page 5: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity
Page 6: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Modularity is the answer

Page 7: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Prevent (tight)

coupling

What we learned about OO design in university :

Promote cohesion

coupling

cohesion

Page 8: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Modules Service Lookups

Page 9: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Stop talking… and show me code!

Page 10: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Back to the cloud...

Page 11: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

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

Page 12: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Auth Blob stores MongoDB Multi-tenancy OpenSocial Search Remote Services REST Template Web ...

Components

Page 13: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

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

Page 14: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Demo

Page 15: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

What about deployment?

Page 16: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Provisioning Server

Page 17: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Demo

Page 18: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Auto scaling

Enough capacity

Without paying for idle servers

at night...

Page 19: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Load Balancer

nodenode

node

nodenode

node

Availability Zone 1

MongoMongo

Mongo

MongoMongo

Mongo

Availability Zone 2

Page 20: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Auto scaling

Node

AWS Auto Scaling

1. Start Load Balancer

Apache ACE

2. register

3. register

4. provision deployment

package

Page 21: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

Wrap up

Page 22: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

The case for modularity

Modularity is the ultimate agile tool!

!Small, disposable, components !Prevents code rot on the architectural level !Isolate problems, focus on work

Page 23: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity
Page 25: Building Modular Java Applications in the Cloud Age · Runtime dynamic services High level API. Demo. What about deployment? Provisioning Server. Demo. Auto scaling Enough capacity

TakkGrazie

Thank you

Obrigado

MahaloDanke

Dank UMerci

Gracias