Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Making everything better 
©2014 IBM Corporation 
with OSGi 
a happy case study in building a really nice runtime 
Holly Cu...
Let’s talk about WebSphere. 
©2014 IBM Corporation
Let’s talk about WebSphere. 
Awesome capabilities… 
©2014 IBM Corporation
Let’s talk about WebSphere. 
Awesome capabilities… 
©2014 IBM Corporation
Let’s talk about WebSphere. 
Awesome capabilities… 
… for production. 
©2014 IBM Corporation
Let’s talk about WebSphere. 
Awesome capabilities… 
… for production. 
For development, historically not so well-suited. 
...
©2014 IBM Corporation 
History
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
History
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
History 
forever
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
Big codebase 
History ...
History 
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
forever 
Big ...
History 
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
forever 
Big ...
History 
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
forever 
Big ...
History 
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
This is not a...
History 
WebSphere Application Server (the full profile) has been 
around since 1998 
©2014 IBM Corporation 
This is not a...
©2014 IBM Corporation
©2014 IBM Corporation 
Code that has been around 
forever…
©2014 IBM Corporation 
Code that has been around 
forever… 
No matter how good you are, 
or how smart you are
©2014 IBM Corporation 
Code that has been around 
forever… 
No matter how good you are, 
or how smart you are 
If your cod...
©2014 IBM Corporation 
Code that has been around 
forever… 
No matter how good you are, 
or how smart you are 
?! 
If your...
©2014 IBM Corporation 
Code that has been around 
forever… 
No matter how good you are, 
or how smart you are 
If your cod...
©2014 IBM Corporation 
Code that has been around 
forever… 
No matter how good you are, 
or how smart you are 
If your cod...
How do you manage dragons? 
©2014 IBM Corporation 
By Steve Collis from Melbourne, 
Australia [CC-BY-2.0 (http:// 
creativ...
How do you manage dragons? 
©2014 IBM Corporation 
By Steve Collis from Melbourne, 
Australia [CC-BY-2.0 (http:// 
creativ...
How do you manage dragons? 
Clever WebSphere architects OSGi 
©2014 IBM Corporation 
By Steve Collis from Melbourne, 
Aust...
©2014 IBM Corporation 
OSGi and WAS: 
The first pass… 
OSGi was included in WAS v6.1, in 2006 
Went from lots of arbitrary...
Did that fix everything? 
©2014 IBM Corporation
Did that fix everything? 
©2014 IBM Corporation 
Not quite. 
By Steve Collis from 
Melbourne, Australia [CC-BY- 
2.0 (http...
©2014 IBM Corporation 
What if… 
If we could start over, what would we want?
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly 
Simple
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly 
Simple 
Dynamic
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly 
Simple 
Dynamic 
Light-w...
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly 
Simple 
Dynamic 
Light-w...
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly 
Simple 
Dynamic 
Light-w...
©2014 IBM Corporation 
What if… 
If we could start over, what would we want? 
Developer-friendly 
Simple 
Dynamic 
Light-w...
©2014 IBM Corporation 
runtime 
only 
some combination of 
technologies 
! 
app-centered 
everything 
What if… 
grokable 
...
©2014 IBM Corporation 
What if… 
grokable 
config 
runtime 
only 
provisioning 
some combination of 
technologies 
! 
app-...
©2014 IBM Corporation 
What if… 
runtime 
only 
some combination of 
technologies 
! 
everything app-centered 
And yet all...
©2014 IBM Corporation 
What if… 
And for crying out loud, 
can we prevent THIS?! 
3rd runtime 
party 
bundle 
B 
system 
b...
©2014 IBM Corporation 
What if… 
And for crying out loud, 
can we prevent THIS?! 
Applicati 
on 
3rd runtime 
party 
bundl...
©2014 IBM Corporation 
What if… 
And for crying out loud, 
can we prevent THIS?! 
Applicati 
on 
3rd runtime 
party 
bundl...
©2014 IBM Corporation 
What if… 
And for crying out loud, 
can we prevent THIS?! 
Applicati 
on 
X 
3rd runtime 
party 
bu...
©2014 IBM Corporation 
The egg problem 
“Create a light-weight profile of 
WebSphere that starts in under 2 
seconds… Don’...
©2014 IBM Corporation 
The egg problem 
“Create a light-weight profile of 
WebSphere that starts in under 2 
seconds… Don’...
©2014 IBM Corporation 
OSGi maturity model
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity 
Level 4: Loose couplin...
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity 
Level 4: Loose couplin...
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity 
Level 4: Loose couplin...
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity 
Level 4: Loose couplin...
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity 
Level 4: Loose couplin...
©2014 IBM Corporation 
OSGi maturity model 
Level 1: Ad Hoc 
Level 2: Modules 
Level 3: Modularity 
Level 4: Loose couplin...
Dealing with our legacy 
We needed a new kernel 
Used the new base to re-group… 
©2014 IBM Corporation 
Lots of code still...
Building a kernel from scratch 
OSGi-based for all the reasons 
First-class use of OSGi services 
©2014 IBM Corporation 
M...
©2014 IBM Corporation 
Bundle manifests
Bundle manifests? What manifests? 
We use Eclipse .classpath to 
©2014 IBM Corporation 
Determine project build order 
Gen...
Bundle manifests? What manifests? 
We use Eclipse .classpath to 
©2014 IBM Corporation 
Determine project build order 
Gen...
©2014 IBM Corporation 
Configuration 
Settled on XML for configuration format 
Ubiquitous 
Expressive 
BUT, for simplicity...
©2014 IBM Corporation 
Configuration 
Composable system requires composable 
configuration: 
Individual components own the...
©2014 IBM Corporation 
Configuration 
Composable system requires composable 
configuration: 
Individual components own the...
©2014 IBM Corporation 
Configuration 
Composable system requires composable 
configuration: 
Individual components own the...
©2014 IBM Corporation 
Metatype 
Equinox impl + extensions 
Uniform validation of user input 
Define configuration and con...
©2014 IBM Corporation 
Metatype 
Equinox impl + extensions 
Uniform validation of user input 
Define configuration everywh...
©2014 IBM Corporation 
Metatype 
Equinox impl + extensions 
Uniform validation of user input 
Define configuration everywh...
©2014 IBM Corporation 
Metatype 
Equinox impl + extensions 
Uniform validation of user input 
Define configuration everywh...
©2014 IBM Corporation 
Using OSGi Services… 
? 
Declarative Blueprint 
Services 
yes, there are others. 
We focused on the...
©2014 IBM Corporation 
Using OSGi Services… 
Who in their right mind wants to manage 
OSGi services themselves?? 
? 
Decla...
©2014 IBM Corporation 
Using OSGi Services… 
Who in their right mind wants to manage 
OSGi services themselves?? 
Exactly....
©2014 IBM Corporation 
Declarative Services 
We chose DS for two main reasons: 
Timing: Blueprint and Aries were just gett...
©2014 IBM Corporation 
DS is AWESOME! 
DS is a central part of the Liberty runtime 
CA + M + DS = “magic” 
We do insane th...
©2014 IBM Corporation 
But …
©2014 IBM Corporation 
Remember this? 
We need to prevent 
THIS 
Application 
X 
3rd runtime 
party 
bundle 
B system 
bun...
©2014 IBM Corporation 
Package privacy
©2014 IBM Corporation 
Package privacy 
OSGi lets you keep your internals private.
©2014 IBM Corporation 
Package privacy 
OSGi lets you keep your internals private. 
Your externals are public.
©2014 IBM Corporation 
Package privacy 
OSGi lets you keep your internals private. 
Your externals are public. 
Private Pu...
©2014 IBM Corporation 
Package privacy 
OSGi lets you keep your internals private. 
Your externals are public. 
Private Pu...
©2014 IBM Corporation 
Granularity 
bundle C 
bundle A 
bundle B
Granularity bundle D 
bundle E 
bundle F 
bundle G 
bundle H 
©2014 IBM Corporation 
bundle M 
bundle N 
bundle I 
bundle ...
Granularity bundle D 
bundle E 
bundle F 
bundle G 
bundle H 
©2014 IBM Corporation 
bundle M 
bundle N 
bundle I 
bundle ...
Granularity bundle D 
bundle E 
bundle F 
bundle G 
bundle H 
©2014 IBM Corporation 
bundle M 
bundle N 
bundle I 
bundle ...
Granularity bundle D 
bundle E 
bundle F 
bundle G 
bundle H 
©2014 IBM Corporation 
bundle M 
bundle N 
bundle I 
bundle ...
©2014 IBM Corporation 
Granularity 
bundle D 
bundle F 
bundle E 
bun dle G 
b undle M 
bundle N 
bundle I 
bundle K 
bund...
©2014 IBM Corporation 
Granularity 
bundle D 
bundle F 
bundle E 
bun dle G 
b undle M 
bundle N 
bundle I 
bundle K 
bund...
©2014 IBM Corporation 
Granularity 
bundle D 
bundle F 
bundle E 
bun dle G 
b undle M 
bundle N 
bundle I 
bundle K 
bund...
©2014 IBM Corporation 
Granularity 
bundle D 
bundle F 
bundle E 
bun dle G 
b undle M 
bundle N 
bundle I 
bundle K 
bund...
This is not a new requirement 
©2014 IBM Corporation
This is not a new requirement 
Lots of attempts to solve this problem 
©2014 IBM Corporation
This is not a new requirement 
Lots of attempts to solve this problem 
©2014 IBM Corporation 
Eclipse features
This is not a new requirement 
Lots of attempts to solve this problem 
©2014 IBM Corporation 
Eclipse features 
Equinox co...
This is not a new requirement 
Lots of attempts to solve this problem 
©2014 IBM Corporation 
Eclipse features 
Equinox co...
This is not a new requirement 
Lots of attempts to solve this problem 
©2014 IBM Corporation 
Eclipse features 
Equinox co...
OSGi Subsystems are AWESOME 
©2014 IBM Corporation
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation...
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation...
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation...
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation...
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation...
OSGi Subsystems are AWESOME 
A new(ish) OSGi standard 
©2014 IBM Corporation 
Liberty uses the Apache Aries implementation...
bundle E 
©2014 IBM Corporation 
When better boxes is not 
bundle D enough 
bundle F 
bundle G 
bundle H 
bundle M 
bundle...
bundle E 
©2014 IBM Corporation 
When better boxes is not 
bundle D enough 
bundle F 
bundle G 
bundle H 
bundle M 
bundle...
bundle E 
©2014 IBM Corporation 
When better boxes is not 
bundle D enough 
bundle F 
bundle G 
bundle H 
bundle M 
bundle...
bundle E 
©2014 IBM Corporation 
When better boxes is not 
bundle D enough 
bundle F 
bundle G 
bundle H 
bundle M 
bundle...
bundle E 
©2014 IBM Corporation 
When better boxes is not 
bundle D enough 
bundle F 
bundle G 
bundle H 
bundle M 
bundle...
Sophisticated package visibility 
Features explicitly declare API and SPI packages 
(IBM-* metadata in the feature manifes...
©2014 IBM Corporation 
Provisioning
©2014 IBM Corporation 
Provisioning 
Dynamically install features (subsystems) based on 
configuration
©2014 IBM Corporation 
Provisioning 
Dynamically install features (subsystems) based on 
configuration 
Adding or removing...
©2014 IBM Corporation 
Provisioning 
Dynamically install features (subsystems) based on 
configuration 
Adding or removing...
©2014 IBM Corporation 
Provisioning 
Dynamically install features (subsystems) based on 
configuration 
Adding or removing...
©2014 IBM Corporation 
Provisioning 
Dynamically install features (subsystems) based on 
configuration 
Adding or removing...
©2014 IBM Corporation 
Provisioning 
Dynamically install features (subsystems) based on 
configuration 
Adding or removing...
©2014 IBM Corporation 
Did we get rid of 
all the dragons?
©2014 IBM Corporation 
Did we get rid of 
all the dragons? 
By Abraham (Own work) CC-BY-3.0 via Wikimedia Commons
©2014 IBM Corporation 
Did we get rid of 
all the dragons? 
The OSGi 
dragon 
By Abraham (Own work) CC-BY-3.0 via Wikimedi...
©2014 IBM Corporation 
Did we get rid of 
all the dragons? 
The OSGi 
dragon 
By Abraham (Own work) CC-BY-3.0 via Wikimedi...
What version should this be? 
©2014 IBM Corporation
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation 
OSG...
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation 
OSG...
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation 
OSG...
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation 
OSG...
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation 
OSG...
What version should this be? 
This is ALWAYS a hard problem in any non-trivial evolving system 
©2014 IBM Corporation 
OSG...
How do I interact with X? 
Let DS do it. Really. 
DS is excellent at managing non-trivial service 
dependencies 
It is ver...
©2014 IBM Corporation 
Why is my test failing 
intermittently ?
©2014 IBM Corporation 
Why is my test failing 
intermittently ? 
Because something hasn’t happened yet.
Service dynamics can hurt! 
©2014 IBM Corporation
Service dynamics can hurt! 
Service dynamics are a huge hurdle for “new” 
developers 
©2014 IBM Corporation
Service dynamics can hurt! 
Service dynamics are a huge hurdle for “new” 
developers 
DI and IoC can turn even experienced...
Service dynamics can hurt! 
Service dynamics are a huge hurdle for “new” 
developers 
DI and IoC can turn even experienced...
Service dynamics can hurt! 
Service dynamics are a huge hurdle for “new” 
developers 
DI and IoC can turn even experienced...
Service dynamics can still hurt. 
©2014 IBM Corporation
Service dynamics can still hurt. 
Being really lazy is hard work! 
©2014 IBM Corporation
Service dynamics can still hurt. 
Being really lazy is hard work! 
Easy to make assumptions 
©2014 IBM Corporation
Service dynamics can still hurt. 
Being really lazy is hard work! 
Easy to make assumptions 
©2014 IBM Corporation 
Servic...
Service dynamics can still hurt. 
Being really lazy is hard work! 
Easy to make assumptions 
©2014 IBM Corporation 
Servic...
Service dynamics can still hurt. 
Being really lazy is hard work! 
Easy to make assumptions 
©2014 IBM Corporation 
Servic...
©2014 IBM Corporation 
Is the server started?
©2014 IBM Corporation 
Is the server started? 
The server
©2014 IBM Corporation 
Is the server started? 
The server
©2014 IBM Corporation 
Is the server started? What does this 
boundary even mean 
in an extensible 
system? 
The server
©2014 IBM Corporation 
Is the server started? What does this 
boundary even mean 
in an extensible 
system? 
The server
©2014 IBM Corporation 
Is the server started? What does this 
boundary even mean 
in an extensible 
system? 
The server
©2014 IBM Corporation 
Is the server started? What does this 
boundary even mean 
in an extensible 
system? 
The server
©2014 IBM Corporation 
Is the server started? What does this 
boundary even mean 
in an extensible 
system? 
Care about 
t...
©2014 IBM Corporation 
What’s the schema for the 
configuration?
©2014 IBM Corporation 
What’s the schema for the 
configuration? 
Devolved configuration is great. But ..
©2014 IBM Corporation 
What’s the schema for the 
configuration? 
Devolved configuration is great. But .. 
Tolerating unre...
©2014 IBM Corporation 
What’s the schema for the 
configuration? 
Devolved configuration is great. But .. 
Tolerating unre...
©2014 IBM Corporation 
What’s the schema for the 
configuration? 
Devolved configuration is great. But .. 
Tolerating unre...
©2014 IBM Corporation 
What’s the schema for the 
configuration? 
Devolved configuration is great. But .. 
Tolerating unre...
©2014 IBM Corporation 
What’s the schema for the 
configuration? 
Devolved configuration is great. But .. 
Tolerating unre...
©2014 IBM Corporation 
Is it worth it?
©2014 IBM Corporation 
Is it worth it? 
OH YES.
©2014 IBM Corporation 
Is it worth it? 
OH YES. 
Our server is GREAT.
©2014 IBM Corporation 
Is it worth it? 
OH YES. 
Our server is GREAT. 
Starts in 3s …
©2014 IBM Corporation 
Is it worth it? 
OH YES. 
Our server is GREAT. 
Starts in 3s … 
… which we never have to do anyway…
©2014 IBM Corporation 
Is it worth it? 
OH YES. 
Our server is GREAT. 
Starts in 3s … 
… which we never have to do anyway…...
©2014 IBM Corporation 
Is it worth it? 
OH YES. 
Our server is GREAT. 
Starts in 3s … 
… which we never have to do anyway…...
Did it all turn out the way we 
©2014 IBM Corporation 
expected? 
A funny thing happened while we were 
developing for dev...
OSGi was designed for … 
©2014 IBM Corporation
OSGi was designed for … 
©2014 IBM Corporation 
Small embedded system
… but turned out to be perfect for … 
©2014 IBM Corporation
… but turned out to be perfect for … 
©2014 IBM Corporation
Liberty was designed for … 
©2014 IBM Corporation
Liberty was designed for … 
©2014 IBM Corporation 
Developer-scale
… but turned out to be perfect 
©2014 IBM Corporation 
for…
… but turned out to be perfect 
©2014 IBM Corporation 
for… 
BIG scale
… but turned out to be perfect 
BlueMix server 
farm 
©2014 IBM Corporation 
for… 
BIG scale
… but turned out to be perfect 
BlueMix server 
farm 
©2014 IBM Corporation 
for… 
BIG scale 
Lots of Liberty 
instances
©2014 IBM Corporation 
Thank you! 
Questions? 
@holly_cummins 
www.wasdev.net
©2014 IBM Corporation 
Thank you! 
Questions? 
@holly_cummins 
www.wasdev.net 
Oh, a n d I h ave a b o o k !
©2014 IBM Corporation 
Backup
©2014 IBM Corporation 
</cleanSlate> 
Of course, we didn’t really get a clean 
slate. 
Application compatibility had to be...
©2014 IBM Corporation 
Configuration Admin 
We rolled our own (sorry) 
Parse and merge user configuration and bundle-provi...
Metatype 
Equinox impl + extensions 
human readable: 
Uniform validation of user input 
Define configuration and constrain...
Metatype 
Equinox impl + extensions 
type=“String” 
ibm:type=“password” 
Uniform validation of user input 
Define configur...
Metatype 
Equinox impl + extensions 
Uniform validation of user input 
Define configuration and constraints in one place, ...
©2014 IBM Corporation 
Isolation 
We mean this in a good way. 
Liberty runtime serves two masters: 
Typical Application Se...
Private-package declarations pull in 
redundant classes 
Split packages never end well 
©2014 IBM Corporation
Upcoming SlideShare
Loading in …5
×

Making everything better with OSGi - a happy case study in building a really nice runtime - H Cummins

517 views

Published on

OSGi Community Event 2014

Abstract:
The WebSphere Application Server Liberty Profile makes extensive use of OSGi technologies to achieve a dynamic, compact, flexible and powerful application server. Using a foundation of Equinox, Subsytems, Configuration Admin, Metatype, and Declarative Services, we built a right-sized elastically-capable runtimes which allows users to get going with (almost) zero-setup, (almost) zero-hardware, and (really) zero-migration.

This talk will discuss how Liberty uses OSGi, what OSGi gives us, why OSGi services are the best thing since sliced bread, what we've learned, and our development best practices.

Speaker Bio:
Holly Cummins is a senior software engineer developing enterprise middleware with the IBM WebSphere, and a committer on the Apache Aries project. She is a co-author of Enterprise OSGi in Action and has spoken at Devoxx, JavaZone, The ServerSide Java Symposium, JAX London, GeeCon, and the Great Indian Developer Summit, as well as a number of user groups.

Published in: Technology
  • Be the first to comment

Making everything better with OSGi - a happy case study in building a really nice runtime - H Cummins

  1. 1. Making everything better ©2014 IBM Corporation with OSGi a happy case study in building a really nice runtime Holly Cummins cumminsh@uk.ibm.com @holly_cummins
  2. 2. Let’s talk about WebSphere. ©2014 IBM Corporation
  3. 3. Let’s talk about WebSphere. Awesome capabilities… ©2014 IBM Corporation
  4. 4. Let’s talk about WebSphere. Awesome capabilities… ©2014 IBM Corporation
  5. 5. Let’s talk about WebSphere. Awesome capabilities… … for production. ©2014 IBM Corporation
  6. 6. Let’s talk about WebSphere. Awesome capabilities… … for production. For development, historically not so well-suited. ©2014 IBM Corporation
  7. 7. ©2014 IBM Corporation History
  8. 8. WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation History
  9. 9. WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation History forever
  10. 10. WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation Big codebase History forever
  11. 11. History WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation forever Big codebase Big customer base
  12. 12. History WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation forever Big codebase Big customer base Big workloads
  13. 13. History WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation forever Big codebase Big customer base Big workloads … Big inhibitors to massive change
  14. 14. History WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation This is not a complaint. Big codebase Big customer base Big workloads … Big inhibitors to massive change This is a problem we are happy to have. forever
  15. 15. History WebSphere Application Server (the full profile) has been around since 1998 ©2014 IBM Corporation This is not a complaint. Big codebase Big customer base Big workloads … Big inhibitors to massive change This is a problem we are happy to have. But it is still a problem. forever
  16. 16. ©2014 IBM Corporation
  17. 17. ©2014 IBM Corporation Code that has been around forever…
  18. 18. ©2014 IBM Corporation Code that has been around forever… No matter how good you are, or how smart you are
  19. 19. ©2014 IBM Corporation Code that has been around forever… No matter how good you are, or how smart you are If your code lives long enough, and is used enough, it ends up looking like…
  20. 20. ©2014 IBM Corporation Code that has been around forever… No matter how good you are, or how smart you are ?! If your code lives long enough, and is used enough, it ends up looking like…
  21. 21. ©2014 IBM Corporation Code that has been around forever… No matter how good you are, or how smart you are If your code lives long enough, and is used enough, it ends up looking like… dragons ?!
  22. 22. ©2014 IBM Corporation Code that has been around forever… No matter how good you are, or how smart you are If your code lives long enough, and is used enough, it ends up looking like… dragons ?! Especially code that has roots going back to late ‘90s…
  23. 23. How do you manage dragons? ©2014 IBM Corporation By Steve Collis from Melbourne, Australia [CC-BY-2.0 (http:// creativecommons.org/licenses/ by/2.0)], via Wikimedia Commons
  24. 24. How do you manage dragons? ©2014 IBM Corporation By Steve Collis from Melbourne, Australia [CC-BY-2.0 (http:// creativecommons.org/licenses/ by/2.0)], via Wikimedia Commons Clever WebSphere architects
  25. 25. How do you manage dragons? Clever WebSphere architects OSGi ©2014 IBM Corporation By Steve Collis from Melbourne, Australia [CC-BY-2.0 (http:// creativecommons.org/licenses/ by/2.0)], via Wikimedia Commons
  26. 26. ©2014 IBM Corporation OSGi and WAS: The first pass… OSGi was included in WAS v6.1, in 2006 Went from lots of arbitrary jars to a few bundles Achieved some modularity enforced by OSGi We did not use or expose OSGi services Compatibility constraints: WAS is the bottom of the stack Assumptions about resource initialization and availability Entrenched dependencies between some core elements
  27. 27. Did that fix everything? ©2014 IBM Corporation
  28. 28. Did that fix everything? ©2014 IBM Corporation Not quite. By Steve Collis from Melbourne, Australia [CC-BY- 2.0 (http:// creativecommons.org/ licenses/by/2.0)], via Wikimedia Commons
  29. 29. ©2014 IBM Corporation What if… If we could start over, what would we want?
  30. 30. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly
  31. 31. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly Simple
  32. 32. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly Simple Dynamic
  33. 33. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly Simple Dynamic Light-weight
  34. 34. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly Simple Dynamic Light-weight Composable / Flexible
  35. 35. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly Simple Dynamic Light-weight Composable / Flexible Extensible
  36. 36. ©2014 IBM Corporation What if… If we could start over, what would we want? Developer-friendly Simple Dynamic Light-weight Composable / Flexible Extensible human usable configuration selectable content clear API/SPI runtime/app isolation
  37. 37. ©2014 IBM Corporation runtime only some combination of technologies ! app-centered everything What if… grokable config provisioning
  38. 38. ©2014 IBM Corporation What if… grokable config runtime only provisioning some combination of technologies ! app-centered everything How do we do this?
  39. 39. ©2014 IBM Corporation What if… runtime only some combination of technologies ! everything app-centered And yet allow this? no restarts
  40. 40. ©2014 IBM Corporation What if… And for crying out loud, can we prevent THIS?! 3rd runtime party bundle B system bundle A
  41. 41. ©2014 IBM Corporation What if… And for crying out loud, can we prevent THIS?! Applicati on 3rd runtime party bundle B system bundle A
  42. 42. ©2014 IBM Corporation What if… And for crying out loud, can we prevent THIS?! Applicati on 3rd runtime party bundle B system bundle A
  43. 43. ©2014 IBM Corporation What if… And for crying out loud, can we prevent THIS?! Applicati on X 3rd runtime party bundle B system bundle A
  44. 44. ©2014 IBM Corporation The egg problem “Create a light-weight profile of WebSphere that starts in under 2 seconds… Don’t break any eggs” — Ian Robinson (cleverest WebSphere architect)
  45. 45. ©2014 IBM Corporation The egg problem “Create a light-weight profile of WebSphere that starts in under 2 seconds… Don’t break any eggs” — Ian Robinson (cleverest WebSphere architect) By miya (miya's own file) [CC-BY-3.0 (http://creativecommons.org/licenses/by/3.0)], via Wikimedia Commons
  46. 46. ©2014 IBM Corporation OSGi maturity model
  47. 47. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc
  48. 48. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules
  49. 49. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity
  50. 50. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity Level 4: Loose coupling
  51. 51. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity Level 4: Loose coupling Level 5: Devolution
  52. 52. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity Level 4: Loose coupling Level 5: Devolution Level 6: Dynamism
  53. 53. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity Level 4: Loose coupling Level 5: Devolution Level 6: Dynamism Level 7: Peter Kriens
  54. 54. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity Level 4: Loose coupling Level 5: Devolution Level 6: Dynamism Level 7: Peter Kriens Websphere Full Profile
  55. 55. ©2014 IBM Corporation OSGi maturity model Level 1: Ad Hoc Level 2: Modules Level 3: Modularity Level 4: Loose coupling Level 5: Devolution Level 6: Dynamism Level 7: Peter Kriens Websphere Liberty Profile
  56. 56. Dealing with our legacy We needed a new kernel Used the new base to re-group… ©2014 IBM Corporation Lots of code still common with full profile Wrap/Shim: New face on old code Patch: tweak and replace bits where necessary
  57. 57. Building a kernel from scratch OSGi-based for all the reasons First-class use of OSGi services ©2014 IBM Corporation Must react to configuration changes Runtime composition on-the-fly
  58. 58. ©2014 IBM Corporation Bundle manifests
  59. 59. Bundle manifests? What manifests? We use Eclipse .classpath to ©2014 IBM Corporation Determine project build order Generate ant classpath Bnd takes care of the rest Declare services using annotations Bnd makes overrides really easy Useful when integrating legacy code
  60. 60. Bundle manifests? What manifests? We use Eclipse .classpath to ©2014 IBM Corporation Determine project build order Generate ant classpath Bnd takes care of the rest Declare services using annotations Bnd makes overrides really easy Useful when integrating legacy code New developers need to have almost no awareness we’re
  61. 61. ©2014 IBM Corporation Configuration Settled on XML for configuration format Ubiquitous Expressive BUT, for simplicity: single file usable defaults <server description=“simple”> <featureManager> <feature>jsp-2.2</feature> </featureManager> ! <httpEndpoint id=“defaultHttpEndpoint” httpPort=“9080” httpsPort=“9443” /> </server>
  62. 62. ©2014 IBM Corporation Configuration Composable system requires composable configuration: Individual components own their config No centralized repository No externally defined global config model
  63. 63. ©2014 IBM Corporation Configuration Composable system requires composable configuration: Individual components own their config No centralized repository No externally defined global config model Configuration Admin and Metatype - job done
  64. 64. ©2014 IBM Corporation Configuration Composable system requires composable configuration: Individual components own their config No centralized repository No externally defined global config model Configuration Admin and Metatype - job mostly done
  65. 65. ©2014 IBM Corporation Metatype Equinox impl + extensions Uniform validation of user input Define configuration and constraints in one place, it gets used everywhere else. We favor metatype.xml for this reason Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference
  66. 66. ©2014 IBM Corporation Metatype Equinox impl + extensions Uniform validation of user input Define configuration everywhere human else. readable: and constraints in one place, it gets used 1h30m converted to unit of choice We favor metatype.xml for this reason Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference
  67. 67. ©2014 IBM Corporation Metatype Equinox impl + extensions Uniform validation of user input Define configuration everywhere human else. readable: and constraints in one place, it gets used 1h30m converted to unit of choice used by developer tools to help prompt for the right kind of We favor metatype.xml for this reason path: file vs. url Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference
  68. 68. ©2014 IBM Corporation Metatype Equinox impl + extensions Uniform validation of user input Define configuration everywhere human else. readable: and constraints in one place, it gets used 1h30m converted to unit of choice used by developer tools to help prompt for the right kind of We favor metatype.xml for this reason path: file vs. url Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference type=“String” ibm:type=“password” The value is a “SerializedProtectedString”, which is not a String.
  69. 69. ©2014 IBM Corporation Using OSGi Services… ? Declarative Blueprint Services yes, there are others. We focused on these two.
  70. 70. ©2014 IBM Corporation Using OSGi Services… Who in their right mind wants to manage OSGi services themselves?? ? Declarative Blueprint Services yes, there are others. We focused on these two.
  71. 71. ©2014 IBM Corporation Using OSGi Services… Who in their right mind wants to manage OSGi services themselves?? Exactly. NOBODY. ? Declarative Blueprint Services yes, there are others. We focused on these two.
  72. 72. ©2014 IBM Corporation Declarative Services We chose DS for two main reasons: Timing: Blueprint and Aries were just getting started Integration with Configuration Admin and Metatype! Config injected as one unit activate/modified/updated methods Service instance creation based on metatype-declared factory pid DS target filters can be set via configuration
  73. 73. ©2014 IBM Corporation DS is AWESOME! DS is a central part of the Liberty runtime CA + M + DS = “magic” We do insane things with config-derived target filters Our runtime would not be what it is without DS in the middle of it
  74. 74. ©2014 IBM Corporation But …
  75. 75. ©2014 IBM Corporation Remember this? We need to prevent THIS Application X 3rd runtime party bundle B system bundle A
  76. 76. ©2014 IBM Corporation Package privacy
  77. 77. ©2014 IBM Corporation Package privacy OSGi lets you keep your internals private.
  78. 78. ©2014 IBM Corporation Package privacy OSGi lets you keep your internals private. Your externals are public.
  79. 79. ©2014 IBM Corporation Package privacy OSGi lets you keep your internals private. Your externals are public. Private Public
  80. 80. ©2014 IBM Corporation Package privacy OSGi lets you keep your internals private. Your externals are public. Private Public
  81. 81. ©2014 IBM Corporation Granularity bundle C bundle A bundle B
  82. 82. Granularity bundle D bundle E bundle F bundle G bundle H ©2014 IBM Corporation bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B
  83. 83. Granularity bundle D bundle E bundle F bundle G bundle H ©2014 IBM Corporation bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B Wait a minute, it wasn’t supposed to be that public …
  84. 84. Granularity bundle D bundle E bundle F bundle G bundle H ©2014 IBM Corporation bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B Wait a minute, it wasn’t supposed to be that public …
  85. 85. Granularity bundle D bundle E bundle F bundle G bundle H ©2014 IBM Corporation bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle B bundle A
  86. 86. ©2014 IBM Corporation Granularity bundle D bundle F bundle E bun dle G b undle M bundle N bundle I bundle K bundle J bundle O bundle P bundle N bundle L bundle M Q bundle C bundle A bundle B
  87. 87. ©2014 IBM Corporation Granularity bundle D bundle F bundle E bun dle G b undle M bundle N bundle I bundle K bundle J bundle O bundle P bundle N bundle L bundle M Q bundle C bundle A bundle B What bundles do I actually need?
  88. 88. ©2014 IBM Corporation Granularity bundle D bundle F bundle E bun dle G b undle M bundle N bundle I bundle K bundle J bundle O bundle P bundle N bundle L bundle M Q bundle C bundle A bundle B What bundles do I actually need? Could I just have an archive, please?
  89. 89. ©2014 IBM Corporation Granularity bundle D bundle F bundle E bun dle G b undle M bundle N bundle I bundle K bundle J bundle O bundle P bundle N bundle L bundle M Q bundle C bundle A bundle B What bundles do I actually need? Could I just have an archive, please?
  90. 90. This is not a new requirement ©2014 IBM Corporation
  91. 91. This is not a new requirement Lots of attempts to solve this problem ©2014 IBM Corporation
  92. 92. This is not a new requirement Lots of attempts to solve this problem ©2014 IBM Corporation Eclipse features
  93. 93. This is not a new requirement Lots of attempts to solve this problem ©2014 IBM Corporation Eclipse features Equinox composite bundles
  94. 94. This is not a new requirement Lots of attempts to solve this problem ©2014 IBM Corporation Eclipse features Equinox composite bundles Apache Aries Enterprise Bundle Archives (.ebas)
  95. 95. This is not a new requirement Lots of attempts to solve this problem ©2014 IBM Corporation Eclipse features Equinox composite bundles Apache Aries Enterprise Bundle Archives (.ebas) Liberty features (mark 1)
  96. 96. OSGi Subsystems are AWESOME ©2014 IBM Corporation
  97. 97. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation
  98. 98. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation
  99. 99. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation Granularity
  100. 100. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation Granularity Package isolation
  101. 101. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation Granularity Package isolation Packaging
  102. 102. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation Granularity Package isolation Packaging
  103. 103. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation Granularity Package isolation Packaging
  104. 104. OSGi Subsystems are AWESOME A new(ish) OSGi standard ©2014 IBM Corporation Liberty uses the Apache Aries implementation Granularity Package isolation Packaging
  105. 105. bundle E ©2014 IBM Corporation When better boxes is not bundle D enough bundle F bundle G bundle H bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B
  106. 106. bundle E ©2014 IBM Corporation When better boxes is not bundle D enough bundle F bundle G bundle H bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B
  107. 107. bundle E ©2014 IBM Corporation When better boxes is not bundle D enough bundle F bundle G bundle H bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B
  108. 108. bundle E ©2014 IBM Corporation When better boxes is not bundle D enough bundle F bundle G bundle H bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B Extension
  109. 109. bundle E ©2014 IBM Corporation When better boxes is not bundle D enough bundle F bundle G bundle H bundle M bundle N bundle I bundle K bundle L bundle M bundle O bundle J bundle P bundle N bundle Q bundle C bundle A bundle B Resolver hook Extension
  110. 110. Sophisticated package visibility Features explicitly declare API and SPI packages (IBM-* metadata in the feature manifest) Isolation between API/SPI, apps/extensions/runtime is enforced in a few ways: ©2014 IBM Corporation Subsystems (the Aries impl) for OSGi Applications (API) Resolver hooks and/or Eclipse Regions for isolation between runtime, extensions (SPI), and containers (API).
  111. 111. ©2014 IBM Corporation Provisioning
  112. 112. ©2014 IBM Corporation Provisioning Dynamically install features (subsystems) based on configuration
  113. 113. ©2014 IBM Corporation Provisioning Dynamically install features (subsystems) based on configuration Adding or removing features …
  114. 114. ©2014 IBM Corporation Provisioning Dynamically install features (subsystems) based on configuration Adding or removing features … installs or uninstalls bundles…
  115. 115. ©2014 IBM Corporation Provisioning Dynamically install features (subsystems) based on configuration Adding or removing features … installs or uninstalls bundles… which adds or removes configurations…
  116. 116. ©2014 IBM Corporation Provisioning Dynamically install features (subsystems) based on configuration Adding or removing features … installs or uninstalls bundles… which adds or removes configurations… which triggers the creation or removal of services!
  117. 117. ©2014 IBM Corporation Provisioning Dynamically install features (subsystems) based on configuration Adding or removing features … No restart needed. ! #really installs or uninstalls bundles… which adds or removes configurations… which triggers the creation or removal of services!
  118. 118. ©2014 IBM Corporation Did we get rid of all the dragons?
  119. 119. ©2014 IBM Corporation Did we get rid of all the dragons? By Abraham (Own work) CC-BY-3.0 via Wikimedia Commons
  120. 120. ©2014 IBM Corporation Did we get rid of all the dragons? The OSGi dragon By Abraham (Own work) CC-BY-3.0 via Wikimedia Commons
  121. 121. ©2014 IBM Corporation Did we get rid of all the dragons? The OSGi dragon By Abraham (Own work) CC-BY-3.0 via Wikimedia Commons
  122. 122. What version should this be? ©2014 IBM Corporation
  123. 123. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation
  124. 124. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation OSGi just makes the problem more obvious
  125. 125. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation OSGi just makes the problem more obvious Semantic versioning is …
  126. 126. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation OSGi just makes the problem more obvious Semantic versioning is … Beautiful
  127. 127. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation OSGi just makes the problem more obvious Semantic versioning is … Beautiful Insufficient
  128. 128. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation OSGi just makes the problem more obvious Semantic versioning is … Beautiful Insufficient Our developers never touch versions
  129. 129. What version should this be? This is ALWAYS a hard problem in any non-trivial evolving system ©2014 IBM Corporation OSGi just makes the problem more obvious Semantic versioning is … Beautiful Insufficient Our developers never touch versions That’s what a release team is for :)
  130. 130. How do I interact with X? Let DS do it. Really. DS is excellent at managing non-trivial service dependencies It is very unlikely that you will be able to do better — just let DS do it. That means: ©2014 IBM Corporation Don’t register services inside a component Don’t manage references inside a component
  131. 131. ©2014 IBM Corporation Why is my test failing intermittently ?
  132. 132. ©2014 IBM Corporation Why is my test failing intermittently ? Because something hasn’t happened yet.
  133. 133. Service dynamics can hurt! ©2014 IBM Corporation
  134. 134. Service dynamics can hurt! Service dynamics are a huge hurdle for “new” developers ©2014 IBM Corporation
  135. 135. Service dynamics can hurt! Service dynamics are a huge hurdle for “new” developers DI and IoC can turn even experienced brains inside out if they aren’t prepared. Thankfully, they do seem to recover. ©2014 IBM Corporation
  136. 136. Service dynamics can hurt! Service dynamics are a huge hurdle for “new” developers DI and IoC can turn even experienced brains inside out if they aren’t prepared. Thankfully, they do seem to recover. DS helps a LOT ©2014 IBM Corporation
  137. 137. Service dynamics can hurt! Service dynamics are a huge hurdle for “new” developers DI and IoC can turn even experienced brains inside out if they aren’t prepared. Thankfully, they do seem to recover. DS helps a LOT But … ©2014 IBM Corporation
  138. 138. Service dynamics can still hurt. ©2014 IBM Corporation
  139. 139. Service dynamics can still hurt. Being really lazy is hard work! ©2014 IBM Corporation
  140. 140. Service dynamics can still hurt. Being really lazy is hard work! Easy to make assumptions ©2014 IBM Corporation
  141. 141. Service dynamics can still hurt. Being really lazy is hard work! Easy to make assumptions ©2014 IBM Corporation Service availability
  142. 142. Service dynamics can still hurt. Being really lazy is hard work! Easy to make assumptions ©2014 IBM Corporation Service availability Event ordering
  143. 143. Service dynamics can still hurt. Being really lazy is hard work! Easy to make assumptions ©2014 IBM Corporation Service availability Event ordering Especially in our tests
  144. 144. ©2014 IBM Corporation Is the server started?
  145. 145. ©2014 IBM Corporation Is the server started? The server
  146. 146. ©2014 IBM Corporation Is the server started? The server
  147. 147. ©2014 IBM Corporation Is the server started? What does this boundary even mean in an extensible system? The server
  148. 148. ©2014 IBM Corporation Is the server started? What does this boundary even mean in an extensible system? The server
  149. 149. ©2014 IBM Corporation Is the server started? What does this boundary even mean in an extensible system? The server
  150. 150. ©2014 IBM Corporation Is the server started? What does this boundary even mean in an extensible system? The server
  151. 151. ©2014 IBM Corporation Is the server started? What does this boundary even mean in an extensible system? Care about the services you care about
  152. 152. ©2014 IBM Corporation What’s the schema for the configuration?
  153. 153. ©2014 IBM Corporation What’s the schema for the configuration? Devolved configuration is great. But ..
  154. 154. ©2014 IBM Corporation What’s the schema for the configuration? Devolved configuration is great. But .. Tolerating unrecognised elements is great when your config is correct.
  155. 155. ©2014 IBM Corporation What’s the schema for the configuration? Devolved configuration is great. But .. Tolerating unrecognised elements is great when your config is correct. It’s not so good when your config is wrong.
  156. 156. ©2014 IBM Corporation What’s the schema for the configuration? Devolved configuration is great. But .. Tolerating unrecognised elements is great when your config is correct. It’s not so good when your config is wrong. Aggregated documentation is good for users.
  157. 157. ©2014 IBM Corporation What’s the schema for the configuration? Devolved configuration is great. But .. Tolerating unrecognised elements is great when your config is correct. It’s not so good when your config is wrong. Aggregated documentation is good for users. Aggregated documentation is (sort of) needed for tooling
  158. 158. ©2014 IBM Corporation What’s the schema for the configuration? Devolved configuration is great. But .. Tolerating unrecognised elements is great when your config is correct. It’s not so good when your config is wrong. Aggregated documentation is good for users. Aggregated documentation is (sort of) needed for tooling We generate an xsd at build-time so tooling can validate user config
  159. 159. ©2014 IBM Corporation Is it worth it?
  160. 160. ©2014 IBM Corporation Is it worth it? OH YES.
  161. 161. ©2014 IBM Corporation Is it worth it? OH YES. Our server is GREAT.
  162. 162. ©2014 IBM Corporation Is it worth it? OH YES. Our server is GREAT. Starts in 3s …
  163. 163. ©2014 IBM Corporation Is it worth it? OH YES. Our server is GREAT. Starts in 3s … … which we never have to do anyway…
  164. 164. ©2014 IBM Corporation Is it worth it? OH YES. Our server is GREAT. Starts in 3s … … which we never have to do anyway… … because it’s fully dynamic
  165. 165. ©2014 IBM Corporation Is it worth it? OH YES. Our server is GREAT. Starts in 3s … … which we never have to do anyway… … because it’s fully dynamic Concise, shareable configuration
  166. 166. Did it all turn out the way we ©2014 IBM Corporation expected? A funny thing happened while we were developing for developers …
  167. 167. OSGi was designed for … ©2014 IBM Corporation
  168. 168. OSGi was designed for … ©2014 IBM Corporation Small embedded system
  169. 169. … but turned out to be perfect for … ©2014 IBM Corporation
  170. 170. … but turned out to be perfect for … ©2014 IBM Corporation
  171. 171. Liberty was designed for … ©2014 IBM Corporation
  172. 172. Liberty was designed for … ©2014 IBM Corporation Developer-scale
  173. 173. … but turned out to be perfect ©2014 IBM Corporation for…
  174. 174. … but turned out to be perfect ©2014 IBM Corporation for… BIG scale
  175. 175. … but turned out to be perfect BlueMix server farm ©2014 IBM Corporation for… BIG scale
  176. 176. … but turned out to be perfect BlueMix server farm ©2014 IBM Corporation for… BIG scale Lots of Liberty instances
  177. 177. ©2014 IBM Corporation Thank you! Questions? @holly_cummins www.wasdev.net
  178. 178. ©2014 IBM Corporation Thank you! Questions? @holly_cummins www.wasdev.net Oh, a n d I h ave a b o o k !
  179. 179. ©2014 IBM Corporation Backup
  180. 180. ©2014 IBM Corporation </cleanSlate> Of course, we didn’t really get a clean slate. Application compatibility had to be preserved. !
  181. 181. ©2014 IBM Corporation Configuration Admin We rolled our own (sorry) Parse and merge user configuration and bundle-provided defaults Resolve variables Provide configuration to consumers as required by the spec (mostly)
  182. 182. Metatype Equinox impl + extensions human readable: Uniform validation of user input Define configuration and constraints in one place, it gets used everywhere else. 1h30m converted to unit of used by developer tools to ©2014 IBM Corporation help prompt for the right kind of path: file vs. url We favor metatype.xml for this reason Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference unique, final, variable, etc. http://www-01.ibm.com/support/knowledgecenter/was_beta_liberty/ com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_extensions_osgi_metatype.html
  183. 183. Metatype Equinox impl + extensions type=“String” ibm:type=“password” Uniform validation of user input Define configuration and constraints in one place, it gets used everywhere else. ©2014 IBM Corporation The value is a “SerializedProtectedString”, which is not a String. We favor metatype.xml for this reason Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference unique, final, variable, etc. http://www-01.ibm.com/support/knowledgecenter/was_beta_liberty/ com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_extensions_osgi_metatype.html
  184. 184. Metatype Equinox impl + extensions Uniform validation of user input Define configuration and constraints in one place, it gets used everywhere else. ©2014 IBM Corporation We favor metatype.xml for this reason This is some crazy stuff. ibm:type=“pid” ibm:reference=“specific.service.pid” Allows nested configuration elements Custom namespace for additional types and validators ibm:type — duration, location, password pid/reference unique, final, variable, etc. to define service relationships http://www-01.ibm.com/support/knowledgecenter/was_beta_liberty/ com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_extensions_osgi_metatype.html
  185. 185. ©2014 IBM Corporation Isolation We mean this in a good way. Liberty runtime serves two masters: Typical Application Server paradigm (apps strictly separated from runtime) — API Platform extender paradigm (the “app” is the runtime) — SPI Persistent problem: how to allow apps or extensions to use their own versions of libraries that don't conflict with the runtime!?
  186. 186. Private-package declarations pull in redundant classes Split packages never end well ©2014 IBM Corporation

×