Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
vertx3
About me
Andy Moncsek
Trivadis AG Switzerland
Email: Andy.Moncsek@Trivadis.com
Twitter: @AndyAHCP
Agenda
about microservices
F
E
Vert.x 3 introduction A
G
C
microservices on top of Vert.x 3 H
B
C
I
F
E
A
G
about microservices C
H
B
C
I
characteristics of microservices [1 Martin
Fowler]
A
F
E
A
smart endpoint & dump pipes (no ESB ;-) ) A
G
A
C
A
A
H
B
A
distributed / decentralized data C
A
AI
microservice design patterns
Architecture patterns
Router/Aggregator/Chained/shared-data
Deployment patterns
Interaction/communication pattern
Service discovery
A
F
serverside/clientside-discovery / self-/3d-party- E
A
registration A
G
A
C
A
A
H
B
A
C
A
AI
F
E
A
G
Vert.x 3 C
H
B
C
I
Vert.X 3
(tool-kit for building reactive
applications)
nodeJS for Java developers :-D (sorry Tim)
Verticle
Event Bus
A
F
E
A
Eventloop vs. Worker A
G
A
C
A
A
H
B
A
C
A
AI
Vert.X 3 (terms)
Scaling, Cluster / HA
VerticleFactory
packaging
A
F
E
A
TCP, UDP, HTTP, WebSocket, SocketJS, FileSystem,.. A
G
A
C
A
A
H
B
A
C
A
AI
F
E
A
G
DEMO C
H
B
C
I
Vert.x 3
F
E
A
G
microservices on top
C
of Vert.x 3 H
B
C
I
https://github.com/amoAHCP/vert.x-microservice
Vert.X microservice framework
current status: working prototype!
components:
service Verticle
@Path("/comments/:id")
@OperationType(Type.REST_GET)
findComments(@PathParam("id") final String id, Message m)
@Path("/fetchByArticleIdWS")
@OperationType(Type.WEBSOCKET)
Verticle fetchByArticleIdWS(String id, WSMessageReply r)
desc. @Path("/fetchByArticleId")
@OperationType(Type.EVENTBUS)
fetchByArticleId(String id, EBMessageReply r)
Vert.X microservice framework - router / gateway
client
@Path("/articleService/comments/:id")
client
@Path(/../fetchByArticleIdWS")
@Path(/..byArticleId) service
client
service
router Event Bus
service
/gateway Event Bus
service
Vert.X cluster
Vert.X microservice framework - registry /
heartbeat
heart- service
service
service
service
beat ping
router service
/gateway
host:port service
service
service
service
register
registry register
Vert.X cluster
Vert.X microservice framework - discovery
p.eventBusSend(message",r->{
rtregis
// reply
try
});
fail
)
fail
); Vert.X cluster
F
E
A
G
DEMO C
H
B
C
I
Vert.x microservice
framework
F
E
any A
G
C
questions? H
B
C
I
F
E
A
G
Thank you C
H
B
C
I
[1] http://www.infoq.com/news/2014/11/gotober-fowler-
microservices
[2] http://www.adam-
bien.com/roller/abien/entry/the_perfect_javaee_microser
vice
[3] https://www.voxxed.com/blog/2015/04/coupling-
versus-autonomy-in-microservices/
[4] https://www.voxxed.com/blog/2015/04/microservice-
design-patterns/