Liferay Module Framework

  • 2,111 views
Uploaded on

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

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,111
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
2
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Liferay Module FrameworkWhy modularity mattersMiguel Ángel Pastor Olivar
  • 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. The need for modularity
  • 4. What does modularity mean?Systems composed of relatively small self-contained unitsClear interfaces defined between them
  • 5. The need for modularityLarge systems are extremely complex to develop andmaintainHighly coupled systemsCloud computing Multiple deployments are co-locatedFootprint and performanceDistributed development
  • 6. Complexity vs costCost unmanageable Small focused pieces Complexity
  • 7. What are you looking for?ModulesDeployment mechanismDependency managementDynamismEncapsulationVersioning
  • 8. Liferay & Modularity
  • 9. “Inside” benefitsDecoupled and highly focused componentsEasier development processSimplify current implementations/patternsEasier to implement new featuresHighly focused teamsEasier distributed development
  • 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. Becoming real!OSGI (Open Service Gateway Initiatives) as foundationCurrently in development. Available in 6.2Lets see some insights!
  • 12. A quick intro to OSGI
  • 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. 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. OSGI architecture Services S e Lifecycle c Bundles u r i Modules t y Executing environment Java Virtual Machine Operating system
  • 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. OSGI architecture Modules About encapsulating and importing/exporting code Security All aspects related to security Execution environment What methods and classes are available
  • 18. OSGI lifecycle REFRESH, UPDATE INSTALL INSTALLED STARTING RESOLVE START REFRESH, UPDATEUNINSTALL RESOLVED ACTIVE STOP UNINSTALL STOPPING UNINSTALLED
  • 19. Liferay Module Framework internals
  • 20. Main points Embedded OSGI framework Ideally should be “agnostic” HTTP Service implementation Backwards compatible Enabled by a configuration property
  • 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. 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. Leveraging all the power! The module admin portlet
  • 24. Leveraging all the power! New kind of plugins
  • 25. Q&A