SlideShare a Scribd company logo
1 of 27
Download to read offline
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




       Towards a second generation
           Topic Maps Engine




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   1 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                       Overview
    technical talk
    API design
         multiple layers
         event handling
    merging done slowly or fastly




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   2 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                    Objectives
    need a Java TM engine
         with TMDM support
                  semantically
                  syntactically (names of methods match TMDM)
         with instant merging
         with dynamic (reversable) merging
         with support for modern Java 1.5 features (generics, etc.)
         which can act as backend for TM4J1 applications
         with persistence support
       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   3 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                               Idea
    develop a new backend for TM4J




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   4 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                         „TMDM“ backend
    is layered
    is (currently) RAM-only
    can do topic merging fast




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   5 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                           Layers
    what?
         layer ≈ coverage of all TMDM item types under a
           particular concern
    why?
         separation of concerns: do one thing, and do it well
         modularity of architecture:
          replace a layer implementation
          by another layer implementation


       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   6 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                           Layers
    how?
         layer ≈ set of classes and interfaces in one Java package
         communication between layers by
                  method calls
                  event listeners (later)




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   7 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                           Layers
    which?
         one layer for accessing                            a topic map
         one layer for just reading                         a topic map
         one layer for storing                              a topic map
         one layer for merging                              a topic map
         one layer for compatibility                        with TM4J1




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   8 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




 TMDM read-write interfaces layer
    Concern: accessing a topic map
    set of interfaces in package org.tm4j.topicmap.tmdm:
    TopicMap                                  extends          Reifiable
    Topic                                     extends          TopicMapConstruct
    TopicName                                 extends          Scopeable
    Variant                                   extends          Scopeable
    Occurrence                                extends          Scopeable
    Association                               extends          Scopeable
    AssociationRole                           extends          Reifiable
    Scopeable                                 extends          Reifiable
    Scope
    Reifiable                                 extends TopicMapConstruct
    TopicMapConstruct
       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   9 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                   Example: AssociationRole
public interface AssociationRole extends Reifiable,
                                         ReadableAssociationRole {

    public ReadableTopic getType();

    public ReadableTopic getPlayer();

    public Association               getParent();

    public void setType(Topic type);

    public void setPlayer(Topic player);
}

note: no setter for parent.


       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   10 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




  TMDM read-only interfaces layer
    Concern: just reading a topic map
    set of interfaces in package org.tm4j.topicmap.tmdm:
    ReadableTopicMap
    ReadableTopic
    ReadableTopicName
    ReadableVariant
    ReadableOccurrence
    ReadableAssociation
    ReadableAssociationRole
    ReadableScopeable
    ReadableScope
    ReadableReifiable
    ReadableTopicMapConstruct
       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   11 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




              Example: ReadableOccurence
public interface ReadableOccurrence extends ReadableScopeable {
  public ReadableTopic getType();
  public Locator       getDatatype();
  public String        getValue();
  public ReadableTopic getParent();
}




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   12 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




TMDM Basic implementation layer
    Concern: storing a topic map
    set of classes in package org.tm4j.topicmap.tmdm.basic:
    BasicTopicMap
    BasicTopic
    BasicTopicName
    BasicVariant
    BasicOccurrence
    BasicAssociation
    BasicAssociationRole
    BasicScopeable
    BasicScope
    BasicReifiable
    BasicTopicMapConstruct
       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   13 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                  Example: BasicAssociation
public class BasicAssociation                                          extends    BasicScopeable
                                                                       implements Association {
    BasicTopicMap                               parent;
    BasicTopic                                  type;
    Set<BasicAssociationRole>                   toles;

    protected        BasicAssociation(BasicTopicMap parent,
                                      BasicTopic type,BasicScope scope)

    public BasicTopicMap                        getParent()

    public void                                 setType(Topic type)
    public void                                 setType(BasicTopic type)
    public BasicTopic                           getType()

    public BasicAssociationRole createRole(Topic type,Topic player)
    public BasicAssociationRole createRole(BasicTopic type,
                                           BasicTopic player)
    public Set<BasicAssociationRole> getRoles()
}
       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   14 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




TMDM Merged implementation layer
    Concern: merging a topic map
    set of classes in package org.tm4j.topicmap.tmdm.merged:
    MergedTopicMap
    MergedTopic
    MergedTopicName
    MergedVariant
    MergedOccurrence
    MergedAssociation
    MergedAssociationRole
    MergedScopeable
    MergedScope
    MergedReifiable
    MergedTopicMapConstruct
    MergedTopicMapView
       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   15 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                  MergedTopicMapConstruct
public abstract class MergedTopicMapConstruct<I extends ReadableTopicMapConstruct>
                                              extends    TMDMObject
                                              implements ReadableTopicMapConstruct {
  protected List<I>             components;
  protected MergedTopicMapView container;

    protected MergedTopicMapConstruct(MergedTopicMapView container)
    protected MergedTopicMapConstruct(MergedTopicMapView container,I firstComponent)

    protected MergedTopicMapView                 getContainer()

    public      boolean                          containsComponent(I component)
    protected   void                             addComponent(I component)
    protected   void                             removeComponent(I component)
    public      Collection<I>                    getComponents()
    public      I                                getRandomComponent()

    public      Set<Locator>                     getItemIdentifiers()
    protected   Collection<Set<Locator>>         getItemIdentifiersSetCollection()
    public      Set<Locator>                     getItemIdentifiersSet()
    public      Collection<Locator>              getItemIdentifiersCollection()
    protected   boolean                          containsItemIdentifier(Locator itemIdentifier)
}

       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   16 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




             Example: MergedAssociationRole
public class MergedAssociationRole
       extends MergedReifiable<ReadableAssociationRole,MergedAssociationRoleKey>
       implements ReadableAssociationRole {

    protected MergedAssociationRole(MergedTopicMapView container,
                                    MergedAssociationRoleKey key,
                                    ReadableAssociationRole firstComponent) {
      super(container,key,firstComponent);
    }

    public MergedTopic getType() {
      return getContainer().getMergedTopic(getRandomComponent().getType());
    }

    public MergedTopic getPlayer() {
      return getContainer().getMergedTopic(getRandomComponent().getPlayer());
    }

    public MergedAssociation getParent() {
      return getContainer().getMergedAssociation(getRandomComponent().getParent());
    }
}

       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   17 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




             TM4J1 compatibility layer
    Concern: exposing a TMDM layer topic map using the TM4J1 API
    set of classes in package org.tm4j.topicmap.tmdm.tm4j1:
    TopicMapImpl
    TopicImpl
    BaseNameImpl
    VariantImpl
    OccurrenceImpl
    AssociationImpl
    MemberImpl
    ScopedObjectImpl
    TopicMapObjectImpl
    Wrap around TMDM to provide TM4J1 (=XTM1) semantics

       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   18 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                          TopicMapObjectImpl
public abstract class TopicMapObjectImpl<
                       I extends org.tm4j.topicmap.tmdm.TopicMapConstruct,
                       V extends org.tm4j.topicmap.tmdm.ReadableTopicMapConstruct>
                implements org.tm4j.topicmap.TopicMapObject {

    protected I                      representedObject;
    protected TopicMapImpl           container;
}




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   19 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                             Event Handling
    Basic idea: make event firing just a method call
    Thus:
         all event parameters are method call parameters
         default implementation: empty method
    Rationale
         keep it small and simple
         (let the JVM) optimize away unnecessary method calls


       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   20 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                       TopicMapEventListener
public interface TopicMapEventListener<TM extends ReadableTopicMap,
                                       T   extends ReadableTopic,
                                       A   extends ReadableAssociation,
                                       O   extends ReadableOccurrence,
                                       TMC extends ReadableTopicMapConstruct,
                                       TN extends ReadableTopicName,
                                       V   extends ReadableVariant,
                                       AR extends ReadableAssociationRole> {
  public void notifyTopicCreated(TM topicMap,T topic);
  public void notifyTopicRemoved(TM topicMap,T topic);

    public   void   notifySubjectIdentifierAdded (TM              topicMap,T     topic,Locator         sid);
    public   void   notifySubjectIdentifierRemoved(TM             topicMap,T     topic,Locator         sid);
    public   void   notifySubjectLocatorAdded     (TM             topicMap,T     topic,Locator         sid);
    public   void   notifySubjectLocatorRemoved   (TM             topicMap,T     topic,Locator         sid);

    public void notifyItemIdentifierAdded                   (TM topicMap,TMC topicMapConstruct,
                                                             Locator itemIdentifier) throws
                                                                DuplicateItemIdentifierException;
    public void notifyItemIdentifierRemoved                 (TM topicMap,TMC topicMapConstruct,
                                                             Locator itemIdentifier);
}

       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>      21 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                  Peculiarities
    Scope is a first-class class
         replace the set of all themes by a pointer
         # of distinct scopes is small, thus
         # of distinct Scope objects is small




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   22 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                  Bigger picture
             TM4J1 compatibility layer
                                       container        container
             TopicImpl            TopicImpl                     TopicMapImpl


                   representedObject                                   representedObject
                                          parent         parent

             BasicTopic           BasicTopic                   BasicTopicMap

                                               Basic layer
                     components                          components

                                           Merged layer
                     MergedTopic                               MergedTopicMap
                                     container     container
             topicToMergedTopic
                                                                      mergedTopicMap
                                    MergedTopicMapView                         eventListener
                                    TopicMapEventListener

       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   23 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                         Merging
    „A merge B = C“ is slow                                   O(n²)
    „A merge B = B“ is fast                                   O(n·log(n))
         if A is smaller than B




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   24 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                                     Merging Benchmark
                                           processing time
                                          900

                                                                           825,49

                                          800
             processing time in seconds




                                          700
                                                                                     “memory” backend
                                          600                                        “TMDM” backend (no merging optimization)
                                                                                     “TMDM” backend (with merging optimization)
                                          500
                                                                           458,97



                                          400


                                          300


                                          200


                                          100

                                                                           21,51

                                           0
                                                0       40000   80000       120000

                                                    # TopicMapConstructs



       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>                              25 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                  What to do?
    instantaneous unmerging
         computationally expensive
         Should we support it? What to do if not?
    implement some methods
    autogenerate engine (Domain Specific Languages)
    late merging vs. early merging



       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   26 of 27
TMRA 2008: Towards a second generation Topic Maps engine
2008-10-17




                                     Thank you
    Questions?




       Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz>   27 of 27

More Related Content

Viewers also liked

Ctm 1.0 Tutorial
Ctm 1.0 TutorialCtm 1.0 Tutorial
Ctm 1.0 Tutorialtmra
 
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path ExpressionsDefining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressionstmra
 
Development of a Trans-Field Learning System Based on Multidimensional Topic ...
Development of a Trans-Field Learning System Based on Multidimensional Topic ...Development of a Trans-Field Learning System Based on Multidimensional Topic ...
Development of a Trans-Field Learning System Based on Multidimensional Topic ...tmra
 
Designing a GUI Description Language with Topic Maps
Designing a GUI Description Language with Topic MapsDesigning a GUI Description Language with Topic Maps
Designing a GUI Description Language with Topic Mapstmra
 
Mappe1
Mappe1Mappe1
Mappe1tmra
 
External Schema for Topic Map Database
External Schema for Topic Map DatabaseExternal Schema for Topic Map Database
External Schema for Topic Map Databasetmra
 
Inquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map DatabaseInquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map Databasetmra
 
A case for XTM 3.0
A case for XTM 3.0A case for XTM 3.0
A case for XTM 3.0tmra
 

Viewers also liked (8)

Ctm 1.0 Tutorial
Ctm 1.0 TutorialCtm 1.0 Tutorial
Ctm 1.0 Tutorial
 
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path ExpressionsDefining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
Defining Domain-Specific Facets for Topic Maps With TMQL Path Expressions
 
Development of a Trans-Field Learning System Based on Multidimensional Topic ...
Development of a Trans-Field Learning System Based on Multidimensional Topic ...Development of a Trans-Field Learning System Based on Multidimensional Topic ...
Development of a Trans-Field Learning System Based on Multidimensional Topic ...
 
Designing a GUI Description Language with Topic Maps
Designing a GUI Description Language with Topic MapsDesigning a GUI Description Language with Topic Maps
Designing a GUI Description Language with Topic Maps
 
Mappe1
Mappe1Mappe1
Mappe1
 
External Schema for Topic Map Database
External Schema for Topic Map DatabaseExternal Schema for Topic Map Database
External Schema for Topic Map Database
 
Inquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map DatabaseInquiry Optimization Technique for a Topic Map Database
Inquiry Optimization Technique for a Topic Map Database
 
A case for XTM 3.0
A case for XTM 3.0A case for XTM 3.0
A case for XTM 3.0
 

Similar to Towards a second generation Topic Maps engine

Dense Topic Maps
Dense Topic MapsDense Topic Maps
Dense Topic Mapstmra
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09Guy Korland
 
GemStone Update
GemStone UpdateGemStone Update
GemStone UpdateESUG
 
Fully Interoperable Streaming of Media Resources in Heterogeneous Environments
Fully Interoperable Streaming of Media Resources in Heterogeneous EnvironmentsFully Interoperable Streaming of Media Resources in Heterogeneous Environments
Fully Interoperable Streaming of Media Resources in Heterogeneous EnvironmentsAlpen-Adria-Universität
 
On Topic Map Templates and Traceability
On Topic Map Templates and TraceabilityOn Topic Map Templates and Traceability
On Topic Map Templates and TraceabilityMarkus Ueberall
 
Wicket and the Generics Battle (and a bit more)
Wicket and the Generics Battle (and a bit more)Wicket and the Generics Battle (and a bit more)
Wicket and the Generics Battle (and a bit more)jcompagner
 
Refactoring Simple Example
Refactoring Simple ExampleRefactoring Simple Example
Refactoring Simple Exampleliufabin 66688
 
TMAPI 2.0 tutorial
TMAPI 2.0 tutorialTMAPI 2.0 tutorial
TMAPI 2.0 tutorialtmra
 
From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2Alessandro Molina
 
Topic Maps: Theory & Practice
Topic Maps: Theory & PracticeTopic Maps: Theory & Practice
Topic Maps: Theory & Practicebbater
 
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...Goran S. Milovanovic
 
Microsoft kafka load imbalance
Microsoft   kafka load imbalanceMicrosoft   kafka load imbalance
Microsoft kafka load imbalanceNitin Kumar
 
What is new in Python 3.9
What is new in Python 3.9What is new in Python 3.9
What is new in Python 3.9Haim Michael
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules RestructuredDoiT International
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructuredAmi Mahloof
 
Developing R Graphical User Interfaces
Developing R Graphical User InterfacesDeveloping R Graphical User Interfaces
Developing R Graphical User InterfacesSetia Pramana
 
PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)
PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)
PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)JunSuzuki21
 

Similar to Towards a second generation Topic Maps engine (20)

Dense Topic Maps
Dense Topic MapsDense Topic Maps
Dense Topic Maps
 
Ontopia tutorial
Ontopia tutorialOntopia tutorial
Ontopia tutorial
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
 
GemStone Update
GemStone UpdateGemStone Update
GemStone Update
 
Fully Interoperable Streaming of Media Resources in Heterogeneous Environments
Fully Interoperable Streaming of Media Resources in Heterogeneous EnvironmentsFully Interoperable Streaming of Media Resources in Heterogeneous Environments
Fully Interoperable Streaming of Media Resources in Heterogeneous Environments
 
On Topic Map Templates and Traceability
On Topic Map Templates and TraceabilityOn Topic Map Templates and Traceability
On Topic Map Templates and Traceability
 
Wicket and the Generics Battle (and a bit more)
Wicket and the Generics Battle (and a bit more)Wicket and the Generics Battle (and a bit more)
Wicket and the Generics Battle (and a bit more)
 
Refactoring Simple Example
Refactoring Simple ExampleRefactoring Simple Example
Refactoring Simple Example
 
TMAPI 2.0 tutorial
TMAPI 2.0 tutorialTMAPI 2.0 tutorial
TMAPI 2.0 tutorial
 
From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2From SQLAlchemy to Ming with TurboGears2
From SQLAlchemy to Ming with TurboGears2
 
Kommons
KommonsKommons
Kommons
 
Topic Maps: Theory & Practice
Topic Maps: Theory & PracticeTopic Maps: Theory & Practice
Topic Maps: Theory & Practice
 
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
 
Microsoft kafka load imbalance
Microsoft   kafka load imbalanceMicrosoft   kafka load imbalance
Microsoft kafka load imbalance
 
What is new in Python 3.9
What is new in Python 3.9What is new in Python 3.9
What is new in Python 3.9
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Developing R Graphical User Interfaces
Developing R Graphical User InterfacesDeveloping R Graphical User Interfaces
Developing R Graphical User Interfaces
 
PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)
PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)
PAKDD2023_Tutorial_T2 (Overview, Part 1, and Part 2)
 

More from tmra

Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...tmra
 
Weber 2010 brn
Weber 2010 brnWeber 2010 brn
Weber 2010 brntmra
 
Subject Headings make information to be topic maps
Subject Headings make information to be topic mapsSubject Headings make information to be topic maps
Subject Headings make information to be topic mapstmra
 
Topic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge FederationTopic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge Federationtmra
 
JavaScript Topic Maps in server environments
JavaScript Topic Maps in server environmentsJavaScript Topic Maps in server environments
JavaScript Topic Maps in server environmentstmra
 
Modelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic MapsModelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic Mapstmra
 
Hatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map MergingHatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map Mergingtmra
 
Designing a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_mapsDesigning a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_mapstmra
 
Tmra2010 matsuuraposter
Tmra2010 matsuuraposterTmra2010 matsuuraposter
Tmra2010 matsuurapostertmra
 
Automatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge managementAutomatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge managementtmra
 
Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010tmra
 
Presentation final
Presentation finalPresentation final
Presentation finaltmra
 
Evaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based OntologyEvaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based Ontologytmra
 
Et Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse SemanticsEt Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse Semanticstmra
 
A PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS IntegrationA PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS Integrationtmra
 
Live Integration Framework
Live Integration FrameworkLive Integration Framework
Live Integration Frameworktmra
 
Hatana tmra 2010
Hatana tmra 2010Hatana tmra 2010
Hatana tmra 2010tmra
 
Motto of TMRA 2010
Motto of TMRA 2010Motto of TMRA 2010
Motto of TMRA 2010tmra
 
Visual Rendering of Topic Maps Fragments
Visual Rendering of Topic Maps FragmentsVisual Rendering of Topic Maps Fragments
Visual Rendering of Topic Maps Fragmentstmra
 
TMBrowse Protocol
TMBrowse ProtocolTMBrowse Protocol
TMBrowse Protocoltmra
 

More from tmra (20)

Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...Topic Maps for improved access to and use of content in relational databases ...
Topic Maps for improved access to and use of content in relational databases ...
 
Weber 2010 brn
Weber 2010 brnWeber 2010 brn
Weber 2010 brn
 
Subject Headings make information to be topic maps
Subject Headings make information to be topic mapsSubject Headings make information to be topic maps
Subject Headings make information to be topic maps
 
Topic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge FederationTopic Merge Scenarios for Knowledge Federation
Topic Merge Scenarios for Knowledge Federation
 
JavaScript Topic Maps in server environments
JavaScript Topic Maps in server environmentsJavaScript Topic Maps in server environments
JavaScript Topic Maps in server environments
 
Modelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic MapsModelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic Maps
 
Hatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map MergingHatana - Virtual Topic Map Merging
Hatana - Virtual Topic Map Merging
 
Designing a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_mapsDesigning a gui_description_language_with_topic_maps
Designing a gui_description_language_with_topic_maps
 
Tmra2010 matsuuraposter
Tmra2010 matsuuraposterTmra2010 matsuuraposter
Tmra2010 matsuuraposter
 
Automatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge managementAutomatic semantic interpretation of unstructured data for knowledge management
Automatic semantic interpretation of unstructured data for knowledge management
 
Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010Putting topic maps to rest.tmra2010
Putting topic maps to rest.tmra2010
 
Presentation final
Presentation finalPresentation final
Presentation final
 
Evaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based OntologyEvaluation of Instances Asset in a Topic Maps-Based Ontology
Evaluation of Instances Asset in a Topic Maps-Based Ontology
 
Et Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse SemanticsEt Tu, Brute? Topic Maps and Discourse Semantics
Et Tu, Brute? Topic Maps and Discourse Semantics
 
A PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS IntegrationA PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS Integration
 
Live Integration Framework
Live Integration FrameworkLive Integration Framework
Live Integration Framework
 
Hatana tmra 2010
Hatana tmra 2010Hatana tmra 2010
Hatana tmra 2010
 
Motto of TMRA 2010
Motto of TMRA 2010Motto of TMRA 2010
Motto of TMRA 2010
 
Visual Rendering of Topic Maps Fragments
Visual Rendering of Topic Maps FragmentsVisual Rendering of Topic Maps Fragments
Visual Rendering of Topic Maps Fragments
 
TMBrowse Protocol
TMBrowse ProtocolTMBrowse Protocol
TMBrowse Protocol
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 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
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.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)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Towards a second generation Topic Maps engine

  • 1. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Towards a second generation Topic Maps Engine Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 1 of 27
  • 2. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Overview technical talk API design multiple layers event handling merging done slowly or fastly Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 2 of 27
  • 3. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Objectives need a Java TM engine with TMDM support semantically syntactically (names of methods match TMDM) with instant merging with dynamic (reversable) merging with support for modern Java 1.5 features (generics, etc.) which can act as backend for TM4J1 applications with persistence support Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 3 of 27
  • 4. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Idea develop a new backend for TM4J Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 4 of 27
  • 5. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 „TMDM“ backend is layered is (currently) RAM-only can do topic merging fast Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 5 of 27
  • 6. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Layers what? layer ≈ coverage of all TMDM item types under a particular concern why? separation of concerns: do one thing, and do it well modularity of architecture: replace a layer implementation by another layer implementation Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 6 of 27
  • 7. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Layers how? layer ≈ set of classes and interfaces in one Java package communication between layers by method calls event listeners (later) Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 7 of 27
  • 8. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Layers which? one layer for accessing a topic map one layer for just reading a topic map one layer for storing a topic map one layer for merging a topic map one layer for compatibility with TM4J1 Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 8 of 27
  • 9. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TMDM read-write interfaces layer Concern: accessing a topic map set of interfaces in package org.tm4j.topicmap.tmdm: TopicMap extends Reifiable Topic extends TopicMapConstruct TopicName extends Scopeable Variant extends Scopeable Occurrence extends Scopeable Association extends Scopeable AssociationRole extends Reifiable Scopeable extends Reifiable Scope Reifiable extends TopicMapConstruct TopicMapConstruct Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 9 of 27
  • 10. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Example: AssociationRole public interface AssociationRole extends Reifiable, ReadableAssociationRole { public ReadableTopic getType(); public ReadableTopic getPlayer(); public Association getParent(); public void setType(Topic type); public void setPlayer(Topic player); } note: no setter for parent. Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 10 of 27
  • 11. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TMDM read-only interfaces layer Concern: just reading a topic map set of interfaces in package org.tm4j.topicmap.tmdm: ReadableTopicMap ReadableTopic ReadableTopicName ReadableVariant ReadableOccurrence ReadableAssociation ReadableAssociationRole ReadableScopeable ReadableScope ReadableReifiable ReadableTopicMapConstruct Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 11 of 27
  • 12. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Example: ReadableOccurence public interface ReadableOccurrence extends ReadableScopeable { public ReadableTopic getType(); public Locator getDatatype(); public String getValue(); public ReadableTopic getParent(); } Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 12 of 27
  • 13. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TMDM Basic implementation layer Concern: storing a topic map set of classes in package org.tm4j.topicmap.tmdm.basic: BasicTopicMap BasicTopic BasicTopicName BasicVariant BasicOccurrence BasicAssociation BasicAssociationRole BasicScopeable BasicScope BasicReifiable BasicTopicMapConstruct Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 13 of 27
  • 14. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Example: BasicAssociation public class BasicAssociation extends BasicScopeable implements Association { BasicTopicMap parent; BasicTopic type; Set<BasicAssociationRole> toles; protected BasicAssociation(BasicTopicMap parent, BasicTopic type,BasicScope scope) public BasicTopicMap getParent() public void setType(Topic type) public void setType(BasicTopic type) public BasicTopic getType() public BasicAssociationRole createRole(Topic type,Topic player) public BasicAssociationRole createRole(BasicTopic type, BasicTopic player) public Set<BasicAssociationRole> getRoles() } Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 14 of 27
  • 15. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TMDM Merged implementation layer Concern: merging a topic map set of classes in package org.tm4j.topicmap.tmdm.merged: MergedTopicMap MergedTopic MergedTopicName MergedVariant MergedOccurrence MergedAssociation MergedAssociationRole MergedScopeable MergedScope MergedReifiable MergedTopicMapConstruct MergedTopicMapView Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 15 of 27
  • 16. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 MergedTopicMapConstruct public abstract class MergedTopicMapConstruct<I extends ReadableTopicMapConstruct> extends TMDMObject implements ReadableTopicMapConstruct { protected List<I> components; protected MergedTopicMapView container; protected MergedTopicMapConstruct(MergedTopicMapView container) protected MergedTopicMapConstruct(MergedTopicMapView container,I firstComponent) protected MergedTopicMapView getContainer() public boolean containsComponent(I component) protected void addComponent(I component) protected void removeComponent(I component) public Collection<I> getComponents() public I getRandomComponent() public Set<Locator> getItemIdentifiers() protected Collection<Set<Locator>> getItemIdentifiersSetCollection() public Set<Locator> getItemIdentifiersSet() public Collection<Locator> getItemIdentifiersCollection() protected boolean containsItemIdentifier(Locator itemIdentifier) } Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 16 of 27
  • 17. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Example: MergedAssociationRole public class MergedAssociationRole extends MergedReifiable<ReadableAssociationRole,MergedAssociationRoleKey> implements ReadableAssociationRole { protected MergedAssociationRole(MergedTopicMapView container, MergedAssociationRoleKey key, ReadableAssociationRole firstComponent) { super(container,key,firstComponent); } public MergedTopic getType() { return getContainer().getMergedTopic(getRandomComponent().getType()); } public MergedTopic getPlayer() { return getContainer().getMergedTopic(getRandomComponent().getPlayer()); } public MergedAssociation getParent() { return getContainer().getMergedAssociation(getRandomComponent().getParent()); } } Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 17 of 27
  • 18. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TM4J1 compatibility layer Concern: exposing a TMDM layer topic map using the TM4J1 API set of classes in package org.tm4j.topicmap.tmdm.tm4j1: TopicMapImpl TopicImpl BaseNameImpl VariantImpl OccurrenceImpl AssociationImpl MemberImpl ScopedObjectImpl TopicMapObjectImpl Wrap around TMDM to provide TM4J1 (=XTM1) semantics Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 18 of 27
  • 19. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TopicMapObjectImpl public abstract class TopicMapObjectImpl< I extends org.tm4j.topicmap.tmdm.TopicMapConstruct, V extends org.tm4j.topicmap.tmdm.ReadableTopicMapConstruct> implements org.tm4j.topicmap.TopicMapObject { protected I representedObject; protected TopicMapImpl container; } Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 19 of 27
  • 20. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Event Handling Basic idea: make event firing just a method call Thus: all event parameters are method call parameters default implementation: empty method Rationale keep it small and simple (let the JVM) optimize away unnecessary method calls Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 20 of 27
  • 21. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 TopicMapEventListener public interface TopicMapEventListener<TM extends ReadableTopicMap, T extends ReadableTopic, A extends ReadableAssociation, O extends ReadableOccurrence, TMC extends ReadableTopicMapConstruct, TN extends ReadableTopicName, V extends ReadableVariant, AR extends ReadableAssociationRole> { public void notifyTopicCreated(TM topicMap,T topic); public void notifyTopicRemoved(TM topicMap,T topic); public void notifySubjectIdentifierAdded (TM topicMap,T topic,Locator sid); public void notifySubjectIdentifierRemoved(TM topicMap,T topic,Locator sid); public void notifySubjectLocatorAdded (TM topicMap,T topic,Locator sid); public void notifySubjectLocatorRemoved (TM topicMap,T topic,Locator sid); public void notifyItemIdentifierAdded (TM topicMap,TMC topicMapConstruct, Locator itemIdentifier) throws DuplicateItemIdentifierException; public void notifyItemIdentifierRemoved (TM topicMap,TMC topicMapConstruct, Locator itemIdentifier); } Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 21 of 27
  • 22. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Peculiarities Scope is a first-class class replace the set of all themes by a pointer # of distinct scopes is small, thus # of distinct Scope objects is small Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 22 of 27
  • 23. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Bigger picture TM4J1 compatibility layer container container TopicImpl TopicImpl TopicMapImpl representedObject representedObject parent parent BasicTopic BasicTopic BasicTopicMap Basic layer components components Merged layer MergedTopic MergedTopicMap container container topicToMergedTopic mergedTopicMap MergedTopicMapView eventListener TopicMapEventListener Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 23 of 27
  • 24. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Merging „A merge B = C“ is slow O(n²) „A merge B = B“ is fast O(n·log(n)) if A is smaller than B Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 24 of 27
  • 25. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Merging Benchmark processing time 900 825,49 800 processing time in seconds 700 “memory” backend 600 “TMDM” backend (no merging optimization) “TMDM” backend (with merging optimization) 500 458,97 400 300 200 100 21,51 0 0 40000 80000 120000 # TopicMapConstructs Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 25 of 27
  • 26. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 What to do? instantaneous unmerging computationally expensive Should we support it? What to do if not? implement some methods autogenerate engine (Domain Specific Languages) late merging vs. early merging Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 26 of 27
  • 27. TMRA 2008: Towards a second generation Topic Maps engine 2008-10-17 Thank you Questions? Xuân Baldauf <xuan--tm4j2--2008--tmra.de@baldauf.org>, Robert Amor <trebor@cs.auckland.ac.nz> 27 of 27