SlideShare a Scribd company logo
1 of 28
Adapting Apache UIMA to OSGi
     Tommaso Teofili | Adobe Basel R&D




© 2012 Adobe Systems Incorporated. All Rights Reserved.
Agenda

    The problem:
         not-OSGi stuff in an OSGi world
         use case
    Possible adaption approaches discussion
         an approach for our use case
    Conclusions




© 2012 Adobe Systems Incorporated. All Rights Reserved.   2
Use case: Domeo

    Annotation toolkit
    create & share ontology based annotations
    using AnnotationOntology RDF model
    supporting (semi) automated annotation
         Apache UIMA based text mining applications integrate via Apache
          Clerezza platform
         but ... Clerezza is OSGi based while UIMA is not




© 2012 Adobe Systems Incorporated. All Rights Reserved.   3
Apache UIMA

    ASF top level project since 2010
    Unstructured information management architecture
    OASIS standard
    Powering
         apps: IBM Watson, DeepQA, ...
         platforms: Behemot, Domeo, U-Compare, ...




© 2012 Adobe Systems Incorporated. All Rights Reserved.   4
Apache Clerezza

    Apache Incubator project
    Service platform for linked data
    RDF API
    JAX-RS implementation
    OSGi based
    Powering Apache Stanbol semantic content management project




© 2012 Adobe Systems Incorporated. All Rights Reserved.   5
Clerezza - UIMA architecture overview




                                                    JAX RS
                                                                               AE    AE   AE   AE   AE
                                         Clerezza platform
                                                                              UIMA Pipeline
                                                                         AO



                               OSGi container
                                                          Triple store




© 2012 Adobe Systems Incorporated. All Rights Reserved.                   6
The problem

    Apache Clerezza
         is OSGi based (running on Apache Felix)
         artifacts delivered as bundles
    Apache UIMA
         is not OSGi based
         is not OSGi ready
         artifacts delivered as standard jars / PEARs
         using reflection / custom classloading
         has some OSGi artifacts for UIMA Eclipse plugins
    How to flawlessly let UIMA live and run inside Clerezza?




© 2012 Adobe Systems Incorporated. All Rights Reserved.   7
Adapting to OSGi

    Things to consider:
         backward compatibility
         development effort
         classloading
         packaging / deployments
         semantic versioning

    Business requirements are crucial to prioritize the above list




© 2012 Adobe Systems Incorporated. All Rights Reserved.   8
Adaption approaches

    migrate everything to support (also?) OSGi
    migrate something in a single lightweight bundle
    migrate nothing and wrap everything in a single big bundle
    create an adaption layer
    ...




© 2012 Adobe Systems Incorporated. All Rights Reserved.   9
Approach #1 - migrate everything

    pros
         fully OSGi compatible
         one time effort
         fully leveraging OSGi capabilities
    cons
         backward compatibility issues
         significant development effort
         consider integration effort
         possibly keep / maintain different architectures at once
         not always feasible
         need full control




© 2012 Adobe Systems Incorporated. All Rights Reserved.   10
Approach #2 - migrate something

    pros
         fully OSGi compatible
         easier limited development effort
         facade package
    cons
         need to keep maintaining OSGi and not-OSGi artifacts over time
         not everything is available to OSGi client architectures
         need full control on codebase




© 2012 Adobe Systems Incorporated. All Rights Reserved.   11
Approach #3 - just wrap

    pros
         fully OSGi compatible
         almost no development effort
         everything is available to OSGi client architectures
    cons
         just not leveraging OSGi capabilities
         possible classloading issues
         need to keep managing OSGi and not OSGi artifacts over time




© 2012 Adobe Systems Incorporated. All Rights Reserved.   12
Approach #4 - adaption layer

    pros
         fully OSGi compatible
         everything is available to OSGi client architectures
         original not-OSGi stuff is not touched
         no need to control not-OSGi stuff
    cons
         some application specific development effort needed
         explicitly managing classloading issues
         need to keep managing this adaption layer




© 2012 Adobe Systems Incorporated. All Rights Reserved.   13
Managing requirements

    Domeo concerns
         OSGi compatibility
         ease of development for UIMA users with (almost) no OSGi experience
         leverage OSGi capabilities


    Communities concerns
         Apache UIMA community was interested in OSGi but:
             not willing to drop backward compatibility
             not willing to migrate everything to OSGi right away
         Apache Clerezza community was happy to have UIMA onboard but:
             didn’t want to have release blocked by UIMA OSGi adaption




© 2012 Adobe Systems Incorporated. All Rights Reserved.   14
Feasible approaches

    migrate everything > NO
         need to touch the code base, not backward compatible
    migrate something > to a degree
         existing UIMA users may need stuff not included in the lightweight pack
    just wrap > NO
         classloading issues
    adaption layer > YES
         but need to develop such a layer :-)




© 2012 Adobe Systems Incorporated. All Rights Reserved.   15
UIMA OSGi adaption layer known approaches

    DME for UIMA from IBM AlphaWorks
    Clerezza - UIMA integration module
    UIMA integration for Apache Stanbol
    UIMA OSGi enablement via Maven
    ...




© 2012 Adobe Systems Incorporated. All Rights Reserved.   16
UIMA Dynamic Module Enabler




© 2012 Adobe Systems Incorporated. All Rights Reserved.   17
Clerezza - UIMA adaption layer

    simple API on top of UIMA API
         create pipeline executor, give it a UIMA descriptor, run
    still can use plain UIMA API
    each bundle using UIMA just needs a specific OSGi activator
    lightweight




© 2012 Adobe Systems Incorporated. All Rights Reserved.   18
Clerezza - UIMA : sample service

    Consider an existing text mining application using UIMA for some
     NLP task that needs to be plugged in Domeo
    it needs:
         ReST endpoint
         RDF API for dealing with ontologies
         AnnotationOntology model awareness
    it already has:
         one or more UIMA descriptors for its NLP pipeline(s)
         UIMA components (either developed internally or publicly available)

    Let’s assume our sample service has one UIMA pipeline with one
     descriptor and uses Apache OpenNLP to extract person names from
     text




© 2012 Adobe Systems Incorporated. All Rights Reserved.   19
Clerezza - UIMA : how it works

    @Property(name = "javax.ws.rs", boolValue = true)
    @Path("/uima")
    public class OpenNLPSampleService {
        ..
        @POST
        @Path("opennlp/person")
        @Produces("application/rdf+xml")
        public Graph extractPersons(@FormParam("uri") String uriString) {
             UIMAExecutor executor = ... ;
             Map<String, Object> parameters = ... ;
             parameters.put(“graph.name”, uriString);
             executor.analyzeDocument(text, new XMLInputSource(descriptor), parameters);
        }
        ..
    }




© 2012 Adobe Systems Incorporated. All Rights Reserved.   20
Clerezza - UIMA : sample service dependencies



                                        OSGi container
                                              OpenNLP
                                               sample       Clerezza
                                               service     UIMA utils




                                             OpenNLP
                                                               UIMA SDK

                                                                          depends on



                                                                            OSGi

                                                                          not OSGi

© 2012 Adobe Systems Incorporated. All Rights Reserved.   21
Clerezza - UIMA : sample service classloading

    Our sample service
         has OpenNLP stuff in its classloader
         gets UIMA stuff from Clerezza UIMA utils bundle
         nothing new but ...
         UIMA uses XML descriptors in which component specific class names are
          given in order to instantiate pipelines




             -> UIMA SDK uses the “famous” Class.forName(...)
             -> everything should break in our case when instantiating pipelines since
              Clerezza UIMA utils bundle doesn’t hold OpenNLP stuff in its classloader




© 2012 Adobe Systems Incorporated. All Rights Reserved.   22
Clerezza - UIMA : runtime classloading dependencies



                                        OSGi container
                                              OpenNLP
                                               sample       Clerezza
                                               service     UIMA utils




                                             OpenNLP
                                                               UIMA SDK

                                                                          needs class from



                                                                              OSGi

                                                                            not OSGi

© 2012 Adobe Systems Incorporated. All Rights Reserved.   23
Clerezza - UIMA : managing classloading issue

    we can leverage
         OSGi activators
             upon bundle activations notify “someone” that new UIMA components are
              available
         UIMA resource managers
             upon pipeline execution we can use a resource manager with a custom
              classloader

         Solution:
             each bundle using UIMA extends a specific OSGi activator
              (org.apache.clerezza.uima.utils.UIMABundleActivator) to explicitly declare its
              UIMA components
             the Clereza UIMA utils module registers such components classloaders within an
              aggregate classloader which is passed to the UIMA resource manager at runtime




© 2012 Adobe Systems Incorporated. All Rights Reserved.   24
Clerezza - UIMA : managing classloading issue

      Sample service bundle                                              ServiceRegistry


                    UIMABundleActivator                   Clerezza UIMA utils bundle


          UIMAComponentX                                  UIMAResourcesClassLoaderRepository

                                                                              ResourceManager

           OpenNLP Sample Service
                                                                                AEProvider

                                                               UIMAExecutor



OSGi container

© 2012 Adobe Systems Incorporated. All Rights Reserved.   25
Conclusions

    Achievements
         UIMA codebase not touched
         fully OSGi compatible
         lightweight
    Left outs
         semantic versioning
         more OSGi capabilities could be leveraged (lots of UIMA API stuff could
          be exposed with OSGi services)

    Lessons learned
         not only one good way
         full OSGi migration is often not simple in the enterprise
         using BNDTools / maven-bundle-plugin is sometimes not enough for
          migrating bundles because of application specific classloading issues



© 2012 Adobe Systems Incorporated. All Rights Reserved.   26
Thanks!

    We’re hiring:
         jobs-basel@adobe.com

    Q&A




© 2012 Adobe Systems Incorporated. All Rights Reserved.   27
© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

More Related Content

Similar to Adapting Apache UIMA to OSGi

OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesJan S. Rellermeyer
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi DevelopmentPaul Fiore
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLo Ki
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLokesh BS
 
Robust Embedded Applications OSGi ME Platforms
Robust Embedded Applications OSGi ME PlatformsRobust Embedded Applications OSGi ME Platforms
Robust Embedded Applications OSGi ME PlatformsOSGi User Group France
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the CloudBert Ertman
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Wardmfrancis
 
Déploiement dynamique d'applications OSGi sur le Cloud
Déploiement dynamique d'applications OSGi sur le CloudDéploiement dynamique d'applications OSGi sur le Cloud
Déploiement dynamique d'applications OSGi sur le CloudOSGi User Group France
 
GigaSpaces Cloudify - The PaaS Jailbreaker
GigaSpaces Cloudify - The PaaS Jailbreaker GigaSpaces Cloudify - The PaaS Jailbreaker
GigaSpaces Cloudify - The PaaS Jailbreaker Uri Cohen
 
OSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir Semerdzhiev
OSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir SemerdzhievOSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir Semerdzhiev
OSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir Semerdzhievmfrancis
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi Shlomo Vanunu
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Nuxeo
 
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
 

Similar to Adapting Apache UIMA to OSGi (20)

OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
Robust Embedded Applications OSGi ME Platforms
Robust Embedded Applications OSGi ME PlatformsRobust Embedded Applications OSGi ME Platforms
Robust Embedded Applications OSGi ME Platforms
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the Cloud
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Ward
 
Déploiement dynamique d'applications OSGi sur le Cloud
Déploiement dynamique d'applications OSGi sur le CloudDéploiement dynamique d'applications OSGi sur le Cloud
Déploiement dynamique d'applications OSGi sur le Cloud
 
SAP NetWeaver Gateway - Gateway Service Consumption
SAP NetWeaver Gateway - Gateway Service Consumption SAP NetWeaver Gateway - Gateway Service Consumption
SAP NetWeaver Gateway - Gateway Service Consumption
 
GigaSpaces Cloudify - The PaaS Jailbreaker
GigaSpaces Cloudify - The PaaS Jailbreaker GigaSpaces Cloudify - The PaaS Jailbreaker
GigaSpaces Cloudify - The PaaS Jailbreaker
 
OSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir Semerdzhiev
OSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir SemerdzhievOSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir Semerdzhiev
OSGi in Java EE Servers - Sneak Peek Under the Hood - Krasimir Semerdzhiev
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
OSGi
OSGiOSGi
OSGi
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 
GlassFish v3 - Architecture
GlassFish v3 - ArchitectureGlassFish v3 - Architecture
GlassFish v3 - Architecture
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
 
Sightly_techInsight
Sightly_techInsightSightly_techInsight
Sightly_techInsight
 
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
 

More from Tommaso Teofili

Affect Enriched Word Embeddings for News IR
Affect Enriched Word Embeddings for News IRAffect Enriched Word Embeddings for News IR
Affect Enriched Word Embeddings for News IRTommaso Teofili
 
Flexible search in Apache Jackrabbit Oak
Flexible search in Apache Jackrabbit OakFlexible search in Apache Jackrabbit Oak
Flexible search in Apache Jackrabbit OakTommaso Teofili
 
Data replication in Sling
Data replication in SlingData replication in Sling
Data replication in SlingTommaso Teofili
 
Search engines in the industry
Search engines in the industrySearch engines in the industry
Search engines in the industryTommaso Teofili
 
Scaling search in Oak with Solr
Scaling search in Oak with Solr Scaling search in Oak with Solr
Scaling search in Oak with Solr Tommaso Teofili
 
Text categorization with Lucene and Solr
Text categorization with Lucene and SolrText categorization with Lucene and Solr
Text categorization with Lucene and SolrTommaso Teofili
 
Machine learning with Apache Hama
Machine learning with Apache HamaMachine learning with Apache Hama
Machine learning with Apache HamaTommaso Teofili
 
Domeo, Text Mining, UIMA and Clerezza
Domeo, Text Mining, UIMA and ClerezzaDomeo, Text Mining, UIMA and Clerezza
Domeo, Text Mining, UIMA and ClerezzaTommaso Teofili
 
Natural Language Search in Solr
Natural Language Search in SolrNatural Language Search in Solr
Natural Language Search in SolrTommaso Teofili
 
Apache Solr crash course
Apache Solr crash courseApache Solr crash course
Apache Solr crash courseTommaso Teofili
 
Apache UIMA - Hands on code
Apache UIMA - Hands on codeApache UIMA - Hands on code
Apache UIMA - Hands on codeTommaso Teofili
 
Apache UIMA Introduction
Apache UIMA IntroductionApache UIMA Introduction
Apache UIMA IntroductionTommaso Teofili
 
OSS Enterprise Search EU Tour
OSS Enterprise Search EU TourOSS Enterprise Search EU Tour
OSS Enterprise Search EU TourTommaso Teofili
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platformTommaso Teofili
 
Information Extraction with UIMA - Usecases
Information Extraction with UIMA - UsecasesInformation Extraction with UIMA - Usecases
Information Extraction with UIMA - UsecasesTommaso Teofili
 
Apache UIMA and Metadata Generation
Apache UIMA and Metadata GenerationApache UIMA and Metadata Generation
Apache UIMA and Metadata GenerationTommaso Teofili
 
Data and Information Extraction on the Web
Data and Information Extraction on the WebData and Information Extraction on the Web
Data and Information Extraction on the WebTommaso Teofili
 
Apache UIMA and Semantic Search
Apache UIMA and Semantic SearchApache UIMA and Semantic Search
Apache UIMA and Semantic SearchTommaso Teofili
 

More from Tommaso Teofili (19)

Affect Enriched Word Embeddings for News IR
Affect Enriched Word Embeddings for News IRAffect Enriched Word Embeddings for News IR
Affect Enriched Word Embeddings for News IR
 
Flexible search in Apache Jackrabbit Oak
Flexible search in Apache Jackrabbit OakFlexible search in Apache Jackrabbit Oak
Flexible search in Apache Jackrabbit Oak
 
Data replication in Sling
Data replication in SlingData replication in Sling
Data replication in Sling
 
Search engines in the industry
Search engines in the industrySearch engines in the industry
Search engines in the industry
 
Scaling search in Oak with Solr
Scaling search in Oak with Solr Scaling search in Oak with Solr
Scaling search in Oak with Solr
 
Text categorization with Lucene and Solr
Text categorization with Lucene and SolrText categorization with Lucene and Solr
Text categorization with Lucene and Solr
 
Machine learning with Apache Hama
Machine learning with Apache HamaMachine learning with Apache Hama
Machine learning with Apache Hama
 
Oak / Solr integration
Oak / Solr integrationOak / Solr integration
Oak / Solr integration
 
Domeo, Text Mining, UIMA and Clerezza
Domeo, Text Mining, UIMA and ClerezzaDomeo, Text Mining, UIMA and Clerezza
Domeo, Text Mining, UIMA and Clerezza
 
Natural Language Search in Solr
Natural Language Search in SolrNatural Language Search in Solr
Natural Language Search in Solr
 
Apache Solr crash course
Apache Solr crash courseApache Solr crash course
Apache Solr crash course
 
Apache UIMA - Hands on code
Apache UIMA - Hands on codeApache UIMA - Hands on code
Apache UIMA - Hands on code
 
Apache UIMA Introduction
Apache UIMA IntroductionApache UIMA Introduction
Apache UIMA Introduction
 
OSS Enterprise Search EU Tour
OSS Enterprise Search EU TourOSS Enterprise Search EU Tour
OSS Enterprise Search EU Tour
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
 
Information Extraction with UIMA - Usecases
Information Extraction with UIMA - UsecasesInformation Extraction with UIMA - Usecases
Information Extraction with UIMA - Usecases
 
Apache UIMA and Metadata Generation
Apache UIMA and Metadata GenerationApache UIMA and Metadata Generation
Apache UIMA and Metadata Generation
 
Data and Information Extraction on the Web
Data and Information Extraction on the WebData and Information Extraction on the Web
Data and Information Extraction on the Web
 
Apache UIMA and Semantic Search
Apache UIMA and Semantic SearchApache UIMA and Semantic Search
Apache UIMA and Semantic Search
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Adapting Apache UIMA to OSGi

  • 1. Adapting Apache UIMA to OSGi Tommaso Teofili | Adobe Basel R&D © 2012 Adobe Systems Incorporated. All Rights Reserved.
  • 2. Agenda  The problem:  not-OSGi stuff in an OSGi world  use case  Possible adaption approaches discussion  an approach for our use case  Conclusions © 2012 Adobe Systems Incorporated. All Rights Reserved. 2
  • 3. Use case: Domeo  Annotation toolkit  create & share ontology based annotations  using AnnotationOntology RDF model  supporting (semi) automated annotation  Apache UIMA based text mining applications integrate via Apache Clerezza platform  but ... Clerezza is OSGi based while UIMA is not © 2012 Adobe Systems Incorporated. All Rights Reserved. 3
  • 4. Apache UIMA  ASF top level project since 2010  Unstructured information management architecture  OASIS standard  Powering  apps: IBM Watson, DeepQA, ...  platforms: Behemot, Domeo, U-Compare, ... © 2012 Adobe Systems Incorporated. All Rights Reserved. 4
  • 5. Apache Clerezza  Apache Incubator project  Service platform for linked data  RDF API  JAX-RS implementation  OSGi based  Powering Apache Stanbol semantic content management project © 2012 Adobe Systems Incorporated. All Rights Reserved. 5
  • 6. Clerezza - UIMA architecture overview JAX RS AE AE AE AE AE Clerezza platform UIMA Pipeline AO OSGi container Triple store © 2012 Adobe Systems Incorporated. All Rights Reserved. 6
  • 7. The problem  Apache Clerezza  is OSGi based (running on Apache Felix)  artifacts delivered as bundles  Apache UIMA  is not OSGi based  is not OSGi ready  artifacts delivered as standard jars / PEARs  using reflection / custom classloading  has some OSGi artifacts for UIMA Eclipse plugins  How to flawlessly let UIMA live and run inside Clerezza? © 2012 Adobe Systems Incorporated. All Rights Reserved. 7
  • 8. Adapting to OSGi  Things to consider:  backward compatibility  development effort  classloading  packaging / deployments  semantic versioning  Business requirements are crucial to prioritize the above list © 2012 Adobe Systems Incorporated. All Rights Reserved. 8
  • 9. Adaption approaches  migrate everything to support (also?) OSGi  migrate something in a single lightweight bundle  migrate nothing and wrap everything in a single big bundle  create an adaption layer  ... © 2012 Adobe Systems Incorporated. All Rights Reserved. 9
  • 10. Approach #1 - migrate everything  pros  fully OSGi compatible  one time effort  fully leveraging OSGi capabilities  cons  backward compatibility issues  significant development effort  consider integration effort  possibly keep / maintain different architectures at once  not always feasible  need full control © 2012 Adobe Systems Incorporated. All Rights Reserved. 10
  • 11. Approach #2 - migrate something  pros  fully OSGi compatible  easier limited development effort  facade package  cons  need to keep maintaining OSGi and not-OSGi artifacts over time  not everything is available to OSGi client architectures  need full control on codebase © 2012 Adobe Systems Incorporated. All Rights Reserved. 11
  • 12. Approach #3 - just wrap  pros  fully OSGi compatible  almost no development effort  everything is available to OSGi client architectures  cons  just not leveraging OSGi capabilities  possible classloading issues  need to keep managing OSGi and not OSGi artifacts over time © 2012 Adobe Systems Incorporated. All Rights Reserved. 12
  • 13. Approach #4 - adaption layer  pros  fully OSGi compatible  everything is available to OSGi client architectures  original not-OSGi stuff is not touched  no need to control not-OSGi stuff  cons  some application specific development effort needed  explicitly managing classloading issues  need to keep managing this adaption layer © 2012 Adobe Systems Incorporated. All Rights Reserved. 13
  • 14. Managing requirements  Domeo concerns  OSGi compatibility  ease of development for UIMA users with (almost) no OSGi experience  leverage OSGi capabilities  Communities concerns  Apache UIMA community was interested in OSGi but:  not willing to drop backward compatibility  not willing to migrate everything to OSGi right away  Apache Clerezza community was happy to have UIMA onboard but:  didn’t want to have release blocked by UIMA OSGi adaption © 2012 Adobe Systems Incorporated. All Rights Reserved. 14
  • 15. Feasible approaches  migrate everything > NO  need to touch the code base, not backward compatible  migrate something > to a degree  existing UIMA users may need stuff not included in the lightweight pack  just wrap > NO  classloading issues  adaption layer > YES  but need to develop such a layer :-) © 2012 Adobe Systems Incorporated. All Rights Reserved. 15
  • 16. UIMA OSGi adaption layer known approaches  DME for UIMA from IBM AlphaWorks  Clerezza - UIMA integration module  UIMA integration for Apache Stanbol  UIMA OSGi enablement via Maven  ... © 2012 Adobe Systems Incorporated. All Rights Reserved. 16
  • 17. UIMA Dynamic Module Enabler © 2012 Adobe Systems Incorporated. All Rights Reserved. 17
  • 18. Clerezza - UIMA adaption layer  simple API on top of UIMA API  create pipeline executor, give it a UIMA descriptor, run  still can use plain UIMA API  each bundle using UIMA just needs a specific OSGi activator  lightweight © 2012 Adobe Systems Incorporated. All Rights Reserved. 18
  • 19. Clerezza - UIMA : sample service  Consider an existing text mining application using UIMA for some NLP task that needs to be plugged in Domeo  it needs:  ReST endpoint  RDF API for dealing with ontologies  AnnotationOntology model awareness  it already has:  one or more UIMA descriptors for its NLP pipeline(s)  UIMA components (either developed internally or publicly available)  Let’s assume our sample service has one UIMA pipeline with one descriptor and uses Apache OpenNLP to extract person names from text © 2012 Adobe Systems Incorporated. All Rights Reserved. 19
  • 20. Clerezza - UIMA : how it works  @Property(name = "javax.ws.rs", boolValue = true)  @Path("/uima")  public class OpenNLPSampleService {  ..  @POST  @Path("opennlp/person")  @Produces("application/rdf+xml")  public Graph extractPersons(@FormParam("uri") String uriString) {  UIMAExecutor executor = ... ;  Map<String, Object> parameters = ... ;  parameters.put(“graph.name”, uriString);  executor.analyzeDocument(text, new XMLInputSource(descriptor), parameters);  }  ..  } © 2012 Adobe Systems Incorporated. All Rights Reserved. 20
  • 21. Clerezza - UIMA : sample service dependencies OSGi container OpenNLP sample Clerezza service UIMA utils OpenNLP UIMA SDK depends on OSGi not OSGi © 2012 Adobe Systems Incorporated. All Rights Reserved. 21
  • 22. Clerezza - UIMA : sample service classloading  Our sample service  has OpenNLP stuff in its classloader  gets UIMA stuff from Clerezza UIMA utils bundle  nothing new but ...  UIMA uses XML descriptors in which component specific class names are given in order to instantiate pipelines  -> UIMA SDK uses the “famous” Class.forName(...)  -> everything should break in our case when instantiating pipelines since Clerezza UIMA utils bundle doesn’t hold OpenNLP stuff in its classloader © 2012 Adobe Systems Incorporated. All Rights Reserved. 22
  • 23. Clerezza - UIMA : runtime classloading dependencies OSGi container OpenNLP sample Clerezza service UIMA utils OpenNLP UIMA SDK needs class from OSGi not OSGi © 2012 Adobe Systems Incorporated. All Rights Reserved. 23
  • 24. Clerezza - UIMA : managing classloading issue  we can leverage  OSGi activators  upon bundle activations notify “someone” that new UIMA components are available  UIMA resource managers  upon pipeline execution we can use a resource manager with a custom classloader  Solution:  each bundle using UIMA extends a specific OSGi activator (org.apache.clerezza.uima.utils.UIMABundleActivator) to explicitly declare its UIMA components  the Clereza UIMA utils module registers such components classloaders within an aggregate classloader which is passed to the UIMA resource manager at runtime © 2012 Adobe Systems Incorporated. All Rights Reserved. 24
  • 25. Clerezza - UIMA : managing classloading issue Sample service bundle ServiceRegistry UIMABundleActivator Clerezza UIMA utils bundle UIMAComponentX UIMAResourcesClassLoaderRepository ResourceManager OpenNLP Sample Service AEProvider UIMAExecutor OSGi container © 2012 Adobe Systems Incorporated. All Rights Reserved. 25
  • 26. Conclusions  Achievements  UIMA codebase not touched  fully OSGi compatible  lightweight  Left outs  semantic versioning  more OSGi capabilities could be leveraged (lots of UIMA API stuff could be exposed with OSGi services)  Lessons learned  not only one good way  full OSGi migration is often not simple in the enterprise  using BNDTools / maven-bundle-plugin is sometimes not enough for migrating bundles because of application specific classloading issues © 2012 Adobe Systems Incorporated. All Rights Reserved. 26
  • 27. Thanks!  We’re hiring:  jobs-basel@adobe.com  Q&A © 2012 Adobe Systems Incorporated. All Rights Reserved. 27
  • 28. © 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n