Creating a REST API for Cloud services using Apache Felix and Sling Carsten Ziegeler and David Bosschaert



Similar documents
Apache Sling A REST-based Web Application Framework Carsten Ziegeler cziegeler@apache.org ApacheCon NA 2014

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

NextRow - AEM Training Program Course Catalog

APACHE SLING & FRIENDS TECH MEETUP BERLIN, SEPTEMBER APACHE SLING & SCALA Jochen Fliedner

Effective Web Application Development with Apache Sling. Robert Munteanu ), Adobe Systems Romania

RESTful web applications with Apache Sling

Continuous Delivery of Apache Sling Applications

Sightly Component Development

Cloud Powered Mobile Apps with Azure

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

Open Source Technologies on Microsoft Azure

SAP Mobile Platform Intro

CQCON 2013: five Sling features you should know

How To Write A Web Server In Javascript

YouTube Vitess. Cloud-Native MySQL. Oracle OpenWorld Conference October 26, Anthony Yeh, Software Engineer, YouTube.

Storage Made Easy Enterprise File Share and Sync (EFSS) Cloud Control Gateway Architecture

Developer s Guide. How to Develop a Communiqué Digital Asset Management Solution

Certified Cloud Computing Professional VS-1067

Developing modular Java applications

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Building native mobile apps for Digital Factory

How To Develop An Open Play Context Framework For Android (For Android)

The future of middleware: enterprise application integration and Fuse

ExtraHop and AppDynamics Deployment Guide

Operations and Monitoring with Spring

Microsoft Azure IaaS: Virtual Machine e Open Source interoperability

REST services in Domino - Domino Access Services

Solution Showcase Session. Enterprise 2.0 Computing Services

NetBeans IDE Field Guide

Modularity in the cloud. A case study

Building a Continuous Integration Pipeline with Docker

Adobe Training Services Course Catalog

Linux A first-class citizen in Windows Azure. Bruno Terkaly bterkaly@microsoft.com Principal Software Engineer Mobile/Cloud/Startup/Enterprise

Globus Auth. Steve Tuecke. The University of Chicago

Collaborative Open Market to Place Objects at your Service

Petroleum Web Applications to Support your Business. David Jacob & Vanessa Ramirez Esri Natural Resources Team

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Glassfish, JAVA EE, Servlets, JSP, EJB

White Paper: Why Upgrade from WebSphere Application Server (WAS) v7 to v8.x?

How To Retire A Legacy System From Healthcare With A Flatirons Eas Application Retirement Solution

How To Manage Your Digital Assets On A Computer Or Tablet Device

S3 Monitor Design and Implementation Plans

Benchmarking Cloud Storage through a Standard Approach Wang, Yaguang Intel Corporation

Cloud Powered Mobile Apps with Microsoft Azure

Anatomy of a Cloud Environment. Jeffrey Bisti IBM Poughkeepsie jbisti@us.ibm.com

Load Testing RIA using WebLOAD. Amir Shoval, VP Product Management

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

The Java EE 6 Platform. Alexis Moussine-Pouchkine GlassFish Team

NoSQL web apps. w/ MongoDB, Node.js, AngularJS. Dr. Gerd Jungbluth, NoSQL UG Cologne,

C2C: An Automated Deployment Framework for Distributed Applications on Multi-Clouds

Spoilt for Choice Which Integration Framework to choose? Mule ESB. Integration. Kai Wähner

Designing RESTful Web Applications

MARKETING CLOUD APIS

Sentinet for BizTalk Server SENTINET

Monitis Project Proposals for AUA. September 2014, Yerevan, Armenia

Configuring CQ Security

Introducing the Adobe Digital Enterprise Platform

Traitware Authentication Service Integration Document

Jenkins World Tour 2015 Santa Clara, CA, September 2-3

Architecture Guide Jahia EE v6.1

Senior IT manager s guide to customer experience management

An Open Source NoSQL solution for Internet Access Logs Analysis

MEGA Web Application Architecture Overview MEGA 2009 SP4

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

ADOBE EXPERIENCE MANAGER MARKET REPORT Q2-2015

Contents. 2 Alfresco API Version 1.0

Lessons learned from a large scale OSGi web app. Jago de Vreede Paul Bakker

Oracle Database Cloud

Nuxeo, an open source platform for content-centric business applications. Stéfane Fermigier, Nuxeo Laurent Doguin, Nuxeo

Time series IoT data ingestion into Cassandra using Kaa

Beyond the SOA/BPM frontiers Towards a complete open cooperative environment

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

IBM Database as a Service

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

OpenShift. Marek Jelen, OpenShift, Red Hat

The end. Carl Nettelblad

Introduction to Engineering Using Robotics Experiments Lecture 18 Cloud Computing

Performance Optimization For Operational Risk Management Application On Azure Platform

DevOps with Containers. for Microservices

Leveraging Cloud Storage Through Mobile Applications Using Mezeo Cloud Storage Platform REST API. John Eastman Mezeo

Interoperable Cloud Storage with the CDMI Standard

WELCOME TO Open Source Enterprise Architecture

Digital Asset Management Beyond CMIS

GlassFish. Developing an Application Server in Open Source

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Cloud up to business processes

Dynamic Content Acceleration: Lightning-Fast Web Apps with Amazon CloudFront and Amazon Route 53

Oracle9i Application Server: Options for Running Active Server Pages. An Oracle White Paper July 2001

Adobe ColdFusion 11 Enterprise Edition

Middleware and the Internet. Example: Shopping Service. What could be possible? Service Oriented Architecture

Transcription:

Creating a REST API for Cloud services using Apache Felix and Sling Carsten Ziegeler and David Bosschaert

Agenda A REST site with Apache Sling Scale it up! with OSGi

Speakers David Bosschaert (davidb@apache.org) R&D Adobe Research Dublin Co-chair OSGi EEG ISO/IEC JTC1 SC38 (Cloud Computing) Open-source and cloud enthusiast Carsten Ziegeler (cziegeler@apache.org) R&D Adobe Research Switzerland OSGi Board, CPEG, EEG, IoT member ASF member

Te Next Great Application

ROA and REST htp:// /products.jsp?id=5643564 htp:// /slingshot/users/slingshot1/content/travel/pet.(html json)

Resource Oriented Architecture Every piece of information is a resource User home, category, item, image, comment Descriptive URI Stateless web architecture (REST) Request contains all relevant information Targets the resource Leverage HTTP GET for rendering, POST/PUT/DELETE for operations

SlingShot Content Structure /slingshot/users slingshot1 slingshot2 content travel home pet images comments ratings pet.jpg

SlingShot Content Structure /slingshot/users slingshot1 content ugs travel travel pet pet images comments ratings pet.jpg

Resource-frst Request Processing Request: /slingshot/users/slingshot1/ugs/travel/pet/comments.10.json Resource: /../slingshot1/ugs/travel/pet/comments Extension: json Selector: 10 Method: GET Resource Type : slingshot/comments

Resource-frst Request processing 1. Resolve the resource 2. Resolve processing script 3. Build execution chain 4. Execute

Scripting Inside It s your choice JSP, servlet, ESP, Scala, Sightly javax.script own script handlers Default servlets JSON, XML POST/update/create/delete handling Error handling

<sling:defineobjects/> <div class="comment"> <% final ValueMap attr = resource.getvaluemap(); final String title = attr.get(property_title, resource.getname()); final String description = attr.get(property_description, ""); final String userid = attr.get(property_user, ""); %> <h4><%= ResponseUtil.escapeXml(userId) %> : <%= ResponseUtil.escapeXml(title) %></h4> <p><%= ResponseUtil.escapeXml(description) %></p> <p><%= ResponseUtil.escapeXml( attr.get(slingshotconstants.property_created, "")) %></p> </div>

Resource Providers / slingshot1 JCR Apache Jackrabbit content ugs travel travel home pet pet images comments ratings pet.jpg S3 MongoDB

Tink! Content structure and ACLs OAK Sightly Keep it simple!

Scale UP! Efectively use the cloud Scale up/down based on need start small = cheap No downtime when moving to larger machines Avoid cloud-provider specifcs

Sling in the cloud Sling OSGi Node Director Sling OSGi Node Load Balancer(s) traffic

Director Sling OSGi Node Sling Sling OSGi Node create destroy OSGi Node Sling OSGi Node provision inspect discover Director metrics OSGi Cloud Ecosystems (RFC 183) FrameworkNodeStatus Service

Node Status public interface NodeStatus { MetricsDTO getmetricsdto() } org.osgi.node.id Unique ID, e.g. docker ID org.osgi.node.endpoint An endpoint to access this node org.osgi.node.vendor E.g. Amazon WS, MS Azure, etc org.osgi.node.country ISO 3166-1 country code org.osgi.node.tags Custom tags... there are more properties Service properties CPULoad percentage freememory in bytes networkthroughput bytes/sec diskthrougput bytes/sec Metrics DTO

Framework Node Status public interface FrameworkNodeStatus extends NodeStatus { FrameworkManager getframeworkmanager() } org.osgi.node......all the properties from NodeStatus public interface FrameworkManager { Collection<BundleDTO> getbundles(); BundleDTO installbundle(string location, InputStream is); void startbundle(long id); void stopbundle(long id); BundleDTO uninstallbundle(long id); // and so on } org.osgi.framework.version org.osgi.framework.processor org.osgi.framework.os java.version there are more Version of framework running Processor Operating system Java version Service properties

Busy times Sling OSGi Node Sling Sling OSGi Node OSGi Node Load Balancer(s) Director Sling OSGi Node traffic

Quiet times Sling OSGi Node Director Load Balancer(s) traffic

Really Quiet times Docker instances Sling Sling Sling OSGi Node Sling Director Load Balancer(s)

Instances Pets vs cattle

Farmville

Herding Web 1 Web 2 Web 3 Repository Worker A 1 Worker B 1 Worker B 2

Modularity ^2 Spezialized instances Create / Destroy on demand Independent scaling Faster dev/test/prod cycles 29

New Kid on the Block 30

Traditional vs MS Architecture Frontend Frontend Business Logic MS1 MS2 MS2 MS2 MS3 Database Database 31

BTDT Frontend MS1 MS3 MS2 Database 32

Topology REST Distributed OSGi Games without Frontiers 33

Single Instance Bundle A Service X Bundle C Bundle B Service Z Service Y 34

Two Instances Bundle A Service X Bundle C Bundle B Service Z Service Y 35

Summary Use Sling to build your REST service Write your app using anything that can interact with REST Native app Javascript Use OSGi Cloud Ecosystems, a cloud abstraction (such as Apache jclouds) and Docker to scale Be cloud-vendor independent!

Innovation at Adobe Links Apache Sling htp://sling.apache.org Apache Felix htp://felix.apache.org SlingShot Sample application htp://svn.apache.org/repos/asf/sling/trunk/samples/slingshot OSGi Cloud Ecosystems RFC 183 htps://github.com/osgi/design/tree/master/rfcs/rfc0183 37