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.

Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos

296 views

Published on

OSGi Community Event 2016 Presentation by Balázs Zsoldos (Everit Kft.)

Have you ever felt that your system could collapse like the house of cards? Has it ever happened to you that an OSGi component got unsatisfied and that caused a chain reaction? It can be hard to find the root cause when you see 50+ non-active components. In this talk, we will show, how these issues can be solved quickly so programming can be fun again.

In the first part of the talk we will introduce our component model that is based on the concept of Declarative Services. There are minor changes, the ones that allow us to handle large set of component graphs easily.

In the second part

we will play a short game with the audience. One must cause a mistake in a large system while another developer (who did not see the change) must fix it.
there will be a demo where we set up a complex Servlet Container with multiple Servlet Contexts, Servlets, and Filters via configuration.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos

  1. 1. Avoid the chaos Handling 100+ OSGi components Balázs Zsoldos
  2. 2. Everit Component Model (ECM) since 2014
  3. 3. Source: Inglourious Basterds
  4. 4. Why another Component Model?
  5. 5. Blueprint Declarative Services
  6. 6. OSGi Service Component Reference
  7. 7. DS DataSource Business Log C Cache Declarative Services
  8. 8. UserDataServlet Servlet Context ErrorServletLoginServlet Not Supported Declarative Services
  9. 9. UserDataServlet Whiteboard extender ErrorServletLoginServlet Whiteboard Declarative Services
  10. 10. Whiteboard extender
  11. 11. Whiteboard extender Aries JPA Extender Blueprint
  12. 12. Source: Reservoir dogs movie
  13. 13. Whiteboard extender ServletContextComponent Authentication Filter URL Redirect Filter User Mgmt Servlet Login Servlet Authentication Filter URL Redirect Filter User Mgmt Servlet Login Servlet TestComponent
  14. 14. Source: Home Alone movie
  15. 15. Declarative Services Everit Component Model
  16. 16. UserDataServlet Servlet Context ErrorServletLoginServlet Not Supported Declarative Services
  17. 17. Package 2 Bundle B Bundle A Package 1 Capability Bundle BBundle B
  18. 18. UserDataServlet Servlet Context ErrorServletLoginServlet
  19. 19. AuthFilter Servlet Context Whatever Filter URLRewriteFilter
  20. 20. AuthFilter Servlet Context Whatever Filter URLRewriteFilter 0. 1. 2.
  21. 21. XML Transform Camel Route XML Digital Signature XML Validator 0. 1. 2.
  22. 22. Authentication Servlet Servlet Context Authorization Servlet LoginServlet /login /auth /auth /a /authrConfigAdmin /authn
  23. 23. logService.target: (implementation=felix) servlet.clause: loginServlet;filter:=(service.pid=...) servlet.clause: ...;init_param1=value1;init_param2=value2 Targeting references
  24. 24. public enum ComponentState { STOPPED, UNSATISFIED, STARTING, ACTIVE, STOPPING, FAILED, FAILED_PERMANENT } // Throwable, restart on configuration change // Throwable, never restart
  25. 25. ecm-extender-ri ecm-component-ri ecm-component-api ecm-metadata ecm-util-method linkage-api capabilitycollector ecm-annotation-metadatabuilder ecm-annotation ecm-extender-api
  26. 26. @StringAttribute private String stringAttribute; public void setStringAttribute(String stringAttribute) { this.stringAttribute = stringAttribute; } private Integer integerAttribute; @IntegerAttribute public void setIntAttribute(Integer integerAttribute) { this.integerAttribute = integerAttribute; } private String[] names; @StringAttribute(dynamic = true) public void setStringAttribute(String[] names) { this.names = names; }
  27. 27. OSGi service Bundle Capability ECM Component
  28. 28. Demo
  29. 29. http://everit.org/ecm/index.html
  30. 30. Source: Inglourious Basterds
  31. 31. Source: Inglourious Basterds
  32. 32. ecm-extender-ri ecm-component-ri ecm-component-api ecm-metadata ecm-util-method linkage-api capabilitycollector ecm-annotation-metadatabuilder ecm-annotation ecm-extender-api OSGi service Bundle Capability ECM Component Twitter: @EveritOrg

×