modularity in the cloud
DESCRIPTION
Presented at JEEConf 2013.TRANSCRIPT
Modularity in the cloud
A case study
Jan Willem JanssenLuminis Technologies
@j_w_janssen
Sander MakLuminis Technologies
@sander_mak
http://branchandbound.net
The case: PulseOn
Educational system focussed on personalized learning
Used in high schools in the Netherlands
Expand to other countries in the near future
Requirements
Easy software
updates
Cross deviceiPad/android/
desktop...
Different set of components per
school
Scalability(both up and
down)
Personal dashboard
Learningcontent
Adaptive recommended
Learning
How to build software
when nobody can tell you
exactly what to build?
Divide and conquer, prevent the ripple effect
Modularity
Modularity in practice
Program to interfaces, not
implementations
Rate of change
of modules
http://geekandpoke.typepad.com
Modules
Ok, but how to create an instance of a hidden
class?
MyInterface myI = new MyImplementation();
YOUDON’T!
Service Lookups
Cross device HTML 5 + JS
RESTful web services
OSGi services
Mongo
Apache Felix
Amdatu
S3
course.gadget
contentsequencer.rest
content.mongo content.storage
Mongo S3
UI
REST API
JavaAPI
course.gadget
contentsequencer.rest
contentsequencer.engine profiling.mongo
content.mongo
profiling.rest
AJAX AJAX
Java Java
Java
Java
Some numbers
190bundles
in a deployment
120PulseOn
bundles
Amdatu: OSGi Cloud components
JAX-RSMongo DBBlobStoresSchedulingMulti-tenancySearchOpenSocial...
Apache Licensed
open source
project
Amdatu MongoDB
Most data is
exposed using
REST
The profiler generates a LOT
of data
The recommender
needs powerful queries
Amdatu OpenSocial
How to separate UI elements in modules?
Each functional part is an
OpenSocial gadget
Modularity in the UI
School B
Load
Deployment
Load Balancer
PulseOn nodePulseOn node
PulseOn node
Load Balancer
PulseOn nodePulseOn node
PulseOn node
School A
MongoMongo
Mongo
MongoMongo
Mongo
Auto scaling
Considerable higher loads during school hours
Enoughcapacity
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
Load Balancer small node
Early morning...
Load Balancer small node
large node
large node
Early morning...
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?
Provisioning servers
ace screenshot
Node
AWS Auto Scaling
1. Start Load Balancer
Apache ACE
4. register
2. register
3. provisiondeployment
package
Provisioning servers
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)
amdatu.org
Cloud provisioning
http://ace.apache.org/Cloud OSGi services
http://www.amdatu.org/
Eclipse OSGi pluginhttp://bndtools.org/
@Sander_Mak
http://luminis.eu/en/
There is more...