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

[07:09:43] * ChanServ sets mode: +o temporalfox [14:14:15] <aesteve> hi everyone :) [14:29:02] <cescoffier> hi aesteve [14:36:05] <aesteve> I'm pretty happy with what I came up with with request body unmarshalling / response body marshalling in Groovy [14:36:32] <aesteve> MyPojo obj = body as MyPojo [14:37:03] <aesteve> SecondPoJo obj2 = obj.someTransformation() [14:37:07] <aesteve> yield obj2 [14:37:40] <aesteve> [14:48:31] <aesteve> cescoffier: if you have an idea of a small project that could illustrate a simple REST Api I could write a project/blog post demonstrating how to deal with the syntaxic sugar [14:48:38] <aesteve> (and comparing with standard Vert.x) [14:48:49] <cescoffier> you can reuse the introduction to vert.x app [14:48:51] <aesteve> (and an API that doesn't involve whisky ;) ) [14:49:27] <aesteve> I was thinking about “Groodle” a doodle-like [15:06:51] <temporal_> so you discovered the “as” in groovy :-) aesteve [15:06:53] <temporal_> don't abuse it :-) [15:12:27] <aesteve> I discovered it a while back ;) [15:12:43] <aesteve> but I think it's a very good usage for it [15:13:20] <aesteve> because that's exactly what you want to say : “I want the request body as this type of object and if doesn't fit, just fail with 400” [18:34:34] * ChanServ sets mode: +o temporalfox

[18:58:25] <alijoudeh> hello everybody

[18:59:30] <alijoudeh> did anyone find a way to avoid re-running the vertx command everytime you do changes to source files?

[19:00:23] <aesteve> I assume you're using Vert.x3 ?

[19:00:30] <aesteve> what's your IDE ?

[19:00:45] <alijoudeh> I tryed NetBeans & Eclipse

[19:01:12] <aesteve> how are you launching your app ? a simple java main or a “MainVerticle” ?

[19:01:46] <alijoudeh> I used the vrtex run [*.java] command

[19:02:35] <aesteve> What's your Java file, a Verticle ?

[19:02:54] <alijoudeh> yes

[19:03:06] <aesteve> so you can create a “run configuration” in Eclipse

[19:03:33] <alijoudeh> when I change even static files, I have to terminate and run the command again

[19:03:56] <alijoudeh> isn't there a way to HOT deployment by recompiling changes on the fly?

[19:04:00] <aesteve> and in the “Main” tab, you set “io.vertx.core.Launcher” as Main-class

[19:04:23] <alijoudeh> sounds good

[19:04:37] <aesteve> then in the “Arguments” tab, under the “Program Arguments” textarea, just write : “run”

[19:04:43] <aesteve> (without the quotation marks

[19:05:14] <alijoudeh> yes

[19:05:49] <alijoudeh> what happens when I make changes? do I still have to terminate & run again?

[19:05:53] <aesteve> and if you use your run configuration as debug (the little bug icon in Eclipse) you should benefit from hot-redeploy (except if you change something that requires the verticle to restart)

[19:06:05] <aesteve> just try it, it should work :)

[19:06:39] <alijoudeh> I really hope so :) thanks alot

[19:07:17] <aesteve> things like changing web server options probably wont work for example

[19:07:39] <aesteve> you're welcome :)

[19:07:55] <alijoudeh> hot-redeploy ony works with changed methods

[19:08:05] <alijoudeh> say for example I added some static files

[19:08:11] <alijoudeh> the changes won

[19:08:18] <alijoudeh> won't propagate

[19:08:30] <alijoudeh> until I terminate & run again

[19:08:39] <aesteve> it's more about Eclipse than Vert.x to be honest, I'm not an expert

[19:09:10] <aesteve> most of the time it works for me, or if I'm really adding classes, refactoring stuff, I switch the server off anyway

[19:10:11] <alijoudeh> must terminate & run everytime you make changes or even add a static file

[19:10:38] <alijoudeh> I see

[19:11:55] <aesteve> note that it's just for development use, obviously :)

[19:12:31] <aesteve> for production etc. package your application as a jar, or even fatJar and run java -jar

[19:13:10] <aesteve> you might be interested in : if you're getting started

[19:13:35] <alijoudeh> yes thats the way I always do it, but when I make simple changes, I have to shutdown

[19:13:48] <alijoudeh> I have a High Availability requirement

[19:14:03] <alijoudeh> can't simply take it down for a simple change

[19:14:36] <aesteve> oh so it's very different

[19:14:48] <aesteve> we're not talking about development

[19:15:48] <alijoudeh> serving a static web directory should not require a server restart

[19:16:02] <alijoudeh> thats the biggest issue

[19:16:30] <aesteve> so you're talking about the static files, it has nothing to do with the code of your application

[19:16:42] <alijoudeh> exactly!

[19:16:44] <aesteve> I didn't understand that, at all

[19:17:04] <aesteve> when you talked about hot-redeploy I was thinking changes you make to the code

[19:17:22] <alijoudeh> yeah I was thinking about that too

[19:17:25] <aesteve> in this case, did you try to play with StaticHandler options

[19:17:46] <aesteve> you must be able to set a “no caching” mode

[19:17:52] <alijoudeh> ill check that out

[19:17:56] <alijoudeh> aha

[19:18:19] <alijoudeh> would that degrade the performance?

[19:19:00] <aesteve> I'm not an expert on that field, but I imagine it could, yes. You should ask that on the Google Group

[19:19:08] <alijoudeh> ok

[19:19:21] <alijoudeh> where are the StaticHandler options?

[19:19:28] <aesteve>

[19:19:41] <aesteve>

[19:20:15] <alijoudeh> setCachingEnabled(false)

[19:20:16] <alijoudeh> ?

[19:20:23] <aesteve> probably

[19:24:20] <alijoudeh> it doesn't work, I don't know

[19:25:19] <aesteve> you should post on the Google Group with : A simple reproducing project on GitHub (just a Verticle with a single StaticHandler for example) and what you want it to do

[19:25:46] <alijoudeh> ok

[19:25:56] <aesteve> honestly if you describe your problem with a reproducer, you should get an answer quite quickly

[19:26:11] <alijoudeh> you are so kind, thanks for sharing :)

[19:26:47] <aesteve> np, if you found a bug in “setCachingEnabled” as a Vert.x user I'm interested in it too ! it could save me a headache

[19:26:51] <aesteve> ;D

[19:33:41] <alijoudeh> I already faced this issue I can't figure it out, trying to look at the source

[19:34:21] <alijoudeh> neither changing static files nor changing java source reflects any changes

[19:34:40] <alijoudeh> I think C# has this on the fly re-compilation

[19:35:05] <aesteve> that sounds really weird, none of my projects would work ^^

[19:35:15] <alijoudeh> Imagine shutting down the server to apply a simple CSS change!

[19:35:35] <aesteve> i can confirm I'm not doing that, all-day, everyday ;)

[19:36:07] <alijoudeh> true, but even in development, im using angular & I make frequent changes

[19:36:09] <alijoudeh> all the time

[19:36:14] <aesteve> yes yes me too

[19:36:14] <alijoudeh> I need to see live updates

[19:36:22] <aesteve> and I'm not shutting down the server !!

[19:36:35] <alijoudeh> does it work for you?

[19:36:36] <aesteve> I'd be crazy if I did this everytime I changed something

[19:36:44] <alijoudeh> exactly

[19:36:49] <alijoudeh> thats my point

[19:37:11] <aesteve> yes it works

[19:37:37] <aesteve>

[19:37:43] <alijoudeh> when you change the static files, update your js, you can see the changes by REFRESHING the browser?

[19:37:56] <aesteve> yes

[19:38:07] <aesteve> you should definitely push a simple reproducing project on Github

[19:38:17] <aesteve> because what you're describing is a huge bug

[19:38:48] <aesteve> either it's been broken in Vert.x but a lot of ppl would have been upset if so or it's something you did wrong in the code

[19:39:12] <alijoudeh> yeah

[19:39:21] <aesteve> no matter which one it is, we need a sample project reproducing the issue to investigate

[19:39:25] <alijoudeh> I ran the angularjs example

[19:40:09] <alijoudeh> io.vertx.example.web.angularjs

[19:40:28] <alijoudeh> setCachingEnabled(false)

[19:40:49] <alijoudeh> router.route().handler(StaticHandler.create().setCachingEnabled(false));

[19:41:02] <alijoudeh> just updated that line

[19:41:59] <aesteve> are you sure Chrome is not caching the files for you ? Did you set “disable caching when devtools is opened” (and opened devtools : ctrl + shift + j)

[19:42:01] <alijoudeh> ok

[19:42:20] <alijoudeh> ill check

[19:43:49] <alijoudeh> no luck!

[19:44:14] <alijoudeh> I don't know I might have something wrong, ill try reproduce on git

[19:45:17] <aesteve> good :) hope you find what the issue is good luck

[19:45:21] <aesteve> have a good evening

[19:46:47] <alijoudeh> thanks to you too

[22:04:07] <nevenr> Hi, is it OK to see that io.vertx.ext.mail.MailClient sending email via eventloop thread (vert.x-eventloop-thread-2)

[22:06:22] <nevenr> In other words, MailClient is asynchronous but does it mean that it is OK to sending email via eventloop thread?

[22:08:11] <nevenr> Or should I call mailClient.sendMail from worker thread pool (vertx.executeBlocking(…))

[22:37:55] *** ChanServ sets mode: +o temporalfox

[23:39:06] <AlexLehm> nevenr: MailClient is asynchronous

[23:39:27] <AlexLehm> you should be able to send very many mails concurrently with it

[23:45:25] <nevenr> AlexLehm: yeah, I'm aware that it is asynchronous, but still sending email can be slow due to network (host name resolution, opening connection,…) and SMTP server speed

[23:46:25] <nevenr> so question is: “Is it OK to send email in eventloop thread?”

[23:46:27] <AlexLehm> the connection operations and the smtp server will not use up any resources, its completely based on handlers that are non-blockng

[23:47:47] <AlexLehm> with the possible exception of dns resolution, there are no blocking operations, dns resolution is left to the vertx net stuff

[23:48:17] <AlexLehm> its ok to do that in the event loop

[23:48:32] <nevenr> AlexLehm: Ok. Thanks man.

[23:49:18] <AlexLehm> yw, its great to see that somebody is actually using the module