Thursday, 2015-01-22

*** cemerick <cemerick!> has joined #immutant00:26
*** siksia <siksia!~siksia@unaffiliated/siksia> has joined #immutant00:36
*** audaxion <audaxion!~siksia@unaffiliated/siksia> has quit IRC (Ping timeout: 265 seconds)00:38
*** audaxion <audaxion!~siksia@unaffiliated/siksia> has joined #immutant00:41
*** siksia <siksia!~siksia@unaffiliated/siksia> has quit IRC (Ping timeout: 265 seconds)00:41
*** bbrowning_away is now known as bbrowning01:03
*** statonjr_ <statonjr_!> has quit IRC (Quit: statonjr_)01:12
*** cemerick <cemerick!> has quit IRC (Ping timeout: 246 seconds)01:27
*** statonjr <statonjr!> has joined #immutant01:53
*** bbrowning_ <bbrowning_!~bbrowning@redhat/jboss/bbrowning> has joined #immutant01:55
*** egli` <egli`!> has joined #immutant01:56
*** pdurbin1 <pdurbin1!> has joined #immutant02:06
*** jbossbot <jbossbot!~JBossBot@redhat/jbossbot> has quit IRC (Ping timeout: 264 seconds)02:06
*** egli <egli!> has quit IRC (Ping timeout: 264 seconds)02:06
*** bbrowning <bbrowning!~bbrowning@redhat/jboss/bbrowning> has quit IRC (Ping timeout: 264 seconds)02:06
*** pdurbin <pdurbin!> has quit IRC (Ping timeout: 264 seconds)02:06
*** bbrowning_ is now known as bbrowning02:10
*** cemerick <cemerick!> has joined #immutant02:12
*** bbrowning is now known as bbrowning_away02:32
*** cemerick <cemerick!> has quit IRC (Ping timeout: 252 seconds)02:34
*** cemerick <cemerick!> has joined #immutant03:22
*** jcrossley3-away <jcrossley3-away!> has joined #immutant04:11
projectodd-ciYippie, build fixed!05:13
projectodd-ciProject immutant2-incremental build #435: FIXED in 19 min:
*** marianoguerra <marianoguerra!~marianogu@> has joined #immutant05:16
*** marianoguerra <marianoguerra!~marianogu@emesene/grandpa/marianoguerra> has joined #immutant05:16
*** marianoguerra <marianoguerra!~marianogu@emesene/grandpa/marianoguerra> has quit IRC (Ping timeout: 245 seconds)05:25
*** qwerty_nor <qwerty_nor!> has joined #immutant06:03
*** qwerty_nor <qwerty_nor!> has quit IRC (Quit: qwerty_nor)06:27
*** je <je!> has joined #immutant06:43
*** je <je!> has quit IRC (Ping timeout: 256 seconds)07:04
*** cemerick <cemerick!> has quit IRC (Ping timeout: 265 seconds)07:14
*** marianoguerra <marianoguerra!~marianogu@> has joined #immutant07:18
*** marianoguerra <marianoguerra!~marianogu@emesene/grandpa/marianoguerra> has joined #immutant07:18
*** marianoguerra <marianoguerra!~marianogu@emesene/grandpa/marianoguerra> has quit IRC (Ping timeout: 244 seconds)08:13
*** galderz <galderz!~galder@redhat/jboss/galderz> has joined #immutant08:19
*** dm3 <dm3!> has joined #immutant08:22
*** je <je!> has joined #immutant08:29
*** dm3 <dm3!> has quit IRC (Remote host closed the connection)08:48
*** DomKM <DomKM!uid23709@gateway/web/> has quit IRC (Ping timeout: 272 seconds)08:50
*** michaniskin_ <michaniskin_!sid28312@gateway/web/> has quit IRC (Ping timeout: 272 seconds)08:52
*** dm3 <dm3!> has joined #immutant08:57
*** DomKM <DomKM!uid23709@gateway/web/> has joined #immutant09:03
*** michaniskin_ <michaniskin_!sid28312@gateway/web/> has joined #immutant09:05
*** galderz <galderz!~galder@redhat/jboss/galderz> has quit IRC (Quit: This computer has gone to sleep)09:33
*** pdurbin1 is now known as pdurbin11:21
*** dm3 <dm3!> has quit IRC (Remote host closed the connection)12:02
*** galderz <galderz!~galder@redhat/jboss/galderz> has joined #immutant12:04
*** dm3 <dm3!> has joined #immutant12:21
*** bbrowning_away is now known as bbrowning12:25
*** egli` is now known as egli12:34
*** cemerick <cemerick!> has joined #immutant13:05
*** tcrawley-away is now known as tcrawley13:05
*** tcrawley is now known as tcrawley-away13:23
*** cemerick <cemerick!> has quit IRC (Ping timeout: 265 seconds)13:41
*** jbossbot <jbossbot!~JBossBot@redhat/jbossbot> has joined #immutant13:42
*** _kardan <_kardan!> has joined #immutant13:48
*** _kardan <_kardan!> has quit IRC (Client Quit)13:52
*** je <je!> has quit IRC (Ping timeout: 244 seconds)14:04
*** cemerick <cemerick!> has joined #immutant14:08
*** jcrossley3-away is now known as jcrossley314:25
*** lance|afk is now known as lanceball14:28
*** cemerick <cemerick!> has quit IRC (Ping timeout: 256 seconds)14:28
*** cemerick <cemerick!> has joined #immutant14:44
*** conan_ <conan_!> has joined #immutant14:44
*** dm3 <dm3!> has quit IRC (Remote host closed the connection)14:49
*** dm3 <dm3!> has joined #immutant14:56
*** tcrawley-away is now known as tcrawley15:10
tcrawleyjcrossley3: I realized this morning that compujure uses path-info to route, so would hit that reflection on every request15:18
tcrawleymaybe we can get utow to expose context and path-info to us15:18
tcrawleywrt servlets - getting it from the session didn't work?15:18
jcrossley3i was going to look at getting around the ref on the servlet side today15:18
jcrossley3i'm also struggling with :context and :path-info being present in the request map at all outside the container, tbh15:19
jcrossley3they're not there in ring15:19
jcrossley3but i don't think any other adapters have a :path option15:20
tcrawleythe struggle is "should they be there"?15:20
jcrossley3and should :path be there15:20
tcrawleyI like path. I like being able to deploy different middleware stacks15:21
tcrawleyI can see value in that15:21
jcrossley3handlers are just fn's. there's not a whole lot of difference between defroutes and our :path option15:21
jcrossley3middleware is an exception, but you could do it with defroutes as well15:21
tcrawleyI guess you could (GET "/foo" [] (with-params handler)), yeah15:22
jcrossley3the args for GET are very flexible15:22
tcrawleywhat's the downside to having them out of container (other than the current reflection)?15:22
jcrossley3perhaps confusingly so15:22
tcrawleyI have to keep reminding myself that that reflection is only for websocket upgrade requqests15:23
tcrawleywhich are designed to generate a long-lived connection, so a perf hit may be acceptable15:23
jcrossley3and compojure won't see it15:23
jcrossley3so i doubt the ref ever gets triggered15:24
tcrawleycompojure does see it, because it's middleware, and we call the full handler stack on an upgrade15:24
jcrossley3helping {blank} on #clojure the other night is what triggered my trepidation about context/path-info out of the container15:25
jcrossley3he had things working out but not on wildfly. if he had been using the deuce, he wouldn't have had things working out, either. :)15:25
tcrawleycan we detect the case where there is only one handler at /, and leave them out in that case?15:26
jcrossley3but that's gross15:27
jcrossley3the other tradeoff i noticed is that our delayed map creates a bunch of nil-valued entries15:28
jcrossley3i guess that's not terrible, but a little odd15:28
jcrossley3tcrawley: i imagine stuart will be fine exposing whatever we need in undertow15:31
*** jcrossley3 <jcrossley3!> has quit IRC (Quit: ERC Version 5.3 (IRC client for Emacs))15:39
*** jcrossley3 <jcrossley3!~user@redhat/jboss/jc3> has joined #immutant15:40
jcrossley3tcrawley: create-endpoint is no longer used?15:53
tcrawleycorrect - we don't use it anywhere. we need to decide if we still want to expose it at all15:54
jcrossley3what replaced it?15:54
tcrawleyit was only used by the old wrap-websocket, and now we use a DelegatingJavaxEndpoint from wboss15:55
jcrossley3i c15:56
tcrawleyspeaking of javax endpoints, we have a bug where endpoints attached to servlets that are on subpaths don't work (web/run foo :path "/foo")15:57
tcrawleyI don't think we tested any that weren't at :path "/"15:57
tcrawleywe may not be giving the endpoint config the correct path15:57
tcrawleydebugging now15:58
jcrossley3i know that used to work, because the demo does that16:08
jcrossley3i think the integs do that, too16:08
tcrawleywhere does the demo do that?16:09
tcrawleythere's only one web/run in there, with no :path option16:09
tcrawleyah, it would use a path if you passed :path as an arg to web/-main16:10
tcrawleydo we ever do that?16:10
jcrossley3i thought you meant at a context, which would be the case deploying the demo as a war to wildfly16:12
tcrawleyah, no. a subcontext16:13
tcrawleyI found the issue16:13
*** bbrowning is now known as bbrowning_away16:14
tcrawleyWF doesn't expect there to be a / at the end of the endpoint path16:14
tcrawleyand we provide one16:14
jcrossley3did we used to?16:15
jcrossley3should prolly add an integ for that16:15
tcrawleyyes, that code hasn't changed (in add-endpoint)16:15
jcrossley3cuz it's easy to get wrong16:15
tcrawleyI have integs that test it now16:15
jcrossley3that stuff is brittle16:16
tcrawleywhich is how I found it :)16:16
tcrawleythey test it indirectly, just because I'm trying to ws on ! /16:16
tcrawleywait, do you now call /dump with ws?16:17
tcrawleyah, that's the issue. requesting /dump will work, /dump/ will not16:18
tcrawleyI'm requesting /cdef/ instead of /cdef in my test16:18
tcrawleyseems like the trailing slash *should* work, so I think this is still a bug16:18
tcrawleydo you agree?16:18
jcrossley3tcrawley: yes16:24
jcrossley3actually, i don't know, tbh16:25
jcrossley3for example,
tcrawleythis is all inside WF, before it gets to our code16:27
tcrawleywe may be able to register the same endpoint under both paths16:28
tcrawleyor not support connecting with a trailing slash outside the container, to be consistent16:28
jcrossley3i don't recommend googling for "http trailing slash" :)16:30
tcrawleynow I'm scared16:30
jcrossley3lots of opinion, none supported by any kind of rfc16:30
jcrossley3seems most important wrt relative paths, which are probably irrelevant for ws16:31
tcrawleyhere's the relevant code from WildFly:
tcrawleythe code where it gets the path to compare against, that is16:32
jcrossley3we turn :path-info to "/" if getPathInfo returns nil to match ring, but i always feel queasy doing it16:33
jcrossley3might be wrong?16:33
tcrawleypathInfo in this case is /, and this is before any of our code gets called anyway16:35
*** galderz <galderz!~galder@redhat/jboss/galderz> has quit IRC (Quit: Leaving)16:36
tcrawleywe don't match on path for upgrades outside the container, the ring handler does the matching for us16:37
tcrawleyany request at that context (path-info or no) triggers the upgrade, which calls in to ring16:38
tcrawleyand if the handler routes to something that calls as-channel, then we're all good16:38
tcrawleyI'm tempted to make /foo/ work in container as ewll16:38
*** lanceball is now known as lance|afk16:39
jcrossley3tcrawley: i concur16:43
tcrawleycoolio, I'll fix that up after lunch16:43
*** tcrawley is now known as tcrawley-away16:44
*** dm3_ <dm3_!> has joined #immutant17:10
*** dm3 <dm3!> has quit IRC (Ping timeout: 240 seconds)17:13
*** dm3_ <dm3_!> has quit IRC (Ping timeout: 245 seconds)17:14
*** jcrossle_ <jcrossle_!> has joined #immutant18:08
*** jcrossley3 <jcrossley3!~user@redhat/jboss/jc3> has quit IRC (Ping timeout: 255 seconds)18:10
*** jcrossle_ is now known as jcrossley318:10
*** galderz <galderz!~galder@redhat/jboss/galderz> has joined #immutant18:30
*** galderz <galderz!~galder@redhat/jboss/galderz> has quit IRC (Client Quit)18:31
*** cemerick <cemerick!> has quit IRC (Ping timeout: 245 seconds)18:45
*** je <je!> has joined #immutant19:18
*** dm3 <dm3!> has joined #immutant19:29
*** bbrowning_away is now known as bbrowning19:39
*** lance|afk is now known as lanceball19:44
*** tcrawley-away is now known as tcrawley19:55
*** cemerick <cemerick!> has joined #immutant19:56
jcrossley3tcrawley: we'll never be able to get host and port from the handshake's requestURI, since that will only ever contain the path19:59
jcrossley3if we want host and port, i think our best shot is to use the origin header19:59
tcrawleyyeah, maybe so20:00
jcrossley3it's really odd that the HandshakeRequest doesn't contain ServletRequest-ish attributes20:00
jcrossley3it's not a well-defined api20:01
tcrawleyagreed, it's kinda cruddy20:01
jcrossley3but we may be asking too much by expecting to form a ring request map from it20:01
jcrossley3i'm creating a DelegatingHandshakeRequest to get around the reflection20:02
*** mgoldmann is now known as mgoldmann|away20:02
*** audaxion <audaxion!~siksia@unaffiliated/siksia> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)20:24
tcrawleyjcrossley3: dammit. according to, "path - The URI or URI template where the endpoint will be deployed. A trailing "/" will be ignored and the path must begin with /.".20:42
jbossbotTitle: ServerEndpointConfig.Builder (Java(TM) EE 7 Specification APIs)20:42
tcrawleyso we can't deploy another endpoint at /20:42
jcrossley3wait, what?20:42
tcrawleyat /foo/, that is20:43
tcrawleywe can do /foo20:43
tcrawleywhich is what we do now20:43
jcrossley3so /foo == /foo/ ?20:44
jcrossley3is that bad?20:44
tcrawley /foo == /foo/ when you register the endpoint, but not when you do ws://server/foo/20:45
tcrawleyhitting /foo/ will not find the endpoint registered at /foo20:45
tcrawleyand you can't register an endpoint at /foo/, so all we can do is say "don't do ws:///foo/20:45
jcrossley3well, you can register at /foo/, but you must connect to it at /foo, right?20:46
tcrawleyyou can try to register at /foo/, but it strips the last / for you20:47
tcrawleyif you register at both, it throws, complaining about two endpoints mapped to /foo20:47
jcrossley3why do we care about this again?20:48
tcrawleybecause outside the container, ws: to /foo/ and /foo both work20:48
tcrawleyinside the container, the upgrade handler is never triggered for /foo/20:48
tcrawleyso it breaks your code in a hard to debug way when you move to the container20:49
jcrossley3define "work"20:49
jcrossley3two unique handlers mapped simultaneously?20:49
jcrossley3at /foo/ and /foo?20:49
tcrawleyoutside the container, they map to the same handler20:49
jcrossley3but i can register two unique ones?20:50
jcrossley3or last one wins?20:50
tcrawleyactually, what happens is we have a utow upgrade handler at /foo. It gets the request, and calls in to your ring handler20:50
tcrawleythe ring handler calls the appropriate route (or just the base ring handler when not using compojure, et. al.)20:52
tcrawleybut before calling in to ring, :websocket? true is set in the request20:52
jcrossley3i'm confused about what results from my registering two handlers, one on /foo and one on /foo/20:52
tcrawleyso whatever ring handler gets the request gets to create the ws20:53
tcrawleyI don't know what happens currently if you register a handler at /foo and /foo/20:53
tcrawleybut that's not the current issue20:53
tcrawleyif you say (web/run handler :path "/foo"), you can ws:///foo/ and ws:///foo outside the container, but only ws:///foo inside20:54
tcrawleythat's the issue I'm trying to resolve20:54
tcrawleyand it works because utow triggers the upgrade handler for every request that passes through /foo (where /foo/ is really /foo + :path-info /)20:55
tcrawleybut inside wildfly, it looks for a ws endpoint under /foo/ (or /foo/bar, or whatever), but can't find it, since it's under /foo *only*20:56
tcrawleyI wonder if that's to spec, or is a WF bug?20:56
jcrossley3it seems like connecting to ws:///foo/ is wrong20:57
jcrossley3this is also making me more uneasy about path-info being / when nil20:57
jcrossley3cuz if we didn't do that, maybe it would work?20:58
tcrawleydefine "it" there - in container /foo/ would work? or out of container /foo/ would fail?20:58
tcrawleybecause in-container, all this happens well before any of our code gets called, so whatever we put in the ring map makes no diff here20:58
jcrossley3the latter21:00
jcrossley3/foo/ would fail21:00
tcrawleylet me find out21:00
jcrossley3actually, for that uri, i would think path-info *should* be /21:01
tcrawleyah, yeah, it would be21:02
tcrawleyso it wouldn't make a difference21:02
tcrawleyI think I can easily change our utow ws support to reject ws requests to ! /foo21:02
tcrawleybut that would mean only the / route under compojure could call as-channel and create a ws21:03
jcrossley3as opposed to what?21:03
tcrawleysay I have (defroutes (GET "/" [] calls-as-channel) (GET "/bar" [] also-calls-as-channel)), then have (web/run the-above :path "/foo")21:05
jcrossley3so ws requests for "/foo" and "/foo/bar" should work?21:06
tcrawleyoutside the container, ws:///foo/bar calls also-calls-as-channel inside an upgrade handler. inside the container, the endpoint is mapped to /foo, so ws:///foo/bar will not trigger the endpoint at all21:06
tcrawleyso if we try to make out work like in, then ws:///foo/bar will be rejected as well21:07
tcrawleyso that second handler-fn (at /bar) could never generate a ws21:07
tcrawleyif we could register an endpoint at /foo/bar in-container, it would work21:07
tcrawleybut we have no way to know we should do that21:07
tcrawleybecause that's all inside compojure21:08
tcrawleywait, it looks like path can be a "URI template"21:09
tcrawleyif that has wildcards, we may be cooking21:09
tcrawley(for EndpointConfig$Builder.create)21:09
jcrossley3you're hurting my head21:09
tcrawleyjoin the club :)21:09
*** dm3 <dm3!> has quit IRC (Remote host closed the connection)21:14
jcrossley3tcrawley: sanity check21:33
tcrawleylay it on me21:33
jcrossley3wtf should :context be when the app is deployed in foo.war and (web/run h :path "/bar")?21:34
tcrawleycontext is /foo/bar21:34
jcrossley3how in the21:34
tcrawleybecause as far as the ring handler is concerned, that is the context21:35
jcrossley3i have no fucking idea how to obtain that for the upgrade :)21:37
jcrossley3none, zip, zilch, zero21:37
tcrawleyhow do we get it for !upgrade?21:37
tcrawleyis this in or out?21:37
jcrossley3from the ServletRequest21:37
jcrossley3but out is no picnic atm21:38
tcrawleyaren't you reflecting the ServletRequest?21:39
jcrossley3only because undertow's impl happens to make it available.21:39
jcrossley3the servlet api does not21:39
jcrossley3and by "make it available" i mean there's an instance member i can reflect21:40
jcrossley3i thought it'd be enough to use ServletContext, which i have.21:40
jcrossley3but it lacks the "getServletPath" of ServletRequest21:40
tcrawleydoes that give you at least /foo?21:40
tcrawleywe know /bar when we register the endpoint21:41
jcrossley3we do?21:41
jcrossley3i don't think we do21:41
tcrawleyweb/run knows it, which calls create-servlet, which calls add-endpoint21:42
tcrawleywe just have to pass it along21:42
tcrawleyactually, create-servlet does:  (let [mapping (-> context (.getServletRegistration (.getServletName this)) .getMappings first)]...)21:44
tcrawleyis /bar in there somewhere?21:44
tcrawleyhey, it is21:44
tcrawleythat *is* /bar21:44
jcrossley3i'm confused21:45
tcrawleyeach web/run call registers a servlet, right?21:46
tcrawleyright, but that's what we're trying to solve atm21:46
tcrawleyso we know inside create-servlet what the path for that servlet (/bar here)21:46
jcrossley3i'm confused by both the servlet and the endpoint sharing the same path21:47
tcrawleythat's how it works21:47
tcrawleythe endpoint is really just a servlet filter21:47
tcrawleywe just need to close over that path in the upgrade handler21:47
jcrossley3so the endpoint's path isn't resolved relative to the servlet's?21:48
tcrawleynope, it's at the same level21:49
tcrawley is how the ws filter determines the path to look at for the endpoint21:49
jcrossley3but we don't expose that21:49
tcrawleywe don't expose what?21:49
jcrossley3we don't expose the ability to map the endpoint's path to something other than the servlet's21:50
tcrawleybecause you can't, really21:51
tcrawleysince it looks at the servletPath to find the endpoint21:51
tcrawleyso they can't be different21:51
jcrossley3along those same lines, it's possible what's fucking you up is line 232 of servlet.clj21:51
jcrossley3path (if (empty? path) "/" path)]21:52
tcrawleyno, I already considered that. in the case I'm dealing with, path is never empty, but is /foo21:52
*** audaxion <audaxion!~siksia@unaffiliated/siksia> has joined #immutant21:58
*** marianoguerra <marianoguerra!> has joined #immutant22:03
*** marianoguerra <marianoguerra!> has quit IRC (Changing host)22:03
*** marianoguerra <marianoguerra!~marianogu@emesene/grandpa/marianoguerra> has joined #immutant22:03
*** GitHub87 <GitHub87!~GitHub87@> has joined #immutant22:05
GitHub87[wunderboss] jcrossley3 pushed 1 new commit to master:
GitHub87wunderboss/master 08f73c7 Jim Crossley: A HandshakeRequest that can fill more of a Ring request map [IMMUTANT-521]22:05
*** GitHub87 <GitHub87!~GitHub87@> has left #immutant22:05
jbossbotTitle: A HandshakeRequest that can fill more of a Ring request map [IMMUTANT-52... · 08f73c7 · projectodd/wunderboss · GitHub22:05
jbossbotjira [IMMUTANT-52] The default value for :singleton should be true for daemons and jobs [Closed (Done) Enhancement, Major, Jim Crossley]
jbossbotjira [IMMUTANT-521] Add API for async channels [Open (Unresolved) Feature Request, Major, Unassigned]
*** marianoguerra <marianoguerra!~marianogu@emesene/grandpa/marianoguerra> has quit IRC (Ping timeout: 276 seconds)22:10
projectodd-ciProject wunderboss-incremental build #181: SUCCESS in 9 min 12 sec:
projectodd-ciJim Crossley: A HandshakeRequest that can fill more of a Ring request map [IMMUTANT-521]22:14
jbossbotjira [IMMUTANT-521] Add API for async channels [Open (Unresolved) Feature Request, Major, Unassigned]
jodarodang it22:17
jodaroi've been trying to deploy a jar to wildfly for like 15 minutes and wondering wtf it won't start22:18
jcrossley3and then you renamed it war?22:20
*** je <je!> has quit IRC (Ping timeout: 264 seconds)22:22
jodarocan i just rename it?22:22
jbossbotgit [immutant] push thedeuce e11dba8.. Jim Crossley Remove reflection in-container for ws upgrades [IMMUTANT-521]22:22
jbossbotgit [immutant] push thedeuce URL:
jbossbotjira [IMMUTANT-521] Add API for async channels [Open (Unresolved) Feature Request, Major, Unassigned]
jodaroor does it need to be built differently?22:22
jcrossley3yeah, it needs to be built by the lein-immutant plugin22:23
jodaronow it jfws22:23
jodaroi've had one of those days where i pretty much fucked up everything i tried22:24
jcrossley3me too :(22:24
*** bbrowning is now known as bbrowning_away22:32
projectodd-ciProject immutant2-incremental build #436: SUCCESS in 21 min:
projectodd-ciJim Crossley: Remove reflection in-container for ws upgrades [IMMUTANT-521]22:44
jbossbotjira [IMMUTANT-521] Add API for async channels [Open (Unresolved) Feature Request, Major, Unassigned]
*** tcrawley is now known as tcrawley-away22:54
*** siksia <siksia!~siksia@unaffiliated/siksia> has joined #immutant22:57
*** audaxion <audaxion!~siksia@unaffiliated/siksia> has quit IRC (Ping timeout: 265 seconds)23:01
*** jcrossle_ <jcrossle_!> has joined #immutant23:32
*** jcrossley3 <jcrossley3!> has quit IRC (Ping timeout: 256 seconds)23:36
*** jcrossle_ is now known as jcrossley323:37
*** cemerick <cemerick!> has quit IRC (Ping timeout: 252 seconds)23:56

Generated by 2.9.2 by Marius Gedminas - find it at!