Slide 1

Slide 1 text

vert.X simplicidade Que nos traz FELICIDADE

Slide 2

Slide 2 text

Agenda Vert.x Concepts Reducing Complexity Open API -> OpenID JDBC Async Metrics Distributed Tracing

Slide 3

Slide 3 text

Vert.x Concepts

Slide 4

Slide 4 text

Vert.x Verticles Verticles are chunks of code that get deployed and run by Vert.x. A Vert.x instance maintains N event loop threads (where N by default is core*2) by default. Worker - Thread Pool in general for blocking code Standard - Event Loop

Slide 5

Slide 5 text

Vert.x Event Loop

Slide 6

Slide 6 text

https://github.com/vert-x3/vertx-examples/blob/4.x/web-examples/src/main/java/io/vertx/example/web/helloworld/Server.java

Slide 7

Slide 7 text

Vert.x Event Bus Is the nervous system of Vert.x. The event bus allows different parts of your application to communicate with each other, and whether they’re in the same Vert.x instance, or in a different Vert.x instance.

Slide 8

Slide 8 text

https://github.com/vert-x3/vertx-examples/blob/4.x/web-examples/src/main/java/io/vertx/example/web/vertxbus/amd/Server.java

Slide 9

Slide 9 text

Reducing complexity

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Lots of Modules Different integrations Models Design Patterns is very important DDD HExagonal Architecture

Slide 12

Slide 12 text

Applications scopes are reduced Many Integrations Contracts will be very helpful

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

The contract is our “new” abstraction

Slide 15

Slide 15 text

An API-First approach means that for any given development project, your APIs are treated as first-class citizens. API First

Slide 16

Slide 16 text

OVERVIEW DIAGRAM

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Supports it???? How

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

How about Vert.x and code complexity??? 1. Easy way to implement OpenAPI endpoints 2. Validate input data using OpenAPI definition 3. Handlers is totally Single Response Principle (SRP) 4. SQL Client in Vert.x is asynchronous 5. Avoid callback Vert.x 4 encourages Futures, sometimes called “Futurisation”

Slide 22

Slide 22 text

APIs is very important to achieve business goals. Security should be first-class citizen in APIs. API Security

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Supports it???? How

Slide 25

Slide 25 text

How about vert.x supports OpenId 1. Auth JWT 2. Configure issuer (OP) in configuration file 3. Download keys from /certs obtained from .well-know endpoints 4. Easy way to achieve token verifier

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

JDBC asynchronous YES

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Features 1. Supports sql-templates 2. Use annotations 3. Add dependency to process annotations 4. It is asynchronous

Slide 32

Slide 32 text

Metrics

Slide 33

Slide 33 text

How about vert.x and Metrics 1. You can use micrometer metrics 2. Add prometheus a metric collector 3. Metrics from HTTP Endpoints are out-of-box 4. Easy way to expose these metrics

Slide 34

Slide 34 text

Supports it???? How

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Distributed Tracing

Slide 40

Slide 40 text

How about vert.x and Distributed Tracing 1. It Supports OpenTracing and Zipkin 2. Configuration are done using environment 3. You can choose the tracing policy PROPAGATE, ALWAYS,and IGNORE 4. You can enable trace in vert.x Event Bus

Slide 41

Slide 41 text

Supports it???? How

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Read Vert.x configuration from json, env and others. Supports Redis Clients in Asynchronous Fashion Support graphQL endpoints in your Vert.x Services OTHER Features Config REDIS graphQL Implementation of the circuit-breaker pattern to mitigate failures. This component provides a Kafka client for reading and sending messages from/to an Apache Kafka cluster. A Vert.x client allowing applications to interact with a MongoDB instance, whether that’s saving, retrieving, searching, or deleting documents Circuit Breaker Kafka MongoDB

Slide 46

Slide 46 text

conclusions 01 02 03 04 Think about Software Architecture and choose carefully Vert.x support microservices “standards” metrics, tracing…. Use contracts to improve communicati on between teams It is not a silver bullet, think in another option in your toolbox

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

CREDITS: This presentation template was created by Slidesgo, including icons by Flaticon, and infographics & images by Freepik. THANKS! Do you have any questions? [email protected] @claudioed https://claudioed.tech Github https://github.com/claudioed/tdc-inn-users https://github.com/claudioed/tdc-inn-chat https://github.com/claudioed/tdc-inn-police-man