import io.vertx.core.AbstractVerticle;
public class Server extends AbstractVerticle {
public void start() {
vertx.createHttpServer().requestHandler(req -> {
req.response()
.putHeader("content-type", "text/plain")
.end("Hello from Vert.x!");
}).listen(8080);
}
}
import io.vertx.core.AbstractVerticle
class Server : AbstractVerticle() {
override fun start() {
vertx.createHttpServer().requestHandler { req ->
req.response()
.putHeader("content-type", "text/plain")
.end("Hello from Vert.x!")
}.listen(8080)
}
}
vertx.createHttpServer().requestHandler({ req ->
req.response()
.putHeader("content-type", "text/plain")
.end("Hello from Vert.x!")
}).listen(8080)
Resource-efficient
Handle more requests with less resources compared to traditional stacks and frameworks based on blocking I/O. Vert.x is a great fit for all kinds of execution environments, including constrained environments like virtual machines and containers.
Don’t waste resources, increase deployment density and save money!
Concurrent and asynchronous
People told you asynchronous programming is too hard for you? We strive to make programming with Vert.x an approachable experience, without sacrifying correctness and performance.
You pick the model that works best for the task at hand: callbacks, promises, futures, reactive extensions, and (Kotlin) coroutines.
Flexible
Vert.x is a toolkit, not a framework, so it is naturally very composable and embeddable. We have no strong opinion on what your application structure should be like.
Select the modules and clients you need and compose them as you craft your application. Vert.x will always adapt and scale depending on your needs.
Vert.x is fun
Forget complexity and costly abstractions. With Vert.x, what you write is actually what you get to execute! Get back to simple designs, forget some of the established “best practices”, and enjoy writing code that is comprehensible and that won’t let you down in the future.
We also have a friendly community, so you can learn from people who have used Vert.x in very diverse settings.
Ecosystem
Web APIs, databases, messaging, event streams, cloud, registries, security… you name it. Vert.x has you covered with a comprehensive end-to-end reactive clients stack for modern applications.
And if you can’t find what you are looking for, there is a very strong chance that someone else has done it in the wider Vert.x open-source ecosystem. Vert.x is a safe investment for your technology stack.
Read about Vert.x
Vert.x in Action teaches you how to build responsive, resilient, and scalable JVM applications with Vert.x using well-established reactive design patterns.