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 restructuredAmi Mahloof
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules RestructuredDoiT International
 
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

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

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