The document discusses managing software complexity with OSGi. It defines complexity as the energy required to complete a task. Modularity reduces complexity by limiting interdependence between modules. OSGi addresses issues like class loading and dependency hell that emerge from tightly coupled systems. Tools are needed to manage metadata and dependencies in OSGi environments. Overall, OSGi promotes a microservices architecture and incremental development to reduce complexity.
1 of 51
Downloaded 124 times
More Related Content
How to manage software complexity with OSGi
1. How to Manage
Software Complexity
with OSGi
Peter Kriens & David Savage
donderdag 24 maart 2011
4. The puzzle looks very simple,
contrary to many other wire
puzzles, that look scary and
complex right from the start.
Nevertheless, its looks are
deceiving, as it can prove to
be frustratingly dif鍖cult to
solve.
donderdag 24 maart 2011
6. Complex?
Worlds Largest Jigsaw Puzzle
24.000 pieces
(4.28m x 1.57m)
donderdag 24 maart 2011
7. The Eye Of The
Beholder
Complexity of a task is the energy you use
to complete that task
c = E/m
donderdag 24 maart 2011
8. The Eye Of The
Beholder
Complexity of a task is the energy you use
to complete that task
c = E/m
donderdag 24 maart 2011
9. Energy?
Understanding the problem
Learning the solution
Accidental complexity
Size matters!
donderdag 24 maart 2011
10. Energy?
Subjective Complexity
Understanding the problem
Learning the solution
Accidental complexity
Size matters!
donderdag 24 maart 2011
11. Energy?
Subjective Complexity
Understanding the problem
Learning the solution
Accidental complexity
Size matters!
Absolute Complexity
size related
donderdag 24 maart 2011
13. Modularity
Functions
local variables
Object Oriented
fields, methods, inheritance,
polymorphism
instances
Bundles
implementations, services
components
donderdag 24 maart 2011
14. Modularity
Functions
local variables
Object Oriented
fields, methods, inheritance,
polymorphism
instances
Bundles
implementations, services
components
donderdag 24 maart 2011
15. Modularity
Modularity is about
creating a difference
between an inside and an A B
outside AB
CD
Chunking - having an
anchor for an aggregation C D
Visibility - is reduced,
reducing the scope to
attend for changes
donderdag 24 maart 2011
16. Modularity
Modularity is about
creating a difference
between an inside and an A B
outside
Chunking - having an
anchor for an aggregation C
AB
CD
D
Visibility - is reduced,
reducing the scope to
attend for changes
donderdag 24 maart 2011
17. Modularity
modules have a private
space and share a
public space A B
modules limit their
visibility and exposure
C D
Reduces geometric to
linear complexity
donderdag 24 maart 2011
18. Modularity
modules have a private
space and share a
public space A B
modules limit their Pub
visibility and exposure
C D
Reduces geometric to
linear complexity
donderdag 24 maart 2011
19. Modularity
modules have a private
space and share a
public space A B
modules limit their Pub
visibility and exposure
C D
Reduces geometric to
linear complexity
donderdag 24 maart 2011
20. Entropy
E functionality
Emodularization
donderdag 24 maart 2011
21. Entropy
E functionality
Emodularization
donderdag 24 maart 2011
22. Entropy
E functionality
Emodularization
donderdag 24 maart 2011
23. Entropy
E functionality
Emodularization
donderdag 24 maart 2011
24. Entropy
E functionality
Emodularization
donderdag 24 maart 2011
25. Entropy
E functionality
Emodularization
donderdag 24 maart 2011
28. Class Loading Revisited
Class.forName
Class path Scanning
Service Loader
Thread Context Class Loaders
Factory, and FactoryBuilders
donderdag 24 maart 2011
29. Class Loading Revisited
Class loaders are used
to provide extensibility
and decoupling A B
They were not Pub
designed for this
purpose, C D
And class loaders break
module boundaries
donderdag 24 maart 2011
35. Would be nice to mention
how 袖Services reduce surface
area of design
袖Services
efficiency of packet based
approaches?
but cost of packet based system
is congestion - leads into
dependency hell?
donderdag 24 maart 2011
39. Coupling
Modules require other
modules
Dependencies are A B
transitive Pub
ACD C D
donderdag 24 maart 2011
40. Coupling
Modules require other
modules
Dependencies are A B
transitive Pub
ACD C D
donderdag 24 maart 2011
41. Cohesion
Fan out is a problem
A does not transitively
depend on D! A B
The dependency is
caused by
C D
(unnecessarily) packing
1 and 2 in the same
module
donderdag 24 maart 2011
42. Cohesion
Fan out is a problem
A does not transitively
depend on D! A A B
The dependency is
caused by 1 2 D
(unnecessarily) packing C
1 and 2 in the same
module
donderdag 24 maart 2011
43. Cohesion
Refactoring can
increase the cohesion
and reduce coupling A B
But now A depends on
C1 and B depends on C2
C 1 C
2 D
Package dependencies C
are more robust to
changes
donderdag 24 maart 2011
44. Cohesion
Refactoring can
increase the cohesion
and reduce coupling A B
But now A depends on
C1 and B depends on C2
C
1 C
2 D
Package dependencies
are more robust to
changes
donderdag 24 maart 2011
47. Tools
1 Request deployment of a
component, e.g. a Bundle,
WAR, WAB or EAR
2 Refer to
Application
Policy Resolver
App
Policy
3 Resolve
Dependencies 4 Provision
according to component and
Policy dependencies
Repository
Nimble
donderdag 24 maart 2011
48. Tools
1 Request deployment of a
component, e.g. a Bundle,
WAR, WAB or EAR
2 Refer to
Application
Policy Resolver
App
Policy
3 Resolve
Dependencies 4 Provision
according to component and
Policy dependencies
Repository
Nimble
donderdag 24 maart 2011
51. How to Manage
Complexity?
Prepare to spend energy!
Architecture = 袖service model
Use tools to manage Metadata and
Dependencies
Small increments
One test is worth a thousand opinions.
donderdag 24 maart 2011