18
Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Dynamic Server Applications with Eclipse RT 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 Tutorial

Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Dynamic Server Applications with Eclipse RT

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

Tutorial

Page 2: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

The authors Gunnar Wagenknecht [email protected] CTO AGETO, Germany

Andreas Mihm [email protected] Head of Research AGETO, Germany

Jochen Hiller [email protected] Developer Evangelist Deutsche Telekom AG, Germany

Page 3: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

In this tutorial you will o LEARN what modern server applications need

to feature

o UNDERSTAND the usage of selected EclipseRT technologies

o BUILD an EclipseRT server application based on Equinox and Eclipse Gyrex

o SETUP a private cluster connecting all attendees

Page 4: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Modern Server Application Requirements

o Support high traffic use cases

o Support different frontend technologies and devices

o modular in development and deployment

o Easy to setup

o Open for new technologies easy to extend AND to

shrink o e.g. persistence

Million transactions

per hour

Page 5: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Eclipse RT “EclipseRT is the collection of OSGi-based runtimes and frameworks built by the Eclipse open source projects. “

Containers, Middleware, EnterpriseFrameworks

Page 6: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Equinox o reference implementation for OSGi spec

o foundation of EclipseRT

o component oriented development and assembly

Page 7: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Eclipse jetty features

o Asynchronous HTTP Server o Standard based Servlet Container o Web Sockets server o Asynchronous HTTP Client o OSGi, JNDI, JMX, JASPI, AJP support

Small foot print allows large scaling Jetty runs in

o Apache Hadoop o Google AppEngine

Page 8: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Comprehensive Java persistence solution addressing relational, XML, and database web services.

EclipseLink

EclipseLink

DBWS

SDO

EIS

MOXy

JPA

XML Data Legacy Systems Databases

Java SE Java EE OSGi Spring ADF

Page 9: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

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 10: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

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 11: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

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 12: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

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 13: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

o Setup workspace and target platform

o Simple OSGi Service implementation

o JAXRS example application

o Private cluster setup

Excercises

Page 14: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

o Copy USB-stick content to local disk

o Extract fresh Eclipse installation from archive

o Copy samples folder into eclipse/dropins

o Start Eclipse with new workspace

o Open Java Perspective

o Import targetplatform project (File->Import->Existing Projects)

o Set LOCAL TargetPlatform

Setup Steps

Page 15: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

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 16: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

o http://www.eclipse.org/gyrex/

o http://www.eclipse.org/equinox/

o http://www.eclipse.org/rt/

For more information

Page 17: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Give Feedback on the Sessions

1 Sign In: www.eclipsecon.org

2 Select Session Evaluate

3 Vote

Page 18: Tutorial - Eclipse · Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller Eclipse RT “EclipseRT is the collection of OSGi-based

Tutorial: Dynamic Server Applications with EclipseRT Gunnar Wagenknecht, Andreas Mihm, Jochen Hiller

Thank You for your attention