Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      Add a facility to listen to changes which are made to the CAS.

      1. images.zip
        285 kB
        kottmann
      2. cas editor doc.txt
        11 kB
        kottmann

        Activity

        Hide
        Marshall Schor added a comment -

        The patches on this Jira are for adding the base documentation for the CAS Editor to the main docbooks. This has been added under UIMA-1360, so these patches should be ignored (and maybe deleted).

        Show
        Marshall Schor added a comment - The patches on this Jira are for adding the base documentation for the CAS Editor to the main docbooks. This has been added under UIMA-1360 , so these patches should be ignored (and maybe deleted).
        Marshall Schor made changes -
        Affects Version/s 2.3 [ 12312973 ]
        Hide
        Marshall Schor added a comment -

        I'm marking this as defererred to (at least) 2.3.0; please correct if not right.

        Show
        Marshall Schor added a comment - I'm marking this as defererred to (at least) 2.3.0; please correct if not right.
        Thilo Goetz made changes -
        Reporter Jörn Kottmann [ kottmann ] Jörn Kottmann [ joern ]
        Hide
        Joern Kottmann added a comment -

        Sure, currently the Cas Editor has very simple cas change notidication, for added, removed and changed annotations. This works
        fine if the user is manually modiyfing the cas. If I start an automatic tagger it fails (cause the uima code does not calls my methods to notifiy about a change).

        I think change notifications should belong to the core and not in an ui layer.
        There are options to make it fast enough that it does not slows the current code.
        We can check a variable which contains a set of listeners against null.
        An other option is to decorate the cas on creation with a change notifcation layer.

        Show
        Joern Kottmann added a comment - Sure, currently the Cas Editor has very simple cas change notidication, for added, removed and changed annotations. This works fine if the user is manually modiyfing the cas. If I start an automatic tagger it fails (cause the uima code does not calls my methods to notifiy about a change). I think change notifications should belong to the core and not in an ui layer. There are options to make it fast enough that it does not slows the current code. We can check a variable which contains a set of listeners against null. An other option is to decorate the cas on creation with a change notifcation layer.
        Hide
        Thilo Goetz added a comment -

        Some of the more basic CAS operations only do a few operations on ints. Just checking that the list of registered listeners is empty would require more work than the operation itself.

        I understand why you need this, but why can't you implement this as part of the control layer? Have the views not update the CAS directly, but some intermediate layer that is part of the CAS editor. I think that would work for everybody. It would give you the notification that you need, and it would keep this kind of UI concern out of the core.

        Does that make sense?

        Show
        Thilo Goetz added a comment - Some of the more basic CAS operations only do a few operations on ints. Just checking that the list of registered listeners is empty would require more work than the operation itself. I understand why you need this, but why can't you implement this as part of the control layer? Have the views not update the CAS directly, but some intermediate layer that is part of the CAS editor. I think that would work for everybody. It would give you the notification that you need, and it would keep this kind of UI concern out of the core. Does that make sense?
        Hide
        Adam Lally added a comment -

        Change notification may also help if we want to implement "delta" responses from a service – that is, the service replying only with the changes that it performed, rather than the entire CAS. This could be a significant performance savings for distributed deployments, where we are currently wasting time serializing and echoing the entire CAS contents.

        Show
        Adam Lally added a comment - Change notification may also help if we want to implement "delta" responses from a service – that is, the service replying only with the changes that it performed, rather than the entire CAS. This could be a significant performance savings for distributed deployments, where we are currently wasting time serializing and echoing the entire CAS contents.
        Hide
        Joern Kottmann added a comment -

        I need a change notification layer for the cas editor. The different parts of the ui (editor, outline view, properties view, etc.) only know the model (CAS) and how to display it, if the model is changed the views must be updated. The problem is that the views do not know each other, so they need change notification to know how the model has changed e.g. annotation was removed/added, annotation span was adjusted, etc.

        I am not sure why do say this is a performance problem. A client would implement a listener interface and adds/registers
        an instance of it. Then the uima code calls the listener if a change occurred.
        Sure this slows the uima code a little bit, but the key point is that it only slows the code if there are registered listeners.
        If there are no registered listeners the code is as fast as without change notifications.

        Show
        Joern Kottmann added a comment - I need a change notification layer for the cas editor. The different parts of the ui (editor, outline view, properties view, etc.) only know the model (CAS) and how to display it, if the model is changed the views must be updated. The problem is that the views do not know each other, so they need change notification to know how the model has changed e.g. annotation was removed/added, annotation span was adjusted, etc. I am not sure why do say this is a performance problem. A client would implement a listener interface and adds/registers an instance of it. Then the uima code calls the listener if a change occurred. Sure this slows the uima code a little bit, but the key point is that it only slows the code if there are registered listeners. If there are no registered listeners the code is as fast as without change notifications.
        Hide
        Thilo Goetz added a comment -

        Joern, why do you need CAS change notification? It seems to me the CAS can change in either of two ways: either you run analytics, in which case you know the CAS has likely changed; or the CAS is changed via an explicit edit by the user, in which case you also know that a change has happened. For performance reasons alone, I would not like to send notification for each and every CAS update.

        Show
        Thilo Goetz added a comment - Joern, why do you need CAS change notification? It seems to me the CAS can change in either of two ways: either you run analytics, in which case you know the CAS has likely changed; or the CAS is changed via an explicit edit by the user, in which case you also know that a change has happened. For performance reasons alone, I would not like to send notification for each and every CAS update.
        kottmann made changes -
        Attachment images.zip [ 12354595 ]
        kottmann made changes -
        Field Original Value New Value
        Attachment cas editor doc.txt [ 12354594 ]
        Hide
        kottmann added a comment -

        CAS Editor Documentation patch for the docbook project.

        Note: This patch does not include the images. I attach them in a
        seperate zip file.

        Show
        kottmann added a comment - CAS Editor Documentation patch for the docbook project. Note: This patch does not include the images. I attach them in a seperate zip file.
        kottmann created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Joern Kottmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development