Docstoc

WP1 – Reference Use Cases

Document Sample
WP1 – Reference Use Cases Powered By Docstoc
					 Non-Intrusive universAAL
A New Design Approach and a Reference
   Design for universAAL on Android

            Vadim Eisenberg
                 IBM




                          WP2
                 Inspiration 1 : OSGi Lite


From OSGi Lite - http://www.osgi.org/blog/2011/04/osgi-
   lite.html :


OSGi Lite provides 80% of the power of
 OSGi in a completely non-intrusive way.




                                      WP2
                 Inspiration 2: POJOs and OSGi


Hide OSGi Code:
Keep the bundle activator and other OSGi-related code in a
   separated package that is not visible to other bundles. It is
   internal detail, and separating the OSGi-related code from the
   domain logic is a best practice that makes it easier to
   understand the domain code and reuse it in a non-OSGi
   deployment.

"OSGi and Equinox" book, p. 74

 POJO – plain old java object




                                         WP2
                  Inspiration 3




universAAL middleware is not a virtual machine.
  Francesco Furfari




                                  WP2
         Non-Intrusive universAAL: the main ideas


   Separate AAL applications into universAAL-specific and non-
    universAAL-specific parts
   Write non-universAAL-specific parts as:
       Plain Old Java Objects
       Plain Old OSGi Services
       Plain Old Android Services
       Plain Old Web Services
   Non-universAAL-specific parts can be reused in other
    environments
   Map/ground/markup/inject universAAL specific code to/into
    non-universAAL specific code
     declaratively

                                         WP2
         Non-Intrusive universAAL: the main ideas


   Connect universAAL parts to the non-universAAL parts as
    non-intrusively as possible
       Java annotations (for Java versions starting from 1.5)
       OSGi properties
       Android <meta-data> elements
       Web Services WSDL




                                              WP2
          Benefits for Dissemination/Exploitation


   Facilitate migration to universAAL for SMEs:
     Start writing AAL applications as plain OSGi/Android etc.
     “universAALize” the applications later
   For SMEs – no need to bet their whole strategy on universAAL
     The non-universAAL-specific parts could be reused without
      universAAL, if universAAL fails
   Skills Separation
     Not all the developers of AAL applications will have to learn
      universAAL
     Some developers can develop pure OSGi/Android components
     Some developers will develop universAAL-specific parts

                                            WP2
     The current view: universAAL as VM




AAL application                   AAL Application


 uAAL/OSGi                        uAAL/Android


    OSGi                             Android

     JVM                          Dalvik Java VM

     OS                               Linux
  Hardware                          Hardware

                            WP2
The changed view: non-intrusive universAAL




AAL application                    AAL Application


            uAAL/OSGi   uAAL/Android


    OSGi                               Android

     JVM                           Dalvik Java VM

     OS                                 Linux
  Hardware                           Hardware

                             WP2
             Inspiration: OSGi Layers as starecase




Source: http://en.wikipedia.org/wiki/File:Osgi_framework.svg

                                                    WP2
              Start as usual – universAALize later




AAL application                                     AAL application




                     uAAL/OSGi    uAAL/Android


            OSGi                                 Android

             JVM                             Dalvik Java VM

             OS                                   Linux
          Hardware                             Hardware

                                       WP2
universAAL – ecosystem of ecosystems



 OSGi ecosystem       Android ecosystem




         universAAL ecosystem




        Web Services ecosystem




                                WP2
                 The Current Implementation



                           Service Bus




                             ServiceCallee     Service Profile



                                         <<inherits>>
                               Concerete
                              ServiceCallee

The intrusive way: The Service Provider Component is coupled to universAAL
Service Callee. Cannot be reused outside of universAAL.

                                               WP2
                          Proposed Implementation



                                  Service Bus



                         AndroidService     WebService          OSGiService
    ServiceCallee
                          CalleeStub        CalleeStub           CalleeStub
               <<inherits>>


<<inherits>>                   Grounding            Grounding             Grounding

      Concerete             Plain Old            Plain Old        Plain Old
     ServiceCallee        Android Service       Web Service      OSGi Service


                                                       WP2
          Implementation: Service Management


   Currently – a push model
     Service Provider Agents register their Service Profiles to the bus
     Similar to OSGi BundleContext.registerService
   Proposed – a pull model
     Service Provider Agents specify their service profiles
      declaratively
        • Inside their regular meta-data (WSDL/Manifest etc.)
     Similar to OSGi Declarative Services




                                               WP2
           Service Management : the pull model


   Additional component – “Extender”, listens for changes in
    Service Provider Agents and pulls the Service Profiles by
    polling the meta-data
     One such component per AAL Node
     A plug-in of the universAAL runtime environment
   The extender registers ServiceCalleeStubs
     one stub per each Service
   The Service bus will be oblivious to the native services called
   All the grounding logic will be contained in the Extender and
    the stubs


                                           WP2
                Advantages of the pull model


   Non-Intrusive – the actual services (Android, Web, OSGi) can
    be used in environments other than universAAL without any
    change
   The grounding can be done later, even by a third party
   The standard native services (OSGi, Android) can be
    universAALized
   The lifecycle of the Semantic Services (register/unregister) is
    synchronized with the lifecycle of the native services by the
    Extender – no need to handle it explicitly




                                           WP2
                       Additional Points


   Tools could be used to create the groundings
   The AAL Space Orchestrator will orchestrate all the services
    together
   The integration power of Semantic Services – invoking and
    orchestrating different kinds of services – OSGi, Android, Web
    services and possibly other services (RESTful, etc.)




                                          WP2
                A reference design: Android


   Android has its own notion of service
   Each service is registered in the Manifest.xml of its
    application
   Each application runs in a separate process
   The applications communicate by sending messages and via
    IPC




                                       WP2
                A reference design: Android


   universAAL middleware will run as a separate Android
    application or several Android applications
   AAL Android applications will communicate with the Android
    applications that contain the uAAL Buses, by IPC
   In order to provide uAAL Services in a lazy way, the
    ServiceCallees have to register their service profiles
    declaratively
     An Extender component has to read the service profiles and to
      register ServiceCallee stubs on behalf of the ServiceCallees




                                           WP2
                    uAAL/Android – the intrusive design

 Android Application that contains
 the Service Bus component                                    Service Bus


                                                                <<registers>>
                ServiceCaller                 ServiceCallee                     AndroidExtender

                         <<inherits>>                      Service Profile
                                          <<inherits>>
                   AndroidServiceCaller          AndroidServiceCalleeStub

<<registers>>                        <<Android messages >>                             <<reads>>
                        <<Android messages >>
                                                 Android Service
        AndroidServiceCallerStub
                                                    AndroidServiceCallee
                                                                                   Service Profile
                          <<inherits>>             <<inherits>>
                                                                                     Service
          ConcereteServiceCaller                  ConcereteServiceCallee             Provider
  Service Requester Android Application    Service Provider Android Application      Manifest

                                                            WP2
                 uAAL/Android – the non-intrusive design

 Android Application that contains
 the Service Bus component                                    Service Bus


                                                                <<registers>>
                ServiceCaller                 ServiceCallee                      AndroidExtender

                         <<inherits>>                      Service Profile
                                          <<inherits>>
                   AndroidServiceCaller        AndroidServiceCalleeStub         Grounding


<<registers>>                       <<Android messages >>                       <<reads>>
                        <<Android messages >>

        AndroidServiceCallerStub                        Plain Old
                                                                                     Service Profile +
                                                      Android Service                  Grounding
                          <<inherits>>
                                                                                       Service
          ConcereteServiceCaller
                                                                                       Provider
  Service Requester Android Application    Service Provider Android Application         Manifest

                                                            WP2
                         ServiceCallers


   Service Callers probably have to be intrusive (any other ideas
    are welcome)
   A component that requests universAAL semantic services has
    to depend on universAAL, due to the Service Caller
   The component that provides universAAL semantic services
    can be independent of universAAL (the only dependence is
    the grounding meta-data)




                                          WP2
              Your comments are welcome


uAAL on Android Design Issues forum -
  http://forge.universaal.org/gf/project/nativeandroid/forum/?
  action=ForumBrowse&forum_id=149




                                       WP2

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:3/26/2012
language:
pages:24