SlideShare a Scribd company logo
1 of 37
Download to read offline
OSGi Cloud Ecosystems



                    David Bosschaert
    Principal Engineer, JBoss/Red Hat
                   david@redhat.com
                           March 2013
Agenda

●   PaaS today
●   OSGi Cloud Ecosystems
●   'Demo'
PaaS offerings today (1)
●   General deployment containers
    –   Application Servers
        ●   i.e. deploy .WAR files in the cloud
    –   Continuous Build Jenkins/Hudson
●   Dynamic Language based
    –   e.g. Python/Ruby/JavaScript
    –   Often come with a Cloud-based IDE
●   Support for specific technology
    –   E.g. deploy Google App Engine on my own
        cloud
PaaS offerings today (2)
●   Typically per cloud-VM instance
    –   you need to do your own scaling
    –   sometimes it can dynamically add replicas
        ●   of your entire deployment
    –   instances don't know much about others
        ●   although they might connect to a cloud data store
●   Today's PaaS
    –   suitable if you can deploy multiple instances of the
        same app
    –   harder to use if you have a composite application
        ●   with a variety of components
        ●   across different nodes
We need a better cloud!
●   Where things are more dynamic
●   Where a bunch of different nodes work together
       to form one logical application
●   Where not every cloud VM image has just one purpose
●   Where each cloud image could play different roles over time
●   Where we can easily migrate from one cloud vendor to another
Example cloud-based Application (1)
●   Has a web front-end
    –   host needs to be accessible from outside
         ●   (well known hostname)
●   Uses messaging
    –   replicated message broker
●   Has a data store
●   And a back end
    –   does the heavy lifting, computation
    –   integrates with 3rd party providers
●   Each entity on a different node
Example cloud-based Application (2)
                                               Every entity runs on a
                                                different cloud node



                      Back End
                      Back End
                                                Read and update
        Notifies                                request data




                                         Database
          Message
                                           Database
           Queue




                       Web
                        Web
    Submit request       Web
                         Web                    Store request data
                     Front-end
                          Web
                     Front-end
                          Web
                      Front-end
                      Front-end
                       Front-end
                        Front-end



                              User interacts
Dynamic Scaling
                    and correction
●   I want all these elements to scale
    dynamically
    –   possibly based on some domain-specific rules
●   I want the system to be able to correct itself
    –   e.g. when a Cloud VM dies/becomes inaccessible
●   I don't want to worry about reconfiguring clients
    –   when a service moves to another node
●   I want the system to be portable
    –   so I can move to another cloud
    –   in case of entire cloud failure
How do I get all this?
I need an entity that orchestrates, a Provisioner
●   Needs to be able to remotely deploy
    –   to the nodes in the system
    –   decide at runtime what the role of a certain VM is
●   Needs to know the topology
    –   as well as the application specifics

I need a flexible cloud platform
●   repurpose a Cloud VM
●   without sending the whole image to a machine again

Portability: I want to shield myself from cloud-vendor specific APIs
●   as much as possible
●   standards based
OSGi Cloud Ecosystems
●   A number of OSGi frameworks
    –   great because of their dynamic capabilities
●   Each in a separate VM/cloud node
●   Bound together to form a logical ecosystem
    –   via ecosystem-wide discovery mechanism

●   Environment
    –   OSGi Frameworks can find out about other frameworks
    –   Can easily communicate with other frameworks
    –   and services running on these frameworks
OSGi Cloud Ecosystems




A highly dynamic OSGi environment where Cloud
nodes/VMs, bundles and services come and go
How does this work?
●   Start off with a number of 'empty'
    OSGi frameworks in the cloud
    –   basic infrastructure provided
         ●   remote services capability
         ●   ecosystem support
    –   no application logic

●   A provisioner decides what goes where
    –   knows about your application
    –   and reacts to changes in topology / runtime system health

●   Discovery component provides OSGi service visibility
    across frameworks
    –   deals with service migrations
Ecosystem Support
●   Each framework registers
    –   FrameworkStatus service
    –   Remote Deployment service
●   These are visible across the Ecosystem
    –   as OSGi services
    –   (via OSGi Remote Services specs)
●   But not outside
FrameworkStatus Service
●   One per running Framework in the Ecosystem
    –   Available via Remote Services
●   Provides information about the framework
    public interface FrameworkStatus {
      String getFrameworkVariable(String name);
    }

●   Static metadata as Service Registration properties
●   Dynamic metadata via getFrameworkVariable()
                  static metadata             dynamic metadata
            cloud type/version          available memory

            location (country / area)   available diskspace

            OSGi framework version      machine load factor

            processor architecture      network throughput

            Java version                ...

            IP address

            app-defined (custom)
Provisioning
●   Need a Remote Deployment API
    –   with Java client API
    –   that spans the Ecosystem
    –   works in the cloud
    –   possibly an RFC 182 (REST)-based solution
A sample Provisioner (1/2)
// Listen for the FrameworkStatus service
ServiceTracker st = new ServiceTracker(context, FrameworkStatus.class.getName(),
                                       null) {
    public Object addingService(ServiceReference reference) {
        topologyChanged();
        return super.addingService(reference);
    }

     public void removedService(ServiceReference reference, Object service) {
         topologyChanged();
         super.removedService(reference, service);
     }
};

// React to changes in the topology
void topologyChanged() {
    // Deploy the web front-end
    if (getDeployments(WEB).size() == 0)
        addDeployment(WEB);

     // Deploy the back-end Service max twice.
     if (getDeployments(SERVICE).size() < 2)
         addDeployment(SERVICE);
}
A sample Provisioner (2/2)
void addDeployment(DeploymentType type) {
    ServiceReference[] possibleFrameworks = getFrameworkReferences();
    ServiceReference target = getMostSuitableFramework(type, possibleFrameworks);
    if (target == null) {
        // No suitable framework found
        return null;
    }

    String[] bundles = getDeploymentBundles(type, target);
    deployToFramework(target, bundles);
}

ServiceReference getMostSuitableFramework(DeploymentType type,
                                            ServiceReference... frameworks) {
    for (ServiceReference ref : frameworks) {
        if (type.equals(WEB)) {
            Object prop = ref.getProperty("...framework.ip");
            if (prop instanceof String)
                 if (((String) prop).startsWith("web"))
                     return ref;
        } else if (type.equals(...) {
            // ...
        }
    }
    return null;
}
How do my distributed
        business components interact?
●   Develop them as OSGi Services
    –   then use them via OSGi Remote Services...
●   To publish a service in the ecosystem
        MyService ms = new MyServiceImpl();
        Dictionary msProps = new Hashtable();
        msProps.put("service.exported.interfaces", "*");
        msProps.put("service.exported.configs", "osgi.configtype.ecosystem");
        context.registerService(MyService.class.getName(), ms, msProps);

●   Discovery component gives visibility across ecosystem
    –   System will react automatically to services moving to
        other VMs/nodes
    –   New instances appearing
●   Client simply uses OSGi services as normal
        MyService ms = ... // Remote Service from Service Registry
        ms.doit();         // Invoke Remote Service
Summary: OSGi Cloud Ecosystems
●   A fluid system where deployments can come and go
●   Provisioner decides what goes where
    –   Cloud nodes get added, removed
        ● Bundles might get deployed, moved
    –   Ecosystem-wide services appear, disappear
        ●   0, 1, many instances
    –   Service consumers don't need to be reconfigured
        ●   react automatically to changes
        ●   handled by OSGi Remote Services + Discovery
●   System can be repurposed
●   Topic of OSGi RFC 183
    –   early access draft available now
Cloud at the OSGi Alliance
●   RFP 133 (Cloud Computing) accepted
        http://www.osgi.org/bugzilla/show_bug.cgi?id=114

●   RFC 182 REST API
●   RFC 183 Cloud Ecosystems
    –   Available as EA draft:
        http://www.osgi.org/Download/File?url=/download/osgi-early-draft-2013-03.pdf

    –   Being discussed at the EEG
●   Starting: RFP 158 Distributed Event Admin
    –   more RFPs/RFCs likely to come...
    –   Interested? Join the discussion!
See it in action
●   Pilot on Red Hat's OpenShift cloud
    –   get your own free dev instances
●   All source code available in github
●   For more details see
        http://coderthoughts.blogspot.com
        (June/July/August 2012 posts)
Demo Setup

                           Back End
                           Back End                      Back End
                                                         Back End




Provisioner rules:
● servlet needs to go on

  specific hostname
● exactly 1 testservice               Web Front-end
                                      Web Front-end      ●     displays available frameworks
                                        (Servlet)
                                         (Servlet)
  ● not on servlet host                                  ●     invokes TestService

                                              User interacts
Demo Setup

                           Back End
                           Back End
                                                            Back End
                                                            Back End
                           TestService
                           TestService




Provisioner rules:
● servlet needs to go on

  specific hostname
● exactly 1 testservice                  Web Front-end
                                         Web Front-end      ●     displays available frameworks
                                           (Servlet)
                                            (Servlet)
  ● not on servlet host                                     ●     invokes TestService

                                                 User interacts
Demo Setup

                           Back End
                           Back End                         Back End
                                                            Back End

                           TestService
                           TestService                     TestService
                                                           TestService




Provisioner rules:
● servlet needs to go on

  specific hostname
● exactly 1 testservice                  Web Front-end
                                         Web Front-end      ●     displays available frameworks
                                           (Servlet)
                                            (Servlet)
  ● not on servlet host                                     ●     invokes TestService

                                                 User interacts
Demo Setup – The Servlet
FrameworkStatus             and TestService
                                      from Service Registry
●   lists available frameworks
    void printFrameworks(PrintWriter out) {
        // frameworkRefs list all FrameworkStatus services from the OSGi Service Registry
        for (ServiceReference ref : frameworkRefs) {
            for (String key : ref.getPropertyKeys()) {
                out.println(key + " - " + ref.getProperty(key));
            }
        }
    }

●   invokes a 'computation' service
    void printTestService(PrintWriter out) {
        out.println("<H2>TestService invocation</H2>");
        TestService svc = ... // from the OSGi Service Registry
        if (svc != null)
            out.println("TestService Result: " + svc.doit());
    }
Demo Setup – Services
FrameworkStatus             is provided by the Ecosystem
TestService          is a simple OSGi Service
public interface TestService {
    String doit();
}


Registered with Remote Service props
public class Activator implements BundleActivator {
    public void start(BundleContext context) throws Exception {
        TestService ts = new TestServiceImpl();
        Dictionary tsProps = new Hashtable();
        tsProps.put("service.exported.interfaces", "*");
        tsProps.put("service.exported.configs", "osgi.configtype.ecosystem");
        context.registerService(TestService.class.getName(), ts, tsProps);
    }
}
Demo
●   Real demo available online:
      http://www.youtube.com/watch?v=8-9deWm67w0
●   Following is a set of screenshots that capture
    the essence of the demo...
Questions?
Acknowledgements
●   Cloud image Wikimedia Commons
    –   Stratocumuli by de:Benutzer:LivingShadow

More Related Content

What's hot

Second Step to the NoSQL Side: MySQL JSON Functions
Second Step to the NoSQL Side: MySQL JSON FunctionsSecond Step to the NoSQL Side: MySQL JSON Functions
Second Step to the NoSQL Side: MySQL JSON FunctionsSveta Smirnova
 
OpenStack DevStack Tutorial
OpenStack DevStack TutorialOpenStack DevStack Tutorial
OpenStack DevStack TutorialSaju Madhavan
 
OpenStack Development Using devstack
OpenStack Development Using devstackOpenStack Development Using devstack
OpenStack Development Using devstackmestery
 
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...ThomasElling1
 
Integrating OpenStack with Active Directory
Integrating OpenStack with Active DirectoryIntegrating OpenStack with Active Directory
Integrating OpenStack with Active Directorycjellick
 
Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGiCarsten Ziegeler
 
Deploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab FacilitiesDeploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab FacilitiesFIWARE
 
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R AugeHTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Augemfrancis
 
Puppet and the Model-Driven Infrastructure
Puppet and the Model-Driven InfrastructurePuppet and the Model-Driven Infrastructure
Puppet and the Model-Driven Infrastructurelkanies
 
Keystone - Openstack Identity Service
Keystone - Openstack Identity Service Keystone - Openstack Identity Service
Keystone - Openstack Identity Service Prasad Mukhedkar
 
Service Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C ZiegelerService Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C Ziegelermfrancis
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqelajobandesther
 
A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)Nati Shalom
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureMarcel Offermans
 
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...mfrancis
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsIván López Martín
 
NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.Sveta Smirnova
 
Openstack in 10 mins
Openstack in 10 minsOpenstack in 10 mins
Openstack in 10 minsDawood M.S
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Leejaxconf
 

What's hot (20)

Second Step to the NoSQL Side: MySQL JSON Functions
Second Step to the NoSQL Side: MySQL JSON FunctionsSecond Step to the NoSQL Side: MySQL JSON Functions
Second Step to the NoSQL Side: MySQL JSON Functions
 
OpenStack DevStack Tutorial
OpenStack DevStack TutorialOpenStack DevStack Tutorial
OpenStack DevStack Tutorial
 
OpenStack Development Using devstack
OpenStack Development Using devstackOpenStack Development Using devstack
OpenStack Development Using devstack
 
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
 
Integrating OpenStack with Active Directory
Integrating OpenStack with Active DirectoryIntegrating OpenStack with Active Directory
Integrating OpenStack with Active Directory
 
Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGi
 
Deploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab FacilitiesDeploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab Facilities
 
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R AugeHTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
 
Puppet and the Model-Driven Infrastructure
Puppet and the Model-Driven InfrastructurePuppet and the Model-Driven Infrastructure
Puppet and the Model-Driven Infrastructure
 
Keystone - Openstack Identity Service
Keystone - Openstack Identity Service Keystone - Openstack Identity Service
Keystone - Openstack Identity Service
 
Service Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C ZiegelerService Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C Ziegeler
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
 
A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the future
 
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut Configurations
 
NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.
 
Openstack in 10 mins
Openstack in 10 minsOpenstack in 10 mins
Openstack in 10 mins
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Lee
 

Viewers also liked

LVIV IT Arena - SmartHome using low cost components
LVIV IT Arena - SmartHome using low cost componentsLVIV IT Arena - SmartHome using low cost components
LVIV IT Arena - SmartHome using low cost componentsOriol Rius
 
Final Presentation - Edan&Itzik
Final Presentation - Edan&ItzikFinal Presentation - Edan&Itzik
Final Presentation - Edan&Itzikitzik cohen
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCUroadster43
 
오픈소스 기반의 레드햇 클라우드 플랫폼 RhCI & Docker with PaaS
오픈소스 기반의 레드햇 클라우드 플랫폼   RhCI & Docker with PaaS오픈소스 기반의 레드햇 클라우드 플랫폼   RhCI & Docker with PaaS
오픈소스 기반의 레드햇 클라우드 플랫폼 RhCI & Docker with PaaSHojoong Kim
 
Home Automation by ESP8266
Home Automation by ESP8266Home Automation by ESP8266
Home Automation by ESP8266Gleb Vinnikov
 
HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE
HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE
HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE IJRISE Journal
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOTdega1999
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1Andy Gelme
 
Android Control Hardware and Arduino IoT ( 22 Aug 15 )
Android Control Hardware and Arduino IoT ( 22 Aug 15 )Android Control Hardware and Arduino IoT ( 22 Aug 15 )
Android Control Hardware and Arduino IoT ( 22 Aug 15 )Adun Nanthakaew
 
Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Baoshi Zhu
 
Arduino Based Home Automation (2003) (1003018)
Arduino Based Home Automation (2003) (1003018)Arduino Based Home Automation (2003) (1003018)
Arduino Based Home Automation (2003) (1003018)Rappy Saha
 
Internet of things for Smart Home
Internet of things for Smart Home Internet of things for Smart Home
Internet of things for Smart Home Khwaja Aamer
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummiesPavlos Isaris
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOEklavya Sharma
 
Home automation using IoT
Home automation using IoTHome automation using IoT
Home automation using IoTAthira_1993
 
Home automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhaneHome automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhaneKamal Lamichhane
 

Viewers also liked (20)

Node MCU Fun
Node MCU FunNode MCU Fun
Node MCU Fun
 
LVIV IT Arena - SmartHome using low cost components
LVIV IT Arena - SmartHome using low cost componentsLVIV IT Arena - SmartHome using low cost components
LVIV IT Arena - SmartHome using low cost components
 
Final Presentation - Edan&Itzik
Final Presentation - Edan&ItzikFinal Presentation - Edan&Itzik
Final Presentation - Edan&Itzik
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
오픈소스 기반의 레드햇 클라우드 플랫폼 RhCI & Docker with PaaS
오픈소스 기반의 레드햇 클라우드 플랫폼   RhCI & Docker with PaaS오픈소스 기반의 레드햇 클라우드 플랫폼   RhCI & Docker with PaaS
오픈소스 기반의 레드햇 클라우드 플랫폼 RhCI & Docker with PaaS
 
Home Automation by ESP8266
Home Automation by ESP8266Home Automation by ESP8266
Home Automation by ESP8266
 
HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE
HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE
HOME AUTOMATION SYSTEM VIA INTERNET USING ANDROID PHONE
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
 
Android Control Hardware and Arduino IoT ( 22 Aug 15 )
Android Control Hardware and Arduino IoT ( 22 Aug 15 )Android Control Hardware and Arduino IoT ( 22 Aug 15 )
Android Control Hardware and Arduino IoT ( 22 Aug 15 )
 
Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266
 
Arduino Based Home Automation (2003) (1003018)
Arduino Based Home Automation (2003) (1003018)Arduino Based Home Automation (2003) (1003018)
Arduino Based Home Automation (2003) (1003018)
 
Internet of things for Smart Home
Internet of things for Smart Home Internet of things for Smart Home
Internet of things for Smart Home
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINO
 
WiFi anywhere
WiFi anywhereWiFi anywhere
WiFi anywhere
 
Home automation using IoT
Home automation using IoTHome automation using IoT
Home automation using IoT
 
Home automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhaneHome automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhane
 
Smart homes
Smart homesSmart homes
Smart homes
 
Dc servo motor
Dc servo motorDc servo motor
Dc servo motor
 

Similar to OSGi Cloud Ecosystems (EclipseCon 2013)

OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)David Bosschaert
 
OSGi Cloud Ecosystems - David Bosschaert
OSGi Cloud Ecosystems - David BosschaertOSGi Cloud Ecosystems - David Bosschaert
OSGi Cloud Ecosystems - David Bosschaertmfrancis
 
OSGi and Cloud Computing - David Bosschaert
OSGi and Cloud Computing - David BosschaertOSGi and Cloud Computing - David Bosschaert
OSGi and Cloud Computing - David Bosschaertmfrancis
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014Hojoong Kim
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?Nuxeo
 
SALSA: A Framework for Dynamic Configuration of Cloud Services
SALSA: A Framework for Dynamic Configuration of Cloud ServicesSALSA: A Framework for Dynamic Configuration of Cloud Services
SALSA: A Framework for Dynamic Configuration of Cloud ServicesDuc-Hung LE
 
Multi-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud ComputingMulti-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud ComputingWSO2
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoopGergely Devenyi
 
Advanced use cases and approaches with stratos paa s
Advanced use cases and approaches with stratos paa sAdvanced use cases and approaches with stratos paa s
Advanced use cases and approaches with stratos paa sWSO2
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and HerokuTapio Rautonen
 
WS-VLAM workflow
WS-VLAM workflowWS-VLAM workflow
WS-VLAM workflowguest6295d0
 
2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublinAlex Heneveld
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSAOracle Korea
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Ruslan Meshenberg
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotClouddaoswald
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Project COLA: Use Case to create a scalable application in the cloud based on...
Project COLA: Use Case to create a scalable application in the cloud based on...Project COLA: Use Case to create a scalable application in the cloud based on...
Project COLA: Use Case to create a scalable application in the cloud based on...Project COLA
 

Similar to OSGi Cloud Ecosystems (EclipseCon 2013) (20)

OSGi Cloud Ecosystems
OSGi Cloud EcosystemsOSGi Cloud Ecosystems
OSGi Cloud Ecosystems
 
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
 
OSGi Cloud Ecosystems - David Bosschaert
OSGi Cloud Ecosystems - David BosschaertOSGi Cloud Ecosystems - David Bosschaert
OSGi Cloud Ecosystems - David Bosschaert
 
OSGi and Cloud Computing - David Bosschaert
OSGi and Cloud Computing - David BosschaertOSGi and Cloud Computing - David Bosschaert
OSGi and Cloud Computing - David Bosschaert
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?
 
SALSA: A Framework for Dynamic Configuration of Cloud Services
SALSA: A Framework for Dynamic Configuration of Cloud ServicesSALSA: A Framework for Dynamic Configuration of Cloud Services
SALSA: A Framework for Dynamic Configuration of Cloud Services
 
Multi-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud ComputingMulti-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud Computing
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoop
 
Advanced use cases and approaches with stratos paa s
Advanced use cases and approaches with stratos paa sAdvanced use cases and approaches with stratos paa s
Advanced use cases and approaches with stratos paa s
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and Heroku
 
WS-VLAM workflow
WS-VLAM workflowWS-VLAM workflow
WS-VLAM workflow
 
2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotCloud
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Project COLA: Use Case to create a scalable application in the cloud based on...
Project COLA: Use Case to create a scalable application in the cloud based on...Project COLA: Use Case to create a scalable application in the cloud based on...
Project COLA: Use Case to create a scalable application in the cloud based on...
 

More from David Bosschaert

What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)David Bosschaert
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in PractiseDavid Bosschaert
 
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)David Bosschaert
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)David Bosschaert
 
What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0David Bosschaert
 
Update on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupUpdate on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupDavid Bosschaert
 
What's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseWhat's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseDavid Bosschaert
 
Distributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancementsDistributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancementsDavid Bosschaert
 
Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009David Bosschaert
 

More from David Bosschaert (9)

What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0
 
Update on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupUpdate on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert Group
 
What's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseWhat's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise Release
 
Distributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancementsDistributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancements
 
Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009
 

OSGi Cloud Ecosystems (EclipseCon 2013)

  • 1. OSGi Cloud Ecosystems David Bosschaert Principal Engineer, JBoss/Red Hat david@redhat.com March 2013
  • 2. Agenda ● PaaS today ● OSGi Cloud Ecosystems ● 'Demo'
  • 3. PaaS offerings today (1) ● General deployment containers – Application Servers ● i.e. deploy .WAR files in the cloud – Continuous Build Jenkins/Hudson ● Dynamic Language based – e.g. Python/Ruby/JavaScript – Often come with a Cloud-based IDE ● Support for specific technology – E.g. deploy Google App Engine on my own cloud
  • 4. PaaS offerings today (2) ● Typically per cloud-VM instance – you need to do your own scaling – sometimes it can dynamically add replicas ● of your entire deployment – instances don't know much about others ● although they might connect to a cloud data store ● Today's PaaS – suitable if you can deploy multiple instances of the same app – harder to use if you have a composite application ● with a variety of components ● across different nodes
  • 5. We need a better cloud! ● Where things are more dynamic ● Where a bunch of different nodes work together to form one logical application ● Where not every cloud VM image has just one purpose ● Where each cloud image could play different roles over time ● Where we can easily migrate from one cloud vendor to another
  • 6. Example cloud-based Application (1) ● Has a web front-end – host needs to be accessible from outside ● (well known hostname) ● Uses messaging – replicated message broker ● Has a data store ● And a back end – does the heavy lifting, computation – integrates with 3rd party providers ● Each entity on a different node
  • 7. Example cloud-based Application (2) Every entity runs on a different cloud node Back End Back End Read and update Notifies request data Database Message Database Queue Web Web Submit request Web Web Store request data Front-end Web Front-end Web Front-end Front-end Front-end Front-end User interacts
  • 8. Dynamic Scaling and correction ● I want all these elements to scale dynamically – possibly based on some domain-specific rules ● I want the system to be able to correct itself – e.g. when a Cloud VM dies/becomes inaccessible ● I don't want to worry about reconfiguring clients – when a service moves to another node ● I want the system to be portable – so I can move to another cloud – in case of entire cloud failure
  • 9. How do I get all this? I need an entity that orchestrates, a Provisioner ● Needs to be able to remotely deploy – to the nodes in the system – decide at runtime what the role of a certain VM is ● Needs to know the topology – as well as the application specifics I need a flexible cloud platform ● repurpose a Cloud VM ● without sending the whole image to a machine again Portability: I want to shield myself from cloud-vendor specific APIs ● as much as possible ● standards based
  • 10. OSGi Cloud Ecosystems ● A number of OSGi frameworks – great because of their dynamic capabilities ● Each in a separate VM/cloud node ● Bound together to form a logical ecosystem – via ecosystem-wide discovery mechanism ● Environment – OSGi Frameworks can find out about other frameworks – Can easily communicate with other frameworks – and services running on these frameworks
  • 11. OSGi Cloud Ecosystems A highly dynamic OSGi environment where Cloud nodes/VMs, bundles and services come and go
  • 12. How does this work? ● Start off with a number of 'empty' OSGi frameworks in the cloud – basic infrastructure provided ● remote services capability ● ecosystem support – no application logic ● A provisioner decides what goes where – knows about your application – and reacts to changes in topology / runtime system health ● Discovery component provides OSGi service visibility across frameworks – deals with service migrations
  • 13. Ecosystem Support ● Each framework registers – FrameworkStatus service – Remote Deployment service ● These are visible across the Ecosystem – as OSGi services – (via OSGi Remote Services specs) ● But not outside
  • 14. FrameworkStatus Service ● One per running Framework in the Ecosystem – Available via Remote Services ● Provides information about the framework public interface FrameworkStatus { String getFrameworkVariable(String name); } ● Static metadata as Service Registration properties ● Dynamic metadata via getFrameworkVariable() static metadata dynamic metadata cloud type/version available memory location (country / area) available diskspace OSGi framework version machine load factor processor architecture network throughput Java version ... IP address app-defined (custom)
  • 15. Provisioning ● Need a Remote Deployment API – with Java client API – that spans the Ecosystem – works in the cloud – possibly an RFC 182 (REST)-based solution
  • 16. A sample Provisioner (1/2) // Listen for the FrameworkStatus service ServiceTracker st = new ServiceTracker(context, FrameworkStatus.class.getName(), null) { public Object addingService(ServiceReference reference) { topologyChanged(); return super.addingService(reference); } public void removedService(ServiceReference reference, Object service) { topologyChanged(); super.removedService(reference, service); } }; // React to changes in the topology void topologyChanged() { // Deploy the web front-end if (getDeployments(WEB).size() == 0) addDeployment(WEB); // Deploy the back-end Service max twice. if (getDeployments(SERVICE).size() < 2) addDeployment(SERVICE); }
  • 17. A sample Provisioner (2/2) void addDeployment(DeploymentType type) { ServiceReference[] possibleFrameworks = getFrameworkReferences(); ServiceReference target = getMostSuitableFramework(type, possibleFrameworks); if (target == null) { // No suitable framework found return null; } String[] bundles = getDeploymentBundles(type, target); deployToFramework(target, bundles); } ServiceReference getMostSuitableFramework(DeploymentType type, ServiceReference... frameworks) { for (ServiceReference ref : frameworks) { if (type.equals(WEB)) { Object prop = ref.getProperty("...framework.ip"); if (prop instanceof String) if (((String) prop).startsWith("web")) return ref; } else if (type.equals(...) { // ... } } return null; }
  • 18. How do my distributed business components interact? ● Develop them as OSGi Services – then use them via OSGi Remote Services... ● To publish a service in the ecosystem MyService ms = new MyServiceImpl(); Dictionary msProps = new Hashtable(); msProps.put("service.exported.interfaces", "*"); msProps.put("service.exported.configs", "osgi.configtype.ecosystem"); context.registerService(MyService.class.getName(), ms, msProps); ● Discovery component gives visibility across ecosystem – System will react automatically to services moving to other VMs/nodes – New instances appearing ● Client simply uses OSGi services as normal MyService ms = ... // Remote Service from Service Registry ms.doit(); // Invoke Remote Service
  • 19. Summary: OSGi Cloud Ecosystems ● A fluid system where deployments can come and go ● Provisioner decides what goes where – Cloud nodes get added, removed ● Bundles might get deployed, moved – Ecosystem-wide services appear, disappear ● 0, 1, many instances – Service consumers don't need to be reconfigured ● react automatically to changes ● handled by OSGi Remote Services + Discovery ● System can be repurposed ● Topic of OSGi RFC 183 – early access draft available now
  • 20. Cloud at the OSGi Alliance ● RFP 133 (Cloud Computing) accepted http://www.osgi.org/bugzilla/show_bug.cgi?id=114 ● RFC 182 REST API ● RFC 183 Cloud Ecosystems – Available as EA draft: http://www.osgi.org/Download/File?url=/download/osgi-early-draft-2013-03.pdf – Being discussed at the EEG ● Starting: RFP 158 Distributed Event Admin – more RFPs/RFCs likely to come... – Interested? Join the discussion!
  • 21. See it in action ● Pilot on Red Hat's OpenShift cloud – get your own free dev instances ● All source code available in github ● For more details see http://coderthoughts.blogspot.com (June/July/August 2012 posts)
  • 22. Demo Setup Back End Back End Back End Back End Provisioner rules: ● servlet needs to go on specific hostname ● exactly 1 testservice Web Front-end Web Front-end ● displays available frameworks (Servlet) (Servlet) ● not on servlet host ● invokes TestService User interacts
  • 23. Demo Setup Back End Back End Back End Back End TestService TestService Provisioner rules: ● servlet needs to go on specific hostname ● exactly 1 testservice Web Front-end Web Front-end ● displays available frameworks (Servlet) (Servlet) ● not on servlet host ● invokes TestService User interacts
  • 24. Demo Setup Back End Back End Back End Back End TestService TestService TestService TestService Provisioner rules: ● servlet needs to go on specific hostname ● exactly 1 testservice Web Front-end Web Front-end ● displays available frameworks (Servlet) (Servlet) ● not on servlet host ● invokes TestService User interacts
  • 25. Demo Setup – The Servlet FrameworkStatus and TestService from Service Registry ● lists available frameworks void printFrameworks(PrintWriter out) { // frameworkRefs list all FrameworkStatus services from the OSGi Service Registry for (ServiceReference ref : frameworkRefs) { for (String key : ref.getPropertyKeys()) { out.println(key + " - " + ref.getProperty(key)); } } } ● invokes a 'computation' service void printTestService(PrintWriter out) { out.println("<H2>TestService invocation</H2>"); TestService svc = ... // from the OSGi Service Registry if (svc != null) out.println("TestService Result: " + svc.doit()); }
  • 26. Demo Setup – Services FrameworkStatus is provided by the Ecosystem TestService is a simple OSGi Service public interface TestService { String doit(); } Registered with Remote Service props public class Activator implements BundleActivator { public void start(BundleContext context) throws Exception { TestService ts = new TestServiceImpl(); Dictionary tsProps = new Hashtable(); tsProps.put("service.exported.interfaces", "*"); tsProps.put("service.exported.configs", "osgi.configtype.ecosystem"); context.registerService(TestService.class.getName(), ts, tsProps); } }
  • 27. Demo ● Real demo available online: http://www.youtube.com/watch?v=8-9deWm67w0 ● Following is a set of screenshots that capture the essence of the demo...
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 37. Acknowledgements ● Cloud image Wikimedia Commons – Stratocumuli by de:Benutzer:LivingShadow