Log of the #duraspace-ff channel on chat.freenode.net

Using timezone: Eastern Standard Time
* kaarefc joins00:57
* kaarefc leaves01:42
* kaarefc joins02:01
* kaarefc leaves02:31
* kaarefc joins03:31
* kaarefc leaves03:56
* eddies leaves07:00
* eddies joins07:01
* eddies leaves
* eddies joins
* eddies leaves
* anusha joins
* eddies joins07:02
* eddies leaves
* eddies joins
* eddies leaves07:04
* jcoyne joins08:03
* JasonDGI joins08:14
* avessey joins08:50
* eddies joins09:24
* eddies leaves
* eddies joins
is fcrepo.fedora4lib.org down?09:38
<jcoyne>eddies: Looks like it's a page full of ads09:40
<eddies>oops. i meant http://fcrepo4.fedora4lib.org
<jcoyne>Yeah, I get 50309:41
<eddies>if you're seeing ads, i think that's your isp serving ads for unknown domains
<jcoyne>eddies: not too surprising.
eddies: I think it might be your DNS doing it actually09:42
ads are from sedoparking.com09:43
wasnt seeing ads—just blank page on the wrong url, must be adblock
cbeer: can you email me our group photos from chicago?09:49
<cbeer>eddies: yes, it's down. barmintor pushed code that hung on some tests.10:08
but he'll fix it before stand-up, i'm sure. or i'll force it to a different version.10:09
<eddies>I dub thee, Barmintor the Breaker10:10
<barmintor>I'm a little perplexed at what's broken now- my tests are all running.10:14
I guess I'll have to actually install the damned thing
<cbeer>and i'll actually open intellij today.10:15
<jcoyne>Can someone take a look at my PR and figure out why Spring isn't working for me?10:17
<barmintor>I'll check it out when I unbreak the build10:18
<jcoyne>barmintor since Zoia isn't here:10:20
@sing Toni Braxton : Unbreak my heart
zoia: Un-cry these tears / I cried so many nights / Un-break my heart / My heart
<cbeer>barmintor: i'm confused how the while loops in AtomJMSTest aren't infinite loops.10:22
(but i'm sure i'm missing something, right?)
oh, that's the JMS listener part of it10:23
<barmintor>yeah, they stop when they receive an event
though we should probably put an actual notify in there, and take the loop out
<cbeer>yeah, and it doesn't look like they're receiving an event?10:24
* barmintor shakes his semaphore
that's what breaks the test?
<cbeer>looks like. i'm debugging the testAtomStream and entry is always turning up null10:25
<barmintor>that is definitely passing locally. what does jms.xml look like?
<cbeer>just like https://github.com/futures/fcrepo4/blob/master/fcrepo-jms/src/test/resources/spring-test/jms.xml10:27
let me see what, if anything, is going on in activemq.10:29
* ajs6f joins10:45
Hey, kids. Working on: https://www.pivotaltracker.com/story/show/4351947910:46
<barmintor>trying to figure out why that last commit isn't running on server10:47
<ajs6f>The JMS legacy stuff?
<ajs6f>Are the JMS tests failing? 'Cause kernel tests are now failing for me...
But I dont think that could be conected.
<cbeer>(kernel is fine for me)10:49
I think it's because of something I did for FedoraEvent.
Not Ben's problem. :)
Yeah, it was (something I did).10:51
But my JMS tests are now hanging— is that what you're seeing, Ben?
<barmintor>that's what's happening on the server, not on either of my machines10:52
<cbeer>ajs6f: that's what i'm seeing. barmintor disclaims all knowledge.
Hanging at:
DEBUG 10:51:12.241 (SimpleObserver) Putting event: Node added at /test1 by <anonymous> on the bus.
<ajs6f>Time to add some DEBUG logging.10:53
Probably in JMSTopicPublisher.
<barmintor>there's not really anywhere to add logging in JMSTopicPublisher after that stmt
<ajs6f>Could be in LegacyMethodEventFactory.10:54
You're @Injecting that into JMSTopicPublisher, right?
<barmintor>for now, but even that has already finished by the time you get that debug line
<ajs6f>Not the way I'm reading it.10:55
That line comes from SimpleObserver.
After which (after that line) the event is on the bus.10:56
But JMSTopicPublisher picks it up _from_ the bus.
<barmintor>sorry. misread that log line
<ajs6f>Easy to find out. I'll add some logging to JMSTopicPublisher and see if it fires.
Oops, no, I'll first go inside for our meeting. brb10:57
* ajs6f leaves
<eddies>don't forget we're on the SG line in two minutes10:58
(feel free to update that, by the way)10:59
<JasonDGI>is this a different line than usual?11:00
* barmintor gets a busy signal
<cbeer>JasonDGI: yes.
see eddies' email
<barmintor>"At 11:01 AM (209) 647-1600 was not available for a phone call."
* ajs6f joins11:02
<cbeer>there has to be a better way to do roll-call.
<barmintor>"At 11:02 AM (209) 647-1600 was not available for a phone call."
<cbeer>barmintor: on skype or phone?
<barmintor>cbeer: gchat
you think I've got skype credit?11:03
<cbeer>eddies: http://fcrepo4.fedora4lib.org/ is back
* barmintor guffaws
<ajs6f>I'm just getting a busy signal.
<barmintor>cbeer: did you roll back?
<JasonDGI>unable to reach contact
<ajs6f>DuraSpace Free Conference Call?
Or Google Hangout?
<eddies>call in info is on the wiki page i linked above. sheesh11:04
<barmintor>eddies: we're trying; none of us can connect
<ajs6f>Enjoy the standup, Eddie. It should be short. :)
<cbeer>i'll keep eddies honest.11:06
<ajs6f>Are you on, cbeer?
by phone
<ajs6f>I'll try again.
<JasonDGI>some of us dont have skype credit :(11:07
<ajs6f>Nope, just busy signal.
I'm trying by phone.
<barmintor>ok, my cellphone works :(11:08
<ajs6f>Where did we get this conf line?11:09
Ben— the JMS test is hanging in LegacyMethodEventFactory.getMessage(), which starts but never finishes.
<ajs6f>To quote barmintor, "I LOVE FREECONFERENCECALLHD!!!!!!!!"
<barmintor>is it waiting on the node? I wonder if the session is closed.11:11
<ajs6f>I'm hecking that now.
But that shold throw an exception, not hang.
<barmintor>could change that method to take the node instead of the jcr session11:12
<cbeer>s/pretty good/meh/
<ajs6f>A node can supply the Session from which it was obtained via Node.getSession();
If you have a Node, you dont need to introduce a new Session.
<JasonDGI>cbeer you always forget the trailing g on your s/ commands
<cbeer>not everything that's pretty good is meh. just that occurrence.
<barmintor>ajs6f: ther's no new session, is there? should be reused.11:14
<ajs6f>I'm saying we don't have to manage the Sessions. We could just use the one attached to the Node
If I understand you correctly.
<barmintor>that's what's going on now, rwally11:15
<ajs6f>Wait a minute...
<barmintor>sorry, doing this 1-handed
<ajs6f>I'm getting as far as the top of publishJCREvent()
<JasonDGI>still cant get connected to the call
<ajs6f>but not even into LegacyMethodEventFactory.getMessage().
<barmintor>ajs6f: err...11:16
<ajs6f>I think we have a problem getting a JMS message factory wired in.
It may not be getting @Injected correctly.
Let me take a look at that
<barmintor>probably shouldn't be @inject'ed anyway. can't be expected to be unique.11:17
Could be many different kinds of serialized JMS messages.
<cbeer>who's talking?11:18
<barmintor>jonathan m, i think
<ajs6f>Or rather, it could be injected, but it should use a @Qualififer.
<barmintor>ajs6f: would you want many publishers, or 1 with many message factories?11:19
<ajs6f>Could go either way. It's the classic choice between a complex graph of small objects or a simpler graph of more complex objects.
<cbeer>(i wish we could table this discussion until after we flee.)
<ajs6f>I usually choose for the former for easier testability.
What are you people planning?
No, wait, Ben.
<cbeer>ajs6f: if the CDC is eligible to be fcrepo4 advisors
<barmintor>ajs6f: in thise case it doesnt impact testability, since test configs will only have 1 factory (presumably). Right?
<ajs6f>With further logging it _is_ getting into LegacyMethodEventFactory.getMessage() but failing somewhere in there.
But we'll run multiple tests over the same code with different config. I'm not saying we get less testing, we just write it differenty.11:21
<cbeer>(i wish jonathan would mute.)
<ajs6f>Okay, looks like I've narrowed it down to LegacyMethod.11:22
Time for more tasty TRACE logging.
Wow. You completely rewrote all the stuff I did. Was it that bad? :)11:24
<JasonDGI>i'm still unable to connect to the call11:25
<ajs6f>Still getting a busy signal, myself.
<JasonDGI>ajs6f: did you get my present?11:27
<JasonDGI>in your luggage
<ajs6f>The bobble head?
<barmintor>ajs6f: I felt like I kept a lot what you did, though I ditched the guava dependency and isolated the abdera stuff
* JasonDGI leaves11:28
<barmintor>does it seem that different?
<ajs6f>Maybe it was just on first glance.
<barmintor>i had to copy over a bunch of stuff from fcr3 to round out the message categories, too11:29
<ajs6f>We should probably isolate the JCR event + Fedora resource type -> legacy Fedora API method name stuff to helper classes.
The Date stuff and so forth?
<barmintor>ajs6f: yeah
<ajs6f>I bet there are libraries out there to help with that.
* kaarefc joins11:30
<ajs6f>Ben— so "delegate" is the Atom entry being constructed?
<barmintor>or being passed in, depending11:31
<cbeer>if you want CMIS, why would you want fcrepo?
<ajs6f>Was that a philosophical question, cbeer?
Ben— are you imagining a layered approach here, where various actors decorate an Atom message with additional info?11:32
<barmintor>Not really- but the receiver of the JMS message needs a way to reconstruct the message11:33
<ajs6f>So that receiver would create a new Entry with the serialized message as received...?11:34
And do stuff with it?
<cbeer>s/may fork/will fork/
<barmintor>the jcrEvent constructor is for publishers, the string constructor is for recevers
<ajs6f>Right. Okay.
<barmintor>ajs6f: cf LegacyMethod#canParse(Message jmsMessage)11:35
<ajs6f>But GSearch will continue to use the fcrepo3 code to unmarshall the message. Are you imagining other clients that would use this code instead?
<barmintor>ajs6f: yes, this is the pattern I want to establish11:36
<ajs6f>Okay, now I'm with you.
Back to inserting TRACE statements.
<barmintor>clients can depend on a single artifact (fcrepo-legacy, eventually) to decode messages11:37
but probably also need to elaborate an api for
<ajs6f>Yeah, I get it now. fcrepo-legacy-atom-messaging-too-long-module-names.
<barmintor>impls to indicate they recognize a jmsMessage11:38
Wait— you want to have handshaking? So servers and cleitns can agree on a serialization?
<barmintor>no, just a shorthand way for a dcoder to say "I cant use this message"11:39
<ajs6f>For the operator of the client, or to send back to the server?
<barmintor>just for the client
<ajs6f>Yeah, that would be nice. Fail quickly and legibly.11:40
<ajs6f>But it would be sensitive to the data type of the message, no? You can't read the format descriptor if you don't know where to find it.11:41
<barmintor>yeah, but that's up to the impl
<ajs6f>Hm. So it would be useful if you both agree on Atom, but not what kind?11:42
Okay, so here's what TRACE is turning up.
The test gets as far as:11:43
LegacyMethod legacy = new LegacyMethod(jcrEvent, resource);
in LegacyMethodEventFactory.
But doesn't get as far as the first line of:
public LegacyMethod(Event jcrEvent, Node resource)
in LegacyMethod, because I put a logging line in there that isn't shoing.
Sorry, I meant the constructor LegacyMethod(Entry atomEntry).11:44
That's where the logging line is, that doesn't execut.
So perhaps there's a problem with newEntry().
Wow. It doesn't even get as far as the first line of newEntry().11:47
WTF? That's just a static method.
Got it.11:50
It's hanging in the static initializer.11:51
It starts, but does not complete, the call:
<cbeer>(i've totally missed the point of this conversation)
<ajs6f>That's because you were wasting your time in standup. :)
I was tracing Ben's new JMS code to find out where it is hanging.
And I just found it.
See what I wrote right above you coming back in.11:52
<cbeer>(ajs6f, no no, the point of the conversation on the call. i understand your stuff)
Ben, you want to deal with that? Static initializers shouldn't be a problem, and your load of that properties map looks fine to me...11:53
<cbeer>name names!
<ajs6f>The pros file looks pretty vanilla...?
<barmintor>THE EAR!11:54
<ajs6f>All right, I'm leaving this one to you, Ben. I'm going to go look at doing FedoraEvent.11:55
<barmintor>ajs6f: step 1- reproduce the problem :(11:56
<ajs6f>You've got access to the servers where it's failing. :)11:57
<barmintor>I wonder if there's an issue using a ref to the class to get the resrouce stream in part of the class's static init12:04
<ajs6f>The logging inficate12:05
indicates that the static initializer is being called right as soon as an instance is being constructed.
or is asked to be constructed, I should say, since it never successfully gets constructed.12:06
<cbeer>eddies: i feel like the SG/TT meetings are mostly a waste of time. Or I should have dropped off much, much earlier.
<ajs6f>Ben, I just tried deleted the "static" keyword, which turned that block into an instance initializer block, and got:12:09
Caused by: java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:434)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at org.fcrepo.messaging.legacy.LegacyMethod.<init>(LegacyMethod.java:85)
so there's something ookey about what you're doing there. But I don't know what.
<eddies>cbeer: i'm hoping that once we're able to target (hydra|islandora).fedora4lib.org for deliverables, the SG calls will be better for the TT—i.e. I don't have to do all the talking and the feature owners can lead the discussion of their individual stories12:10
but yeah, i agree, not so good right now for TT
<ajs6f>I thought it was great. I got a lot of work done.
<barmintor>ajs6f: I didn't even realize you could float a non-static code block outside of the constructors. That's kind of weird12:11
under "Initializing Instance Members".
<barmintor>that's crazy
<ajs6f>It's so that you can avoid repeating initialization code in constructors that don't have a natural layering to them.
<barmintor>has that always been in Java? I feel like that used to throw a compile error12:12
<ajs6f>I don't know how old it is. Java is ageless and timeless and pitiless.
* kaarefc leaves12:14
<eddies>are folks avail for a quick check-in?12:15
<ajs6f>As available as I was for stand up. That went well.12:16
<eddies>barmintor, cbeer, anusha?
i thought i saw jason earlier
<barmintor>I'm eating and debugging. Is this a phone call or an IRC bit?
<eddies>i thought phone12:17
i can live w/ irc tho
can you eat and type?
<anusha>eddies: I'm reading along & typing12:18
<barmintor>I am the only participant in this conference.
<ajs6f>You're all it takes to make a conference.
<eddies>ok, i'm on12:19
<ajs6f>Are we suposed to be dialing into something?
<ajs6f>The same one we tried for standup?12:20
Not the old Fedora one/
<eddies>no, our regular one
<eddies>well, we could take the opportunity to try google h, but ben & i are already on freeconf
<ajs6f>And now so am i>
<eddies>google hangouts: good enough for obama, good enough for fedora?12:21
<ajs6f>It would let me make faces at you.
* barmintor is chewing12:22
<ajs6f>Get dropped?12:26
<barmintor>back on
* JasonDGI joins12:28
<cbeer>eddies: still on?12:32
<barmintor>cbeer: yes
<cbeer>ok, on.12:33
<barmintor>EDWINUS REX12:35
And look for "bill of materials"12:40
<eddies>jasondgi can you join the freeconf line?12:47
<JasonDGI>its still listed as offline, give me a second
call dropped12:50
<JasonDGI>freeconf is the worst12:55
<barmintor>ajs6f: Can you try runing the tests after changing line 66 of LegacyMethod to load "/org/fcrepo/messaging/legacy/map.properties"?12:58
<ajs6f>Will try. Hang on.
Wait, line 66 is:12:59
public final static String SERVER_VERSION = "4.0.0-SNAPSHOT";
tht should be line 52.
Oh hell, I cleaned up the imports
<ajs6f>Yeah, 52 is blank for me.
<barmintor>jsut change the resourceAsStream parm to be "/org/fcrepo/messaging/legacy/map.properties"
<ajs6f>Did you mean FEDORA_TYPES.load(LegacyMethod.class
<ajs6f>Trying it now, with initializer static as you left it.13:02
Same behavior with and without static.13:05
<barmintor>I'm totally baffled by this. Why can't I break my local build?13:07
<ajs6f>I can come up there and break it for you.
Bt that would take a while. :)
I wonder if we have different version of Java?13:08
<barmintor>is that map.properties file in fcrepo-jms/target/classes/org/fcrepo/messaging/legacy/
<ajs6f>I'll check. It certain should be.
AHA! No, it isn't.13:09
<barmintor>so, that's weird
maybe that needs to be refactored under src/main/resources13:10
<ajs6f>That's where I would have put it.
<barmintor>well, la-dee-da13:11
<ajs6f>No, it's la ti si do rem mi fa sol13:12
* anusha leaves13:14
<barmintor>good news! it continues to not be broken locally.13:15
<ajs6f>Ah, Julie Andrews. One of my earliest movie star crushes…<313:16
* github-ff joins13:19
[fcrepo4] barmintor pushed 1 new commit to master: http://git.io/b03Z0A
fcrepo4/master a008cc3 Benjamin Armintor: moving props file into resources
* github-ff leaves
<barmintor>did that work?
<cbeer>my tests passed, at least.
* github-ff joins13:27
[fcrepo4] cbeer pushed 1 new commit to master: http://git.io/4AfW2g
fcrepo4/master 1b32008 Chris Beer: bump modeshape to 3.1.2
* github-ff leaves
<barmintor>then ajs6f++, he sussed out the problem
not sure why the file was being copied correctly on my machines, but w/e
<ajs6f>Good old fashioned TRACE slathered liberally all over the ocde.
Hm. Can't get git remote add origin git@github.com:futures/fcrepo-foxml.git13:30
to do IRC notifications.
That should have been https://github.com/futures/fcrepo-foxml
Stupid clipboard.
<barmintor>yay, build fixed13:45
should the fcr3 ATOM jms stuff be pulled out into a new module (fcrepo-legacy-jms) or put into the fcrepo-legacy-api module?13:54
<cbeer>+1 to legacy-jms
Messaging != API.13:55
<barmintor>ehhhh… okay
ajs6f: when you were talking about using @Qualifier, were you talking about writing a completely new annotation for our projects to use (javax.inject.Qualifier) or using Spring's @Qualifier?14:00
<ajs6f>They are they same.14:01
<barmintor>Actually, now that I type that, both seem bad
<ajs6f>At least, the way we use them.
<barmintor>They're the same? The javadoc for javax.inject.Qualifier looks prety different
<ajs6f>_The way we are using them_. We use Spring's Q to pick out a resource for use to fulfill an injection annotation with j.i.Q.14:02
If we were using CDI, we could use pure annotations.
The reason I did it that way is to keep dependencies on Spring out of the code itself.14:03
<barmintor>my inclination is to fall back to setters, to keep config out of the source
yeah, I completely agree w/ that
<ajs6f>@Qualifier annotations, to my mind, are not config. They're part of the semantics of the code. But I'm not going to be doctrinaire. If you think that X is clearer or easier to understand for more people, then +1 to X.14:04
<barmintor>I think I don't understand them as well as you.14:05
<ajs6f>I don't think I understand them as well as you think I understand them, or I would be able to explain them so that you understood them as well as I do.14:06
<ajs6f>Here's the semantic I understand them to have:
You want to @Inject stuff into your code.
But what happens when there is more than one resource (bean) that could be injected into a given point?14:07
That is, what if the types of the resources aren't enough to distinguish which goes where.
That's when you bust out your @Q-gun.
<barmintor>yes, but that seems like config to me
at least, in this case14:08
<ajs6f>Not to me. Config would be if either (let's say there are only two, for simplicity) of the injectable beans could go in either slot.
So that you could one of several choices at run time.
And they would all be legitimate forms of operation.
What's ahppeneing here is that there _aren't_ different choices you can make.
Any choice but one will lead to incorrect operation.14:09
And @Q annotations make sure that the DI engine makes the right choice.
So that's not cofngi, to me.
Config = choice.
@Q = neccessary advice.14:10
<barmintor>I'm having a hard time visualizing the use case. It doesn't help that the Spring examples basically use them as ways to have the bean demand that an injected bean have a certain name
<ajs6f>Yeah, Spring is not helpful here.
So let's take our actual example.
ModeShape config.
We supply that to MS as an URL, because that's how MS demands it.
But we could easily imagine other beans taking URLs for other purposes.14:11
So how to distinguish the various URLs?
We coudl just use Spring XML.
But that's what I was triyng not to do. Maybe it's easier for more people,and I'm fine with that.
Instead, I put a @Q annotation on the thing that suppies the MS cofnig URL.14:12
So that it is marked as "the URL that DI should use to inject into MS's factory".
If we had multiple possible MS configs, all of which were legit, we could annotate them all, and then further annotate one as default, or something like that14:13
And that would not rely on Spring at all.
<barmintor>but doesn't that seem ike you've just moved part of the MS config into a Java class?
<ajs6f>You've moved the _identity_ of the config, as a resource, into a Java class.
Not the config itself.
So maybe that's another way to think about it.14:14
@Q lets you define the identity of different components in a DI-wired system in a framework-agnostic way.
<barmintor>see, that seems like the config of the bean to me. I can't shake the feeling that this undoes the virtue of inverted dependencies
<ajs6f>How so?
<barmintor>Because instead of MS saying "I need a URL", it says "I need a URL, and you must have marked it up like so"14:15
which moves part of that responsibility back into the consuming class14:16
<ajs6f>But MS _doesn't_ just need an URL. That's my point about there not being any choice that leads to config. It needs _an URL that points to a resource that is a MS config_. Nothing lese will do.
but the qualifier doesn't guarantee that
<ajs6f>The @Q annotation has the semantic of "that points to a resource that is a MS config"
No, but the @Q makes it explicit.
<barmintor>I dont see how it does14:17
does it inspect the content of the URLs input stream?
<ajs6f>Well, it's called "ModeShapeRepositoryConfiguration"
No, it doesn't make quarantees about the contents of the URL.
It helps distinguish bettween that URL and any other URLs in the system.14:18
<barmintor>Right- that is, it's baking in what used to be configuration
<ajs6f>"makes it explicit" in the sense of "makes clear what the resource is being used for".
Well, that's where we disagree. It's not config, to me, because there is no chocie being offered to the user.14:19
You can't use a different uRL>
You have to use the one that actually has the config.
(MS config, that is.)
What's the advantage in giving a user a "choice" in config for which there is only one right answer?
<barmintor>Right- you have abrogated the config, and MS is now locating its own URL
<ajs6f>You have removed unneccessary config, and obviated the user from having to get it right.14:20
And the DI system is locating the URL.
The @Q is not visible to MS.
<barmintor>I dunno: you have two modeshapes. MS1 gets this URL, MS2 gets that URL. I have configured them so.
<ajs6f>In one repo?14:21
<barmintor>in one execution context
<ajs6f>What's the use case there?
How would Fedora deal with two MSes?
<barmintor>I'm just trying to illustrate my point- the @Q forecloses on use cases by making things less confugrable14:22
<ajs6f>Yes, exactly.
And sometimes, that's a good thing-
<ajs6f>when the configurability has only two possible settings: right, and wrong.
If we have a genuine use case for one Fedora —> multiple MSes,
then things are different.
<barmintor>but in the very case that we're talking about, the @Q doesn't resolve that
<ajs6f>It seems to do so to me.
Only the URL that matches the annotation can be used.14:24
<JasonDGI>im still getting "The empty namespace can be only bound to the empty prefix" when i try to curl http://localhost:9999/rest?_wadl (on futures6), any ideas?
<ajs6f>Are we making WADL?14:25
<barmintor>but that doesn't mean it's a correct URL, it only means that you've constrained the configuration by putting some of it into Java
ajs6f: thanks for being patient about my anxieties here.
<ajs6f>No, it doesn't mean that it's a correct URL, but that's not what @Q is _for_. And I would say it differently: we're _removed_ some configuration because there was no purpose to it.
No problem.
This is very abstract stuff, and I don't thin kthere's a right and wrong answer.14:26
There's what we should do to get our work done best.
And that may not be to take advantage of techniques that are opaque.
<barmintor>ajs6f: more concretely, I think it does not make sense for a JMSTopicPublisher to inject its JMSEventMessageFactory impl, b/c there's not a way to distinguish different impls for different publishers when the publisher code is common to all the beans14:29
at least, it should not @Inject
<ajs6f>@Q is _exactly_ that way to distinguish between beans of the same (Jave) type but different semantics.
<barmintor>Err… how is that? In this case, this is the "2 modeshapes" example14:30
<ajs6f>So that's where we get back into config.
<barmintor>execept that it's "2 publishers"
<ajs6f>Now, it's not the 2 MS example, because there is an actual choice to be made.14:31
So let's say we have a publisher.
And it needs at least one message factory.
And no more than one.
But there are three message factories to choose from.
And only two of them will work. (Let's say only two of them can produce JMS messages.)14:32
We qualify the two with @JmsMessageFactory.
And that restricts the possible correct config to only those configurations that will work.
We've prevented the use from wiring the publisher to the factory that won't work.
But we've left open all the legitimate choices.14:33
<barmintor>But… you can't @Inject them
we've shifted to talking about types14:34
ie, there's some invisible subtype of message factory identified by an annotation rather than the Java type system14:35
<ajs6f>@Q annotations are a refinement on the type system, and you _can_ inject them, that's th whole point. You just can't inject the one that won't work.
<barmintor>Right, but which of the two that will work get injected?14:36
<ajs6f>_That's what you leave to actual config._
You're not trying to elimnate config.
Just to eliminate configs that don't work or make no sense.
<barmintor>right- it can be injected, but not @Injected. I think we were talking past each other
<ajs6f>No, it can be @Injected, or why not?
<barmintor>because there's more than one match, and Spring is going to fail14:37
<ajs6f>No, that's the config
<barmintor>@Inject requires a unique match
<ajs6f>Yes, but that's what you choose in Spring (or other DI config).
Again, we're not trying to eliminate config.14:38
If you have two legimiate chocies for injection, you
actually have a confogurable choice.
And that should be made in config.
But attaching a AMQP message facotry to a JMS publisher is _not_ a legitimate choice, and we shouldn't let the user get any farther than we can trying to make that choice.14:39
We should stop that kind of foolishness and posibly send someone to the corner for a time out.
<barmintor>that would fail in traditional Spring config
<ajs6f>What would fail?14:40
<barmintor>The Java type system would prevent me from wiring a AQMP message factory in there
b/c the property has another type14:41
<ajs6f>Sure, if we had separate types, which in that case we probably would.
But in the MS config case,
and URL is an URL is an URL, unless we want to subtype URL with ModeShapeConfigURL.
We could do all of this in the type system, and if we had control over every type, no problem.
BUt we don't.
<barmintor>We are politely tabling the Modeshape config URL discussion :)14:42
<ajs6f>And that's why having the ability to refine the type system is useful.
Well, it gets right to the heart of the thing.
If you own all the code, refining the type system is silly and pointless.
It's when you can't change the types of things you have to work with that it becomes useful.
Or when you don't want to make the entirety of the type system transparent within your own code, for encapsulation.14:43
<barmintor>here is a nonabstract question: I have only seen @Inject work with autowiring. Does Spring accomodate that annotation with setters and constructor parms?14:44
In fact, the @Inject annotation itself will tell you where you can use it, in Javadocs.
Let me see...
Constructors, field, or methods.
Most annotations have a @Target meta-annotation which tells the compiler where it can be legitiamtely used, which is how (e.g.) Eclipse knows when you put an annotation somewhere it can't be.14:45
I'm not trying to beat you over the head with this thing. I genuinely think it's a useful and elegant tool for real work, and it has the benefit of being independent of DI solution. So if we don't like Spring, we can use something else. But if it's just confusing (as cbeer might say, too much magic), then I'm fine with us rewriting the minimal use of it we are now making.14:47
<barmintor>Honestly speaking, I don't see what the value added is of the @ModeshapeRepositoryConfiguration over constructor injection14:51
<ajs6f>With the current Spring config, not much.
Take a look at the branch CDI.
That's where you start to see it make a real difference.14:52
Look at the Spring confg.
<ajs6f>Oh, wait! You can't. Because there isn't any. When there is no legitimate config to be used, there's no need for any config at all.
No, sorry, look in fcrepo-kernel.
That branch is only half done, and I hadn't gotten to wfcrepo-webapp.14:53
I guess I own't, now, now that we are breaking it out.
In fcreo-kernel, there is no more Spring config and no need for any.
Because there is no actual configuration to be done for the jernel.14:54
The beans only fit together one way.
And the code describes that via annotations.
And that's what I'm after. Not _no_ config. _No more config_ than is genuinely needed.14:55
<barmintor>I don;t get it. The code just requires that the repo config be at /repository.json?
<ajs6f>Without any config. If you added some DI config that overrode that, you could put it elsewhere. But you don't have to do that to have a running app. I think we have to distinguish also between config that wires beans together and config that configures individual beans. This @Q thing is _entirely_ about the former and not about he latter at all.14:57
<barmintor>So it locates an overrideable default config into the code14:58
<ajs6f>I'm not sure what the right words are for those two things, but the former is what you might alter to swap or choose from implementations of a component, and the latter is what you might use to configure an individual component, and this whole question just hasn't anything to do with the latter, from my POV.
<cbeer>(when you decide something, let us know on ff-tech.)14:59
<ajs6f>I've already said that I'm not going to push on this. Ben seems curious about it and I'm confident that these tools are actually sound and good (and so is every JEE app server vendor). That doesn't mean that they are right for us.15:00
<barmintor>Those circumstances make me think I must be missing something, I'm honestly trying to figure it out
<ajs6f>I hear ya.15:01
Maybe, for the moment, we should just table it, leave the old stuff as is (sine it works), you do the new stuff in the way that makes sense, and we'll talk it out more fully over a beer sometime?
<barmintor>Looking back at FCR3, the ability to configure both the component wiring and the components was really the point of the whole Spring migration
<ajs6f>Sure, but that was because neither was easily configurable. Spring was a great advance.15:02
We're not starting from that place.
I want to offer the ability to configure both now, too.
<barmintor>So it seems strange to me to step back from component wiring in config to component wiring in code
<ajs6f>Not component wiring in code solely. Maybe you could say that the annotations offer a "schema" for component wiriing. They define what is and isn't allowable as component wring.15:03
And again, if we owned all the types, we'd just do that in the type system.
<barmintor>It makes the most sense to me when there is *literally* only one way to put things together: This app is a closed system that happens to be built through DI15:04
<ajs6f>Actually, if we ownded all the types and wanted to code against them in all circumstances.
yeah, that's the most obvious case.
That's makes it really black-and-white.
But in the grey area, again, it's about defining acceptible states of wiring.
You can let the user have as much choice as the semantics of the code actually make possible. But not more. Not quite qnough rope to hang themselves.15:05
<cbeer>we're having a code4lib debrief... and naturally having pizza.15:06
<ajs6f>Actually, that might be a really useful analogy. The annotations are like an "XML schema" for the wiring. They define what are and aren't legitimate choices for bean wiring. And they're only useful when you can't just do it in the type system, or you don't want to do it in the type system because you would have to expose implementation types that should be hidden for encapsualtion's sake.15:07
"Why don't we do it in the type system?" One of the Beatles worst.15:08
* JasonDGI leaves
<barmintor>I think I still need to find an example. The URL thing doesn't do it for me. I'm going to talk to Uncle Google about it.15:09
<ajs6f>Good call.
Examples++. I'm going out for a smoke. I'll pray for cbeer's palate, as he undergoes more pizza torture.15:10
<cbeer>(and not just pizza.. "chicago pizza"
<ajs6f>From California? {ahem}15:11
* ajs6f leaves15:22
* ajs6f joins15:24
P.S. Ben, if you don't find examples that makes sense for you, then firstly, let's agree not to use @Q going forward, at least for now, and secondly, I will gladly write you an example as an exercise for myself. I'm pretty confident in my opinions on this one, but if I can't make the matter plain with a straghtforward code example that shows exactly what @Q is good for and why you might want to use it, I have no business pontificating about it.15:26
<barmintor>I'm reading some propaganda about CDI now. I will say that I think making a default config invisible should probably not be a justification, since I pity the sap who answers a question about how to change a config with "oh, first you write a config. No, there's no default config to use as a guide."15:32
<ajs6f>Oh, fair enough.
Totally agreed. This is more about:15:33
1) vendor indepedence. I don't want module writers to have to use Spring if they don't want to.
2) Providing that "just enough rope but not too much": we want to answer as few questions on the list about valid config as possible.
3) Type-safety as much as possible. Bad wiring config should show up and be reported ASAP, not after a particular execution path gets exercised.15:34
<barmintor>It seems like the CDI spec comes from EJB webapps space, which makes more sense in that any given app is essentially a configuration of a template and not a thing to be configured15:35
<ajs6f>Yeah, I'd agree with that. Now, @Q, like @Inject, comes from java.inject, not CDI.
I like CDI, but I'd be the first to admit that we shouldn't be using it right now.15:36
Maybe "a configuration of a template and not a thing to be configured" is a good way to get at what I meant about the difference between wiring config and config-for-specific-beans.15:37
* github-ff joins15:39
[fcrepo4] ajs6f pushed 1 new commit to master: http://git.io/gEiSWQ
fcrepo4/master 87ccd5a ajs6f: Created new FedoraEvent abstraction for: https://www.pivotaltracker.com/story/show/43519479
* github-ff leaves
* anusha joins15:41
<ajs6f>Ben, in LegacyMethod you've got some testing methods like testNodeTypes(). I've already put machinery for that in org.fcrepo.utils.FedoraTypesUtils, like isFedoraObject and the like. Any qualms about me factoring those out of your code to use the pre-existing ones?15:42
* anusha leaves15:43
<barmintor>ajs6f: nope
<ajs6f>Also, similarly, in org.fcrepo.utils.FedoraJcrTypes we have a bunch of constants like FEDORA_DATASTREAM = "fedora:datastream" and so forth. Mind if I factor those into the legacy JMS stuff to get rid of string literals?
<ajs6f>Cool. I'll do that.15:44
<barmintor>in fact, I celebrate the removal of inline literals
<ajs6f>With a perfectly curated beer, I hope? :)
<barmintor>I'm having a bad beer week, actually. Very disappointed in a bottle I waited a while to open.
eddies: did you hear that? sometimes I don't like them.15:45
<ajs6f>I hear you. I've had that experience with whiskey. It's why I try to drink as much as possible as fast as possible now.
<barmintor>On the one hand, these articles aren't convincing me yet. On the other, they suggest that this approach might offer a path to the drop-in rest resource goal.15:51
* github-ff joins
[fcrepo4] ajs6f pushed 1 new commit to master: http://git.io/7bcCWw
fcrepo4/master a734325 ajs6f: Slight factoring to use already-present utility methods
* github-ff leaves
<ajs6f>That's one of the things I've had in mind. I'll happily admit that these things just don't matter that much when we have the whole codebase in our hands. It's when we start, not just managing a single codebase, but guiding an ecosystem, that I think they'll really start to pay off. And maybe it's too soon to spend much time with them. I can't empahsize enough that I'm not going to cavil if we just chuck 'em out. I do think we should keep them on the radar15:54
Eddie has emphasized (rightly, I think) that we want a custom/extension module to be as easily added to a site's gear as possible. I think that getting the DI really, really, right is a big part of that. (Along with good module management, with I thikn OSGi will buy us most cheaply.)15:55
Okay, I've finished my last tix for this round. cbeer and barmintor can deliver or send them back as they find meet and proper.16:01
* ajs6f leaves16:07
* ajs6f joins16:11
k, jcoyne's fork is now re-un-forked to https://github.com/futures/fcrepo-jruby-admin16:17
<jcoyne>ajs6f: now can you fix my other PR?16:20
<ajs6f>What's that?
Spring is messed up somehow.16:21
This is null: https://github.com/jcoyne/fcrepo4/blob/service/fcrepo-legacy-api/src/main/java/org/fcrepo/api/legacy/service/FedoraService.java#L59
<ajs6f>I'm not going to merge that, jcoyne, but only because I have about thirty minutes left in the sprint and I'm not on again for several more weeks, so you don't want me reponsible for anything. Actually, I think cbeer ought to take a look at it because he introduced (rightly) those services.16:22
<jcoyne>But you're the spring guy!16:23
<ajs6f>Hardly. :) I'm the PONTIFICATOR! Haven't you been reading my endless diatribes for barmintor.
Seriously, Ill take a quick look and see if it's something I can spot.16:24
<barmintor>See the problem is that @Inject annotation...
* barmintor ducks
* jcoyne thinks it's nothing a RepositoryFactory couldn't fix16:25
<ajs6f>isn't getting used, becuse FedoraServer is nowhere set up in the Spring XML.
You can't ask Spring to inject something it doesn't know about.
You need to put FedoraService in as a bean somewhere.
<jcoyne>This isn't good enough: https://github.com/jcoyne/fcrepo4/commit/69114cf71b9b21b001d3b950fa5a0ab35d2eaf78#L1R4216:27
<ajs6f>ben— this is one place where CDI would be nice. You wouldn't have to worry about this kind of stuff with it in play. The container would introspect on the FedoraService class and the other code, and it would make te injection happen without any additional config.
What is that?
<jcoyne>final private FedoraService fedoraService = new FedoraService();16:28
<barmintor>jcoyne: Spring can't help you with beans you create
<jcoyne>so @Inject \n private FedoraService fedoraService;
<ajs6f>Right. And that's fine (just minting objects as you need them programmatically) as long as
<jcoyne>and then add FedoraService to spring.xml
<ajs6f>they're lightweight and have no dependencies of their own. FedoraService needs its own stuff.16:29
<ajs6f>Thank Ben. I'm just here to make an enterprise-ready nuisance of myself.
<barmintor>ajs6f: if he had annotated that with @Inject, would he actually need the bean in Spring's xml, or would Spring try to work it out from the classpath?16:30
this actually seems like a case when the annotations would be really helpful,since there's only one implementation16:31
<ajs6f>That's what he did, and Spring didn't do it. That's maybe a really good example of the difference between Spring-style and CDI-style. Spring can do that sort of thing (introspect on the type system) but only by using special Spring-specific XML config that scans given package names.
I agree, that's a case where there is really only one right way to wire it up, so what's the point of Justin having to screw around with the XML?16:32
Thats what I was trying to show off with the CDI branch kernel.
<barmintor>no, that's not what he did
he just had a private member
<barmintor>(I totally agree about the XML here)
<ajs6f>is where we started. I see the @Inject there.
<barmintor>Ah, I mean that *would* have been injected if the Datastream class had @Inject FedoraService16:34
my question is whether the container will require him to get into the xml if he marks the FedoraService as @Inject'ed
or whether magic will happen
<ajs6f>Oh… hm. I'm honestly not sure. I think you're asking whether Spring can trace a deendency relationship graph transitively through a bean it doesn't specifically instantiate and manage it self, right?16:35
I suspect not, but it might.
<barmintor>Yeah: If Spring makes a bean, and it looks up the injection properties and doesn't have a bean but has the class, will it fake it
<ajs6f>Right. I don't know. Like I said, I would be surprised.16:36
But there might be some Spring-specific config for making it do that knd of thing.
<barmintor>so is Spring not in the CDI branch at all?
<ajs6f>Not in the parts that work ( I didn't finish it).
I ran into, ironically neough, a problem that I think we've seen before.16:37
JAX-RS using a different component lifecycle than CDI.
<barmintor>How do you tell the container to start with the CDI stuff? Where's the "on" switch?
<ajs6f>When we saw it, it was JAX-RS using a diffferent compooent lifecycle than Spring.
I believe it depends a bit on the container. Unlike OSGi, there isn't (yet) a standard API for instantiating a framework, or at least I ahaven't run across it. For both Apache OpenWebBeans and JBoss Weld (the two I've tried)...16:38
the CDI framework _is_ the cntainer. You start them with a few lines of code, and they introspect on the types in the classpath and find any annotated (or default) classes, and wire it all up.16:40
With OSGI, it's a little different because you have the OSGi classpath management and lifecycle stuff to relate to.16:41
You typically don't even have to start the CDI BeanManager yourself.
CDI just inspects any bundle s for beans it can manage and gets to work.
It's that nice "scanning" thing we wanted out of JAX-RS.16:42
That's why I think it wuld be so nice for "drop-in" modules.
<barmintor>yeah, that's precisely what we wanted for REST resources16:43
<ajs6f>For the testing frameworks in the CDI branch (I tried using OWB and Weld in different places, just to see if CDI really _is_ vendor aganostic) it was pretty much that easy.
I used Pax Exam, which is a lightweight apparatus for in-container tests that handle OSGi frameworks, Web container, CDI containers, and JEE containers.
And I told it (via a single Maven dependenecy) "use OWB for you container" or "use Weld for your container".16:44
And again, the only problem I ran into was making sure that JAX-RS resources got properly managed by the CDI container and not by anything else (like RESTEasy's scan-and-instantiate" apparatus).16:45
People kept trying to steal my CDI beans!
That's why the CDI issue I wrote suggests we hang back and wait for JAX-RS this spring, which should align the component lifecycle models and straighten that crap out.16:46
* ajs6f leaves17:23
<barmintor>cbeer: is that gsearch config task finished?17:29
<cbeer>barmintor: sorry, been busy playing catch-up. i'll check now.17:30
<barmintor>cbeer: not a problem, just doing some housekeeping in pivotal
<cbeer>barmintor: i'm not seeing that stacktrace17:39
i'm not seeing docs in the index either.
<cbeer>seemingly they're still connected together
i guess i should up the logging, huh.17:43
or point the logging at a real file path.
<barmintor>I guess I could also pull the fcr3 artifacts for APIMMessage in as a test dep of that jms module, and actually test against that class17:44
<cbeer>oh, not your fault17:45
gsearch is validating PID formats
(which I would have known if it wasn't trying to log to somewhere deep in /Users/gert/)17:46
dk.defxws.fedoragsearch.server.errors.FedoraObjectNotFoundException: Tue Feb 19 22:46:52 GMT 2013 Fedora Object test:123 not found at gsearch_solr; nested exception is:17:47
Caused by: Object not found in low-level storage: test:123
at dk.defxws.fedoragsearch.server.GenericOperationsImpl.getFoxmlFromPid(GenericOperationsImpl.java:594)
i guess it really is trying to find FOXML on disk?
<cbeer>let me check that that's not in the xslt
<barmintor>No, it's not getting it from disk17:48
it's asking for it through the mgmt API
<cbeer>oh, it's an API call we don't have yet?
oh, or there's a mis-configuration17:49
<barmintor>it's calling the export api
<cbeer>ok. we don't have one of those, afaik
so.. where is it going to fcrepo 3...
ah, right there.
barmintor: SOAP API?17:50
<barmintor>it's going through a client
yeah, looks like the SOAP api
<cbeer>ok, so. we wired it in. that's enough to declare victory, right?17:51
it gets the JMS message
and tries to do something with it
<barmintor>yeah, I don't think it's our problem that it wants to use the soap api. I'd note it in the ticket and close it.17:52
<cbeer>you have to love the getBaseURL code17:53
strip the "/services" from the string. if it doesn't have "/services" that's an error.
<barmintor>It knows what it wants.
& it wants to be the one that strips "/services". Not you!17:54
* avessey leaves
* jcoyne leaves17:56
<cbeer>ok, well, i didn't touch clustering today either.17:58
guess i know what comes back next iteration.17:59
<barmintor>good god, these misbehaving app was last touched in 2006, and has a random shell script in the midst of a pile of JSPs with this in it:18:11
WEBINF=`pwd | sed 's|WEB-INF/.*|WEB-INF|'`
Did I shell out of a Servlet to get the path to the WEB-INF directory? Am I that immoral?18:12
<cbeer>developing in java is so much easier with a 2nd monitor.18:19
barmintor: in fcrepo-legacy-api, i assume there's a reason that org.apache.cxf:cxf-rt-frontend-jaxrs is a a test-scope dependency?18:25
it looks like I need to make it a real (compile? provided?) dependency so I can use multipart.Attachment in FedoraDatastreams18:26
<barmintor>cbeer: I totally believe you18:33
ok, time for home18:36
* barmintor leaves
* github-ff joins18:54
[fcrepo4] cbeer created batch-update-single-object (+1 new commit): http://git.io/AeJsoA
fcrepo4/batch-update-single-object c70656f Chris Beer: add a 'batch' change API endpoint, which accepts multipart posts and adds each part as a datastream using the content disposition name
* github-ff leaves
* github-ff joins18:55
[fcrepo4] cbeer opened pull request #22: Batch object datastream API endpoint (master...batch-update-single-object) http://git.io/Kvhkvw
* github-ff leaves
* cinch_ joins19:19
* cinch_ leaves19:20
* ff-pivotal joins19:22
* ff-pivotal leaves19:23
* ff-pivotal joins19:26
* ff-pivotal leaves
* ff-pivotal joins20:23
Chris Beer: Chris Beer added "test"20:24
* ff-pivotal leaves
* ff-pivotal joins
Chris Beer added comment: "asdf"20:25
<eddies>cbeer: hey, how'd you do that?21:05
(and morning all)21:06
<cbeer>eddies: pivotal has a webhooks API
so i stood up a sinatra app that parses it and pushes the description to IRC
i should add a url, maybe tomorrow.21:07
<ff-pivotal>Edwin Shin added comment: "cbeer++"
yes, some context would be good, but still, that's great
there's the message format
<cbeer>I expect to see great things tomorrow in time for iteration planning :P21:13
<eddies>ah, you can only have one activity web hook tho?21:14
<cbeer>guess so. feel free to take it over.21:15
* jcoyne joins22:00
* ff-pivotal2 joins22:01
* ff-pivotal2 leaves22:02
<jcoyne>So, do injectable properties have visibility requirements?22:07
* ff-pivotal2 joins22:08
Edwin Shin added comment: "whee"22:11
<eddies>jcoyne: i don't know...
* ff-pivotal2 leaves22:24
* ff-pivotal2 joins22:25
Edwin Shin added comment: "foo" http://www.pivotaltracker.com/services/v3/projects/684825/stories/43942687
<jcoyne>How does anybody program java:22:27
java.lang.NoSuchMethodError: javax.ws.rs.NotFoundException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status;)Ljavax/ws/rs/core/Response;
at javax.ws.rs.NotFoundException.<init>(NotFoundException.java:71) ~[javax.ws.rs-api-2.0-m10.jar:na]
Did Java just tell me to go fuck myself?22:29
<cbeer>basically. i think you're trying to request a REST resource that doesn't exist22:33
<jcoyne>I also find that tests that fail in mvn, work fine in eclipse.22:34
* ff-pivotal2 leaves22:35
* ff-pivotal2 joins
<jcoyne>Looks like it's calling /rest/describe/modeshape
<ff-pivotal2>Edwin Shin added comment: "foo bar" https://www.pivotaltracker.com/story/show/4473312522:36
<eddies>success :-P
now i need to make my coffee. thanks cbeer for distracting me enough from even getting my morning coffee ;-)
<cbeer>where's the pull request!?!
<jcoyne>cbeer: I'm pushing another commit to my PR that fixes the spring issue.
<eddies>pfft. i forked your repo. sec
<cbeer>(oh, and have you written tests and documentation? :P)
<jcoyne>cbeer: You have to pick it up and fix the last 5 errors.
Because I don't have a clue.22:38
<eddies>no good deed goes unpunished
cbeer: is your sinatra app deployed on your laptop (or something of that ilk) or somewhere more stable?22:41
(i just deployed mine to heroku)22:42
<cbeer>eddies: on a VPS, so stable enough.
<cbeer>good to know it works on heroku too22:43
<eddies>i was tempted to also get it to deploy to GAE, but really, i should busy myself with other things :-P22:45
* ff-pivotal2 leaves22:46
<eddies>ok. i killed mine. pull request issued. you'll need to update the web hook url—i conveniently forgot yours22:47
<cbeer>boo, rvmrc.
<eddies>i knew you'd love it22:48
i couldn't resist checking it in at the end for you =)
ok. i'm going to take the dog out and get some coffee
* ff-pivotal leaves22:53
<jcoyne>Every environment I test in yields different results.22:54
that's a bit annoying.
* ff-pivotal joins22:55
<jcoyne>Okay, I hate spring.23:09
Coding should not be done in XML.
Go and ruin a perfectly good statically typed language.
* jcoyne leaves23:26

Generated by Sualtam