iPOJO 2.x - a tale about dynamism

1,379 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,379
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

iPOJO 2.x - a tale about dynamism

  1. 1. Clement Escoffier,Pierre Bourret
  2. 2. OSGi™&Dynamic Systems
  3. 3. Module LayerLifecycle LayerService LayerModular, Static applicationsExtender-based approach(coarse grain dynamism)Dynamic applications(fine-grain dynamism)
  4. 4. Why choosing the harder case ?
  5. 5. Adaptability
  6. 6. SomethingSomewhereSomehow
  7. 7. iPOJO2005 - 2012
  8. 8. iPOJO 0.x2005 - 2008
  9. 9. A simple model to developdynamic applications
  10. 10. Plain Old Java Object
  11. 11. Just the business logic
  12. 12. @Component@Instantiatepublic class Host {@Requiresprivate Shape[] shapes;public Host() {// Create the frame...}//...}
  13. 13. @Component@Provides@Instantiatepublic class Circle implements Shape {@ServiceProperty(name=Shape.NAME_PROPERTY)private String name;@Validatepublic void start() {name = "Circle";}public void draw(Graphics2D g2, Point p) {// Draw a circle}}
  14. 14. iPOJO 1.x2008 - 2012
  15. 15. Extension of thedependency modeltemporal, proxies, graceperiods, consistency, caching…
  16. 16. Reacheda level of maturity
  17. 17. 5000downloads / month
  18. 18. Used inlarge-scale project(>1 000 000 LOC)
  19. 19. Where did it failed ?
  20. 20. 70 projects using iPOJO
  21. 21. From 20 000 LOCTo > 1 000 000 LOC
  22. 22. How developers are using iPOJO?
  23. 23. The most wanted features
  24. 24. Death by <xml/>
  25. 25. XML required to create complexinstances
  26. 26. @Configurationpublic class MyConfiguration {Instance myInstance = instance().of(MyComponent.class).with("message").setto("foo").with("list").setto(list(1, 2, 3));}1.10
  27. 27. Death by (LDAP)
  28. 28. LDAP has a simple syntax….for simple filters
  29. 29. No variability
  30. 30. Very very time-consumingdebugging
  31. 31. @Requires(filter=“(property=${value})”private Service service;1.10
  32. 32. Values from:System propertiesInstance configurationContext sources
  33. 33. Service dependencyinterceptors2.0
  34. 34. TrackerinterceptorRankinginterceptor
  35. 35. TrackerinterceptorRefuse servicesTransform servicesFiltering
  36. 36. Sophisticated selectionamong a set of providerAdvanced RankingRankinginterceptor
  37. 37. Online manipulation
  38. 38. Offline manipulationnot required anymore2.0
  39. 39. Inheritance2.0
  40. 40. Better testability and debugging
  41. 41. Unclear errorsDying instances
  42. 42. WTF !All my fields are null
  43. 43. Declaration services:Is your declaration bound ?What was the error ?1.10
  44. 44. Architecture of stopped instances1.10
  45. 45. Injected values cached in fields2.0
  46. 46. Easier extensibility
  47. 47. New injection machine:Injection chains2.0
  48. 48. Annotation-basedconfiguration2.0
  49. 49. @Handlerpublic class MyHandler extends PrimitiveHandler<MyAnnotation> {public void configure(MyAnnotation configuration, ...){//…}}
  50. 50. Intra-bundle injection
  51. 51. @Instance(component=MyClass.class)private MyClass instance;@Instance(component=MyClass.class, name=“name”)private MyClass name;2.0
  52. 52. Conclusion
  53. 53. 1.10 -> Soonish2.0 -> End of June
  54. 54. End of file

×