Islandora / Alpaca

Event driven middleware based on Apache Camel for Islandora
http://islandora.ca
MIT License
7 stars 20 forks source link

Issue 640 #48

Closed dannylamb closed 6 years ago

dannylamb commented 7 years ago

GitHub Issue: Part of Islandora-CLAW/CLAW#640

What does this Pull Request do?

Guts islandora-indexing-fcrepo since the heavy lifting is being moved to Milliner. Routing, configuration, and testing are all dramatically simpler.

What's new?

All business logic has been removed, and routes are now pretty simple. Read incoming message, extract what you need, and then post to Milliner.

How should this be tested?

There's an upcoming Islandora-Devops/claw-playbook PR that we'll use to test all the PRs required for Islandora-CLAW/CLAW#640, since it encompasses Alpaca, Crayfish, Crayfish-Commons, the core Islandora module... pretty much all of it.

Interested parties

@Islandora-CLAW/committers

codecov[bot] commented 7 years ago

Codecov Report

Merging #48 into master will decrease coverage by 14.43%. The diff coverage is 95.83%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master      #48       +/-   ##
=============================================
- Coverage     91.74%   77.31%   -14.44%     
+ Complexity       58       16       -42     
=============================================
  Files             8        4        -4     
  Lines           666      119      -547     
  Branches          3        1        -2     
=============================================
- Hits            611       92      -519     
+ Misses           52       26       -26     
+ Partials          3        1        -2
Impacted Files Coverage Δ Complexity Δ
...lpaca/indexing/triplestore/TriplestoreIndexer.java 100% <100%> (ø) 6 <3> (+3) :arrow_up:
...slandora/alpaca/indexing/fcrepo/FcrepoIndexer.java 86.36% <92.3%> (-12.67%) 4 <3> (-1)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4f3c097...f9e42bd. Read the comment docs.

whikloj commented 6 years ago

Copying from https://github.com/Islandora-CLAW/claw_vagrant/pull/55#issuecomment-341770710

@dannylamb The config for the islandora-indexing-triplestore feature indicates a change from one queue to two (https://github.com/Islandora-CLAW/Alpaca/pull/48/files#diff-d6faeeeee8e4b65be5a42765db3ed169) but the broadcaster is still routing to the old queue (IslandoraBroadcastRecipients=activemq:queue:islandora-indexing-fcrepo-content,activemq:queue:islandora-indexing-triplestore) and I can't see what is supposed to route the messages (based I am guessing on EventType)

whikloj commented 6 years ago

Should the Rules in Drupal be updated so that the Create/Update rules broadcast to the activemq:queue:islandora-indexing-triplestore-index and the Delete broadcasts to the activemq:queue:islandora-indexing-triplestore-delete queue?

I think that is probably makes more sense that there is a simple little router that reads from activemq:queue:islandora-indexing-triplestore and directs to the other two routes based on the EventType...but perhaps I am missing something?

dannylamb commented 6 years ago

@whikloj Let me check, you're on to something here.

dannylamb commented 6 years ago

Looks like there's an inconsistency in naming between blueprint and config files there. I'm installing the JMS feature now to check it out on a fresh box.

whikloj commented 6 years ago

So I went into Drupal and changed the queues for the "Broadcast Content Create Event" and "Broadcast Content Update Event" from activemq:queue:islandora-indexing-triplestore to activemq:queue:islandora-indexing-triplestore-index and changed the "Broadcast Content Delete Event" from activemq:queue:islandora-indexing-triplestore to activemq:queue:islandora-indexing-triplestore-delete.

Now the triples appear in the triplestore.

I think you are missing a route to do the sorting.

dannylamb commented 6 years ago

@whikloj Sorting?

Let me touch up the rules and re-export them.

dannylamb commented 6 years ago

@whikloj ok, I've updated the rules exports on the Islandora PR