Liferay Module Framework

3,083 views
2,823 views

Published on

A quick overview about modularity, OSGI and how we are applying it to the Liferay platform

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,083
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
2
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Liferay Module Framework

  1. 1. Liferay Module FrameworkWhy modularity mattersMiguel Ángel Pastor Olivar
  2. 2. A little bit about meWorking at the "infrastructure" sideCloud computing and distributed systemsInterests in concurrent and distributed programming.Functional programming advocate!Scala, OSGI and AspectJ enthusiast. Erlang aficionadoEmail: miguel.pastor at liferay dot comTwitter handler: miguelinlas3
  3. 3. The need for modularity
  4. 4. What does modularity mean?Systems composed of relatively small self-contained unitsClear interfaces defined between them
  5. 5. The need for modularityLarge systems are extremely complex to develop andmaintainHighly coupled systemsCloud computing Multiple deployments are co-locatedFootprint and performanceDistributed development
  6. 6. Complexity vs costCost unmanageable Small focused pieces Complexity
  7. 7. What are you looking for?ModulesDeployment mechanismDependency managementDynamismEncapsulationVersioning
  8. 8. Liferay & Modularity
  9. 9. “Inside” benefitsDecoupled and highly focused componentsEasier development processSimplify current implementations/patternsEasier to implement new featuresHighly focused teamsEasier distributed development
  10. 10. “Outside” benefitsMore frequent delivery of new features or improvementsLess bugs due to higher degree of focusQuicker and simpler delivery of patches for bugs and securityissuesRobustnessFootprint
  11. 11. Becoming real!OSGI (Open Service Gateway Initiatives) as foundationCurrently in development. Available in 6.2Lets see some insights!
  12. 12. A quick intro to OSGI
  13. 13. OSGI features/benefits Reduce complexity Developing bundles Dynamism Real world is dynamic; deal with it! Deployment mechanism Determine how components are installed and managed Dynamic updates Do not bring down the whole system
  14. 14. OSGI features/benefits Versioning Multiple versions of the same component Small and fast About 300K jar file Non intrusive. Runs everywhere. Widely used Eclipse, Glassfish, JBoss, Virgo RT, . . .
  15. 15. OSGI architecture Services S e Lifecycle c Bundles u r i Modules t y Executing environment Java Virtual Machine Operating system
  16. 16. OSGI architecture Bundles OSGI components Services Connecting in a dynamic way. POJOs. Life-cycle How to install, start, stop, update and uninstall bundles
  17. 17. OSGI architecture Modules About encapsulating and importing/exporting code Security All aspects related to security Execution environment What methods and classes are available
  18. 18. OSGI lifecycle REFRESH, UPDATE INSTALL INSTALLED STARTING RESOLVE START REFRESH, UPDATEUNINSTALL RESOLVED ACTIVE STOP UNINSTALL STOPPING UNINSTALLED
  19. 19. Liferay Module Framework internals
  20. 20. Main points Embedded OSGI framework Ideally should be “agnostic” HTTP Service implementation Backwards compatible Enabled by a configuration property
  21. 21. 100000 feet architecture Webapp Server Plugin A Plugin B Traditional deployment mechanism Liferay Portal OSGI container OSGI based plugins Plugin X Plugin Y
  22. 22. How it works? AutoDeploy listeners Deployment Folder Web Bundle Processor Monitored by the OSGI framework Blocked Valid WAB bundle Web Bundle Processor Container notifies the deployer OSGI Container Web Bundle Deployer
  23. 23. Leveraging all the power! The module admin portlet
  24. 24. Leveraging all the power! New kind of plugins
  25. 25. Q&A

×