Getting started with Vert.x
The framework we'll be using for our microservice is called Vert.x. It's a reactive framework that shares much in common with reactive extensions, which we discussed in Chapter 7, Staying Reactive. It's asynchronous and non-blocking.
Let's understand what this means by using a concrete example.
We'll start with a new Kotlin Gradle project. From your IntelliJ IDEA, open File | New | Project, and choose Gradle | Kotlin in the New Project wizard. Give your project a GroupId (I chose me.soshin) and an ArtifactId (catsShelter in my case).
Note
Gradle is a build tool, similar to Maven and Ant. It has a nice syntax and compiles your projects in an optimised way. You can read about it more here:https://gradle.org/.
On the next screen, choose Use auto-import and Create directories for empty content roots, then click Finish.
Next, add the following dependencies to your build.gradle.
dependencies {
def $vertx_version = '3.5.1'
...
compile...