+ All Categories
Home > Software > Reactive applications and microservices with Vert.x tool-kit

Reactive applications and microservices with Vert.x tool-kit

Date post: 11-Apr-2017
Category:
Upload: victor-hugo
View: 935 times
Download: 0 times
Share this document with a friend
23
applications and Microservices with Vert.x tool-kit Victor Hugo / Recife-PE http://titorec.net
Transcript
Page 1: Reactive applications and microservices with Vert.x tool-kit

Be happy. Reactive applications and Microservices with Vert.x tool-kitVictor Hugo / Recife-PEhttp://titorec.net

Page 2: Reactive applications and microservices with Vert.x tool-kit

Reactive applications

Page 3: Reactive applications and microservices with Vert.x tool-kit

What Reactive means ?“Showing a response to a stimulus” Oxford

“Tending to be responsive or to react to a stimulus.” http://www.thefreedictionary.com/reactive

Response and react to a stimulus quickly

Page 4: Reactive applications and microservices with Vert.x tool-kit

Reactive concepts

Page 5: Reactive applications and microservices with Vert.x tool-kit

ResponsiveA responsive system is quick to answer to all users in beautiful ways or bad ways

Rapid

Consistent

Page 6: Reactive applications and microservices with Vert.x tool-kit

ResilientA resilient system offer an architecture type where bad days become good days

A resilient system guarantees the availability of your service

Replication

Isolation

Failover

Load balance

Fail tolerance

Page 7: Reactive applications and microservices with Vert.x tool-kit

ScalableA scalable system is easy to increment when you need to answer several load types

Scaling up (max memory)

Scaling out (max childs on the cluster)

Page 8: Reactive applications and microservices with Vert.x tool-kit

Event drivenA event driven system is based on events which are expected by one or more observers

A event driven system is asynchronous where messages are delivered when the process end without block the thread where the event was fired

Page 9: Reactive applications and microservices with Vert.x tool-kit

Microservices

Page 10: Reactive applications and microservices with Vert.x tool-kit

Monolithic applicationHTML / JAVASCRIPT

Movie Service Recommendation ServiceAnalysis ServiceRating Service User Service

Data Access

Application domain

Page 11: Reactive applications and microservices with Vert.x tool-kit

Microservices architectureHTML / JAVASCRIPT

Movie Service

Data Access

HTML / JAVASCRIPT

User Service

Data Access

HTML / JAVASCRIPT

Rating Service

Data Access

HTML / JAVASCRIPT

Recommendation Service

Data Access

HTML / JAVASCRIPT

Analysis Service

Data Access

MySQL MySQL Neo4j MongoDB Spark

Application domain

Page 12: Reactive applications and microservices with Vert.x tool-kit

Microservices communication

Page 13: Reactive applications and microservices with Vert.x tool-kit

Microservices characteristics• Automation• Continuous delivery• Decentralize the things• Each team take control about their deploys• Small teams (max of 4 people)• Does not necessary stop all services to deploy a new service• Easy scaling• Architecture fail tolerance (One fail does not stop all application)• Each service is elastic, resilient, composable, minimal, and complete• The services are small and easy to manage

Page 14: Reactive applications and microservices with Vert.x tool-kit

And now. Who will help me ?

Page 15: Reactive applications and microservices with Vert.x tool-kit

Here is the answer. Vert.x

http://vertx.io/

Page 16: Reactive applications and microservices with Vert.x tool-kit

General purpose

http://vertx.io/

Vert.x is incredibly flexible – whether it’s simple network utilities, sophisticated modern web applications, HTTP/REST microservices, high volume event processing or a full blown back-end message-bus application, Vert.x is a great fit.

Vert.x is not restrictive framework or container and we don’t tell you a correct way to write an application. Instead we give you a lot of useful bricks and let you create your app the way you want to.

Page 17: Reactive applications and microservices with Vert.x tool-kit

Scale

http://vertx.io/

Vert.x is event driven and non blocking. This means your app can handle a lot of concurrency using a small number of kernel threads. Vert.x lets you app scale with minimal hardware.

Scale

Page 18: Reactive applications and microservices with Vert.x tool-kit

Vert.x architecture

Page 19: Reactive applications and microservices with Vert.x tool-kit

How the Event Loop(non-blocking) worksIf a thread to execute a long operation that does not use CPU like read or write data to disk other thread can be executed until the first operation to be finished maximizing the CPU use.

Page 20: Reactive applications and microservices with Vert.x tool-kit

Polyglot

http://vertx.io/

You can use Vert.x with multiple languages including Java, JavaScript, Groovy and Ruby.

Vert.x doesn’t preach about what language is best – you choose the languages you want based on the task at hand and the skill-set of your team.

Page 21: Reactive applications and microservices with Vert.x tool-kit

Advantages

http://vertx.io/

• Vert.x is lightweight - Vert.x core is around 650kB in size.• Vert.x is fast. Here are some independent numbers.• Vert.x is not an application server. There's no monolithic Vert.x instance into which you

deploy applications. You just run your apps wherever you want to.• Vert.x is modular - when you need more bits just add the bits you need and nothing

more.• Vert.x is simple but not simplistic. Vert.x allows you to create powerful apps, simply.• Vert.x is an ideal choice for creating light-weight, high-performance, microservices.

Page 22: Reactive applications and microservices with Vert.x tool-kit

Some things that Vert.x can do• Core / Web (UDP / TCP / HTTP / Rest / Json / Xml)• Data (MongoDB / JDBC Client / Redis Client / Spring data using JAVA language)• Hibernate using JAVA language• Mail Client• Authentication and Authorisation• Docker (Let you run Vert.x Applications in docker containers)• Clustering(Hazelcast)• Maven• Spring framework using JAVA language• and more...

Page 23: Reactive applications and microservices with Vert.x tool-kit

Hands on


Recommended