This version (2017/05/27 13:44) is a draft.
Approvals: 0/1

[09:34:22] <temporal_> voidDotClass for decoding ?

[09:35:20] <voidDotClass> yeah, but i already did it via jackson temporal_ , but it was a pita, so i just read it line by line and loaded into jsonobj

[09:35:45] <temporal_> is it for http ?

[09:36:12] <temporal_> I know some project provides push based style json parsing

[09:36:30] <temporal_> but usually it does not create object

[09:36:41] <temporal_> because such impl wants to avoid to hold the full object in memory

[09:36:53] <temporal_> and they just want to parse the structure and get info from it

[10:15:25] <aesteve> hi everyone; hi temporal_

[10:15:32] <temporal_> hi aesteve

[10:15:49] <temporal_> how are you doing ?

[10:15:59] <aesteve> fine thanks, and you ?

[10:16:24] <temporal_> doing good, cooking a boeuf bourguignon :-)

[10:16:47] <aesteve> nice one !

[10:18:12] <aesteve> so let me know about http2, what do you expect ? :)

[10:18:36] <temporal_> there are some existing demo with http2 server

[10:18:49] <temporal_> it would be a good idea to port them with vertx http server

[10:19:00] <temporal_> basically they feature latency improvements

[10:19:14] <temporal_> the example I showed you is the classic one

[10:19:20] <temporal_> it shows a tile

[10:19:23] <temporal_> tiled image

[10:19:36] <temporal_> that appears faster with http2 because of multiplexing

[10:20:41] <temporal_> I tried a browser with current http2 and I've been able to make work an hello world at least :-)

[10:21:48] <aesteve> ok so I checkout the http2 branch, mvn install locally, then create a simple server serving a static resource

[10:22:19] <temporal_> yes

[10:22:24] <aesteve> together with a standard http server serving the same resource (on a different port)

[10:22:27] <temporal_> to see how to create an http2 server

[10:22:35] <aesteve> then access both using a browser

[10:22:40] <temporal_> look at the Http2Test class

[10:22:44] <temporal_> it's quite simple

[10:22:45] <aesteve> ok

[10:22:55] <temporal_> however there is one thing you need to know

[10:23:00] <temporal_> that is not in Http2Test class

[10:23:11] <temporal_> you need at the moment Jetty ALPN jar on the bootclasspath

[10:23:20] <temporal_> and use the jar version that suits your JDK

[10:23:45] <temporal_>

[10:23:52] <temporal_> ${alpn-boot-version}

[10:23:55] <temporal_> depends on your JDK

[10:24:05] <temporal_> (so the current one in this branch is for my JDK)

[10:24:50] <temporal_> so I would advice first to make a simple project that does an http2 hello world with a browser

[10:24:58] <temporal_> then tweak it to make demos

[10:25:12] <aesteve> ok

[10:25:29] <temporal_> in tests I'm using

[10:25:30] <temporal_> TLS_RSA_WITH_AES_128_CBC_SHA

[10:25:32] <temporal_> don't use it

[10:25:38] <temporal_> browser won't accept it

[10:26:06] <temporal_> I use it because it allows to decipher the connection easily in wireshark

[10:26:19] <temporal_> so just remove this line

[10:26:34] <temporal_> once we have this working, perhaps we could look at doing more evolved demos

[10:26:38] <temporal_> like push promise

[10:26:55] <aesteve> ok

[10:26:59] <aesteve> do I need https ?

[10:27:06] <temporal_> always

[10:27:07] <aesteve> (the jks etc. stuff )

[10:27:10] <temporal_> specially with browser

[10:27:19] <temporal_> http2 can be in cleartext (h2c)

[10:27:25] <temporal_> but browser won't support it

[10:27:43] <aesteve> ok

[10:28:36] <temporal_> if you need you can debug http2 in browser more easily than in test

[10:28:41] <temporal_> with the keylogfile

[10:28:54] <temporal_> with wireshark

[10:29:09] <temporal_> basically there are two ways to see the traffic with wireshark

[10:29:15] <temporal_> either use a keylogfile

[10:29:21] <temporal_> that browser support

[10:29:24] <temporal_> however JDK does not

[10:29:38] <temporal_> so it needs to use a private key with a non Diffie Helman cipher

[10:29:49] <temporal_> (which is what I do for unit tests)

[10:30:00] <temporal_> but normally it should work OOTB (it did for me)

[10:30:48] <aesteve> wow that sounds complicate :\

[10:31:19] <temporal_> it's not :-)

[10:31:22] <temporal_> I said it should work OOTB

[10:31:30] <temporal_> I don't want to confuse you :-)

[10:31:48] <aesteve> let's try OOtB then

[10:32:16] <aesteve> mvn install -DSkipTest for now, I'll setup a gradle project in the meantime

[10:32:24] <temporal_> ok

[11:50:14] <aesteve> ok temporal_ I got something kinda running, but still not http2 : (Sending GOAWAY failed: ….)

[11:50:48] <aesteve> it's here : , I'll dig more in details after lunch. Bon app[unknown:eacute]tit

[11:56:01] <temporal_> bon app[unknown:eacute]tit

[11:56:19] <temporal_> keep in mind that you are the first to use vertx http2 outside of unit tests :)

[12:00:23] <temporal_> aesteve you don't need to use findFileOnClasspath

[12:00:35] <temporal_> if you specify directly the resource in classpath it should work

[12:00:44] <temporal_> (and unit tests should not find these on the classpath too)

[12:00:57] <temporal_> so just doing setPath(“tls/server-keystore.jks”); will work

[12:24:25] <aesteve> Indeed ! cool that's less useless code

[12:24:53] <aesteve> And np, I know I'm trying an experimental feature :)

[12:33:04] <aesteve> Mmmh only thing I found is :

[12:33:12] <aesteve> but it's a programmatic client, not a browser

[12:33:26] <aesteve> looks like it's my browser sending things Netty doesn't agree with

[12:33:38] <aesteve> GRAVE: Sending GOAWAY failed: lastStreamId '0', errorCode '1', debugData 'HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: '. Forcing shutdown of the connection.

[13:01:27] <temporal_> go away is sent by browser ?

[13:02:17] <aesteve> I don't think so. I guess it's sent by netty

[13:02:33] <aesteve> f[unknown:eacute]vr. 21, 2016 12:55:48 PM io.netty.handler.codec.http2.Http2ConnectionHandler processGoAwayWriteResult

[13:02:33] <aesteve> GRAVE: Sending GOAWAY failed: lastStreamId '0', errorCode '1', debugData 'HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: '. Forcing shutdown of the connection.

[13:02:46] <aesteve> not sure actually… “processGoAwayWriteResult”

[13:04:14] <aesteve> nothing special within Chrome's network tab. It doesn't show me any negociation

[13:11:27] <aesteve> temporal_: do I need : server = vertx.createHttpServer(serverOptions.setHttp2Settings(VertxHttp2Handler.toVertxSettings(settings)));

[13:11:53] <aesteve> because for now I didn't use any http2Settings, is there any default ?

[14:06:56] <aesteve> temporal_ : got the same error with Firefox developper edition

[14:07:10] <aesteve> I'll give chrome:net-internals a try [14:44:02] <aesteve> mmh temporal_ it seems to work with the go client ( “h2c”) [14:44:42] <aesteve> Maybe Chrome is using SPDY or something ? :\ [15:04:08] <temporal_> aesteve can you use wireshark along with keylogfile ? [15:04:35] <aesteve> I haven't tried yet [15:04:43] <temporal_> [15:04:53] <temporal_> then you can figure out what happens precisely over the wire :-) [15:05:08] <aesteve> just because when I set the CipherSuite as server option Chrome denies it [15:05:34] <aesteve> yep, problem is : nothing will happen [15:06:03] <aesteve> if you try the Http2Test code in a Chrome you'll see what I mean [15:06:24] <temporal_> ok [15:06:29] <temporal_> I tried and it worked for me [15:06:33] <temporal_> but I'll try your :-) [15:06:38] <temporal_> with chomr [15:06:40] <temporal_> chrome [15:06:49] <aesteve> Oh so I did something wrong [15:06:51] <temporal_> I need to go out now, will try later [15:06:58] <aesteve> ok [15:07:58] <temporal_> how do you run your case ? [15:08:06] <temporal_> I see a verticle [15:08:20] <temporal_> gradle run ? [15:08:34] <aesteve> idd [15:08:55] <aesteve> but careful I don't have the same apnl version as yours [15:08:57] <temporal_> what's your jdk version ? [15:08:59] <temporal_> yeah…. [15:09:01] <aesteve> u74 [15:09:11] <temporal_> I do have 1.8.0_66 [15:09:14] <temporal_> I'll update it [15:09:43] <aesteve> by default with my script, it'll look for the apnl jar within your local maven repo [15:09:49] <temporal_> ok [15:09:58] <aesteve> and throw an exception if it doesn't exist [15:11:30] <aesteve> when I set addEnabledCipherSuite(“TLS_RSA_WITH_AES_128_CBC_SHA”) I get : ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY in Chrome [18:31:31] <temporal_> aesteve I have hello world running however iget also this log [18:31:31] <temporal_> SEVERE: Sending GOAWAY failed: lastStreamId '0', errorCode '1', debugData 'HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: '. Forcing shutdo [18:31:36] <temporal_> will investigate [18:31:48] <temporal_> TLS_RSA_WITH_AES_128_CBC_SHA is expected to fail [18:31:52] <temporal_> with browsers [18:31:59] <aesteve> yeah I was guessing so [18:33:18] <temporal_> aesteve how can I run debug with gradlew run [18:33:31] <temporal_> export JAVA_OPTS ? [18:33:49] <aesteve> I never tried, I always debug in the IDE [18:33:56] <aesteve> with a custom run configuration [18:33:59] <temporal_> seems to work [18:34:20] <aesteve> what did you do precisely ? [18:34:48] <temporal_> actually no [18:34:54] <temporal_> what is being debugged in gradle itself :-) [18:35:04] <temporal_> export JAVA_OPTS=“-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005” [18:35:13] <temporal_> I think it should be in the run task [18:35:38] <aesteve> but but you want to set breakpoints in your IDE, right ? [18:35:59] <temporal_> yes [18:36:06] <temporal_> I'm going to try gradle –debug-jvm run [18:37:00] <aesteve> I never tried such a thing :D I always reflect the gradle run (i.e. io.vertx.core.Launcher stuff) in my IDE's run config. Let me know if you find somthing interesting, I'm interested [18:37:18] <temporal_> I think it's the favicon [18:37:24] <temporal_> gradle run –debug-jvm [18:37:32] <temporal_> that makes this go away [18:37:37] <temporal_> not sure [18:37:49] <temporal_> because it happens only fiurst time [18:37:52] <temporal_> if I refresh it does not [18:38:34] <aesteve> that would make sense since h2c doesn't complain (and probably doesn't fetch favicon) [18:38:55] <aesteve> but what I was more worried about [18:39:22] <aesteve> is that chrome:net-internals didn't show localhost as an http2 session

[18:40:30] <temporal_> ah

[18:40:57] <aesteve> I'll try something new

[18:42:31] <aesteve> mmmh

[18:42:43] <temporal_> go away seems to be sent when channel becomes inactive

[18:42:46] <aesteve> that's probably net-internals that is crazy

[18:42:48] <temporal_> it may be a netty bug

[18:43:14] <aesteve> because with

[18:43:18] <temporal_> but you have hello world displayed right ?

[18:43:21] <aesteve> it shows the small indicator

[18:43:25] <aesteve> yep

[18:43:29] <temporal_> ok

[18:43:36] <temporal_> perhaps you should try to display a simple web page

[18:43:37] <temporal_> with resources

[18:43:48] <temporal_> like a couple of css

[18:43:48] <temporal_> with vertx web

[18:43:56] <aesteve> I'll try to

[18:44:28] <aesteve> that's pretty cool because I expected to set “http2” somewhere, and I did not

[18:44:47] <aesteve> so for the end user that's gonna be completely transparent, nice

[18:47:48] <temporal_> so this happen because of a broken pipe

[18:53:25] <aesteve> ouch

[18:53:25] <temporal_> with safari I don't get this behavior

[18:53:47] <aesteve> [ERROR] The project (/Users/arnaud/git/vertx-web/vertx-template-engines/pom.xml) has 1 error

[18:53:47] <aesteve> [ERROR] Non-parseable POM /Users/arnaud/git/vertx-web/vertx-template-engines/pom.xml: unexpected character in markup < (position: END_TAG seen …<module>vertx-web-templ-thymeleaf</module>\n«… @37:3) @ line 37, column 3 → [Help 2]

[18:53:52] <temporal_> thing seems still in flux with http2, so I would not worry right now about such things

[18:54:03] <temporal_> in flux with netty

[18:54:47] <aesteve> nvm a failed merge

[18:58:27] <aesteve> mmh I got an issue while installing vertx-web locally

[18:58:51] <aesteve> it looks for vertx-core:tests (and doesn't find it)

[19:06:03] <aesteve> guess I need a maven expert on this one. I assume mvn install doesn't install the 'test' jar if tests aren't run ?

[19:13:03] <aesteve> temporal_ I think I can't use vertx-web

[19:13:24] <aesteve> it doesn't compile against the 3.3.0-SNAPSHOT http2

[19:13:40] <aesteve>[15,1] io.vertx.ext.web.impl.HttpServerRequestWrapper is not abstract and does not override abstract method promisePush(io.vertx.core.http.HttpMethod,java.lang.String,io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpServerResponse») in io.vertx.core.http.HttpServerRequest

[19:13:59] <aesteve> maybe vertx-web needs an http2 branch, too

[19:20:32] <aesteve> actually that's not hard to implement it's just a matter of delegate

[19:26:18] <temporal_> I can define for now a default method

[19:26:26] <temporal_> so we don't need a branch for vertx-web

[19:27:00] <aesteve> I'm fixing stuff manually for now :)

[19:27:12] <aesteve> (and putting SockJS on @Ignore, too)

[19:27:55] <aesteve> ok I built vertx-web, let's try to play with http2 and static resources, now

[19:35:58] <aesteve> yikes temporal_ :D

[19:36:09] <aesteve> won't be able to test a lot of things :P

[19:36:11] <temporal_> ah yes

[19:36:13] <temporal_> sendfile :-)

[19:36:24] <temporal_> I can give a try to sendfile

[19:36:36] <aesteve> that'd allow me to test images and stuff

[19:36:39] <temporal_> yes

[19:36:47] <temporal_> but it will not use zero copy because of SSL

[19:37:06] <temporal_> and the current handler for files is only compatible with http 1/1

[19:37:13] <temporal_> ok

[19:37:27] <aesteve> I'll give a look to what the go example you linked is showing

[19:39:22] <aesteve> mmmh ok I'm guess I'm starting to understand the kind of examples we could do

[19:39:39] <aesteve> I'll prepare a tile image

[19:42:58] <temporal_> there is also example with push promise

[19:43:00] <temporal_> you could try

[19:43:08] <temporal_> so basically you send an image with resources

[19:43:12] <temporal_> not using send file

[19:43:21] <temporal_> (because it is not implemneted :-) )

[19:43:35] <temporal_> and you make push promise for css, images, etc…

[19:44:47] <temporal_>

[19:45:35] <aesteve> can I create a buffer pump ?

[19:45:52] <temporal_> you can pump from an AsyncFile

[19:45:56] <temporal_> [maven-release-plugin] prepare release netty-4.1.0.CR3

[19:45:57] <temporal_> normanmaurer committed 2 days ago

[19:46:02] <temporal_> I will try to update to CR3

[19:46:06] <temporal_> it was just released

[19:46:30] <temporal_> look

[19:46:30] <temporal_>

[19:46:34] <temporal_> HTTP/2 Writes GO_AWAY on channelInactive

[19:46:37] <temporal_> that's what we have seen

[19:46:48] <temporal_> it was fixed in CR3

[19:47:26] <aesteve> nice !

[19:47:31] <aesteve> already fixed, then

[19:47:38] <temporal_> CR2 has a regression

[19:47:41] <temporal_> that make one test fail

[19:47:47] <temporal_> that is also fixed in CR3

[19:48:30] <temporal_> and CR3 is on central

[19:48:39] <temporal_> so I will update to CR3 tonight

[19:48:47] <temporal_> if all current tests pass

[21:33:32] <aesteve> ok I have the example “canvas” working with http1.1

[21:34:48] <aesteve> I tried to remove every cache setting, but it's still way slower the first time the page is loaded

[21:35:08] <aesteve> even though I tell chrome not to cache, vert.x not to cache, and set expires/cache-control headers

[21:35:10] <aesteve> weird

[21:45:02] <aesteve> &cachebuster=${new Date().getTime()}

[21:45:04] <aesteve> works

[22:18:03] <aesteve> temporal_ I'm gonna stop for today :) the layout is good and working in both http1.1 and http2, The only stuff reminding is to use promises

[22:18:26] <aesteve> here :