Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

13
OSGi based PaaS-like programming stack Gyrex Node LoadBalancer Gyrex Node Gyrex Node Gyrex Node Gyrex Node Gyrex Node Gyrex Node Gyrex Node ZK Node ZK Node ZK Node coordinates the cluster Holds the complete application- and cluster configuration REST API REST API REST API REST API REST API REST API REST API REST API data repositories iPad App Mobile Apps PHP WebApp InternetOfThings Device Native App Eclipse Gyrex

description

OSGi DevCon 2012 - OSGi Cloud Workshop. Presentation by Gunnar Wagenknecht (Ageto) - "Eclipse Gyrex OSGi based PaaS-Like Programming Stack"

Transcript of Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

Page 1: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

OSGi based PaaS-like programming stack

ZK Cluster

Gyrex Node

LoadBalancer

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

ZK Node

ZK Node

ZK Node

• coordinates the cluster • Holds the complete application- and cluster configuration

REST API

REST API

REST API

REST API

REST API

REST API

REST API

REST API

data repositories

iPad App Mobile Apps

PHP WebApp

InternetOfThings Device

Native App

Eclipse Gyrex

Page 2: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

GYREX lightweight application stack for building server applications using EclipseRT technologies.

o built-in clustering o built-in web-based administration UI

o built-in multi tenancy

o enhancements for professional maintenance - centralized logging - cluster provisioning UI

Page 3: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

Stack

o Equinox o Jetty o p2 o ZooKeeper o Solr o Logback, o Cassandra o Memcached

Page 4: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

GYREX Components

Admin

Contextual Runtime

Equinox

Cloud

Monitoring

Repositories (JDBC, EclipseLink, NoSQL)

HTTP Applications (Jetty, OSGi HttpService)

RAP Logging

Clustering & Coord. (ZooKeeper)

Provisioning (p2)

Debug/Trace

Metrics

Console

Processing (Eclipse Jobs API)

Configuration (Eclipse Preferences API)

Page 5: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

ZK Cluster

GYREX Infrastructure Setup For a High Traffic Application

with different frontends

Gyrex Node

LoadBalancer

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

ZK Node

ZK Node

ZK Node

• coordinates the cluster • Holds the complete application- and cluster configuration

REST API

REST API

REST API

REST API

REST API

REST API

REST API

REST API

data repositories

iPad App Mobile Apps

PHP WebApp

InternetOfThings Device

Native App

p2 repo

Page 6: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

GYREX Features

ZK Cluster

Gyrex Node

LoadBalancer

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

Gyrex Node

ZK Node

ZK Node

ZK Node

• coordinates the cluster • Holds the complete application- and cluster configuration

REST API

REST API

REST API

REST API

REST API

REST API

REST API

REST API

data repositories

iPad App Mobile Apps

PHP WebApp

InternetOfThings Device

Native App

o light weight application stack

o fast 100% OSGi runtime o central cluster configuration through zookeeper o cluster aware job scheduling

o multi tenant application support

o automated deployment through p2

o support for cluster node roles, e.g. „job worker node“ and „api node“

Page 7: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

ZooKeeper o group/membership

o tag nodes (“webserver”, “worker”) o associate bundle states and/or applications with tags

o configuration (using OSGi Preferences)

o distributed coordination

o automatic failover of singleton services o node UP/DOWN events (EventAdmin)

Page 8: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012
Page 9: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

HTTP & OSGi

Requirements:

o Grouping (“application”)

o Multi-tenancy

o Run multiple instances of an “application” on different URLs

Page 10: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

HTTP & OSGi public class MyWebApp extends Application { @Override protected void doInit() throws CoreException { getApplicationContext().registerServlet(…); getApplicationContext().registerResources(…); getApplicationContext().registerFilter(…); } }

Page 11: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

HTTP & OSGi osgi> http <cmd> [args] ls … lists registered applications or providers

defineApp … defines an application removeApp … removes an application definition setAppProperty … sets/removes an application property

mount … mounts an application at the specified URL unmount … unmounts the specified URL

start … starts an application stop … stops an application

Page 12: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

Queue Service IQueueService { IQueue getQueue(..) } IQueue { void sendMessage(byte[] messageBody) List<IMessage> receiveMessages(..) IMessage consumeMessage(..) boolean deleteMessage(..) }

Page 13: Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop March 2012

Thank You for your attention