Vert.x 3 project in an IDE (Eclipse or IntelliJ)

1,733 views
Skip to first unread message

Arik Bron

unread,
Feb 5, 2016, 1:56:36 PM2/5/16
to vert.x
I just spent 2 days on trying to understand how to create my first Vert.x 3 project in an IDE. I read dozens of posts and blogs about how to use Eclipse and IntelliJ for that matter, all of them are either partial or outdated.

As of now I didn't manage to set up a working run/debug environment in those IDEs. Some recommend to use old vertx plugin for IntelliJ, some Gradle, some Maven.

Can anyone please help me with ONE integrated step-by-step explanation on what needs to be done?

Thank you in advance!
Arik

Tim Fox

unread,
Feb 5, 2016, 2:00:50 PM2/5/16
to ve...@googlegroups.com
The examples repo contains many examples that you should be able to just open in Eclipse in IntelliJ and get started. You don't have to do any special setup:

Here's a good start:

https://github.com/vert-x3/vertx-examples/tree/master/maven-verticles/maven-verticle

Just copy it and then open it in your IDE.

If you follow the links from the "getting started" page on the web-site it should point you in the right direction.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/d9954140-9683-47dd-812c-0f474e67e31d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arik Bron

unread,
Feb 5, 2016, 2:43:00 PM2/5/16
to vert.x
Thanks Tim, but this doesn't explain the rest of the steps:
- resolving dependencies by setting up links to Vert.x JARs,
- setting up run configuration: what arguments to use, etc.
- setting up debug configuration.

I understand that explaining those things to a rookie like me can be frustrating :) but that is what makes new technologies/tools/frameworks accessible and widely adopted...

The GIT repository contains only the source and the pom.xml. It doesn't include the .idea file, mod.json that, if I'm not mistaken, is required by Maven, etc...

Any additional help will be much appreciated :)

Once I understand the flow of setting things up I intend to write a post about - a post that will explain things in details - looks like none else cares to write such a thing...

Tim Fox

unread,
Feb 5, 2016, 3:00:11 PM2/5/16
to ve...@googlegroups.com
Hi Arik,

I think you're overcomplicated things.

Really, all you need to do is open the pom.xml in your IDE, that's it. It's a completely vanilla/standard Maven project. If you've used Maven before there should be nothing new to learn here that's specific to Vert.x.

* you don't need any special plugins.
* you don't need to set any links to Vert.x JARs
* take a look at the README for instructions on how to run things.

Jonathan Doughty

unread,
Feb 5, 2016, 3:23:59 PM2/5/16
to vert.x
It can be a bit intimidating getting started, I am not too far ahead of you. The differences between vertx 3.x and previous versions make the web search for a skeleton a bit difficult, combined with the almost overwhelming number of examples. But those first baby steps can be tough,

Where you might want to start is the (current) last in the Introduction to Vert.x series  (which is the only place I've found that provides an easy reference to all the episodes so far) and work through each of the episodes in the series from the beginning.

Just set up the initial project layout and pom.xml, maybe with a text editor. Then open the now existing project with your IDE, telling the IDE it is a maven project.

Stop or diverge when you get comfortable.

Tim Fox

unread,
Feb 6, 2016, 3:45:15 AM2/6/16
to ve...@googlegroups.com
With Vert.x 3.0 we made some effort to make this process as easy as we can, but we've had a couple of people complain that it's complex.

The trouble I have is I can't see where the complexity is! So how about we step through the "getting started" process and if someone could point out how we could improve things then.. we can do that.

Let's say the user is a Maven user (as that's the most common) but the process would be adapted slightly if they prefer Gradle or neither of those.

1. Start at http://vertx.io
2. Click on "Documentation"
3. The first paragraph is "Get Started"
4. Read the "Get Started" paragraph: "... Start with the main README and let that guide you through."
5. Click on the link to the README. This opens a link into the examples repo
6. Read the first paragraph "Maven Users".
7. Click on the link to "Simplest Maven Example". This takes you to the README for that example
8. That's a fully functioning (simple) Vert.x project. Just clone the repo or copy that locally however you prefer.
9. In your IDE (IntelliJ or Eclipse should work the same here) open the pom.xml
10. You can build and run at the command line with maven tasks (see the README for an explanation of those)
11. You can run it in your IDE by just right clicking on the main() method and right click...run as (nothing Vert.x specific here)

Perhaps it's a bit confusing if you've come from Vert.x 2 which needed special plugins and setup to get a hello world example to work, but Vert.x 3.0 doesn't require any such steps, it's really just a very vanilla Maven project setup.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.

Arnaud Estève

unread,
Feb 6, 2016, 7:01:18 AM2/6/16
to vert.x
Hi Arik.

All you need to know is that a Vert.x project is just a standard Java project. Like a simple hello world or anything.

You simply interact with Vert.x's API in a programmatic way, no configuration, no module, nothing else.

So, if you're a Maven user, the pom.xml from the examples should tell you the dependencies (and your IDE will download them for you once you import the pom.xml)
Same thing for Gradle.
If you are a plain Java user, just download the following dependency : http://search.maven.org/remotecontent?filepath=io/vertx/vertx-core/3.2.1/vertx-core-3.2.1.jar , add it to the classpath in your IDE as you use to. And you'll be good to go.

To get started, just create a main method like you would in a standard Java project, type Vertx vertx = Vertx.vertx();  and you'll have access to the full toolbox Vertx provides, you don't need anything else to get started ! Then, as you dig through the documentation, you'll learn about Verticles, how they're deployed, the Launcher class, which are all convenience utilities to help you build an application. But you'll still be able to stick to the main method if you need to.

Sometimes simplicity can be confusing :)

Mykel Alvis

unread,
Feb 6, 2016, 9:43:00 AM2/6/16
to vert.x
Hi Arik, 

It appears possible that you might not be overly familiar with using either of these IDEs.  I'll talk about Eclipse since that's what I'm most familiar with.  
Please read all the steps before you start, so that you don't either do something you're already intimately familiar with or do something out of place if you're not.
Also note that this is basic directions for how to import any well-formed maven project into eclipse.  If you already know how to do that, you don't need these directions.

Finally, this is not a list of instructions on how to make Vert.x applications.  That's a much different and more complex problem.   This is instructions on how to import the examples so that they'll compile.

Optional Step zero is to install maven to use at the command line. 
I suggest SDKMAN as a means to do that (and several other tools, including Vert.x executables!) if you're using one of their well-supported platforms.  
You can find SDKMAN and the instructions for installing it and Maven at http://sdkman.io/.
The command, once SDKMAN works, is drop-dead simple:
$ sdk install maven

While you're at it, you might as well install Vert.x 3.2.1.  
$ sdk install vertx

If you can get `mvn -v` to not show any sort of error from the command line, you're set.
Mine looks like this on my mac:
$ mvn -v

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)

Maven home: /Users/malvis/.sdkman/candidates/maven/current

Java version: 1.8.0_45, vendor: Oracle Corporation

Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre

Default locale: en_US, platform encoding: UTF-8

OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac"


Step one is to get Eclipse installed and working.  That's a job for the Eclipse docs, not here.
Assuming you've installed a recent version, you'll have Maven built-in.  
I suggest a later version of the JDK, as well.  I use a somewhat recent version of Oracle's JDK8, but I should update to release 73.
I also suggest you start with a clean workspace.  

Step two is to check out some code, such as the example Tim posted above.  
* Open the "Git" perspective.  There should be a View called "Git Repositories".  If not, select the"View" menu and find that.
* Click the button at the top of Git Repositories that says "Clone a Repository and add it to this view"
* Enter "g...@github.com:vert-x3/vertx-examples.git" or more likely "https://github.com/vert-x3/vertx-examples.git" as your source url and clone it.  
There's a possibility that eclipse will ask you for credentials of various sources.  Stack Overflow and the rest of the internet can guide you through that process easily.
* You should end up with a working copy of "vertx-examples" in the "Git Repositories" list

Step three is to import your clone as a project.
* Open the dropdown next to the cloned repository in "Git Repositories".  By that, I mean click the little triangle that will expand the tree of that cloned repo.
* One of the entries will be "Working Directory"
* Right-click on that and select "Import Projects"
* Select "Import as General Project" and just select the defaults until you can select "Finish"
*  Go to the Java perspective
* Your imported project should be in your workspace as a "General Project"
* Right click your project and select "Team -> Switch to -> Other -> Tags " and select "3.2.1".  This will checkout the latest release as of right now.
*  At this point your workspace points to a clone of the tag you just checked out.

At this point, you might ask yourself "Why did I switch to a tag?  Why not use the HEAD of master?"  
The answer is that the tag is a controlled and released codebase, and the docs that you see online will map directly to the code you're compiling and running.
Master usually does compile, but certainly might not, whereas the tag "3.2.1" is static and will always compile on a properly configured system.

Step four is to make the project build with Maven
* Right click on your project and select "Configure -> Convert to Maven Project"
  This might take a while as you download the internet.

Step five is to make sure your project is updated properly
* Your project should have a tiny "M" as a badge over the project icon in the workspace. Eclipse calls these things "label decorations" I think.
* Right click the project again and select "Maven -> Update project".  This may not be necessary but it frequently is, so just do it.  
"Maven -> Update project" is something I tend to do a LOT in Eclipse.

Step Six -> Rebuild your project
* Right click on the project and select "Run as -> Maven Install"
  This launches maven inside Eclipse but separate from the eclipse builder.  If you get an error building the code then try it again. 
*  If you continue to get an error, it's likely a maven problem, not a Vert.x one.  You'll want to swap lists until you can get the code to build locally.
*  If you installed maven from the command line, you can try running `mvn clean install` from the command line inside the checkout out clone of the 
    repo.  With my relatively speedy connection to the interwebs, a total dependency resolution takes about 150 seconds.  YMMV on that.  Be prepared to
   wait if your internet is slow.

At this point, all your dependencies should have been resolved by Maven.  The maven list is likely your next stop if you're still getting dependency resolution errors.

Step Seven -> Import the modules
* Select your project in the project list
* Right click and select "Import"
* Select "Existing Maven Projects" and "Next".  There will be several.
* Click "Select All" and then make sure that the top level project is deselected.  Once that is true, the "Finish" button should be active.  Click "Finish"
  This will cause a pile of new projects to appear in your workspace.
* Do "Maven -> Update Project" again, selecting all projects.  It's not entirely intuitive, but it tends to solve a lot of problems before they start.
*  Select the "Project" menu item and make sure  "Build Automatically" is selected
*  Select the "Project" menu item then select "Clean". Pick the "Clean all projects" selection and click "OK"

In a bit, all the code should be compiled.  Inside Eclipse there might be some errors, as there often are with complex projects.  Most of these tend to be of the 
"Eclipse doesn't know how to deal with this plugin" sort and are safe to "Quick fix" 

However, OUTSIDE of Eclipse, the "3.2.1" tag of "Vert.x examples" builds without fail with Maven 3.3.9 from the command line.

If you followed these directions and got no errors, congratulations!  You should be able to go to the command line and run the examples as described in the docs.

If you got an error, your initial path for debugging is most likely to execute the maven build from the command line.  

#  cd {yourworkingcopyofvertxexamples}
# mvn clean install

If that fails, either maven isn't installed or its not on your path.  Look at the SDKMAN docs.  If you get no relief there, go to the Maven docs for installation.  
If you chose not to install Maven, my ability to assist you further is gone.

If the root problem is that you can't access the internet from your machine, that's a different problem and likely to be ongoing, because that's pretty much how Maven (et al) tends to work.

I just did all these steps within a new workspace after removing my local maven repo and my settings.xml, so I know for certain that it works on Eclipse Luna and Mars.
I installed Maven 3.3.9 and used it to do my local resolution.

All that to say that if you have trouble, it's probably not a Vert.x thing. It's probably, in order of decreasing likelihood:  Network, Eclipse install (reinstall is, sadly, a thing I have to occasionally do with Eclipse), Maven (sometimes you have to blow away the local repo), git (i.e. maybe you don't have the tag checked out?).

If you've already got a maven setup, then you might also have a settings.xml  in the .m2 directory of your user's home dir.  Moving this to a different name temporarily might solve your problem.


Good luck!

Arkady Bron

unread,
Feb 10, 2016, 8:40:09 AM2/10/16
to ve...@googlegroups.com
Hi Tim,

Thanks a lot for the very detailed response.

Unfortunately the link is broken -  simple Maven verticle example - I get 404.



--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/_-_tZfG8eag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.

Clement Escoffier

unread,
Feb 10, 2016, 8:42:14 AM2/10/16
to ve...@googlegroups.com
Here is the correct link: https://github.com/vert-x3/vertx-examples/tree/master/maven-verticles/maven-verticle
Can you point where you find the link ? I will fix it.

Clement

Arkady Bron

unread,
Feb 10, 2016, 8:44:17 AM2/10/16
to ve...@googlegroups.com

Tim Fox

unread,
Feb 10, 2016, 8:45:08 AM2/10/16
to ve...@googlegroups.com
Where did you get that link from?

If you click on the link that says "Maven" in the first paragraph of the "Get Started" section it takes you straight there. (Works for me at least!) :)

1. Start here: http://vertx.io/docs/
2. Click on "Maven" link in first paragraph.

Arkady Bron

unread,
Feb 10, 2016, 8:47:27 AM2/10/16
to ve...@googlegroups.com
Just replied to Clement - it's here: https://github.com/vert-x3/vertx-examples/blob/master/README.adoc

He's going to fix it...

Arkady Bron

unread,
Feb 10, 2016, 9:41:49 AM2/10/16
to ve...@googlegroups.com
Thanks a lot Mykel!

This helped me a lot!

I used though "Import Project" option and imported a directory as an existing Maven project. In 1 click Eclipse converted the directory into a Maven project.

I run into 1 problem with the ""Maven Install" - I had to switch to JDK instead of using JRE - otherwise Eclipse couldn't compile the project. And then I created a "Java Application" Run Configuration, pointed to the io.vertx.core.Launcher class and used run io.vertx.example.HelloWorldVerticle as Program arguments.

At this point I have the example verticle running on my Windows.

I am using Virtual Box's shared directory to do development on Windows and then to test on CentOS - prior deploying the code into production on public cloud. The next challenge for me is to run the verticle on CentOS - I hope it will be smoother than getting started with the Eclipse environment on Windows :)

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/_-_tZfG8eag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.

Mykel Alvis

unread,
Feb 10, 2016, 11:11:15 AM2/10/16
to vert.x
I'm glad that helped!

Sorry about leaving out the rest of the "build an execution" part.  I've been a bit sleep-deprived lately. :)

Jonathan Doughty

unread,
Feb 11, 2016, 12:28:26 PM2/11/16
to vert.x
The problem I have is "Where do I go from here?" at the bottom of the README - the examples are all useful and I can get them to run individually. But how do I now combine them into a complete application in a vert.x 3.x way? Vert.x may be un-opinionated and "we don't tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to" is admirable. But an example opinion, a collection of  bricks to say "this is one, not the, way" I think would help.

I think Vert.x's documentation is almost there in overcoming the complexity but what I find missing is an "And now what?" step 12. A cookiecutter template if you will to lead the adopter, not someone coming from vert.x 2, in how to take the next step and build on all the examples. The challenge I, and I think other adopters, face is I'm used to other, more monolithic, frameworks' concepts; now how do I map those onto vert.x. This is along the lines of what I found valuable in @clement's Introduction to Vert.x series although those too seem to walk the user through the individual capabilities of vert.x and stop short of a big picture.

A bigger / combo web example from the command line for instance. So here is a suggestion based on a question I had:  logging - I suspect every real application is probably going to want logging as part of a bunch of verticles. Vert.x has io.vertx.core.logging.Logger whose purpose is "allows us to isolate all our logging dependencies in one place." But `ack Logger` is finding me no usages of it anywhere in vertx-examples.git. Perhaps an example that combines a few of the more typical use cases that potential adopters might be coming from; e.g., authjdbc and templating and sessions to pick a few arbitrarily that I'm interested in - with logging as an excuse to show how the combination can fit together in a correct way. Contributors might extend this example with angular, or vertxbus, or rest examples although pretty soon you'll end up with an opinion.

Arkady Bron

unread,
Feb 11, 2016, 12:41:30 PM2/11/16
to ve...@googlegroups.com

Agreed!

You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/_-_tZfG8eag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.

Tim Fox

unread,
Feb 11, 2016, 1:20:53 PM2/11/16
to ve...@googlegroups.com
On 11/02/16 17:41, Arkady Bron wrote:

Agreed!

On Feb 11, 2016 7:28 PM, "Jonathan Doughty" <jwd...@gmail.com> wrote:
The problem I have is "Where do I go from here?" at the bottom of the README - the examples are all useful and I can get them to run individually. But how do I now combine them into a complete application in a vert.x 3.x way? Vert.x may be un-opinionated and "we don't tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to" is admirable. But an example opinion, a collection of  bricks to say "this is one, not the, way" I think would help.

This really depends on what type of application you want to write? Is it a web application? If so, what kind of web application? Server side rendered or client side rendered? If client side, what are you using? Angular? Something else?

Maybe you want to write a REST API? Or perhaps a websockets based application? Or maybe a combination of the two?

Maybe it's not a web application but a network utility you want to write? Maybe a chat server? Maybe a network client? Perhaps a web server? Perhaps a real time game?

You'll find examples of all of those in the examples repo. There are an innumerable number of ways to write a Vert.x application and that's because Vert.x is _not_ a framework, but it's a _toolkit_.



Tim Fox

unread,
Feb 11, 2016, 1:27:34 PM2/11/16
to ve...@googlegroups.com
On 11/02/16 18:20, Tim Fox wrote:
On 11/02/16 17:41, Arkady Bron wrote:

Agreed!

On Feb 11, 2016 7:28 PM, "Jonathan Doughty" <jwd...@gmail.com> wrote:
The problem I have is "Where do I go from here?" at the bottom of the README - the examples are all useful and I can get them to run individually. But how do I now combine them into a complete application in a vert.x 3.x way? Vert.x may be un-opinionated and "we don't tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to" is admirable. But an example opinion, a collection of  bricks to say "this is one, not the, way" I think would help.

This really depends on what type of application you want to write? Is it a web application? If so, what kind of web application? Server side rendered or client side rendered? If client side, what are you using? Angular? Something else?

Maybe you want to write a REST API? Or perhaps a websockets based application? Or maybe a combination of the two?

Maybe it's not a web application but a network utility you want to write? Maybe a chat server? Maybe a network client? Perhaps a web server? Perhaps a real time game?

You'll find examples of all of those in the examples repo. There are an innumerable number of ways to write a Vert.x application and that's because Vert.x is _not_ a framework, but it's a _toolkit_.

Vert.x forces you to think about the right architecture for your application as it does not prescribe one. This should give you a much better understanding of your requirements and lead you to a solution that works better for your business case than a "one size fits all" framework approach where you leave the architectural reasoning at the door.

Of course this means, as a developer, you have to think more for yourself, and not just "fill in the blanks" as you do with most rigid frameworks. but I think this is a good thing for developers :)

Tim Fox

unread,
Feb 11, 2016, 1:32:23 PM2/11/16
to ve...@googlegroups.com
On 11/02/16 18:27, Tim Fox wrote:
On 11/02/16 18:20, Tim Fox wrote:
On 11/02/16 17:41, Arkady Bron wrote:

Agreed!

On Feb 11, 2016 7:28 PM, "Jonathan Doughty" <jwd...@gmail.com> wrote:
The problem I have is "Where do I go from here?" at the bottom of the README - the examples are all useful and I can get them to run individually. But how do I now combine them into a complete application in a vert.x 3.x way? Vert.x may be un-opinionated and "we don't tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to" is admirable. But an example opinion, a collection of  bricks to say "this is one, not the, way" I think would help.

This really depends on what type of application you want to write? Is it a web application? If so, what kind of web application? Server side rendered or client side rendered? If client side, what are you using? Angular? Something else?

Maybe you want to write a REST API? Or perhaps a websockets based application? Or maybe a combination of the two?

Maybe it's not a web application but a network utility you want to write? Maybe a chat server? Maybe a network client? Perhaps a web server? Perhaps a real time game?

You'll find examples of all of those in the examples repo. There are an innumerable number of ways to write a Vert.x application and that's because Vert.x is _not_ a framework, but it's a _toolkit_.

Vert.x forces you to think about the right architecture for your application as it does not prescribe one. This should give you a much better understanding of your requirements and lead you to a solution that works better for your business case than a "one size fits all" framework approach where you leave the architectural reasoning at the door.

Of course this means, as a developer, you have to think more for yourself, and not just "fill in the blanks" as you do with most rigid frameworks. but I think this is a good thing for developers :)

So.. for your particular case - if you could explain a bit about what kind of application you want to write then perhaps we can point you more in the right direction :)

qsys

unread,
Feb 12, 2016, 4:16:52 AM2/12/16
to vert.x


Op donderdag 11 februari 2016 18:28:26 UTC+1 schreef Jonathan Doughty:
The problem I have is "Where do I go from here?" at the bottom of the README - the examples are all useful and I can get them to run individually. But how do I now combine them into a complete application in a vert.x 3.x way? Vert.x may be un-opinionated and "we don't tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to" is admirable. But an example opinion, a collection of  bricks to say "this is one, not the, way" I think would help.

Now, that's rather a very difficult issue, since it all really depends a lot on the type of application you're writing. Giving an example of, let's say, a blog-like web application might make people think it's mainly for blogs, or for straight forward web apps. It's not, it's much more versatile. So, suppose there's an example of a web application, some day somebody might take a look, see the example and think: this is not what I'm looking for, since he's looking for something to do some nightly concurrent batch-processing. However, we've had rather good experiences with the latter - not nightly, but still, batch processing. Or a swing, or JavaFX application? Or just as a process where log-messages are piped to (and your vert.x application processes them)? ...?

Your best option to me seems to be:
1. post on this list what you want to do and possibly what you considered so far and what you're struggling with. This is way more interesting than giving an 'example' that will be (mis)used as a kind of template in the end (which might result in all kinds of opinions about vert.x that are wrong).
2. put yourself in a wait for answers and think loop - you'll probably get a few opinions :). This is the fun loop: you only need a screen once in a while to check for new answers. After a while, something must happen, so decide, check if your 'design' still fits your needs and environment and finally, implement (or go back to wait for answers, or even step 1.).

Just a general thought: since there are now and than similar questions: there are already basic examples for each component, but no examples of how you can put them together. I might agree tons of examples, of different scenario's, might help people out. Or, if you will, a kind of 'vert.x architectural examples' could be helpful. It would, in my opnion, only be useful if there are, let's say > 50 'conceptual' examples (of how linking components together). However, that would take tons of time as well :)

Tim Fox

unread,
Feb 12, 2016, 4:51:16 AM2/12/16
to ve...@googlegroups.com
+1. We've wanted to create some kind of "blueprints" library of "real" applications that illustrate a selection of the archetypal apps you might want to create with Vert.x. But it's a lot of work.

The problem Vert.x has always had is resourcing - we've never had the luxury of large full-time teams to work on these things that JavaEE and Spring has had - so these kinds of tasks naturally get prioritised away.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.

qsys

unread,
Feb 12, 2016, 5:23:19 AM2/12/16
to vert.x


Op vrijdag 12 februari 2016 10:51:16 UTC+1 schreef Tim Fox:
On 12/02/16 09:16, qsys wrote:


Op donderdag 11 februari 2016 18:28:26 UTC+1 schreef Jonathan Doughty:
The problem I have is "Where do I go from here?" at the bottom of the README - the examples are all useful and I can get them to run individually. But how do I now combine them into a complete application in a vert.x 3.x way? Vert.x may be un-opinionated and "we don't tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to" is admirable. But an example opinion, a collection of  bricks to say "this is one, not the, way" I think would help.

Now, that's rather a very difficult issue, since it all really depends a lot on the type of application you're writing. Giving an example of, let's say, a blog-like web application might make people think it's mainly for blogs, or for straight forward web apps. It's not, it's much more versatile. So, suppose there's an example of a web application, some day somebody might take a look, see the example and think: this is not what I'm looking for, since he's looking for something to do some nightly concurrent batch-processing. However, we've had rather good experiences with the latter - not nightly, but still, batch processing. Or a swing, or JavaFX application? Or just as a process where log-messages are piped to (and your vert.x application processes them)? ...?

Your best option to me seems to be:
1. post on this list what you want to do and possibly what you considered so far and what you're struggling with. This is way more interesting than giving an 'example' that will be (mis)used as a kind of template in the end (which might result in all kinds of opinions about vert.x that are wrong).
2. put yourself in a wait for answers and think loop - you'll probably get a few opinions :). This is the fun loop: you only need a screen once in a while to check for new answers. After a while, something must happen, so decide, check if your 'design' still fits your needs and environment and finally, implement (or go back to wait for answers, or even step 1.).

Just a general thought: since there are now and than similar questions: there are already basic examples for each component, but no examples of how you can put them together. I might agree tons of examples, of different scenario's, might help people out. Or, if you will, a kind of 'vert.x architectural examples' could be helpful. It would, in my opnion, only be useful if there are, let's say > 50 'conceptual' examples (of how linking components together). However, that would take tons of time as well :)


+1. We've wanted to create some kind of "blueprints" library of "real" applications that illustrate a selection of the archetypal apps you might want to create with Vert.x. But it's a lot of work.

Yeah, and the thing is: you have to agree on how to represent the design (or architecture), which may be opiniated ;).
 

The problem Vert.x has always had is resourcing - we've never had the luxury of large full-time teams to work on these things that JavaEE and Spring has had - so these kinds of tasks naturally get prioritised away.

 Scanning existing projects using vertx and trying to extract the architecture from the code (or maybe just ask the developers/architects/...)? Yeah, seems like an extremely hard task. I wish vert.x had the luxury of a somewhat larger team...

Arnaud Estève

unread,
Feb 13, 2016, 6:06:01 AM2/13/16
to vert.x
If anyone has an idea of a small "showcase" app, interesting for starters (as vertx-feeds can be), do not hesitate to reply to this thread, ping me on github or send me an email.

Just give me a few specifications, keep things basic, let me know if you want it to involve mongo, redis, jdbc etc. and I'll give it a try.

The more examples we've got, the more concrete use cases we can discuss about, the better :)

Jonathan Doughty

unread,
Feb 15, 2016, 10:23:30 AM2/15/16
to vert.x
If you've got some time, how about adding Vert.x to the many implementations of the canonical ToDo application? The purpose of http://www.todobackend.com/  is "to showcase backend tech stacks."  All the specs are right there.  Vert.x ought to have a place, maybe more than one, in that tech stack showcase don'tcha think?

Arnaud Estève

unread,
Feb 17, 2016, 2:40:06 AM2/17/16
to vert.x
Thanks for the pointer. I'm working on it.

I started with grooveex (it helped me alot in adding new functionnalities). After that, I'm expecting to create more Vert.x "standard" examples :
- a pure Java implementation (Todos stored in a vert.x LocalMap for the sake of the example, because it could be a simple ArrayList)
- a Java + mongo example
- a Java + JDBC example
- a Java + redis example

And then maybe something involving the event-bus ? Still not sure how.

Arnaud Estève

unread,
Feb 21, 2016, 12:01:57 PM2/21/16
to vert.x
Here it is, work in progress (LocalMap for now). I'll add vertx-unit tests, too.

The code doesn't aim efficiency but being demonstrative (in the example : how to re-use vertx-web handlers and assemble them as small building bricks).  

Arnaud Estève

unread,
Feb 21, 2016, 12:02:24 PM2/21/16
to vert.x
Missing link (sorry for the noise) : https://github.com/aesteve/todo-backend-vertx

Jonathan Doughty

unread,
Feb 24, 2016, 10:29:29 AM2/24/16
to vert.x
Nice start. Lacks a README and while I can gradle run it to get a web server on localhost:9000 the result, for me, lacks a user interface still.

But really, I'm not complaining; I agree that being demonstrative should be the primary goal. I am sure others will find it useful to compare against other http://www.todobackend.com/ implementations.

Whether the result is "good' vert.x style I leave to others to judge.
Reply all
Reply to author
Forward
0 new messages