Is a ./gen_site.sh necessary at this point? BTW, the README still
talks about ./genmanual.sh
>> 2. ./runserver.sh
Probably worth pointing out that you need vert.x on the path!
>> 3. point browser at http://localhost:8181
>>
>> Subject to corrections after review, everything is done for the next beta6
>> release.
Planning to take a look this morning.
Peter
--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware
And then I got this exception: http://pastebin.com/DcD1s7Rx
Any ideas?
You won't need to rebuild it unless you edit something, since I've
already built and added the generated html to github too
If you do want to build it you'll need to install the dependencies:
python markdown, xsltproc
I'll fix the README error :)
>>> 2. ./runserver.sh
> Probably worth pointing out that you need vert.x on the path!
What? You mean don't have vert.x installed on all your machines yet? ;)
>>> 3. point browser at http://localhost:8181
>>>
>>> Subject to corrections after review, everything is done for the next beta6
>>> release.
> Planning to take a look this morning.
Great. Thx!
> Peter
>
--
Tim Fox
Vert.x - effortless polyglot asynchronous application development
http://vertx.io
twitter:@timfox
>>> 2. ./runserver.sh
>
> Probably worth pointing out that you need vert.x on the path!And then I got this exception: http://pastebin.com/DcD1s7Rx
Any ideas?
No problem. I wrote a web_server.groovy instead and run that ;)
Peter
Just a few comments (the core API doc is long!):
# In the example `def id = container.deployVerticle(main)`, it's
really not clear what 'main' is. A string? If so, why's it not in
quotes? Is it an injected variable?
# `container.getConfig()` and `container.getLogger()` would more
typically be `container.config`, `container.logger`
# It's unusual to use quotes for map keys. I recommend removing them.
# There are semi-colons dotted around the examples
# Typo for this line: sock.write("hello", "UTF-162); <-- missing quote
# This example should probably refer to a Groovy script: `vertx deploy
foo.MyServer -instances 20`
One thing that does strike me is how all deployment is via scripts.
But what if you want to deploy a larger application that you have
decomposed into multiple classes? How do you deploy such an
application? Is there a packaging format?
Cheers,
> I've completed the Groovy API docs and tutorial.
>
> Would any Groovy folks volunteer to proof read them?Just a few comments (the core API doc is long!):
# In the example `def id = container.deployVerticle(main)`, it's
really not clear what 'main' is. A string? If so, why's it not in
quotes? Is it an injected variable?
# `container.getConfig()` and `container.getLogger()` would more
typically be `container.config`, `container.logger`
# It's unusual to use quotes for map keys. I recommend removing them.
# There are semi-colons dotted around the examples
# Typo for this line: sock.write("hello", "UTF-162); <-- missing quote
# This example should probably refer to a Groovy script: `vertx deploy
foo.MyServer -instances 20`
One thing that does strike me is how all deployment is via scripts.
But what if you want to deploy a larger application that you have
decomposed into multiple classes?
How do you deploy such an
application?
Is there a packaging format?
Which just says it's a script name or a class. But is the argument a
string? A class literal? A file path to a script? Does it include the
file extension? At the moment, 'main' is simply a variable reference
but we don't know what that variable is.
>> # `container.getConfig()` and `container.getLogger()` would more
>> typically be `container.config`, `container.logger`
>
> I can't see that in the version I am looking at. Are you looking at an old
> one?
/core_manual_groovy.html#getting-configuration-in-a-verticle
I pulled the ws_beta6 branch this morning. However, just done another
pull and these have indeed been fixed.
>> # It's unusual to use quotes for map keys. I recommend removing them.
>
> Again, think this is already fixed. Can you point me at the line?
https://github.com/purplefox/vert.x/blob/ws_beta6/core_manual_groovy.md
Search for the line: def config = [ "foo": "wibble", "bar": false]
>> # There are semi-colons dotted around the examples
>
>
> Can you point me at specific cases?
container.deployVerticle("foo.ChildVerticle", config);
container.deployVerticle("verticle1.js", appConfig["verticle1Config"]);
...
Seriously, it would be easier if you grepped the source for semi-colons :)
>>
>> # Typo for this line: sock.write("hello", "UTF-162); <-- missing quote
>
>
> Can't find this
I can only think we're looking at different files. If I search for
that string at the above GitHub URL, it's found.
>>
>> # This example should probably refer to a Groovy script: `vertx deploy
>> foo.MyServer -instances 20`
>
> Can't find this either!
See above :) Have you forgotten to push? Committed to a different branch?
>> One thing that does strike me is how all deployment is via scripts.
>
> By scripts do you mean command line?
No, as in MyApp.groovy - a single file that's a script.
> Yes, all deployment is via command line operations, as opposed to "dropping
> a war in a directory" like you do with many app servers.
>
> This is more similar to node.js style.
>
>>
>> But what if you want to deploy a larger application that you have
>> decomposed into multiple classes?
>
> Classes can live in a hierarchy of class files in a directory or you can jar
> them up into a jar. It's up to you. Just makes sure the classpath you
> specify when deploying points at them.
So, roll it yourself :) I think this comes back to how you make sure
stuff appear on the classpath, which as I understand it means running
vert.x as a server with everything necessary already on the classpath.
Then you can deploy your apps. Not sure I buy into this model, but
that's a separate discussion/argument.
Or have I got that wrong? Anyway, let's sort out the docs first.
> The sentence straight after says "See the chapter on "running vert.x" in the
> main manual for a description of what a main is."
>
> Which goes into detail on what a main is.
>
> Any suggestions welcome on how I can make this clearer.Which just says it's a script name or a class. But is the argument a
string? A class literal? A file path to a script? Does it include the
file extension? At the moment, 'main' is simply a variable reference
but we don't know what that variable is.
>> # `container.getConfig()` and `container.getLogger()` would more
>> typically be `container.config`, `container.logger`
>
> I can't see that in the version I am looking at. Are you looking at an old
> one?/core_manual_groovy.html#getting-configuration-in-a-verticle
I pulled the ws_beta6 branch this morning. However, just done another
pull and these have indeed been fixed.
>> # It's unusual to use quotes for map keys. I recommend removing them.
>
> Again, think this is already fixed. Can you point me at the line?https://github.com/purplefox/vert.x/blob/ws_beta6/core_manual_groovy.md
Search for the line: def config = [ "foo": "wibble", "bar": false]
>> # There are semi-colons dotted around the examples
>
>
> Can you point me at specific cases?container.deployVerticle("foo.ChildVerticle", config);
container.deployVerticle("verticle1.js", appConfig["verticle1Config"]);
...Seriously, it would be easier if you grepped the source for semi-colons :)
>>
>> # Typo for this line: sock.write("hello", "UTF-162); <-- missing quote
>
>
> Can't find thisI can only think we're looking at different files. If I search for
that string at the above GitHub URL, it's found.
>>
>> # This example should probably refer to a Groovy script: `vertx deploy
>> foo.MyServer -instances 20`
>
> Can't find this either!See above :) Have you forgotten to push? Committed to a different branch?
>> One thing that does strike me is how all deployment is via scripts.
>
> By scripts do you mean command line?No, as in MyApp.groovy - a single file that's a script.
> Yes, all deployment is via command line operations, as opposed to "dropping
> a war in a directory" like you do with many app servers.
>
> This is more similar to node.js style.
>
>>
>> But what if you want to deploy a larger application that you have
>> decomposed into multiple classes?
>
> Classes can live in a hierarchy of class files in a directory or you can jar
> them up into a jar. It's up to you. Just makes sure the classpath you
> specify when deploying points at them.So, roll it yourself :) I think this comes back to how you make sure
stuff appear on the classpath, which as I understand it means running
vert.x as a server with everything necessary already on the classpath.
Then you can deploy your apps. Not sure I buy into this model, but
that's a separate discussion/argument.Or have I got that wrong?
>> One thing that does strike me is how all deployment is via scripts.
>
> By scripts do you mean command line?No, as in MyApp.groovy - a single file that's a script.
Replacing 'main' with the string-literal "foo.groovy" would certainly
help I think. The main manual should probably include some more
examples too, highlighting that:
# 'main' is a string
# it's a script name *with* extension or a fully-qualified class name
# it does not include a path to the script.
>> /core_manual_groovy.html#getting-configuration-in-a-verticle
>>
>> I pulled the ws_beta6 branch this morning. However, just done another
>> pull and these have indeed been fixed.
>
>
> I fixed them yesterday actually ;)
Yeah, I don't know why the `git fetch` and `git co -b ...
upstream/ws_beta6` didn't seem to get the latest. Nevermind, sorted
now.
> I still can't find it (maybe I fixed it already and forgot), and I've done a
> recursive grep thru the whole source.
I've caved and sent a pull request :)
It's not clear how a coordinator script should work. For example,
let's say I run `vertx start` in some arbitrary location (not in a
vert.x application directory). I can then do a separate `vertx deploy
foo.groovy` as long as the script is standalone, i.e. doesn't require
any other JARs etc it can't resolve itself. Is that correct?
What I wouldn't be able to do is run `vertx deploy foo.groovy` from a
Vert.x app directory and expect the whole directory to be deployed to
wherever `vertx start` is running, right?
I guess what I'm really getting at is how `vertx start` works. My
current understanding is that I can launch that command in an
application directory and then deploy a script from elsewhere, but I'm
struggling to understand the value of this approach.
Anyway, I'll read the busmods thread more fully and get back to you.
I don't think most people will use vertx start / vertx deploy. For
deploying apps it is easier to just use vertx run.
You then just cd to wherever your app is and execute vertx run. This is
the same model node.js employs.
(This is 99% likely what we'd have to do on a cloud deployment like
cloudfoundry )
About vertx start / deploy:
> It's not clear how a coordinator script should work. For example,
> let's say I run `vertx start` in some arbitrary location (not in a
> vert.x application directory). I can then do a separate `vertx deploy
> foo.groovy` as long as the script is standalone, i.e. doesn't require
> any other JARs etc it can't resolve itself. Is that correct?
The script doesn't need to be standalone - it can reference as many
other scripts and jars as it likes on the classpath.
> What I wouldn't be able to do is run `vertx deploy foo.groovy` from a
> Vert.x app directory and expect the whole directory to be deployed to
> wherever `vertx start` is running, right?
When you execute vertx deploy (or vertx run for that matter), nothing
gets moved or copied to another place. It's not like the CF command line
tool (vmc) which physically copies stuff to the server.
All that happens is it tells the server to open the main script that you
specified with the classpath that you specified and run it.
So the working directory of the verticle is wherever you ran vertx start
from. This differs from vertx run where the working directory is
wherever you ran vertx run from.
> I guess what I'm really getting at is how `vertx start` works. My
> current understanding is that I can launch that command in an
> application directory and then deploy a script from elsewhere, but I'm
> struggling to understand the value of this approach.
The value with vertx start as opposed to vertx run is you can have a
single JVM instance hosting many apps, so there's less overhead from the
JVM.
> Anyway, I'll read the busmods thread more fully and get back to you.
>
> Peter
>
--
OK, thanks. That's cleared things up in my head now. Still, if you do
`vertx deploy foo.groovy`, doesn't that serialise the script to the
'server'? In other words, foo.groovy doesn't have to be in the
directory where `vertx start` was executed from. Or am I wrong on that
as well?
> The value with vertx start as opposed to vertx run is you can have a single
> JVM instance hosting many apps, so there's less overhead from the JVM.OK, thanks. That's cleared things up in my head now. Still, if you do
`vertx deploy foo.groovy`, doesn't that serialise the script to the
'server'?
app.rb and restart it => Save the edited App.groovy and restart it.I can group those comments in a pull request, if you agree with the first two.
Antoine