modularity in the cloud

34
Modularity in the cloud A case study

Upload: sander-mak-sandermak

Post on 12-May-2015

1.261 views

Category:

Technology


1 download

DESCRIPTION

Presented at JEEConf 2013.

TRANSCRIPT

Page 1: Modularity in the Cloud

Modularity in the cloud

A case study

Page 3: Modularity in the Cloud

The case: PulseOn

Educational system focussed on personalized learning

Used in high schools in the Netherlands

Expand to other countries in the near future

Page 4: Modularity in the Cloud

Requirements

Easy software

updates

Cross deviceiPad/android/

desktop...

Different set of components per

school

Scalability(both up and

down)

Page 5: Modularity in the Cloud

Personal dashboard

Page 6: Modularity in the Cloud

Learningcontent

Page 7: Modularity in the Cloud

Adaptive recommended

Learning

Page 8: Modularity in the Cloud

How to build software

when nobody can tell you

exactly what to build?

Page 9: Modularity in the Cloud

Divide and conquer, prevent the ripple effect

Modularity

Page 10: Modularity in the Cloud

Modularity in practice

Program to interfaces, not

implementations

Rate of change

of modules

http://geekandpoke.typepad.com

Page 11: Modularity in the Cloud

Modules

Page 12: Modularity in the Cloud

Ok, but how to create an instance of a hidden

class?

MyInterface myI = new MyImplementation();

YOUDON’T!

Page 13: Modularity in the Cloud

Service Lookups

Page 14: Modularity in the Cloud

Cross device HTML 5 + JS

RESTful web services

OSGi services

Mongo

Apache Felix

Amdatu

S3

Page 15: Modularity in the Cloud

course.gadget

contentsequencer.rest

content.mongo content.storage

Mongo S3

UI

REST API

JavaAPI

Page 16: Modularity in the Cloud

course.gadget

contentsequencer.rest

contentsequencer.engine profiling.mongo

content.mongo

profiling.rest

AJAX AJAX

Java Java

Java

Java

Page 17: Modularity in the Cloud

Some numbers

190bundles

in a deployment

120PulseOn

bundles

Page 18: Modularity in the Cloud

Amdatu: OSGi Cloud components

JAX-RSMongo DBBlobStoresSchedulingMulti-tenancySearchOpenSocial...

Apache Licensed

open source

project

Page 19: Modularity in the Cloud

Amdatu MongoDB

Most data is

exposed using

REST

The profiler generates a LOT

of data

The recommender

needs powerful queries

Page 20: Modularity in the Cloud

Amdatu OpenSocial

How to separate UI elements in modules?

Each functional part is an

OpenSocial gadget

Modularity in the UI

Page 21: Modularity in the Cloud

School B

Load

Deployment

Load Balancer

PulseOn nodePulseOn node

PulseOn node

Load Balancer

PulseOn nodePulseOn node

PulseOn node

School A

MongoMongo

Mongo

MongoMongo

Mongo

Page 22: Modularity in the Cloud

Auto scaling

Considerable higher loads during school hours

Enoughcapacity

Without paying for idle servers

at night...

Page 23: Modularity in the Cloud

Load Balancer small node

Cluster per school

Always use a load balancer because we don’t want downtime during scaling

Page 24: Modularity in the Cloud

Load Balancer small node

Early morning...

Page 25: Modularity in the Cloud

Load Balancer small node

large node

large node

Early morning...

Page 26: Modularity in the Cloud

End of the day...

Load Balancer small node

large node

large node

Page 27: Modularity in the Cloud

End of the day...

Load Balancer small node

Page 28: Modularity in the Cloud

But how do we install

our software on a node?

Page 29: Modularity in the Cloud

Provisioning servers

Page 30: Modularity in the Cloud

ace screenshot

Page 31: Modularity in the Cloud

Node

AWS Auto Scaling

1. Start Load Balancer

Apache ACE

4. register

2. register

3. provisiondeployment

package

Provisioning servers

Page 32: Modularity in the Cloud

Tooling and frameworks are

now mature enough

How does this fit other applications?

The architecture fits most

modern web applications

Works in the cloud

(but not a requirement)

Page 33: Modularity in the Cloud

amdatu.org