49
Peergreen Platform Guillaume Sauthier [email protected] @sauthieg 17/05/2013

Peergreen Platform Overview

Embed Size (px)

DESCRIPTION

This presentation outlines Peergreen Platform.

Citation preview

Page 1: Peergreen Platform Overview

Peergreen PlatformGuillaume Sauthier

[email protected]@sauthieg

17/05/2013

Page 2: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Plan

• Overview• In depth

o Guidelineso Booto Deployment Systemo Shello Webo Consoleo Securityo Development

• Next

Page 3: Peergreen Platform Overview

Overview

Page 4: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Overview

• Peergreeno Startupo Experienced engineerso Open source contributions

Page 5: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Available today

• Peergreen Server M1o Light-weighted integrated server (<3MB)o OSGi “application” supporto Effective deployment system

• Peergreen Eclipse Plugino Leverage Eclipse OSGi framework support

Shamelesscommercial

slide

Downloadable from our web site www.peergreen.com

Page 6: Peergreen Platform Overview

In Depth

Page 7: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Guidelines

• 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

Page 8: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Boot

• User’s very first impressiono Easy to executeo Fast

Page 9: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Boot

• 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)

Page 10: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Boot

Demo

Page 11: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Boot

• Wrap upo Boot in a few secondso event:* commands to observe boot timeo Simple launch procedure

Page 12: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment 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 applications

ready

CB A

Page 13: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment 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 …

Artifact

CB

A

Page 14: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment 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 resolved

discovery

per-facetOSGi

install

start

Webread-web

configure

start

Page 15: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment System

• Global discovery phaseo Sub-phases executed sequentiallyo Processors in phases executed concurrently

uri-fetcher uri-resolver facet-scanner facet-conflicts

dependency-finder

Page 16: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment System

• Per-facet lifecycleo Sequence of phaseso Runnable processor of phase are executed concurrently (when possible)o Facet lifecycle phase can be traversed simultaneously by multiple artifacts

webxml

install

start

bundle

install

start

ca

read

create

Page 17: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment 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 and UPDATE

Page 18: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment System

• Artifact modelo Artifacts are stored in a model

With meta-information• Processor’s chain

• Execution time Deployment root ? Transformed artifact

o Query-able Service API available CLI

plan

plan

web ejbjar

mvn

bundle

Page 19: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment System

Demo

Page 20: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Deployment 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

Page 21: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Shell

• OW2 Shelbie basedo Modular & dynamico Apache Felix iPOJO integrationo Sweetness

Completion ANSI Easy command programming (@Command, @Option and

@Argument)

Page 22: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Shell

• Built-in command scopeso Gogo & Felix commandso Shelbie built-in commands

exit / shutdown help

o 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

Page 23: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Shell

Demo

Page 24: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Shell

• Wrap upo Completiono Help systemo Remote telnet accesso Threads reporting

Deadlock detection Thread interruption

Page 25: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

• 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.39

M2

Page 26: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

• Deployment system integrationo Facet contribution (phases description)

o Processors Webapp type detection and facet installation Context configuration Context start

M2

Generic

Tomcat

Tomcat

DEPLOY parse deploy start

UPDATE stop parse start

UNDEPLOY stop undeploy

Page 27: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

• Classloadingo Java EE Web archives assume permissive classloading

environment 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 parent

classloader

M2

not very proud :’(

Page 28: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

• Injectiono Default Tomcat InstanceManager has to be replaced

Imports all of the Java EE packages (@EJB, …) Hardcoded behavior

o Peergreen InstanceManager Supports @Resource on BundleContext Limited imports Abstractable to be usable for other components

M2

Modularity :’(

Evolution :’(

OSGi binding :-)

OSGi friendly :-)

Work in progress

Page 29: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

• HttpServiceo Tomcat-based implementationo Servlet 3.0 supporto Good enough to run Apache Felix Webconsole :-)

M2

Page 30: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

Demo

M2

Page 31: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Web

• Wrap upo Java EE War deploymento Usable HttpService with Apache Felix Webconsole

M2

Page 32: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Console

• 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 feel

M2

Page 33: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Console

• 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

Page 34: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Console

Demo

M2

Page 35: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Console

• Wrap upo Views contributionso Server interactions

Start/Stop bundleo Notifications

Badge Overlay

M2

Page 36: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Security

• Security needs to be there from the beginningo Protect access to the server

Authentication Authorization

o Administrative entry points Shell console Web console JMX . . .

M2

Page 37: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Security

• 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 content

M2

admin

joe

jane

HashService

AccountStore

EncoderService

extensibility

Page 38: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Security

• Command lineo User management

CRUDo Role management

Assignment

M2

Page 39: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Security

Demo

M2

Page 40: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Security

• Wrap upo User creationo Password modificationo Local console is securedo Tomcat realm connected to AccountStore

M2

Page 41: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Development

• Building applicationso Eclipse supporto Maven support

Page 42: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Development

• OSGi FrameworkFactory APIo Standard API to launch OSGi frameworks

Apache Felix Eclipse Equinox . . .

o Peergreen Server also implements it

Peergreen Server executable jar is usable directly from consumer of that API !

• Pax Exam• OW2 JOnAS• . . .

Page 43: Peergreen Platform Overview

Next

Page 44: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Next (soon)

• Java Transaction APIo On-going work on OW2 JOTM

• Java Persistence APIo @PersistenceContext supporto On going work on OW2 EasyBeans

• JNDIo JNDI / OSGi integration

M2

Page 45: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Next (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 Listener

M?

Page 46: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Next

• Release plano Scheduled release every 2 months

M?

M1 April

M2 June

M3 August

M4 October

Page 47: Peergreen Platform Overview

© 2013 Peergreen, Confidential & Proprietary

Questions

Page 48: Peergreen Platform Overview