by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:33
    StefWin opened #1478
  • Jul 01 18:23

    dependabot[bot] on maven

    Bump log4j.version from 2.13.1 … (compare)

  • Jun 30 18:08
    ggiavelli closed #1476
  • Jun 30 17:49
    ggiavelli opened #1476
  • Jun 15 19:18

    dependabot[bot] on maven

    Bump xercesImpl from 2.9.1 to 2… (compare)

  • May 25 23:11
    pidugusundeep opened #1474
  • Apr 26 20:10

    reckart on 1473-Upgrade-dependencies-uima2

    #1473 - Upgrade dependencies -… (compare)

  • Apr 26 20:08
    reckart milestoned #1473
  • Apr 26 20:08
    reckart labeled #1473
  • Apr 26 20:08
    reckart assigned #1473
  • Apr 26 20:08
    reckart opened #1473
  • Apr 24 07:11

    reckart on master

    #1471 - Hunpos binaries do not … Merge pull request #1472 from d… Merge branch '1.12.x' * 1.12.x… and 1 more (compare)

  • Apr 15 21:39
    reckart closed #1461
  • Apr 15 21:27

    reckart on master

    Update README.md (compare)

  • Apr 15 21:24
    reckart closed #1471
  • Apr 15 21:24

    reckart on 1471-Hunpos-binaries-do-not-run-on-OS-X-Catalina

    (compare)

  • Apr 15 21:24

    reckart on 1.12.x

    #1471 - Hunpos binaries do not … Merge pull request #1472 from d… (compare)

  • Apr 15 14:33
    reckart milestoned #1472
  • Apr 15 14:30

    reckart on 1471-Hunpos-binaries-do-not-run-on-OS-X-Catalina

    #1471 - Hunpos binaries do not … (compare)

  • Apr 15 14:10
    reckart edited #1471
Florian Schneider
@floschne
Hi
Maybe this is not the right channel to ask but basically the only one I found on gitter regarding UIMA
Florian Schneider
@floschne
I'm trying to implement a (Collection)Reader, that waits for user input inform of a POST from a web app and I'm planning to do so by emitting an Event and wait for the Event in the Reader's getNext(). Question is: how would you suggest to wait? As always busy waiting seems not to be an option. Another option would wrapping the reader into a Thread and let it sleep until an Event is received, but I think it's not an option again since I think this could interfere with UIMA internal scheduling. Also using the Java-built-in Observer Pattern won't work nicely because you have to create a Bridge Class to hack the necessary multi-inheritance from Observable & the Reader Base class..
Isn't there a Reader that wait's on user input implemented already? If not this maybe could be worth an Issue?
Jens Grivolla
@jgrivolla
I think your question is really outside the UIMA (or DKpro) specific part. As you noticed, you can just wait inside the getNext(), and what you wait for really has nothing to do with UIMA. We do it this way e.g. to wait for messages on a Kafka bus, which is easy because we can just use a blocking call from the Kafka API that takes care of the waiting.
When we do REST services, so far we don't do it by waiting inside a Collection Reader, but rather implement the service using the usual Java approaches for this, and then create a corresponding CAS with the data that was sent to the we app and call the process(jCAS) method on a previously set up aggregate analysis engine with it.
You can see an example of what I mean here: https://github.com/EUMSSI/EumssiUimaService/blob/master/src/main/java/eu/eumssi/managers/uima/UimaManager.java#L195 (this is the method that gets called whenever the web service receives a POST)
I'm not claiming that this is the best way to do it, but so far it works quite well for us. You just need to make sure you instantiate your analysis engine once and reuse it for each call (e.g. by using a singleton) to avoid the initialization overhead.