Peergreen Platform Overview

Post on 01-Nov-2014

1.276 views 0 download

Tags:

description

This presentation outlines Peergreen Platform.

Transcript of Peergreen Platform Overview

Peergreen PlatformGuillaume Sauthier

guillaume.sauthier@peergreen.com@sauthieg

17/05/2013

© 2013 Peergreen, Confidential & Proprietary

Plan

• Overview• In depth

o Guidelineso Booto Deployment Systemo Shello Webo Consoleo Securityo Development

• Next

Overview

© 2013 Peergreen, Confidential & Proprietary

Overview

• Peergreeno Startupo Experienced engineerso Open source contributions

© 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

In Depth

© 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

© 2013 Peergreen, Confidential & Proprietary

Boot

• User’s very first impressiono Easy to executeo Fast

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

© 2013 Peergreen, Confidential & Proprietary

Boot

Demo

© 2013 Peergreen, Confidential & Proprietary

Boot

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

© 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

© 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

© 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

© 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

© 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

© 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

© 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

© 2013 Peergreen, Confidential & Proprietary

Deployment System

Demo

© 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

© 2013 Peergreen, Confidential & Proprietary

Shell

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

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

@Argument)

© 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

© 2013 Peergreen, Confidential & Proprietary

Shell

Demo

© 2013 Peergreen, Confidential & Proprietary

Shell

• Wrap upo Completiono Help systemo Remote telnet accesso Threads reporting

Deadlock detection Thread interruption

© 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

© 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

© 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 :’(

© 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

© 2013 Peergreen, Confidential & Proprietary

Web

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

M2

© 2013 Peergreen, Confidential & Proprietary

Web

Demo

M2

© 2013 Peergreen, Confidential & Proprietary

Web

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

M2

© 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

© 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

© 2013 Peergreen, Confidential & Proprietary

Console

Demo

M2

© 2013 Peergreen, Confidential & Proprietary

Console

• Wrap upo Views contributionso Server interactions

Start/Stop bundleo Notifications

Badge Overlay

M2

© 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

© 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

© 2013 Peergreen, Confidential & Proprietary

Security

• Command lineo User management

CRUDo Role management

Assignment

M2

© 2013 Peergreen, Confidential & Proprietary

Security

Demo

M2

© 2013 Peergreen, Confidential & Proprietary

Security

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

M2

© 2013 Peergreen, Confidential & Proprietary

Development

• Building applicationso Eclipse supporto Maven support

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

Next

© 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

© 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?

© 2013 Peergreen, Confidential & Proprietary

Next

• Release plano Scheduled release every 2 months

M?

M1 April

M2 June

M3 August

M4 October

© 2013 Peergreen, Confidential & Proprietary

Questions