SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
From Distributed to Pervasive OSGi

Jan S. Rellermeyer
Systems Group, ETH Zürich
Welcome to Zürich!




Tuesday, June 23, 2009   Jan S. Rellermeyer, ETH Zürich   2
Software Modules

      Structured Programming
      Encapsulation                 David Parnas, 1972

      Information Hiding
      Coupling vs. Cohesion         Larry Constantine, 1974


      Separation of Concerns        Edsger W. Dijkstra, 1974




 Reuse
                                                                Web services, OSGi
 Orchestration

 Software Design Principle
 Base unit for adding orthogonal concerns                      The Future?

Tuesday, June 23, 2009     Jan S. Rellermeyer, ETH Zürich                            3
Module Management in Java

 Traditional Java: The mystical class path

 java –cp commons-X.jar foo.jar bar.jar
  my.application.MainClass

                Which module contains the main class?
                What are the dependencies between foo.jar and bar.jar?
                What happens if bar.jar is upgraded to bar-1.01.jar?




Tuesday, June 23, 2009                Jan S. Rellermeyer, ETH Zürich      4
The OSGi Framework
  Export-Package: Package 1                                       Export-Package: Package I, Package II
                                                                  Import-Package: Package 1

                                                Exported Package                                   Exported Package




                                    Package 1                                  Package I




                                                                    Bundle B
                         Bundle A




                                                     Import                    Package II
                                    Package 2
                                    Package 3

                                                Private Package


                                            OSGi Framework


                Explicit dependencies
                Explicit, yet declarative
                Runtime
                    Dynamic
                    Events, Introspection

Tuesday, June 23, 2009                                            Jan S. Rellermeyer, ETH Zürich                      5
Modularity: Coupling vs. Cohesion

    Two components are loosely coupled, when changes in one never or rarely
    necessitate a change in the other




                         A component exhibits high cohesion when all its functions/methods are
                         strongly related in terms of function




Tuesday, June 23, 2009                          Jan S. Rellermeyer, ETH Zürich                   6
OSGi Services: Reducing Coupling

    Bundles are Modules
           encapsulate functionality
           deployment unit
    Enable reuse, extension, and dynamic composition

    But: Package dependencies are explicit.                             Interface
           Can lead to all or nothing
           Limits the modularity!
                                                                      Implementation

    Solution: Services
           Separate the interface from the implementation

Tuesday, June 23, 2009               Jan S. Rellermeyer, ETH Zürich                  7
The Service Registry


 The OSGi framework maintains a central service registry

 Bundles can register their own services and retrieve
  services provided by other bundles

 Services can be registered with a set of properties
        Additional description of the service, can be used to model
         constraints or do “best fit matching”

                                                                       Registry
 Services are identified by their name

Tuesday, June 23, 2009             Jan S. Rellermeyer, ETH Zürich                 8
Distributed OSGi

 General idea: use services provided by a remote machine
        Loose coupling

 Remote can be
        Separate machine, connected through a network
        Separate JVM, different address space
                (Different language, different address space)


 Why would you want this?
        Isolation
        Redundancy
        Problem is inherently distributed


Tuesday, June 23, 2009                       Jan S. Rellermeyer, ETH Zürich   9
Preview: OSGi 4.2 Remote Services

 Service Hooks
        Distribution Software can intercept service requests

 Proxies
        Import a service into the local framework

 Intents
        Denotes an abstract distribution capability
        Requires mutual agreement
        Derived from SCA




Tuesday, June 23, 2009             Jan S. Rellermeyer, ETH Zürich   10
Example: Eclipse Communication Framework

                                 Application                                                Container Adapters
                         Eclipse, RCP, Equinox Server
                                                                               Shared Editing               Call
                                                 3                                                          Jingle

              1                   2       Datashare                                    Remote
                                                                                       Services          Discovery
                  container


                                                                                   Datashare            File Transfer


             ECF Core                                                              Presence            Shared Object
                  XMPP (e.g.)
                                                      OSGi/Equinox

            API                       Provider                                IAdaptable



Tuesday, June 23, 2009                                Jan S. Rellermeyer, ETH Zürich                                    11
ECF Remote Services

 Can do RFC 119 Remote Service Provider
        Will be made compliant with the 4.2 specs
        Can use different distribution systems as backend
                R-OSGi
                ECF generic DSOs


 Can do more
        Proxy service has a distinct property service.imported set
        In ECF, this is set to an IRemoteService instance
                One-Shot, fireAsync
                Futures, callAsync/1
                Async with Listener, callAsync/2
        Non-transparent access


Tuesday, June 23, 2009                       Jan S. Rellermeyer, ETH Zürich   12
R-OSGi

 Preserves the expressiveness of OSGi
        Every Java class can be a service
 Runs with every OSGi framework

 Consistently maps network failures to module lifecycle
  events
        Proxy service provided by proxy bundle
                                          Life-cycle, consistent behavior
 Is flexible, yet competitive in terms of performance

            [J. S. Rellermeyer, G. Alonso, T. Roscoe: R- OSGi: Distributed Applications through Software Modularization.
            In: Middleware 2007]



Tuesday, June 23, 2009                                 Jan S. Rellermeyer, ETH Zürich                                      13
Dynamic Proxy Generation

 Service: Interface + Implementation
 Shared Knowledge: Interface




   public class MyServiceProxy implements MyService {
                                                                            public interface MyService {
       public String callMe(Integer i) {
          // generic remote service call                                        public String callMe(Integer i);
       }
                                                                            }
   }




       Peer A                                                                                     Peer B

Tuesday, June 23, 2009                     Jan S. Rellermeyer, ETH Zürich                                      14
Remote Services: Cohesion Distributed




Tuesday, June 23, 2009   Jan S. Rellermeyer, ETH Zürich   15
Type Injection: Dealing with Coupling

 public interface MyService {                                        Bundle


        void enqueue(QueueItem item);

        Queue getQueue();

 }                                                                  MyService




                                         Proxy
                                         Bundle
                                        MyService




Tuesday, June 23, 2009             Jan S. Rellermeyer, ETH Zürich               16
DISTRIBUTED OSGI

Location-transparency for services
Point to point

Not a single system image
Not a distributed module runtime


PERVASIVE OSGI



Tuesday, June 23, 2009        Jan S. Rellermeyer, ETH Zürich   17
The Cloud(s)




     Amazon EC2                                                                   Yahoo Pipes

        Infrastructure as a service                                     Agility
        Pay as you go                                                   Permanently available
        Horizontal Scale out




Tuesday, June 23, 2009                 Jan S. Rellermeyer, ETH Zürich                             18
The Fabric of the Cloud: Distributed Systems

 Under the hood:

 Potentially
        unreliable hardware
        unreliable network


 Virtualized environment
        Little to no control




Tuesday, June 23, 2009          Jan S. Rellermeyer, ETH Zürich   19
Distributed Systems Are Still Challenging

      Architecture
      Complexity
      Parallelization
      Debugging, Testing
      Deployment
      Management




Tuesday, June 23, 2009      Jan S. Rellermeyer, ETH Zürich   20
Software Modules as an Application Model

      Composable
      Reusable
      Manageable
      Focus on functional aspects
      Encourage to think about interfaces
      Tool support

 Building distributed systems without thinking of distribution

                                                               Think of R-OSGi



Tuesday, June 23, 2009        Jan S. Rellermeyer, ETH Zürich                 21
R-OSGi: A First Step Into The Cloud

 Services facilitate loose coupling and high cohesion
                         Instrumental for parallelization, think about Map-Reduce!

 R-OSGi preserves the expressiveness of OSGi services
        Every Java class can be a service
        With R-OSGi, almost every OSGi service can be a remote service
                                                                                                            Generality
 Provides location transparency
                                        “Where” has a different meaning in a data center
 Consistently maps network failures to module lifecycle
  events
                                                       Node and network failures happen often!
            [J. S. Rellermeyer, M. Duller, G. Alonso: Engineering the Cloud from Software Modules. In: ICSE-Cloud 2009]


Tuesday, June 23, 2009                                Jan S. Rellermeyer, ETH Zürich                                      22
Example: R-OSGi Deployment Tool




            [J. S. Rellermeyer, G. Alonso, T. Roscoe: Ready for Distribution? Turning Modular into Distributed
            Applications with the R- OSGi Deployment Tool . Demo at OOPSLA 2007]

Tuesday, June 23, 2009                                 Jan S. Rellermeyer, ETH Zürich                            23
Modules for the Cloud

 Distribution can be added as an orthogonal concern
                         R-OSGi turns OSGi modules into a distributed system
 So can replication
        Instrumentation of the modules
        Middleware support
 Elasticity through redundancy and redeployment

                                                   Module
                                Module                                  Module



                                                                  Module
                                         Module




Tuesday, June 23, 2009                        Jan S. Rellermeyer, ETH Zürich     24
Research Prototype: Cirrostratus




                                                          Overlay
                                                          Network




Tuesday, June 23, 2009   Jan S. Rellermeyer, ETH Zürich             25
A Virtual Runtime for Modules

 “Hypovisor” for OSGi Modules

 Instruments Bundles
        For paravirtualization
        For state capturing

 Shares internal state
        Shared service registry
        Shared bundle registry

 Shares bundle state
        Replication, migration

Tuesday, June 23, 2009             Jan S. Rellermeyer, ETH Zürich   26
The Model of State




      The fields of a service instance are “state”
      The fields of “state” are “state”
      “State” is replicated (and treated as “by reference”)
      Everything else is local to the node (no state leakage)
Tuesday, June 23, 2009         Jan S. Rellermeyer, ETH Zürich    27
Code Analysis: Symbolic Execution
                                                    private int state;
add(I)I
   L0                                               int add(int i) {
    ALOAD 0                                             state += i;
    DUP                                                 return state;
    GETFIELD test/Simple.state : I                  }
    ILOAD 1
    IADD
                                               Initialize the slots of the call stack
    PUTFIELD test/Simple.state : I              with symbols
   L1                                                  0 = “this”, 1 = arg0, 2 = local0
    ALOAD 0
                                               Initialize the fields with relative
    GETFIELD test/Simple.state : I
    IRETURN                                     symbols
   L2                                                  test/Simple.state = “Simple.state”
    LOCALVARIABLE this Ltest/Simple; L0
    L2 0
                                               Execute the code symbolically
    LOCALVARIABLE i I L0 L2 1                  Execution stack becomes symbolic
    MAXSTACK = 3
                                               Non-linear control flow leads to Phi-
    MAXLOCALS = 2
                                                Symbols
Tuesday, June 23, 2009             Jan S. Rellermeyer, ETH Zürich                            28
Instrumentation for Replication
                         private int state;

                         int add(int i) {
                            TransactionContext.BOT(“Simple.add”, i);
private int state;
                            TransactionContext.read(“Simple.state”);
                            state += i;
int add(int i) {            TransactionContext.write(“Simple.state”,
   state += i;              i);
   return state;            return state;                Simplication, it’s
                            TransactionContext.EOT();      top of stack
}
                         }

 TransactionContext binds free variables at runtime and puts fields into
  context
 Similar: Instrumentation for thread migration
Tuesday, June 23, 2009         Jan S. Rellermeyer, ETH Zurich               29
A Virtual Module Runtime




+ non-functional requirements
+ orthogonal concerns




Tuesday, June 23, 2009          Jan S. Rellermeyer, ETH Zürich   30
CONCLUSIONS
 OSGi is a very interesting platform for building dynamic modular
  applications for Java.
 Distribution software like R-OSGi facilitate remote access to OSGi
  services. The 4.2 specs will bring this to the mainstream.
 The OSGi model is a perfect match for dynamic environments such as
  cloud computing
 The Cirrostratus prototype enables adding even more sophisticated
  properties to modules than distribution, such as state replication, service
  migration, hardening policies.
 It can thereby facilitate the even more pervasive usage of OSGi.


Questions?
Tuesday, June 23, 2009          Jan S. Rellermeyer, ETH Zürich              31

Más contenido relacionado

La actualidad más candente

Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalOpenCity Community
 
Hyper-V VMM ile Cloud computing
Hyper-V VMM ile Cloud computingHyper-V VMM ile Cloud computing
Hyper-V VMM ile Cloud computingAhmet Mutlu
 
OSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryOSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryAnthony Gelibert
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
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
 
Getting Into The Flow With CQ DAM
Getting Into The Flow With CQ DAMGetting Into The Flow With CQ DAM
Getting Into The Flow With CQ DAMLars Trieloff
 
Ese2008 Swordfish
Ese2008 SwordfishEse2008 Swordfish
Ese2008 Swordfishwwtyler
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGiDavid Bosschaert
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)David Bosschaert
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiToni Epple
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaArun Gupta
 
Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action CompatibleOne
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification PresentationNiall Merrigan
 
IBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertyIBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertynick_garrod
 

La actualidad más candente (19)

Rogue bundles
Rogue bundlesRogue bundles
Rogue bundles
 
Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-final
 
Hyper-V VMM ile Cloud computing
Hyper-V VMM ile Cloud computingHyper-V VMM ile Cloud computing
Hyper-V VMM ile Cloud computing
 
OSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryOSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared Memory
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
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
 
Getting Into The Flow With CQ DAM
Getting Into The Flow With CQ DAMGetting Into The Flow With CQ DAM
Getting Into The Flow With CQ DAM
 
Ese2008 Swordfish
Ese2008 SwordfishEse2008 Swordfish
Ese2008 Swordfish
 
Intro to Cloudstack
Intro to CloudstackIntro to Cloudstack
Intro to Cloudstack
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGi
 
Polyglot OSGi
Polyglot OSGiPolyglot OSGi
Polyglot OSGi
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGi
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 India
 
Jetty Vs Tomcat
Jetty Vs TomcatJetty Vs Tomcat
Jetty Vs Tomcat
 
Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action Compatibleone @ OpenStack In Action
Compatibleone @ OpenStack In Action
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification Presentation
 
Introduction to-osgi
Introduction to-osgiIntroduction to-osgi
Introduction to-osgi
 
IBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertyIBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of liberty
 

Destacado

Cloudy with a Chance of Bundles (and non java components) - R Nicholson & T Ward
Cloudy with a Chance of Bundles (and non java components) - R Nicholson & T WardCloudy with a Chance of Bundles (and non java components) - R Nicholson & T Ward
Cloudy with a Chance of Bundles (and non java components) - R Nicholson & T Wardmfrancis
 
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012mfrancis
 
Lessons learned from a large scale OSGii web app - P Bakker & J de Vreede
Lessons learned from a large scale OSGii web app - P Bakker & J de VreedeLessons learned from a large scale OSGii web app - P Bakker & J de Vreede
Lessons learned from a large scale OSGii web app - P Bakker & J de Vreedemfrancis
 
Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...
Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...
Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...mfrancis
 
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...mfrancis
 
Robust collaboration services with OSGi - Satya Maheshwari
Robust collaboration services with OSGi - Satya MaheshwariRobust collaboration services with OSGi - Satya Maheshwari
Robust collaboration services with OSGi - Satya Maheshwarimfrancis
 
Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)
Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)
Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)mfrancis
 
Better WebApp Development using OSGi - Raymond Auge
Better WebApp Development using OSGi - Raymond AugeBetter WebApp Development using OSGi - Raymond Auge
Better WebApp Development using OSGi - Raymond Augemfrancis
 
Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012
Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012
Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012mfrancis
 
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan RellermeyerUsing OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyermfrancis
 
OSGi and Private Clouds
OSGi and Private CloudsOSGi and Private Clouds
OSGi and Private Cloudsmfrancis
 
OSGi PaaS+ building a modular and secure cloud platform with OSGi - A Grzesik
OSGi PaaS+ building a modular and secure cloud platform with OSGi - A GrzesikOSGi PaaS+ building a modular and secure cloud platform with OSGi - A Grzesik
OSGi PaaS+ building a modular and secure cloud platform with OSGi - A Grzesikmfrancis
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the CloudBert Ertman
 
The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...
The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...
The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...mfrancis
 
Complexity, Components & Clouds (Paremus)
Complexity, Components & Clouds (Paremus)Complexity, Components & Clouds (Paremus)
Complexity, Components & Clouds (Paremus)mfrancis
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Makmfrancis
 
Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi ApplicationsMarcel Offermans
 
Deploying Heterogeneous Artifacts to the Cloud with OSGi - Neil Bartlett
Deploying Heterogeneous Artifacts to the Cloud with OSGi - Neil BartlettDeploying Heterogeneous Artifacts to the Cloud with OSGi - Neil Bartlett
Deploying Heterogeneous Artifacts to the Cloud with OSGi - Neil Bartlettmfrancis
 
RESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with DockerRESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with DockerBertrand Delacretaz
 

Destacado (20)

Cloudy with a Chance of Bundles (and non java components) - R Nicholson & T Ward
Cloudy with a Chance of Bundles (and non java components) - R Nicholson & T WardCloudy with a Chance of Bundles (and non java components) - R Nicholson & T Ward
Cloudy with a Chance of Bundles (and non java components) - R Nicholson & T Ward
 
OSGi Cloud Ecosystems
OSGi Cloud EcosystemsOSGi Cloud Ecosystems
OSGi Cloud Ecosystems
 
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
 
Lessons learned from a large scale OSGii web app - P Bakker & J de Vreede
Lessons learned from a large scale OSGii web app - P Bakker & J de VreedeLessons learned from a large scale OSGii web app - P Bakker & J de Vreede
Lessons learned from a large scale OSGii web app - P Bakker & J de Vreede
 
Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...
Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...
Eclipse Gyrex OSGi based PaaS-Like Programming Stack - OSGi Cloud Workshop Ma...
 
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
 
Robust collaboration services with OSGi - Satya Maheshwari
Robust collaboration services with OSGi - Satya MaheshwariRobust collaboration services with OSGi - Satya Maheshwari
Robust collaboration services with OSGi - Satya Maheshwari
 
Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)
Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)
Cloud & OSGi - The Dawn of Composite Clouds (Now with demo videos)
 
Better WebApp Development using OSGi - Raymond Auge
Better WebApp Development using OSGi - Raymond AugeBetter WebApp Development using OSGi - Raymond Auge
Better WebApp Development using OSGi - Raymond Auge
 
Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012
Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012
Cloud and OSGi at eBay - OSGi Cloud Workshop March 2012
 
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan RellermeyerUsing OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyer
 
OSGi and Private Clouds
OSGi and Private CloudsOSGi and Private Clouds
OSGi and Private Clouds
 
OSGi PaaS+ building a modular and secure cloud platform with OSGi - A Grzesik
OSGi PaaS+ building a modular and secure cloud platform with OSGi - A GrzesikOSGi PaaS+ building a modular and secure cloud platform with OSGi - A Grzesik
OSGi PaaS+ building a modular and secure cloud platform with OSGi - A Grzesik
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the Cloud
 
The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...
The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...
The Dawn of Composite Clouds – Why OSGi is the Most Important Ingredient in t...
 
Complexity, Components & Clouds (Paremus)
Complexity, Components & Clouds (Paremus)Complexity, Components & Clouds (Paremus)
Complexity, Components & Clouds (Paremus)
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Mak
 
Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi Applications
 
Deploying Heterogeneous Artifacts to the Cloud with OSGi - Neil Bartlett
Deploying Heterogeneous Artifacts to the Cloud with OSGi - Neil BartlettDeploying Heterogeneous Artifacts to the Cloud with OSGi - Neil Bartlett
Deploying Heterogeneous Artifacts to the Cloud with OSGi - Neil Bartlett
 
RESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with DockerRESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with Docker
 

Similar a From Distributed to Pervasive OSGi

Emotion recognition from facial expression using fuzzy logic
Emotion recognition from facial expression using fuzzy logicEmotion recognition from facial expression using fuzzy logic
Emotion recognition from facial expression using fuzzy logicFinalyear Projects
 
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBMUsing OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBMmfrancis
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi WebinarWSO2
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012Nouh Walid
 
Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)Md. Mujahid Islam
 
Vulnerability Exploitation in Docker Container Environments
Vulnerability Exploitation in Docker Container EnvironmentsVulnerability Exploitation in Docker Container Environments
Vulnerability Exploitation in Docker Container EnvironmentsFlawCheck
 
An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...Conference Papers
 
Wireless network basics
Wireless network basicsWireless network basics
Wireless network basicsKumar
 
OSI MODEL
OSI MODELOSI MODEL
OSI MODELMousa_k
 
Berlin Devops: Managing systems with Marionette Collective
Berlin Devops: Managing systems with Marionette CollectiveBerlin Devops: Managing systems with Marionette Collective
Berlin Devops: Managing systems with Marionette CollectiveAndreas Schmidt
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programmingmukhtarhudaya
 
Performance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memoryPerformance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memoryZongYing Lyu
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Peter R. Egli
 
OSHI - Open Source Hybrid IP/SDN networking @EWSDN14
OSHI - Open Source Hybrid IP/SDN networking @EWSDN14OSHI - Open Source Hybrid IP/SDN networking @EWSDN14
OSHI - Open Source Hybrid IP/SDN networking @EWSDN14Stefano Salsano
 

Similar a From Distributed to Pervasive OSGi (20)

Emotion recognition from facial expression using fuzzy logic
Emotion recognition from facial expression using fuzzy logicEmotion recognition from facial expression using fuzzy logic
Emotion recognition from facial expression using fuzzy logic
 
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBMUsing OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi Webinar
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Osi model
Osi modelOsi model
Osi model
 
FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012
 
Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)
 
OSI Model
OSI ModelOSI Model
OSI Model
 
Vulnerability Exploitation in Docker Container Environments
Vulnerability Exploitation in Docker Container EnvironmentsVulnerability Exploitation in Docker Container Environments
Vulnerability Exploitation in Docker Container Environments
 
An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...
 
Wireless network basics
Wireless network basicsWireless network basics
Wireless network basics
 
OSI MODEL
OSI MODELOSI MODEL
OSI MODEL
 
Berlin Devops: Managing systems with Marionette Collective
Berlin Devops: Managing systems with Marionette CollectiveBerlin Devops: Managing systems with Marionette Collective
Berlin Devops: Managing systems with Marionette Collective
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
Performance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memoryPerformance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memory
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)
 
C++0x
C++0xC++0x
C++0x
 
1757 1761
1757 17611757 1761
1757 1761
 
1757 1761
1757 17611757 1761
1757 1761
 
OSHI - Open Source Hybrid IP/SDN networking @EWSDN14
OSHI - Open Source Hybrid IP/SDN networking @EWSDN14OSHI - Open Source Hybrid IP/SDN networking @EWSDN14
OSHI - Open Source Hybrid IP/SDN networking @EWSDN14
 

Último

Data Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and TemplatesData Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and TemplatesAurelien Domont, MBA
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...ssuserf63bd7
 
Rakhi sets symbolizing the bond of love.pptx
Rakhi sets symbolizing the bond of love.pptxRakhi sets symbolizing the bond of love.pptx
Rakhi sets symbolizing the bond of love.pptxRakhi Bazaar
 
Planetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifePlanetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifeBhavana Pujan Kendra
 
Jewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource CentreJewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource CentreNZSG
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...Hector Del Castillo, CPM, CPMM
 
NAB Show Exhibitor List 2024 - Exhibitors Data
NAB Show Exhibitor List 2024 - Exhibitors DataNAB Show Exhibitor List 2024 - Exhibitors Data
NAB Show Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxRakhi Bazaar
 
Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...
Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...
Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...PRnews2
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsKnowledgeSeed
 
Healthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare NewsletterHealthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare NewsletterJamesConcepcion7
 
Excvation Safety for safety officers reference
Excvation Safety for safety officers referenceExcvation Safety for safety officers reference
Excvation Safety for safety officers referencessuser2c065e
 
Pitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deckPitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deckHajeJanKamps
 
Implementing Exponential Accelerators.pptx
Implementing Exponential Accelerators.pptxImplementing Exponential Accelerators.pptx
Implementing Exponential Accelerators.pptxRich Reba
 
Fundamentals Welcome and Inclusive DEIB
Fundamentals Welcome and  Inclusive DEIBFundamentals Welcome and  Inclusive DEIB
Fundamentals Welcome and Inclusive DEIBGregory DeShields
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfJamesConcepcion7
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamArik Fletcher
 
Interoperability and ecosystems: Assembling the industrial metaverse
Interoperability and ecosystems:  Assembling the industrial metaverseInteroperability and ecosystems:  Assembling the industrial metaverse
Interoperability and ecosystems: Assembling the industrial metaverseSiemens
 
20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf
20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf
20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdfChris Skinner
 
Customizable Contents Restoration Training
Customizable Contents Restoration TrainingCustomizable Contents Restoration Training
Customizable Contents Restoration TrainingCalvinarnold843
 

Último (20)

Data Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and TemplatesData Analytics Strategy Toolkit and Templates
Data Analytics Strategy Toolkit and Templates
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
 
Rakhi sets symbolizing the bond of love.pptx
Rakhi sets symbolizing the bond of love.pptxRakhi sets symbolizing the bond of love.pptx
Rakhi sets symbolizing the bond of love.pptx
 
Planetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifePlanetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in Life
 
Jewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource CentreJewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource Centre
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
 
NAB Show Exhibitor List 2024 - Exhibitors Data
NAB Show Exhibitor List 2024 - Exhibitors DataNAB Show Exhibitor List 2024 - Exhibitors Data
NAB Show Exhibitor List 2024 - Exhibitors Data
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
 
Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...
Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...
Introducing the AI ShillText Generator A New Era for Cryptocurrency Marketing...
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applications
 
Healthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare NewsletterHealthcare Feb. & Mar. Healthcare Newsletter
Healthcare Feb. & Mar. Healthcare Newsletter
 
Excvation Safety for safety officers reference
Excvation Safety for safety officers referenceExcvation Safety for safety officers reference
Excvation Safety for safety officers reference
 
Pitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deckPitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deck
 
Implementing Exponential Accelerators.pptx
Implementing Exponential Accelerators.pptxImplementing Exponential Accelerators.pptx
Implementing Exponential Accelerators.pptx
 
Fundamentals Welcome and Inclusive DEIB
Fundamentals Welcome and  Inclusive DEIBFundamentals Welcome and  Inclusive DEIB
Fundamentals Welcome and Inclusive DEIB
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdf
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management Team
 
Interoperability and ecosystems: Assembling the industrial metaverse
Interoperability and ecosystems:  Assembling the industrial metaverseInteroperability and ecosystems:  Assembling the industrial metaverse
Interoperability and ecosystems: Assembling the industrial metaverse
 
20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf
20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf
20220816-EthicsGrade_Scorecard-JP_Morgan_Chase-Q2-63_57.pdf
 
Customizable Contents Restoration Training
Customizable Contents Restoration TrainingCustomizable Contents Restoration Training
Customizable Contents Restoration Training
 

From Distributed to Pervasive OSGi

  • 1. From Distributed to Pervasive OSGi Jan S. Rellermeyer Systems Group, ETH Zürich
  • 2. Welcome to Zürich! Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 2
  • 3. Software Modules  Structured Programming  Encapsulation David Parnas, 1972  Information Hiding  Coupling vs. Cohesion Larry Constantine, 1974  Separation of Concerns Edsger W. Dijkstra, 1974  Reuse Web services, OSGi  Orchestration  Software Design Principle  Base unit for adding orthogonal concerns The Future? Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 3
  • 4. Module Management in Java  Traditional Java: The mystical class path  java –cp commons-X.jar foo.jar bar.jar my.application.MainClass  Which module contains the main class?  What are the dependencies between foo.jar and bar.jar?  What happens if bar.jar is upgraded to bar-1.01.jar? Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 4
  • 5. The OSGi Framework Export-Package: Package 1 Export-Package: Package I, Package II Import-Package: Package 1 Exported Package Exported Package Package 1 Package I Bundle B Bundle A Import Package II Package 2 Package 3 Private Package OSGi Framework  Explicit dependencies  Explicit, yet declarative  Runtime  Dynamic  Events, Introspection Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 5
  • 6. Modularity: Coupling vs. Cohesion Two components are loosely coupled, when changes in one never or rarely necessitate a change in the other A component exhibits high cohesion when all its functions/methods are strongly related in terms of function Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 6
  • 7. OSGi Services: Reducing Coupling  Bundles are Modules  encapsulate functionality  deployment unit  Enable reuse, extension, and dynamic composition  But: Package dependencies are explicit. Interface  Can lead to all or nothing  Limits the modularity! Implementation  Solution: Services  Separate the interface from the implementation Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 7
  • 8. The Service Registry  The OSGi framework maintains a central service registry  Bundles can register their own services and retrieve services provided by other bundles  Services can be registered with a set of properties  Additional description of the service, can be used to model constraints or do “best fit matching” Registry  Services are identified by their name Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 8
  • 9. Distributed OSGi  General idea: use services provided by a remote machine  Loose coupling  Remote can be  Separate machine, connected through a network  Separate JVM, different address space  (Different language, different address space)  Why would you want this?  Isolation  Redundancy  Problem is inherently distributed Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 9
  • 10. Preview: OSGi 4.2 Remote Services  Service Hooks  Distribution Software can intercept service requests  Proxies  Import a service into the local framework  Intents  Denotes an abstract distribution capability  Requires mutual agreement  Derived from SCA Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 10
  • 11. Example: Eclipse Communication Framework Application Container Adapters Eclipse, RCP, Equinox Server Shared Editing Call 3 Jingle 1 2 Datashare Remote Services Discovery container Datashare File Transfer ECF Core Presence Shared Object XMPP (e.g.) OSGi/Equinox API Provider IAdaptable Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 11
  • 12. ECF Remote Services  Can do RFC 119 Remote Service Provider  Will be made compliant with the 4.2 specs  Can use different distribution systems as backend  R-OSGi  ECF generic DSOs  Can do more  Proxy service has a distinct property service.imported set  In ECF, this is set to an IRemoteService instance  One-Shot, fireAsync  Futures, callAsync/1  Async with Listener, callAsync/2  Non-transparent access Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 12
  • 13. R-OSGi  Preserves the expressiveness of OSGi  Every Java class can be a service  Runs with every OSGi framework  Consistently maps network failures to module lifecycle events  Proxy service provided by proxy bundle Life-cycle, consistent behavior  Is flexible, yet competitive in terms of performance [J. S. Rellermeyer, G. Alonso, T. Roscoe: R- OSGi: Distributed Applications through Software Modularization. In: Middleware 2007] Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 13
  • 14. Dynamic Proxy Generation  Service: Interface + Implementation  Shared Knowledge: Interface public class MyServiceProxy implements MyService { public interface MyService { public String callMe(Integer i) { // generic remote service call public String callMe(Integer i); } } } Peer A Peer B Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 14
  • 15. Remote Services: Cohesion Distributed Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 15
  • 16. Type Injection: Dealing with Coupling public interface MyService { Bundle void enqueue(QueueItem item); Queue getQueue(); } MyService Proxy Bundle MyService Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 16
  • 17. DISTRIBUTED OSGI Location-transparency for services Point to point Not a single system image Not a distributed module runtime PERVASIVE OSGI Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 17
  • 18. The Cloud(s) Amazon EC2 Yahoo Pipes  Infrastructure as a service  Agility  Pay as you go  Permanently available  Horizontal Scale out Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 18
  • 19. The Fabric of the Cloud: Distributed Systems  Under the hood:  Potentially  unreliable hardware  unreliable network  Virtualized environment  Little to no control Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 19
  • 20. Distributed Systems Are Still Challenging  Architecture  Complexity  Parallelization  Debugging, Testing  Deployment  Management Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 20
  • 21. Software Modules as an Application Model  Composable  Reusable  Manageable  Focus on functional aspects  Encourage to think about interfaces  Tool support  Building distributed systems without thinking of distribution Think of R-OSGi Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 21
  • 22. R-OSGi: A First Step Into The Cloud  Services facilitate loose coupling and high cohesion Instrumental for parallelization, think about Map-Reduce!  R-OSGi preserves the expressiveness of OSGi services  Every Java class can be a service  With R-OSGi, almost every OSGi service can be a remote service Generality  Provides location transparency “Where” has a different meaning in a data center  Consistently maps network failures to module lifecycle events Node and network failures happen often! [J. S. Rellermeyer, M. Duller, G. Alonso: Engineering the Cloud from Software Modules. In: ICSE-Cloud 2009] Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 22
  • 23. Example: R-OSGi Deployment Tool [J. S. Rellermeyer, G. Alonso, T. Roscoe: Ready for Distribution? Turning Modular into Distributed Applications with the R- OSGi Deployment Tool . Demo at OOPSLA 2007] Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 23
  • 24. Modules for the Cloud  Distribution can be added as an orthogonal concern R-OSGi turns OSGi modules into a distributed system  So can replication  Instrumentation of the modules  Middleware support  Elasticity through redundancy and redeployment Module Module Module Module Module Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 24
  • 25. Research Prototype: Cirrostratus Overlay Network Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 25
  • 26. A Virtual Runtime for Modules  “Hypovisor” for OSGi Modules  Instruments Bundles  For paravirtualization  For state capturing  Shares internal state  Shared service registry  Shared bundle registry  Shares bundle state  Replication, migration Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 26
  • 27. The Model of State  The fields of a service instance are “state”  The fields of “state” are “state”  “State” is replicated (and treated as “by reference”)  Everything else is local to the node (no state leakage) Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 27
  • 28. Code Analysis: Symbolic Execution private int state; add(I)I L0 int add(int i) { ALOAD 0 state += i; DUP return state; GETFIELD test/Simple.state : I } ILOAD 1 IADD  Initialize the slots of the call stack PUTFIELD test/Simple.state : I with symbols L1  0 = “this”, 1 = arg0, 2 = local0 ALOAD 0  Initialize the fields with relative GETFIELD test/Simple.state : I IRETURN symbols L2  test/Simple.state = “Simple.state” LOCALVARIABLE this Ltest/Simple; L0 L2 0  Execute the code symbolically LOCALVARIABLE i I L0 L2 1  Execution stack becomes symbolic MAXSTACK = 3  Non-linear control flow leads to Phi- MAXLOCALS = 2 Symbols Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 28
  • 29. Instrumentation for Replication private int state; int add(int i) { TransactionContext.BOT(“Simple.add”, i); private int state; TransactionContext.read(“Simple.state”); state += i; int add(int i) { TransactionContext.write(“Simple.state”, state += i; i); return state; return state; Simplication, it’s TransactionContext.EOT(); top of stack } }  TransactionContext binds free variables at runtime and puts fields into context  Similar: Instrumentation for thread migration Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zurich 29
  • 30. A Virtual Module Runtime + non-functional requirements + orthogonal concerns Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 30
  • 31. CONCLUSIONS  OSGi is a very interesting platform for building dynamic modular applications for Java.  Distribution software like R-OSGi facilitate remote access to OSGi services. The 4.2 specs will bring this to the mainstream.  The OSGi model is a perfect match for dynamic environments such as cloud computing  The Cirrostratus prototype enables adding even more sophisticated properties to modules than distribution, such as state replication, service migration, hardening policies.  It can thereby facilitate the even more pervasive usage of OSGi. Questions? Tuesday, June 23, 2009 Jan S. Rellermeyer, ETH Zürich 31