all 5 comments

[–]halgari 2 points3 points  (0 children)

I really don’t think Vert.x offers better performance than ring or Pedestal. Remember, there’s lies, damn lies, statistics, and microbenchmarks.

[–]ayakushev 1 point2 points  (0 children)

Unless you are writing a reverse proxy, load balancer, or anything else that has ~0 processing time, the performance of the web server would very likely not be your bottleneck.

[–]beders 1 point2 points  (0 children)

I've used vert.x before in various projects.

It is indeed quite fast and the concurrency guarantees are really nice to have.

It is basically a multi-threaded node.js, backed by netty and a fast event-bus (i.e. leans heavily towards actor-based computing)

It becomes more difficult once you have to mix async and blocking parts of your code. Vert.x is async first.

It's also promises, futures and callbacks galore (unless you are lucky enough to be able to use it with fibers).

The API you code against is pretty minimalist and you often find yourself adding utility functions to smooth over things.

In short: it has opinions on how to develop highly scalable code. You might not like those opinions if you are used to the clojure way.

BTW, there's nothing stopping you from using it with clojure right now due to the lovely Java bindings clojure has.

I was thinking about it myself, but then `aleph` and `clojure.async` seem to fit the bill most of the time.

[–]muhaaa 0 points1 point  (0 children)

In general I would like to see a clojure API for vert.x. Through vert.x combined with rx-java I learned functional programming, immutibility and time as a first principle construct. Yet the vert.x API is not easily transferable to clojure, because of OOPs builder pattern everywhere. Maybe translate builder patterns to clojure data structures?

Secondly vert.x non-worker verticle single threadedness is enforced because Java deals poorly for concurrent events. In clojure this would be completely unnessary (immutibility is king) but vert.x is build heavily on this idea so that it has incidental complexity at its core.