b a c d b a the existential question why osgi hello world
play

B A C D B A The existential question Why OSGi? Hello World - PowerPoint PPT Presentation

OSGi enRoute An Development Chain for OSGi B A C D B A The existential question Why OSGi? Hello World is not a benchmark Dev Chain Language Small versus Large dynamic Java & languages OSGi cost of change


  1. OSGi enRoute An Development Chain for OSGi αβ

  2. B A C D B A

  3. The existential question

  4. Why OSGi?

  5. “Hello World”

  6. … is not a benchmark

  7. Dev Chain Language

  8. Small versus Large dynamic Java & languages OSGi cost of change However, long term cost is much lower Startup cost of Java (statically typed languages) is higher functionality

  9. Your IDE knows exactly who is using this Javascript Java target.foo(15,”abc”); target.foo(15,”abc”); You KNOW target You HOPE target implements foo … implements foo … and expects an integer and a string

  10. OSGi extends type safety to modules that evolve

  11. What is OSGi enRoute? dynamic Java & languages OSGi cost of change functionality

  12. How?

  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. Development Process test Components build enRoute � Profile Run � Deployable � compile define Descriptor Unit resolve other � API’s Distro baseline release external dependencies QA & Production staging

  15. bnd, the little engine that built …

  16. gradle, ant bndtools bnd maven (eclipse) command line bndlib

  17. workspace cnf project project bundle bundle

  18. profiles

  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. 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. 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. 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. 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. dependency package com.api bind publish subscribe

  25. Components Component (object)

  26. Creates a component Can (de)activate, gets configuration data Service dependency

  27. Bundles Bundle component component component component

  28. Bundles Bundle

  29. Private packages Calculated imports Exported packages bnd descriptor

  30. Content, e.g. Component XML Continuous build JARs

  31. external dependencies (or where the heck is maven central????)

  32. Repository (includes maven central)

  33. Opens browser window Search repos

  34. Assemble OSGi Framework OSGi Framework Bundle Bundle Bundle Bundle Bundle Bundle

  35. distros

  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. how do we prevent vendor lock-in?

  38. Capability Model Requirement namespace Capability (foo>=14) foo =14 base =“bar” id =21

  39. Capability Model Import osgi.wiring.package Export (& (osgi.wiring.package=com.acme) osgi.wiring.package=com.acme (version>=1.2) version=1.2 )

  40. Debug Requirements Resolve requirements bndrun descriptor

  41. Resolved bundles Running

  42. staging

  43. Staging OSGi Framework

  44. Export

  45. release

  46. Semantic Versioning • major – Breaking change for consumers • minor – Breaking change for providers • micro – Invisible change

  47. baselining

  48. Released bundles

  49. NoSuchMethodException

  50. version wrong Incompatible API change

  51. command line

  52. continuous integration

  53. summary

  54. bnd(tools) gradle, bnd command IDE? line? Workspace Package Method Bundle Class parameters package method bundle class package method bundle return class jpm4j travis Continuous (maven central) Repository? Integration?

  55. // TODO

  56. TODO • bnd(tools) documentation • Base Tutorial • Additional profiles • Additional deployment standards • Create a community!

Recommend


More recommend