Peergreen Platform Overview

1,440 views
1,331 views

Published on

This presentation outlines Peergreen Platform.

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

  • Be the first to like this

No Downloads
Views
Total views
1,440
On SlideShare
0
From Embeds
0
Number of Embeds
729
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Peergreen Platform Overview

  1. 1. Peergreen PlatformGuillaume Sauthierguillaume.sauthier@peergreen.com@sauthieg17/05/2013
  2. 2. © 2013 Peergreen, Confidential & ProprietaryPlan• Overview• In deptho Guidelineso Booto Deployment Systemo Shello Webo Consoleo Securityo Development• Next
  3. 3. Overview
  4. 4. © 2013 Peergreen, Confidential & ProprietaryOverview• Peergreeno Startupo Experienced engineerso Open source contributions
  5. 5. © 2013 Peergreen, Confidential & ProprietaryAvailable today• Peergreen Server M1o Light-weighted integrated server (<3MB)o OSGi “application” supporto Effective deployment system• Peergreen Eclipse Plugino Leverage Eclipse OSGi framework supportDownloadable from our web sitewww.peergreen.com
  6. 6. In Depth
  7. 7. © 2013 Peergreen, Confidential & ProprietaryGuidelines• Built-in extensibility and dynamism• Fast, fast, fast• Right sized• User and applications as first class citizen“Everything should be made as simple as possible but no simpler”A. Einstein
  8. 8. © 2013 Peergreen, Confidential & ProprietaryBoot• User’s very first impressiono Easy to executeo Fast
  9. 9. © 2013 Peergreen, Confidential & ProprietaryBoot• All-in-one executable artifact• Few seconds to boot on modern machines• Mechanisms in useo Jar introspectiono Jar compressiono Classloader for accessing jar in jar’s contento Maven plugin for building specific assembly Select underlying OSGi framework Select initial Bundles set with start levels (if any)
  10. 10. © 2013 Peergreen, Confidential & ProprietaryBoot
  11. 11. © 2013 Peergreen, Confidential & ProprietaryBoot• Wrap upo Boot in a few secondso event:* commands to observe boot timeo Simple launch procedure
  12. 12. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Core system blocko Native multi-thread supporto Plug-able service-based architectureo Artifact centric Faceted artifactso Deployed resource neutral Location (remote, local, access protocol) Type (bundle, web-app, …)o Operation reporting (errors, …)o Persistence• Supported artifactso OSGi Bundleo OSGi Configuration Admino OW2 JOnAS deployment plano Java EE Web applicationsreadyCB A
  13. 13. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Artifacto Resource to be deployed, URI location• Faceto Specialized view of the artifact (Web, Bundle,ConfigAdmin, …)• Processoro Express requirements (for automatic placement)o Handle the archive Produce a facet Use a facet “Glue” the artifact on an external system …ArtifactCBA
  14. 14. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Processing artifactso Collection of artifact handled simultaneouslyo Execute concurrently or sequentially a set of Processorso Dynamic resolution of runnable processors• Phaseo Container of Processorso Logical ordering• Processoro Installed in a phaseo Statelesso Express requirements Enabled only if resolveddiscoveryper-facetOSGiinstallstartWebread-webconfigurestart
  15. 15. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Global discovery phaseo Sub-phases executed sequentiallyo Processors in phases executed concurrentlyuri-fetcher uri-resolver facet-scannerfacet-conflictsdependency-finder
  16. 16. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Per-facet lifecycleo Sequence of phaseso Runnable processor of phase are executed concurrently (whenpossible)o Facet lifecycle phase can be traversed simultaneously by multipleartifactswebxmlinstallstartbundleinstallstartcareadcreate
  17. 17. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Extensionso Contribute Processors Bound to a phase, requiring facet and/or artifact attributeso Contribute Lifecycle for a facet Define the sequence of phases for DEPLOY, UNDEPLOY andUPDATE
  18. 18. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Artifact modelo Artifacts are stored in a model With meta-information• Processor’s chain• Execution time Deployment root ? Transformed artifacto Query-able Service API available CLIplanplanweb ejbjarmvnbundle
  19. 19. © 2013 Peergreen, Confidential & ProprietaryDeployment System
  20. 20. © 2013 Peergreen, Confidential & ProprietaryDeployment System• Wrap upo OW2 JORAM deployment plan Bundles activated (loaded from maven repository)o OW2 JORAM configuration files Configurations started and services instances registeredo OW2 JOnAS compatibility
  21. 21. © 2013 Peergreen, Confidential & ProprietaryShell• OW2 Shelbie basedo Modular & dynamico Apache Felix iPOJO integrationo Sweetness Completion ANSI Easy command programming (@Command, @Option and @Argument)
  22. 22. © 2013 Peergreen, Confidential & ProprietaryShell• Built-in command scopeso Gogo & Felix commandso Shelbie built-in commands exit / shutdown helpo iPOJO commandso Config-admin commandso Java VM commands Threads management (dump, stop/interrupt threads, deadlocks)o MBeans commands JMX handling (get / set attributes, introspect mbeans, …)o Deployment commands List deployed artifacts, print reports, …o Newsfeed commands (RSS)o Security commands Realm management
  23. 23. © 2013 Peergreen, Confidential & ProprietaryShell
  24. 24. © 2013 Peergreen, Confidential & ProprietaryShell• Wrap upo Completiono Help systemo Remote telnet accesso Threads reporting Deadlock detection Thread interruption
  25. 25. © 2013 Peergreen, Confidential & ProprietaryWeb• Supports of web applicationo Java EE standard web app (.war)o HttpService implementation• Servlet 3.0 / JSP 2.2 / EL 2.2• Apache Tomcat 7.0.39M2
  26. 26. © 2013 Peergreen, Confidential & ProprietaryWeb• Deployment system integrationo Facet contribution (phases description)o Processors Webapp type detection and facet installation Context configuration Context startM2GenericTomcatTomcatDEPLOY parse deploy startUPDATE stop parse startUNDEPLOY stop undeploy
  27. 27. © 2013 Peergreen, Confidential & ProprietaryWeb• Classloadingo Java EE Web archives assume permissive classloadingenvironment Not a nice fit within an OSGi gateway :’(o Needs a special bundle with the ugly DynamicImport-Package * Special classloader delegating to this bundle used as Webapp’s parentclassloaderM2not very proud :’(
  28. 28. © 2013 Peergreen, Confidential & ProprietaryWeb• Injectiono Default Tomcat InstanceManager has to be replaced Imports all of the Java EE packages (@EJB, …) Hardcoded behavioro Peergreen InstanceManager Supports @Resource on BundleContext Limited imports Abstractable to be usable for other componentsM2Modularity :’(Evolution :’(OSGi binding :-)OSGi friendly :-)Work in progress
  29. 29. © 2013 Peergreen, Confidential & ProprietaryWeb• HttpServiceo Tomcat-based implementationo Servlet 3.0 supporto Good enough to run Apache Felix Webconsole :-)M2
  30. 30. © 2013 Peergreen, Confidential & ProprietaryWebM2
  31. 31. © 2013 Peergreen, Confidential & ProprietaryWeb• Wrap upo Java EE War deploymento Usable HttpService with Apache Felix WebconsoleM2
  32. 32. © 2013 Peergreen, Confidential & ProprietaryConsole• Highly modular and extensible web consoleo Foundation for our products’ consoleso External contributions Business moduleso Vaadin framework selected HTML 5 support Mature On-going OSGiTM integration GWT under the hood• Responsive client application Nice look and feelM2
  33. 33. © 2013 Peergreen, Confidential & ProprietaryConsole• Foundationo Base application layout Scopes containing tabbed viewso Theme Shared across contributed viewso Unified login pageo Notification serviceo Extensibility through OSGi services Do not think extension points !M2
  34. 34. © 2013 Peergreen, Confidential & ProprietaryConsoleM2
  35. 35. © 2013 Peergreen, Confidential & ProprietaryConsole• Wrap upo Views contributionso Server interactions Start/Stop bundleo Notifications Badge OverlayM2
  36. 36. © 2013 Peergreen, Confidential & ProprietarySecurity• Security needs to be there from the beginningo Protect access to the server Authentication Authorizationo Administrative entry points Shell console Web console JMX . . .M2
  37. 37. © 2013 Peergreen, Confidential & ProprietarySecurity• Account managemento Storing accounts securely Hashing Persistence• Services APIso HashService Encrypt clear text password into byte[]• Plain text, MD5, Salted SHA, …o EncoderService Transform the byte[] into a persistable String• Base64, Hexa, Text, …o AccountStore Manage store contentM2adminjoejaneHashServiceAccountStoreEncoderServiceextensibility
  38. 38. © 2013 Peergreen, Confidential & ProprietarySecurity• Command lineo User management CRUDo Role management AssignmentM2
  39. 39. © 2013 Peergreen, Confidential & ProprietarySecurityM2
  40. 40. © 2013 Peergreen, Confidential & ProprietarySecurity• Wrap upo User creationo Password modificationo Local console is securedo Tomcat realm connected to AccountStoreM2
  41. 41. © 2013 Peergreen, Confidential & ProprietaryDevelopment• Building applicationso Eclipse supporto Maven support
  42. 42. © 2013 Peergreen, Confidential & ProprietaryDevelopment• OSGi FrameworkFactory APIo Standard API to launch OSGi frameworks Apache Felix Eclipse Equinox . . .o Peergreen Server also implements itPeergreen Server executable jar is usable directlyfrom consumer of that API !• Pax Exam• OW2 JOnAS• . . .
  43. 43. Next
  44. 44. © 2013 Peergreen, Confidential & ProprietaryNext (soon)• Java Transaction APIo On-going work on OW2 JOTM• Java Persistence APIo @PersistenceContext supporto On going work on OW2 EasyBeans• JNDIo JNDI / OSGi integrationM2
  45. 45. © 2013 Peergreen, Confidential & ProprietaryNext (later)• Web consoleo More supported contributions Menu bar Progress view• RESTo Jersey integration• EJBo EasyBeans integration• HttpServiceo Java EE annotations support (@WebServlet)o Filter and ListenerM?
  46. 46. © 2013 Peergreen, Confidential & ProprietaryNext• Release plano Scheduled release every 2 monthsM?M1AprilM2 JuneM3AugustM4October
  47. 47. © 2013 Peergreen, Confidential & ProprietaryQuestions
  48. 48. © 2013 Peergreen, Confidential & ProprietaryPicture resources• http://www.flickr.com/photos/tales2astonish/7436776110/• http://www.flickr.com/photos/richard_jones/4352200167/• http://www.flickr.com/photos/richard_jones/4352196667• http://www.flickr.com/photos/richard_jones/4352929650/• http://www.flickr.com/photos/richard_jones/4326588616/• http://www.flickr.com/photos/richard_jones/4325850207/• http://www.flickr.com/photos/richard_jones/4428269374/

×