Contenu connexe
Similaire à Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012 (20)
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
- 1. Cloud & OSGi - Beyond the VM
Richard Nicholson: Paremus CEO
www.paremus.com
President of the OSGi Alliance
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 2. Virtual Machine Man
Amazon EC2, RackSpace, Azure? They all suffer
from the same fundamental design flaw.
Virtual Machine image centric Cloud solutions:
• Cause excessive network infrastructure load.
• Cause excessive storage consumption - caused by virtual machine
image sprawl.
• Fail to address to primary issue - the ongoing cost of maintaining
applications.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 3. VM images: The Wrong deployment artefact!
Type of Deployment Artefact
Artefact Module Centric Image Centric
Machine Image ~ 1 to 2 Gbytes per node ~ 1 to 2 Gbytes per node
Application ~ 1 TO 100 Mbytes ~ 1 to 2 Gbytes per node
Application Patch ~ 100’s Kbytes ~ 1 to 2 Gbytes per node
Property / Config Changes ~ 1 Kbyte ~ 1 to 2 Gbytes per node
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 4. Observation
m ?
o
1. The Unit of Deployment is... Need to Optimise
• The unit of fix / maintenance.
• The potential unit of re-use.
Ro Response
Also... Detect
t he Decision
i n
2. Time to deploy - directly influences...
• Time to recover a failed Business Service.
r k
• Time to scale an environment in response to business load.
i
s K
I Patterns of Modular Architecture
(Kirk Knoernschild)
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 5. Principle: Modularity and Abstraction
The smaller the deployment artefact the better
➟ BUT MUST AT ALL COST avoid Operational Complexity.
?
Automatically manage dependencies
Automatically install required parts.
ABSTRACTION - operations must manage the WHOLE, not the constituent PARTS.
➟ The new OSGi Alliance R5.0 OBR (Resolver & Repository specifications)
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 6. Principle: Modularity and Abstraction
The smaller the deployment artefact the better
➟ BUT MUST AT ALL COST avoid Operational Complexity.
Automatically manage dependencies
Automatically install required parts.
ABSTRACTION - operations must manage the WHOLE, not the constituent PARTS.
➟ The new OSGi Alliance R5.0 OBR (Resolver & Repository specifications)
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 7. Principle: Modularity and Abstraction
The smaller the deployment artefact the better
➟ BUT MUST AT ALL COST avoid Operational Complexity.
Automatically manage dependencies
Automatically install required parts.
ABSTRACTION - operations must manage the WHOLE, not the constituent PARTS.
➟ The new OSGi Alliance R5.0 OBR (Resolver & Repository specifications)
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 8. circa 2005
Paremus introduce the Service Fabric - a distributed OSGi / OBR based
Cloud runtime.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 9. The Paremus Service Fabric
A highly modular OSGi™ / OSGi Resolver based cloud runtime.
(1..m) ‘Composite Applications’ (a.k.a. Systems) may be
dynamically assembled and run upon a single Service Fabric.
SaaS
Java / Scala, [Blueprint, Declarative
Services, WARs & generic artefacts].
IaaS
(1..n) compute resource (physical or virtual) may contribute
to create a Service Fabric
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 10. Operational simplicity through Abstraction
The Service Fabric is a model driven runtime.
To change a running System, simply change its model in the required manner.
Target State Runtime State
=1
=5
=1
Re-Configure
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 11. Updating the System
The runtime will respond...
Provision Delta
Target State Runtime State
Planned Deltas
=1 e.g. Configuration
M!del changes
=5 Target State
Runtime
Unplanned Deltas Entity
"Structure#SLA$
=1 e.g. Resource
failures
Monitor
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 12. Today - 2012
Building consensus that next generation of cloud solution will
be composite and will support dynamically assembly highly
modular applications.
Growing realisation that OSGi, and specifically the new OBR
resolver specification, are key enablers.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 13. Dependency management
really is everything!
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 14. OBR Resolution Process
OSGi Repository A
Physical Repository
OSGi Resolver
OSGi Repository B
OSGi Repository C
‘Scoped’ Repositories
(specific views of one - or more - physical
repositories)
RESOLVER ENVIRONMENT
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 15. OBR Resolution Process
OSGi Repository A
Physical Repository
OSGi Resolver
OSGi Repository B
OSGi Repository C
Resource/s +
Constraints
e.g. ‘Pricer (a,c)’ ‘Scoped’ Repositories
(specific views of one - or more - physical
repositories)
RESOLVER ENVIRONMENT
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 16. OBR Resolution Process
OSGi Repository A
Physical Repository
OSGi Resolver
OSGi Repository B
OSGi Repository C
Resource/s +
Constraints
e.g. ‘Pricer (a,c)’ ‘Scoped’ Repositories
(specific views of one - or more - physical
repositories)
RESOLVER ENVIRONMENT
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 17. OBR Resolution Process
OSGi Repository A
Physical Repository
OSGi Resolver
OSGi Repository B
OSGi Repository C
Part ‘Pricer’
Resource/s +
Constraints
e.g. ‘Pricer (a,c)’ ‘Scoped’ Repositories
(specific views of one - or more - physical
repositories)
RESOLVER ENVIRONMENT
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 18. OBR Resolution Process
OSGi Repository A
Physical Repository
OSGi Resolver
OSGi Repository B
OSGi Repository C
Part ‘Pricer’
Resource/s +
Constraints
e.g. ‘Pricer (a,c)’ ‘Scoped’ Repositories
(specific views of one - or more - physical
repositories)
RESOLVER ENVIRONMENT
WHAT NOW?
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 19. Centralised Resolver: push / pull resultant composites?
OSGi Repository A
Physical Repository
OSGi Resolver
OSGi Repository B
OSGi Repository C
1
Part ‘Pricer’
2
Push / Pull
The new software
Artefact?
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 20. Centralised Resolver: push / pull resultant composites?
• Better than a fully stacked VM (WHAT COULD BE
WORSE?!).
• Heavy resolving load on centralised (one or a few) ‘Cloud‘
resolvers.
• Shipping assembled composites to target nodes loads loads
network and source nodes.
• No visibility of local environment on target nodes. Resolution
may be incorrect or not optimal.
• Example of approach - Apache ACE?
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 21. Centralised Resolver: Push / Pull List of Bundles?
OBR Repository A
Physical Repository
OBR Resolver
OBR Repository B
OBR Repository C
Part ‘Pricer’
*AR
Pricer 2
bundle a
bundle b
bundle c
bundle d
bundle e
bundle f
bundle
bundle
g
h
1
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 22. Centralised Resolver: Push / Pull List of Bundles?
• Better than pushing / pulling composite artefacts.
• Avoids some network loading - but not the loading
on the centralised resolvers.
• Still no visibility of local environment on target
nodes. As before - resolution may be incorrect or
not optimal.
• Example of approach?
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 23. Service Fabric approach - OSGi Resolver on each node ✔
$ ./posh
Paremus Service Fabric Evaluation License,
OSGi Resolver expires Wed Jan 09 23:59:59 EST 2013.
______________________________________
Welcome to the Paremus Service Fabric!
[paremus-ran-2.local.0]% lsb
0 ACTIVE org.apache.felix.framework:3.2.1
1 ACTIVE com.paremus.core.types:1.4.5
2 ACTIVE com.paremus.core.hooks:1.4.5
3 ACTIVE com.paremus.posh.runtime:1.4.5
4 ACTIVE com.paremus.posh.shell:1.4.5
5 ACTIVE com.paremus.console:1.4.5
6 ACTIVE com.paremus.nimble.core:1.4.5
7 ACTIVE com.paremus.nimble.repos:1.4.5
8 ACTIVE com.paremus.nimble.cli:1.4.5
9 ACTIVE org.apache.felix.configadmin:1.2.8
10 ACTIVE com.paremus.util.cmds:1.4.5
Resolver centric OSGi runtimes are
lightweight runtimes ! (example Paremus
Nimble).
An OSGi runtime
instance
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 24. Inject Root Resource & OSGi repository scope
negotiate
OBR Repository A
Physical Repository
Resource/s +
Constraints OBR Repository B
e.g. ‘Pricer (a,c)’
OBR Repository C
A negotiation process selects optimal
nodes to host the ‘Pricer’ composite
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 25. Inject Root Resource & OSGi Repository scope
OBR Repository A
Physical Repository
Resource/s +
Constraints OBR Repository B
e.g. ‘Pricer (a,c)’
OBR Repository C
Each node performs a local resolution.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 26. Inject Root Resource & OSGi Repository scope
RESOLVE
OBR Repository A
Physical Repository
Resource/s +
Constraints OBR Repository B
e.g. ‘Pricer (a,c)’
OBR Repository C
Each node performs a local resolution.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 27. Each participating node asynchronous pulls artefacts
Physical Repository
Resource/s +
Constraints
Asynchronous flow of bundles from
e.g. ‘Pricer (a,c)’ one or more physical repositories to
participating nodes
Each node asynchronously downloads
required bundles that are not already local.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 28. Repeat
‘Persistence (b,c)’
‘Gateway (b)’
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 29. System Models
In RFC-133 we defined the notion of a ‘System’: A runtime
abstraction comprised of elements, wiring and runtime constraints.
<system name="gateway.system" version="1.0"
boundary="fabric" repopath="gateway,nimble-rs,aries,aries-ext,fabric,fabric-ext,nimble-cmpn"
xmlns="http://schema.paremus.com/sf/1">
<description>Deploys a pricer and gateway component wired together using slp and essencermi</description>
<!-- set SystemGroup for security control -->
<nature group="demo" />
<system name="pricer" boundary="fibre">
<system.part category="msf" name="com.example.pricer">
<property name="type" value="firm" />
</system.part>
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.dsw.essencermi" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.discovery.slp" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.topologymanager" />
<replication.handler type="scalable">
<property name="scaleFactor" value="1" type="float" />
<property name="fixedDelta" value="-2" type="integer" />
<property name="minimum" value="1" type="integer" />
</replication.handler>
</system>
<system name="gateway" boundary="fibre">
<system.part category="msf" name="com.example.gateway">
<property name="id" value="foo" />
</system.part>
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.dsw.essencermi" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.discovery.slp" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.topologymanager" />
</system>
</system>
Pricer (b,c) [1..n] Persistence (a,c) [1..1] Gateway (b) [1..m]
Physical Deployment Running System = FX Trading System Model = FX Trading
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 30. A ‘System’ Model - (example Paremus Service Fabric)
<system name="fx.system" version="1.0"
boundary="fabric" repopath="gateway,nimble-rs,aries,aries-ext,fabric,fabric-ext,nimble-cmpn"
xmlns="http://schema.paremus.com/sf/1">
<description>Deploys a pricer and gateway component wired together using slp and essencermi</description>
<!-- set SystemGroup for security control -->
<nature group="demo" />
<system name="pricer" boundary="fibre">
<system.part category="msf" name="com.example.pricer">
<property name="type" value="firm" />
</system.part> Defines system name and version.
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.dsw.essencermi" /> Whether System is distributed.
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.discovery.slp" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.topologymanager" />
<replication.handler type="scalable"> The OSGi repositories to be used when
<property name="scaleFactor" value="1" type="float" /> assembling Parts.
<property name="fixedDelta" value="-2" type="integer" />
<property name="minimum" value="1" type="integer" />
</replication.handler>
</system>
...
...
...
</system>
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 31. A ‘System’ Model - (example Paremus Service Fabric)
<system name="fx.system" version="1.0"
boundary="fabric" repopath="gateway,nimble-rs,aries,aries-ext,fabric,fabric-ext,nimble-cmpn"
xmlns="http://schema.paremus.com/sf/1">
<description>Deploys a pricer and gateway component wired together using slp and essencermi</description>
<!-- set SystemGroup for security control -->
<nature group="demo" />
<system name="pricer" boundary="fibre">
<system.part category="msf" name="com.example.pricer">
<property name="type" value="firm" />
</system.part> The Pricer Part. A managed service
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.dsw.essencermi" /> fabric based built from
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.discovery.slp" />
com.example.pricer. An
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.topologymanager" />
<replication.handler type="scalable"> instance of which is created with
<property name="scaleFactor" value="1" type="float" /> attribute ‘firm’
<property name="fixedDelta" value="-2" type="integer" />
<property name="minimum" value="1" type="integer" />
</replication.handler>
</system>
....
....
....
</system>
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 32. A ‘System’ Model - (Paremus Service Fabric)
<system name="fx.system" version="1.0"
boundary="fabric" repopath="gateway,nimble-rs,aries,aries-ext,fabric,fabric-ext,nimble-cmpn"
xmlns="http://schema.paremus.com/sf/1">
<description>Deploys a pricer and gateway component wired together using slp and essencermi</description>
<!-- set SystemGroup for security control -->
<nature group="demo" />
<system name="pricer" boundary="fibre">
<system.part category="msf" name="com.example.pricer"> AVRO?
<property name="type" value="firm" />
</system.part>
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.dsw.essencermi" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.discovery.slp" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.topologymanager" />
<replication.handler type="scalable">
<property name="scaleFactor" value="1" type="float" /> Remote Services using the Paremus
<property name="fixedDelta" value="-2" type="integer" /> implementation of the OSGI Alliance RSA
<property name="minimum" value="1" type="integer" /> specification.
</replication.handler>
</system>
In this example Essence RMI is the
.... protocol - and SLP is
.... used for discover. Normally we
....
recommend DDS - which is the default.
</system>
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 33. A ‘System’ Model - (Paremus Service Fabric)
<system name="fx.system" version="1.0"
boundary="fabric" repopath="gateway,nimble-rs,aries,aries-ext,fabric,fabric-ext,nimble-cmpn"
xmlns="http://schema.paremus.com/sf/1">
<description>Deploys a pricer and gateway component wired together using slp and essencermi</description>
<!-- set SystemGroup for security control -->
<nature group="demo" />
<system name="pricer" boundary="fibre">
<system.part category="msf" name="com.example.pricer">
<property name="type" value="firm" />
</system.part> ....
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.dsw.essencermi" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.discovery.slp" />
<system.part category="osgi.active.bundle" name="com.paremus.dosgi.topologymanager" />
<replication.handler type="scalable"> 1
<property name="scaleFactor" value="1" type="float" />
<property name="fixedDelta" value="-2" type="integer" />
<property name="minimum" value="1" type="integer" />
</replication.handler> Many
</system>
.... Replication Handlers control the number
.... of Part instances required in the
.... runtime.
</system>
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 34. DEMO TIME
1. Start a client.
2. Start single node Service Fabric & a simple OBR repository.
3. Load Repository & System model.
4. Deploy System.
5. Apply a property change to the running System.
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 35. Control Loops & Hierarchies
automatic or manual Outer Control Loop (IaaS)
controlling number of VM resources
in the environment
reactive Inner Control Loop (PaaS)
Controls distribution
of software components across
population of available resources
Cloud
Runtime
Highly agile, stable & robust systems tend to use (fast) inner and (slow) outer
provisioning control loops (reference http://www.ist-selfman.org/wiki/images/9/94/
SelfmanFACS06talk.pdf).
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 36. BNDTools <> Service Fabric Integration
Code Run
An OBR centric end-to-end solution
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 37. Modular Systems are Maintainable Systems
Applicability w.r.t OPEX of VM based (non modular)
} private Cloud solutions.
Anne Thomas Manes (Gartner) – SOA Symposium: Berlin, October 2010
OSGi Dev Con 2012 - Cloud Workshop II Copyright © 2005 - 2012 Paremus Ltd. March 2012
May not be reproduced by any means without express permission. All rights reserved.
- 38. Thanks
www.paremus.com
Service Fabric - www.paremus.com/psf
Nimble - www.paremus.com/nimble
Bndtools - http://bndtools.org
info@paremus.com
Service Fabric Overview Copyright © 2012 Paremus Ltd. February 2012
May not be reproduced by any means without express permission. All rights reserved.