Differences

This shows you the differences between two versions of the page.

Link to this comparison view

irc:1438639200 [2017/05/27 13:44] (current)
Line 1: Line 1:
 +[01:16:05] <​monko>​ good evening, everybody!
 +
 +[01:16:47] <​monko>​ i'm playing around with the new vert.x and liking it very much
 +
 +[01:17:22] <​monko>​ but could it be that not everything is completely fleshed out yet?
 +
 +[01:19:43] <​monko>​ i was looking for the commonSql parameterized insert - guess it's just not here yet?
 +
 +[01:22:11] <​monko>​ i guess, for now, string escaping (shudder) will have to do
 +
 +[03:12:00] <​monko>​ anyone here?
 +
 +[06:27:05] <​basky>​ hello .. I am trying to run mail-service examples but in vain .. Verticle gets deployed successfully.. when i d sendMail, ​ it never returns back to its handler .. anyone having same issue ??
 +
 +[09:53:38] <​cescoffier>​ pmlopes: Morning, are you around ?
 +
 +[09:53:50] <​pmlopes>​ cescoffier, good morning
 +
 +[09:54:25] <​cescoffier>​ I'm writing the mail for Nemo
 +
 +[09:55:34] <​cescoffier>​ I've only asking for vertx-web, vertx-service-proxy and vertx-maven-service-factory
 +
 +[09:55:39] <​cescoffier>​ do you want vertx-auth ?
 +
 +[09:58:01] <​pmlopes>​ what is nemo?
 +
 +[09:58:09] <​pmlopes>​ or who is Nemo?
 +
 +[09:58:17] <​cescoffier>​ what in this case :-)
 +
 +[09:58:31] <​cescoffier>​ nemo is the Sonar server for open source projects
 +
 +[09:58:37] <​cescoffier>​ http://​nemo.sonarqube.org/​
 +
 +[09:59:03] <​pmlopes>​ oh ok, then please add vertx-auth since it is a critical component that we should not mess up :)
 +
 +[09:59:31] <​cescoffier>​ ok
 +
 +[09:59:46] <​cescoffier>​ I'will also rely on vertx-auth for the stomp authentication support
 +
 +[13:36:32] <​monko>​ hi everybody! i'm writing a little blogging app (to learn the framework better), but was stumped by the lack of parameterized INPUT in commonsql
 +
 +[13:37:50] <​monko>​ any advice in how to get over that obstacle? this is not security critical, but there isn't even available support for SQL string escaping (e.g. in commons lang) anymore.
 +
 +[13:41:27] <​monko>​ is it possible to use the update interfaces for inserting/​deleting?​
 +
 +[13:45:48] <​monko>​ ah, ok - i've just tried, update works
 +
 +[13:46:01] <​monko>​ makes sense.
 +
 +[16:08:33] <​joan_>​ any vertx 3 developer here ?
 +
 +[16:08:35] <​joan_>​ :)
 +
 +[16:09:39] <​joan_>​ mhh i have the following problem with downloading files in vertx 3.0: https://​groups.google.com/​forum/?​fromgroups#​!topic/​vertx/​N_wSoQlvMMs
 +
 +[16:10:07] <​joan_>​ i implemented downloading large files with vertx 2, but somehow i get corrupt files with vert3
 +
 +[16:10:25] <​joan_>​ i'm really stuck, so if someone could help, that would be great
 +
 +[16:10:54] <​D-Spair>​ joan_: ​ Gimme a few seconds to have a look
 +
 +[16:11:24] <​joan_>​ thanks!!!!
 +
 +[16:12:10] <​joan_>​ if you need my code, i can send it again to this channel
 +
 +[16:13:47] <​D-Spair>​ joan_: ​ Looks like you are closing the channel outside of the Pump... Pump will do that work for you... You just need to provide Pump with the source and destination...
 +
 +[16:14:22] <​D-Spair>​ joan_: ​ So, the code inside of your "​endHandler"​ should probably go away.
 +
 +[16:15:22] <​joan_>​ okay, but how do i know then when the pump has finished ?
 +
 +[16:16:12] <​D-Spair>​ joan_: ​ I "​believe"​ that you can set a callback on the Pump itself...
 +
 +[16:16:22] <​joan_>​ i need a way/ callback when all data is written to the asyncfile
 +
 +[16:16:51] <​joan_>​ but the interface "​Pump"​ does not have a method like that
 +
 +[16:19:09] <​joan_>​ i didnt read your first message,​sorry
 +
 +[16:19:49] <​joan_>​ but then i have the same question: how do i now when all data is written to the file
 +
 +[16:19:54] <​D-Spair>​ joan_: ​ Here's a good example: https://​github.com/​vert-x3/​vertx-examples/​blob/​2b6f74fd7af731f15834c8cbc7da532437d9c685/​core-examples/​src/​main/​java/​io/​vertx/​example/​core/​http/​upload/​Server.java
 +
 +[16:20:24] <​D-Spair>​ joan_: ​ And you are correct, there is no callback on Pump... It just goes until the stream is closed.
 +
 +[16:21:16] <​D-Spair>​ joan_: ​ You "​could"​ have the "​endHandler"​ for the http client stream send a notice once the stream is ended.
 +
 +[16:21:17] <​joan_>​ so, when the endhandler of the httpClientResponse is called, then the file is completly weitten ?
 +
 +[16:22:32] <​joan_>​ so, this is my endhandler now :
 +
 +[16:22:34] <​joan_> ​            ​httpClientResponse.endHandler(httpEndHandler -> {                 ​message.reply(filePath); ​            });
 +
 +[16:22:50] <​joan_>​ damn, i hope you can read this, sorry
 +
 +[16:22:57] <​joan_>​ i try it!
 +
 +[16:23:09] <​joan_>​ give me 3 min :) thank you very much already!
 +
 +[16:23:18] <​D-Spair>​ joan_: ​ It "​may"​ be completely written, but you don't need to worry if it isn't as the Pump will handle draining the stream and writing any remaining bytes.
 +
 +[16:26:24] <​joan_>​ i still get corrupt files...
 +
 +[16:26:58] <​D-Spair>​ joan_: ​ Pastebin your latest code please.
 +
 +[16:27:52] <​joan_>​ i am sorry, pastebin means ? :) (i am not often in irc chats) :D
 +
 +[16:28:46] <​D-Spair>​ joan_: ​ Go to "​pastebin.com"​ and paste your code there and post the link back here instead of trying to show code in the chat.
 +
 +[16:28:58] <​joan_>​ ok i got it
 +
 +[16:28:59] <​joan_>​ http://​pastebin.com/​WJwzt8rX
 +
 +[16:29:46] <​joan_>​ its all work in progress ;)=
 +
 +[16:31:05] <​D-Spair>​ joan_: ​ You are still closing the httpClient in your code instead of letting the Pump do it for you...
 +
 +[16:31:17] <​joan_>​ ohh no
 +
 +[16:31:20] <​D-Spair>​ joan_: ​ You are closing the file as well..
 +
 +[16:31:35] <​D-Spair>​ Pump will close both streams when it is done..
 +
 +[16:31:39] <​joan_>​ ok, perhabs im a complete idiot
 +
 +[16:31:54] <​joan_>​ but im closing the client, not the HttpClientResponse
 +
 +[16:32:32] <​joan_>​ sorry, i thought you mean closing the HttpClientResponse is wrong
 +
 +[16:33:08] <​joan_>​ but i only close the file if the status code is not matching
 +
 +[16:33:29] <​D-Spair>​ joan_: ​ I'm looking at line 187 where you call "​asyncFile.close()"​
 +
 +[16:34:26] <​joan_>​ yes thats true, but in this case an error occured, and i wont even started the pump
 +
 +[16:36:36] <​D-Spair>​ joan_: ​ IC... Still looking..
 +
 +[16:36:42] <​joan_>​ this is the updated code: http://​pastebin.com/​GpmkY0J5
 +
 +[16:36:56] <​joan_>​ with removing comments end the client.close()
 +
 +[16:39:25] <​D-Spair>​ joan_: ​ On the latest paste, line 169, where is httpClientResponse being defined?
 +
 +[16:39:51] <​D-Spair>​ joan_: ​ I do not see that being passed as a parameter...
 +
 +[16:40:00] <​joan_>​ on which pastebin ?
 +
 +[16:40:08] <​D-Spair>​ joan_: ​ on the latest one..
 +
 +[16:40:38] <​joan_>​ its part of the lamda expression
 +
 +[16:40:47] <​joan_> ​        ​return httpClientResponse -> {
 +
 +[16:42:41] <​D-Spair>​ joan_: ​ Understood, but you are relying on the JVM to do type inference to determine what to pass in as the httpClientResponse,​ and perhaps that is where it is going wrong.
 +
 +[16:44:05] <​D-Spair>​ joan_: ​ I will try to compile and run your code later and reply on the Google Group, but for now I have to run off to do my day job...
 +
 +[16:44:46] <​joan_>​ thank you cery much, i give it a try!
 +
 +[16:47:04] <​joan_>​ sorry to say that but it also fails...
 +
 +[16:50:40] <​joan_>​ has someone else an idea ?
 +
 +[17:07:35] <​joan_>​ any other vertx expert here :)
 +
 +[17:24:19] <​Sticky>​ joan_: that is not the problem, java can inver the type of httpClientResponse as a HttpClientResponse from the definition of getHttpClientResponseHandler
 +
 +[17:33:23] <​joan_>​ yes, i verified that
 +
 +[17:34:10] <​joan_>​ i am realy stucked now
 +
 +[17:34:20] <​joan_>​ i have now idea whats wrong with the code
 +
 +[17:35:50] <​joan_>​ the strange thing is, that if i url points to a file in the internet, the file is not corrupt. if the file points to a file which is hosted on my machine, for example a fiel served by nginx, its corrupt. but i verified that the file which is on my filesystem is not corrupt. i am totaly confused...
 +
 +[17:43:16] <​Sticky>​ joan_: do you need to set something like "​Content-Encoding",​ "​Content-Type"​ etc : https://​en.wikipedia.org/​wiki/​List_of_HTTP_header_fields#​Response_fields
 +
 +[17:45:52] <​joan_>​ well, i send nothing to the client, i just make a get request without a body
 +
 +[17:46:12] <​joan_>​ so i would think, that i dont need a content-type set
 +
 +[17:46:51] <​joan_>​ *i send nothing to the server (sorry)
 +
 +[17:46:54] <​D-Spair>​ joan_: ​ Without a content-type,​ the client may assume text/plain and not transfer the bytes in the correct format.
 +
 +[17:47:30] <​D-Spair>​ When you set the content-type,​ the code will account for that and encode the data as base64
 +
 +[17:51:15] <​joan_>​ so would do i need to set for binary ?
 +
 +[17:51:58] <​joan_>​ application/​octet-stream ?
 +
 +[17:52:02] <​D-Spair>​ joan_: ​ Content-Type should be something like "​video/​x-matroska"​ or whatever format...
 +
 +[17:52:22] <​cescoffier>​ pmlopes: do you have commiter right on https://​github.com/​cjryan/​openshift-cartridge ?
 +
 +[17:54:01] <​joan_>​ D-Spair: still not working...
 +
 +[17:56:05] <​joan_>​ sorry, i have to leave
 +
 +[17:56:13] <​joan_>​ if anybody has an ide, you are welcome
 +
 +[18:20:42] -sendak.freenode.net- [freenode-info] why register and identify? your IRC nick is how people know you. http://​freenode.net/​faq.shtml#​nicksetup