Time |
S |
Nick |
Message |
01:14 |
|
aditsu |
pdurbin: what exactly do you mean by feedback loop? |
01:21 |
|
pdurbin |
Well, the example I tried to give was a REST API returning some JSON. Let's say say you add "foo: bar" to the JSON output. From the time you click "save" in your IDE and the code is deployed to the app server, how long before you can use curl on the API and see the new output? For me it was 36 seconds. |
01:37 |
|
aditsu |
are you talking about updating a production server? or just testing during development? |
01:40 |
|
aditsu |
pdurbin: when I'm working on something, I never "deploy" code to an "app server", I don't build any war, I just run jetty directly from my project and it just uses the classpath I already have |
01:44 |
|
aditsu |
so I can run it instantly with the updated code |
01:49 |
|
aditsu |
I never really build war files anyway, I prefer using the expanded folder structure |
01:54 |
|
aditsu |
also the largest set of libraries I've used in a web application is about 25MB |
02:04 |
|
aditsu |
pdurbin: oh, I forgot the best part: I run it in debug mode, make a change, reload the page in the browser and it's updated - no need to restart or re-login |
02:05 |
|
aditsu |
but sometimes it says it can't update the running app (when making bigger changes), so I still need to restart it |
02:28 |
|
pdurbin |
aditsu: so is the problem that we're using Glassfish instead of something like Jetty? "I can run in instantly with the updated code" sounds good. Way faster than 36 seconds. And yes, I'm just talking about development, not production. |
02:30 |
|
aditsu |
I haven't tried glassfish, but I would expect to be able to do a similar thing with it.. unless it absolutely has to be run separately |
02:30 |
|
pdurbin |
Hmm. Maybe we're using it wrong. |
02:32 |
|
aditsu |
a quick search for glassfish embedded suggests it should be possible |
02:32 |
|
pdurbin |
Embedded Glassfish is definitely a thing. |
02:36 |
|
aditsu |
gotta go now, ttyl |
13:09 |
|
pdurbin |
aditsu: you talked about embedded jetty at https://github.com/pdurbin/addressbookmvc/tree/master/examples/wicket#2-running-jetty-embedded |
13:32 |
|
|
kirua joined ##friendlyjava |
13:43 |
|
aditsu |
pdurbin: yeah, that's an example of how I run it (using eclipse) |
13:46 |
|
aditsu |
btw, that project uses my own public ivy repository, which I haven't updated in a few years.. |
15:32 |
|
|
kirua joined ##friendlyjava |
16:24 |
|
|
mr_lou joined ##friendlyjava |
16:48 |
|
pdurbin |
I guess you're saying that you use embedded applications servers and have a much tighter feedback loop than I do. By implication, I should investigate embedded application servers. In practice, we use Glassfish and I've never used embedded Glassfish. |
17:01 |
|
aditsu |
I don't really think of it as embedded, but I guess that's what it's called |
17:01 |
|
aditsu |
I just see it as running the server directly with my web app |
17:03 |
|
aditsu |
instead of "deploying" to a separate app server |
17:07 |
|
aditsu |
I think eclipse and probably some other IDEs too have a feature where they manage a server and let you run your application code directly in a similar way, but without you having to do the work of setting up and starting the server from your code |
17:07 |
|
aditsu |
but I don't think I ever tried that |
17:24 |
|
pdurbin |
In our setup, our IDE (Netbeans) starts the application server (Glassfish) and deploys the code when you click "Run". I'm saying that I've already clicked "Run" at least once to start Glassfish and deploy the code the initial time (which takes over a minute, I'm sure). By feedback loop I'm talking about subsequent "Run" clicks after making a change to the code. This takes 36 seconds before I can test |
17:24 |
|
pdurbin |
the change on the running application server. |
17:26 |
|
pdurbin |
And part of my point is that I feel like when the WAR file was smaller years ago it took less than 36 seconds to get feedback. One task I have in mind is to figure out how long it took back in those early days. |
17:28 |
|
aditsu |
I guess the question is whether there is an extra step of building/packaging/deploying your app to Netbeans's server when you click "Run" |
17:29 |
|
aditsu |
before actually running it |
17:30 |
|
aditsu |
when I click Run, it just runs |
17:30 |
|
aditsu |
it's also possible that your app runs [almost] immediately, but takes 36 sec to initialize |
17:31 |
|
aditsu |
but you can probably tell that from the logs |
17:32 |
|
pdurbin |
There is a *ton* of output in the application server log after you click "Run". I do think that all sorts of stuff is initializing or unzipping or who knows what. |
17:37 |
|
aditsu |
I tested an application now, it takes 1 sec to get the first log message (basically saying jetty is starting), and 2.5 sec (total) until it's settled and ready |
17:39 |
|
pdurbin |
Ok. And then you can make a change and test it right away? After a small number or seconds? |
17:40 |
|
aditsu |
if the change is small enough and it's running in debug mode, I just need to save and reload the page in the browser |
17:40 |
|
aditsu |
otherwise, restart it and it takes about 2.5 sec again |
17:40 |
|
pdurbin |
Ok. How easy is it to demo this stuff in the "wicket" example you added to addressbookmvc? |
17:40 |
|
aditsu |
maybe add 1 sec for stopping it |
17:41 |
|
aditsu |
pretty easy, I think I provided full instructions |
17:41 |
|
aditsu |
on the page you linked above |
17:41 |
|
pdurbin |
great |
17:42 |
|
pdurbin |
How hard would it be to add a REST API? To list an address book entry? |
17:43 |
|
aditsu |
should be easy, but I need more details |
17:45 |
|
pdurbin |
Well, here's my JAX-RS code in my "javaee7" example for doing a "list" of the address book: https://github.com/pdurbin/addressbookmvc/blob/890dbdb6a96a10430350dcf533a605a4ad317bf9/examples/javaee7/src/main/java/com/greptilian/addressbookmvc/javaee7/api/People.java#L30 |
17:46 |
|
aditsu |
o_O |
17:46 |
|
aditsu |
erm.. I think it's better if you tell me what it does / what you want it to do |
17:47 |
|
aditsu |
ah, it's just one method for listing |
17:48 |
|
aditsu |
so.. just put everything in a json array? |
17:49 |
|
pdurbin |
I like JSON but it could be whatever. |
17:59 |
|
|
mr_lou joined ##friendlyjava |
18:39 |
|
aditsu |
pdurbin: ok I got some time now, I coded a simple list page, would you like me to update the code on github? |
18:41 |
|
aditsu |
or just paste it somewhere? |
19:09 |
|
|
nanoz joined ##friendlyjava |
19:43 |
|
aditsu |
well, here's a diff anyway: http://dpaste.com/1YC5H1K |
19:44 |
|
aditsu |
I have to sleep soon |
20:34 |
|
|
kirua joined ##friendlyjava |
22:30 |
|
pdurbin |
aditsu: thanks! For how I captured that diff in an issue: https://github.com/pdurbin/addressbookmvc/issues/18 |