OSGi enRoute
An Development Chain for OSGi
αβ
A
B
A
B
C
D
7.
04.23.14 EnRoute LOGO DEVELOPMENT ALTERNATIVE DESIGN SOLUTIONS
A
1
B C
EnRoute LOGO DEVELOPMENT ALTERNATIVE...
The existential
question
Why OSGi?
“Hello World”
… is not a benchmark
Language
Dev Chain
Small versus Large
costofchange
functionality
dynamic
languages
Java &
OSGi
Startup cost of Java
(statically typed
languag...
target.foo(15,”abc”); target.foo(15,”abc”);
Javascript Java
You HOPE target
implements foo …
You KNOW target
implements fo...
OSGi extends type safety
to modules that evolve
What is OSGi enRoute?
costofchange
functionality
dynamic
languages
Java &
OSGi
How?
OSGi enRoute
• µService Oriented Programming
• To reduce system complexity
• Dependency Management
• To reduce errors in d...
Development Process
Components
Run!
Descriptor
Distro
enRoute!
Profile
other!
API’s
Deployable!
Unit
test
compile
resolve
b...
bnd, the little engine
that built …
bndlib
bndtools
(eclipse)
maven
gradle, ant
bnd
command line
bundle bundle
workspace
project
cnf
project
profiles
Profiles
• A profile is specific catalog of specifications that vendors
can provide in a distribution.
• An OSGi Profile consis...
Profiles
• Each OSGi enRoute Profile is represented by a
clean signed JAR library that can be used to build
bundles against....
Planned Profiles
• java 1.8 — All profiles are based on Java 1.8
• base — A minimum profile, mostly as common base and for
de...
Base Profile
• OSGi Core Framework — R6
• OSGi Compendium — ConfigurationAdmin, Coordinator, EventAdmin,
LogService, MetaTyp...
Base Profile
• OSGi enRoute services!
• Authenticator and Authority — For extensible security
• ConfigurationDone — To signa...
package com.api
publishbind
subscribe
dependency
Components
Component
(object)
Creates a component
Can (de)activate, gets
configuration data
Service dependency
Bundles
Bundle
component
component
component
component
Bundles
Bundle
Private packages
Exported packages
Calculated imports
bnd descriptor
Continuous build JARs
Content, e.g.
Component XML
external
dependencies
(or where the heck is maven
central????)
Repository
(includes maven central)
Search repos
Opens browser window
OSGi Framework
Bundle
Assemble
Bundle
Bundle
Bundle
Bundle
Bundle
OSGi Framework
distros
Distros
• A distro provides the runtime environment for one
or more profiles
• The OSGi enRoute project will deliver a refe...
how do we prevent
vendor lock-in?
foo =14
base =“bar”
id =21
namespace
Capability Model
(foo>=14)
Requirement Capability
osgi.wiring.package
Capability Model
(&
(osgi.wiring.package=com.acme)
(version>=1.2)
)
Import Export
osgi.wiring.package=...
Resolve requirements
bndrun descriptor
Requirements
Debug
Running
Resolved bundles
staging
Staging
OSGi Framework
Export
release
Semantic Versioning
• major – Breaking change for consumers
• minor – Breaking change for providers
• micro – Invisible ch...
baselining
Released bundles
NoSuchMethodException
Incompatible API change
version wrong
command line
continuous integration
summary
Continuous
Integration?
IDE?
command
line?
Repository?
MethodClassPackageBundleWorkspace returnparameters methodmethodclas...
// TODO
TODO
• bnd(tools) documentation
• Base Tutorial
• Additional profiles
• Additional deployment standards
• Create a communit...
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
Upcoming SlideShare
Loading in …5
×

OSGi enRoute Unveiled - P Kriens

2,307 views

Published on

OSGi enRoute is an OSGi project to make OSGi as easy to use as some of non-java dynamic web development environments but still provide the benefits of OSGi's strong modularity. OSGi makes it easy to get started with OSGi by providing an integrated tool chain with several runtime environments, that uses OSGi as it always was intended to be used. By leveraging OSGi's powerful features like services and the powerful requirement/capability model, development of applications can be significantly simplified.

This presentation will provide an introduction to OSGi, the way it is used in enRoute, and then a demo of how to build an application with enRoute.

Bio:
Peter Kriens is an independent consultant since 1990.He currently works for the OSGi Alliance and Paremus. During the eighties he developed advanced distributed systems for newspapers based on microcomputers based on, at the time very novel, object oriented technologies. For this experience in Objects he was hired by a number of international companies, including Adobe, Intel, Ericsson, IBM, and many others. During his work at Ericsson Research in 1998 he got involved with the OSGi specification; Later he became the primary editor for these specifications. In 2005 he was awarded the OSGi Fellows title. After taking a sabbatical in 2012 to develop jpm4j he returned to the OSGi Alliance to help increasing adoption. He is Dutch but decided to live in France.

Published in: Technology, Education
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,307
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
73
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

OSGi enRoute Unveiled - P Kriens

  1. 1. OSGi enRoute An Development Chain for OSGi αβ
  2. 2. A B A B C D 7. 04.23.14 EnRoute LOGO DEVELOPMENT ALTERNATIVE DESIGN SOLUTIONS A 1 B C EnRoute LOGO DEVELOPMENT ALTERNATIVE DESIGN SOLUTIONS A B C A B C04.23.14 EnRoute LOGO DEVELOPMENT ALTERNATIVE DESIGN SOLUTIONS A 1 2 3 B CEnRoute LOGO DEVELOPMENT ALTERNATIVE DESIGN SOLUTIONS A B C 04.23.14 EnRoute LOGO DEVELOPMENT ALTER A 1 2 3 B C 1 2 3 2 3 04.23.14 EnRoute LOGO DEVELOPMENT ALTERNATIVE DESIGN SOLU A 1 2 3 B C
  3. 3. The existential question
  4. 4. Why OSGi?
  5. 5. “Hello World”
  6. 6. … is not a benchmark
  7. 7. Language Dev Chain
  8. 8. Small versus Large costofchange functionality dynamic languages Java & OSGi Startup cost of Java (statically typed languages) is higher However, long term cost is much lower
  9. 9. target.foo(15,”abc”); target.foo(15,”abc”); Javascript Java You HOPE target implements foo … You KNOW target implements foo … and expects an integer and a string Your IDE knows exactly who is using this
  10. 10. OSGi extends type safety to modules that evolve
  11. 11. What is OSGi enRoute? costofchange functionality dynamic languages Java & OSGi
  12. 12. How?
  13. 13. OSGi enRoute • µService Oriented Programming • To reduce system complexity • Dependency Management • To reduce errors in development & operations • Tooling • To reduce time to market • Documentation & Training • To reduce confusion with developers
  14. 14. Development Process Components Run! Descriptor Distro enRoute! Profile other! API’s Deployable! Unit test compile resolve build release define baseline external dependencies QA & Production staging
  15. 15. bnd, the little engine that built …
  16. 16. bndlib bndtools (eclipse) maven gradle, ant bnd command line
  17. 17. bundle bundle workspace project cnf project
  18. 18. profiles
  19. 19. Profiles • A profile is specific catalog of specifications that vendors can provide in a distribution. • An OSGi Profile consists of • µServices — Specifications of either OSGi Alliance or external µservices. • Extenders — An extender provides support functionality to OSGi bundles. • Capabilities — A capability describes a feature/function/ resource of the underlying system in abstract format.
  20. 20. Profiles • Each OSGi enRoute Profile is represented by a clean signed JAR library that can be used to build bundles against. • This is a specification only library, • It can not introduce unwanted dependencies, or • Let developers accidentally use proprietary features of a vendor
  21. 21. Planned Profiles • java 1.8 — All profiles are based on Java 1.8 • base — A minimum profile, mostly as common base and for demonstrations. It provides support for the best practices in our industry. • base.debug — Supports developing and debugging • web — Web application development optimized for single page web apps. • web.debug — Supports developing and debugging web apps. • persistence — Provides support for JPA on OSGi
  22. 22. Base Profile • OSGi Core Framework — R6 • OSGi Compendium — ConfigurationAdmin, Coordinator, EventAdmin, LogService, MetaTypeService,UserAdmin • Logging — Extensive Java Logging and SLF4J (dynamic!) logging support. Both service based an statics. • OSGi enRoute Support! • Requirements and Capabilities — Completely developed with the R&C model in mind • Specifications in code — Extensive support to use Java classes and interfaces to also specifies non-Java aspects. E.g. license headers, forms, versioning, etc. Mostly through annotations.
  23. 23. Base Profile • OSGi enRoute services! • Authenticator and Authority — For extensible security • ConfigurationDone — To signal end of initialization at startup • DTOs — Extensive support for Data Transfer Objects (JSON, conversion, diffing, named access) • Launched — Provides access to startup parameters • LoggerAdmin — Administrative front end to logging. Can handle OSGi, SLF4J, and Java Logging • java.util.Timer — Scheduled tasks • java.util.concurrent.Executor — Background tasks
  24. 24. package com.api publishbind subscribe dependency
  25. 25. Components Component (object)
  26. 26. Creates a component Can (de)activate, gets configuration data Service dependency
  27. 27. Bundles Bundle component component component component
  28. 28. Bundles Bundle
  29. 29. Private packages Exported packages Calculated imports bnd descriptor
  30. 30. Continuous build JARs Content, e.g. Component XML
  31. 31. external dependencies (or where the heck is maven central????)
  32. 32. Repository (includes maven central)
  33. 33. Search repos Opens browser window
  34. 34. OSGi Framework Bundle Assemble Bundle Bundle Bundle Bundle Bundle OSGi Framework
  35. 35. distros
  36. 36. Distros • A distro provides the runtime environment for one or more profiles • The OSGi enRoute project will deliver a reference distribution for all profiles based on open source and OSGi provided bundles • Members and other companies can provide other, competing, interoperable, distributions (And are actively encouraged to do so).
  37. 37. how do we prevent vendor lock-in?
  38. 38. foo =14 base =“bar” id =21 namespace Capability Model (foo>=14) Requirement Capability
  39. 39. osgi.wiring.package Capability Model (& (osgi.wiring.package=com.acme) (version>=1.2) ) Import Export osgi.wiring.package=com.acme version=1.2
  40. 40. Resolve requirements bndrun descriptor Requirements Debug
  41. 41. Running Resolved bundles
  42. 42. staging
  43. 43. Staging OSGi Framework
  44. 44. Export
  45. 45. release
  46. 46. Semantic Versioning • major – Breaking change for consumers • minor – Breaking change for providers • micro – Invisible change
  47. 47. baselining
  48. 48. Released bundles
  49. 49. NoSuchMethodException
  50. 50. Incompatible API change version wrong
  51. 51. command line
  52. 52. continuous integration
  53. 53. summary
  54. 54. Continuous Integration? IDE? command line? Repository? MethodClassPackageBundleWorkspace returnparameters methodmethodclass classpackage packagebundle bundle bnd(tools) gradle, bnd jpm4j (maven central) travis
  55. 55. // TODO
  56. 56. TODO • bnd(tools) documentation • Base Tutorial • Additional profiles • Additional deployment standards • Create a community!

×