It seems to me that Vert.x provides some nice out-the-box functionality, but is held back by; no solution for callback hell (where are Promises?), horrible module system (honestly, it really is) and generally too prescriptive for many applications.
Having evaluated Spring Boot + Reactor, it seems you can get all the benefits of a micro framework with asynchronous handlers (when you want or need them) whilst avoiding nested callbacks with Promises and chained calls. With this comes all the normal benefits of a Spring managed application (annotation driven config etc). They are also addressing monitoring, service discovery/registry, api routing with the spring cloud project. From these Vert.x only really has service discovery (via HZ) which appears to be protected from the developer so is only really useful for Vert.x internals (ESB).
This is not meant to be a knock down of Vert.x, perhaps some of these issues are getting addressed in 3.0? I'm just wondering where the future of Vert.x lies and it's specific advantages over the Spring alternatives. I really liked Vert.x to begin with, but after using Spring Boot, I just feel so much more at home and confident about integrating services in the long term.
It seems to me that Vert.x provides some nice out-the-box functionality, but is held back by; no solution for callback hell (where are Promises?),
No solution for callback hell? There are several promises libraries and other similar ways of mitigating callback hell (e.g. RxJava) which can, and commonly are, used with Vert.x.
See https://github.com/vert-x/mod-rxvertx for example. RxJava, if you're not aware of it, is like promises on steriod. It takes the idea of promises and extends them to streams of data which can be composed in many powerful ways. Project reactor's Composable is similar to what you can do in RxJava but the latter is arguably more powerful.
Vert.x 3.0 is going to have automatic Rx-ification of APIs. So you can use the simple callback style API if you wish, but we will offer Rx-ified version for all our APIs too.
--
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.
For more options, visit https://groups.google.com/d/optout.
SLA = no more than 50ms slower than upstream server response at the 99th percentile. e.g. if upstream takes 50ms, the Vertx proxy cannot take longer than 100ms at the 99th percentile.
Test framework: https://github.com/wg/wrk/wiki/Installing-Wrk-on-Linux
Hardware: AWS m3.xlarge with 4 cores all in same AWS zone
Call: wrk --latency -c 1000 -t 1 -d 50s --timeout 17s http://localhost:8080/ud/wait/15000
1 thread, 1000 connections, looped call for 50 seconds. Calls app under test which proxies onto a test server that waits 15000ms before replying. Run a minimum of 3 times before times are recorded and 3 runs recorded.
Vertx with 1 verticle.
Framework | Avg | Stdev | Max | 50% | 75% | 90% | 99% |
---|---|---|---|---|---|---|---|
Vertx (1v) | 15.03s | 5.91ms | 15.04s | 15.03s | 15.04s | 15.04s | 15.04s |
Vertx (1v) | 15.03s | 5.91ms | 15.04s | 15.03s | 15.04s | 15.04s | 15.04s |
Vertx (1v) | 15.10s | 197.88ms | 15.83s | 15.03s | 15.03s | 15.22s | 15.83s |
Vertx with 4 verticles, taking advantage of all cores.
Framework | Avg | Stdev | Max | 50% | 75% | 90% | 99% |
---|---|---|---|---|---|---|---|
Vertx (4v) | 15.02s | 3.92ms | 15.03s | 15.02s | 15.03s | 15.03s | 15.03s |
Vertx (4v) | 15.02s | 4.35ms | 15.03s | 15.02s | 15.03s | 15.03s | 15.03s |
Vertx (4v) | 15.03s | 10.99ms | 15.07s | 15.03s | 15.04s | 15.04s | 15.06s |
Framework | Avg | Stdev | Max | 50% | 75% | 90% | 99% |
---|---|---|---|---|---|---|---|
Ratpack | 15.06s | 174.38ms | 16.05s | 15.03s | 15.03s | 15.04s | 16.04s |
Ratpack | 15.02s | 220.60ms | 16.04s | 15.02s | 15.03s | 15.05s | 16.04s |
Ratpack | 15.02s | 330.52ms | 16.24s | 15.02s | 15.03s | 16.02s | 16.24s |
Framework | Avg | Stdev | Max | 50% | 75% | 90% | 99% |
---|---|---|---|---|---|---|---|
Undertow | 15.14m | 277.60ms | 16.04s | 15.02s | 15.03s | 15.42 | 16.04 |
Undertow | 15.11m | 243.80ms | 16.03s | 15.02s | 15.02s | 15.42 | 16.03 |
Undertow | 15.16m | 339.03ms | 16.65s | 15.02s | 15.02s | 15.83 | 16.65 |
Framework | Avg | Stdev | Max | 50% | 75% | 90% | 99% | Requests |
---|---|---|---|---|---|---|---|---|
Vertx | 170.63ms | 3.17ms | 284ms | 170ms | 170ms | 171ms | 182ms | 1,757,517 |
Ratpack | 184.50ms | 95.96ms | 3.17s | 170ms | 176ms | 181ms | 386ms | 1,628,271 |
Undertow | 170.36ms | 8.09ms | 1.17s | 169ms | 170ms | 171ms | 180ms | 1,757,202 |
@RequestMapping("/todo-service") public class TodoService { @RequestMapping("/todo/count") public int size() {... @RequestMapping("/todo/") public List<TodoItem> list() {...
@RequestMapping("/adder-service") public class AdderService { @RequestMapping("/add/{0}/{1}") public int add(@PathVariable int a, @PathVariable int b) {... }
Do you work for Pivotal? ;)
Where to start... I've tried to answer your questions below.
On 17/09/14 16:54, Jamie B wrote:
> After evaluating Vert.x for a few erweeks and then doing some wider research, I wonder what people consider to be the main benefits of using Vert.x over Spring Boot (and supporting packages)?
--
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/ULSbuw6J27w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
--
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/ULSbuw6J27w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/ULSbuw6J27w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
eh?
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
This one has only milestone build
<dependency> <groupId>io.vertx</groupId> <artifactId>vertx-core</artifactId> - <version>3.0.0-SNAPSHOT</version> + <version>3.0.0-milestone5</version> </dependency> <dependency>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>I'd prefer milestone build. But I can only find 3.0.0-milestone5 for vertx-core and not for vertx-web anywhere
--
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.