Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Areeb-Gillani authored Sep 1, 2023
1 parent ce5c4b3 commit 7c32549
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
This project adds the flavor of SpringBoot's style annotations in vertx to reduce the learning curve. It follows the same annotation style such as @RestController, @Service, @Autowired, @RequestParam, @RequestBody, @PostMapping & @GetMapping whereas controller and service classes should extend AbstractVerticle as per the requirement of Vertx.

# Background & Basics
### Vertx Vs Spring
Vertx is an event driven toolkit backed by eclipse foundation. It's a polyglot and is used for highly concurrent code writing. When compared to Spring Webflux or Boot vertx is exceptionally fast. In my performance testing I have found vertx 75% faster than spring. Techempower has also shared very similar results on their site as well https://www.techempower.com/benchmarks/#section=data-r21. Now considering this, if you want to develop a state of the art application with high throughput, one should go for vertx as it is Java's fastest available unopinionated framework available today (Techempower's results also backs this statement).

### Basics of Vertx
In Vertx a router needs to be decalared in order to register API endpoints in the application. Each route has its own handler which entertains the logic once API endpoint is called. It becomes very hard to maintain so many route handlers and like most people tend to declare all the routes in the same class then it's a very hard class to maintain.
Vertx says that every class which extends abstractverticle will be handled by their own dedicated threads and threadpools and will have its own life cycle. I am asuming that you have the basic idea of MainVerticle and WorkerVerticle. If you don't have the idea then please visit https://vertx.io first.
A service is basically a worker verticle and you can configure it using the following json.

Vertx says that every class which extends abstractverticle will be handled by their own dedicated threads and threadpools and will have its own life cycle. I am asuming that you have the basic idea of MainVerticle and WorkerVerticle. If you don't have the idea then please visit https://vertx.io first. A service is basically a worker verticle and you can configure it using the following json.
# Config
```json
{
Expand Down

0 comments on commit 7c32549

Please sign in to comment.