SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante 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
 

Semelhante 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

Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...Aggregage
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 

Último (20)

Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 

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