autodiscoverable microservices with vertx3

Slides:



Advertisements
Similar presentations
© 2014 IBM Corporation Empowering the IBM ecosystem Introduction to Developing applications using node.js on Bluemix IBM Ecosystem Development Instructors.
Advertisements

G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Understanding and Managing WebSphere V5
CS 157B: Database Management Systems II February 27 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Web Services based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
Introduction to Node.js® Jitendra Kumar Patel Saturday, January 31, 2015.
Deploying Elastic Java EE Microservices in the Cloud with Docker
Social Enablement of Xpages - Linoy K George & Mervin Thomas.
JBossWS beyond JAX-WS Heiko Braun Senior Software Engineer
Ur/Web: A Simple Model for Programming the Web
Copyright (c) JNode.org g JNode a modern Java operating system JNode.org Ewout Prangsma.
The Holmes Platform and Applications
Profound.js: The future of open source development on IBM i
Microservice Powered Orchestration
Java Web Services Orca Knowledge Center – Web Service key concepts.
Configuration & Registry Microservice Deep Dive
Platform as a Service (PaaS)
Build and Learn ASP.NET Workshop.
Export Services Deep Dive
Microservice Bus Tutorial Huabing Zhao
A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed system Patrick Schäfer, , Munich.
Going Serverless with AWS Lambda
Servlets.
Build /26/2018 6:17 AM Building Resilient, Scalable Services with Microsoft Azure Service Fabric Érsek © 2015 Microsoft Corporation.
Platform as a Service (PaaS)
IoT Integration Patterns, REST, and CoAP
Java EE, Microservices, Microprofile and Playing a little mix & match
OpenLegacy Training Day Four Introduction to Microservices
Containers: The new network endpoint
Sabri Kızanlık Ural Emekçi
Chapter 5 Remote Procedure Call
Docker Birthday #3.
Self Healing and Dynamic Construction Framework:
CSE 775 – Distributed Objects Submitted by: Arpit Kothari
Unit – 5 JAVA Web Services
Software Architecture in Practice
Mastering the Fundamentals of RESTful API Design
A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed system Patrick Schäfer, , Munich.
Introduction to Microservices Prepared for
Eng Computation & Data Science.
CMPE419 Mobile Application Development
#01 Client/Server Computing
SharePoint-Hosted Apps and JavaScript
Event driven Microservices with VERT.X & Kubernetes
Using docker containers
Welcome to GDC’05 Riyadh, Saudi Arabia
The pub-sub channels based push service…..
CS 425/625 Software Engineering Architectural Design
NETSERV Network Services for VistA
$, $$, $$$ API testing Edition
INTRODUCTION TO By Stepan Vardanyan.
Serverless Architecture in the Cloud
Introduction to Web Services
Introduction to AppInventor
Distributed System using Web Services
Java Analysis Studio - Status
5 Azure Services Every .NET Developer Needs to Know
J2EE Lecture 13: JMS and WebSocket
Distributed System using Web Services
CMPE419 Mobile Application Development
TN19-TCI: Integration and API management using TIBCO Cloud™ Integration
Client/Server Computing and Web Technologies
Introduction of Week 5 Assignment Discussion
#01 Client/Server Computing
DIBBs Brown Dog BDFiddle
Message Passing Systems
Presentation transcript:

autodiscoverable microservices with vertx3 Andy Moncsek

About me Andy Moncsek Senior Consultant Application development Trivadis AG Switzerland Email: Andy.Moncsek@Trivadis.com Twitter: @AndyAHCP

Agenda about microservices Vert.x 3 introduction H F I about microservices Vert.x 3 introduction microservices on top of Vert.x 3

C E B A G H F I about microservices

characteristics of microservices [1 Martin Fowler] component oriented, replaceable, independent focus on business capabilities UNIX style: do one thing well & work together smart endpoint & dump pipes (no ESB ;-) ) distributed / decentralized data 1 Martin Fowler : http://www.infoq.com/news/2014/11/gotober-fowler-microservices A E F G C H B I

microservice design patterns Architecture patterns Router/Aggregator/Chained/shared-data Deployment patterns instance per host, VM, Container be aware of different depl. patterns Req.-Resp.: response expected, need to know who to ask; Pub-Sub. : service registers itself Events (order 123 created), Queries/Commands : what should happen https://www.voxxed.com/blog/2015/04/coupling-versus-autonomy-in-microservices/ A E F G C H B I

microservice design patterns Interaction/communication pattern Request-Reply vs. Pub-Sub / Events vs. Queries/Commands Service discovery serverside/clientside-discovery / self-/3d-party- registration be aware of different depl. patterns Req.-Resp.: response expected, need to know who to ask; Pub-Sub. : service registers itself Events (order 123 created), Queries/Commands : what should happen https://www.voxxed.com/blog/2015/04/coupling-versus-autonomy-in-microservices/ A E F G C H B I

C E B A G H F I Vert.x 3

Vert.X 3 (tool-kit for building reactive applications) nodeJS for Java developers :-D (sorry Tim) event driven / non blocking polyglot (written in Java 8) general purpose (web, backend) http://vert-x3.github.io, current version: v3.0-milestone6

Vert.X 3 (terms) Vert.X Verticle Event Bus Eventloop vs. Worker F E A 1: The runtime env. either as binary dist. , embedded, fat-jar 2: Verticles are chunks of code that get deployed and run by Vert.x 3: connects all parts of your application (Verticles) / clusterable (Hazlecast) 4: default: Event Loop single threaded - Don’t block the event loop! / Worker Verticles A E F G C H B I

Vert.X 3 (terms) Scaling, Cluster / HA VerticleFactory packaging TCP, UDP, HTTP, WebSocket, SocketJS, FileSystem,….. 1: define number of instances (1 thread/instance), Clustering: „EventBus over network“, HA: failover 2: VerticleFactory: SPI to extend Vert.x (different languages, Spring) 3: no custom modules anymore (simple maven & maven-shade-plugin) 4: create … A E F G C H B I

C E B A G H F I DEMO Vert.x 3

microservices on top of Vert.x 3 B A G H F I microservices on top of Vert.x 3 https://github.com/amoAHCP/vert.x-microservice

Vert.X microservice framework current status: working prototype! idea: all-in-one microservice framework based on Vert.X components: service Verticle service router / API gateway service registry / heartbeat service discovery A E F G C H B I

Vert.X microservice framework - service Verticle @ApplicationPath("/articleService") Verticle @Path("/comments/:id") @OperationType(Type.REST_GET) findComments(@PathParam("id") final String id, Message m) classical „jersey-style“ Path + method vs. async handler registration Why? „reactive / event-driven“ is cool but for many developers still „neuland“ classical input/output (method with parameter and return type) is not applicable (it blocks!)… solution message reply handler @Path("/fetchByArticleIdWS") @OperationType(Type.WEBSOCKET) fetchByArticleIdWS(String id, WSMessageReply r) desc. @Path("/fetchByArticleId") @OperationType(Type.EVENTBUS) fetchByArticleId(String id, EBMessageReply r)

Vert.X microservice framework - router / gateway client router /gateway host:port @Path("/articleService/comments/:id") @Path(„/../fetchByArticleIdWS") @Path(„/..byArticleId“) service Event Bus Vert.X cluster

Vert.X microservice framework - registry / heartbeat challenge: many verticles instances (lokal and cluster) needs to synchronize registration process on startup… solution: cluster-wide counter challenge registry: clusterWideMap is not iterate able… solution: key is the router-key, value is a blob of a descriptor object with all registered descriptions generally figure out how dropwizard is usable for heartbeat router /gateway host:port ping register unreg. registry register Vert.X cluster

Vert.X microservice framework - discovery router /gatew ay host:po rt regis try discovery.service(„name“, op-> ); client / server API the same connects through vertx instance or REST-URL op.operation(„path“, p-> ) fail p.eventBusSend(„message",r->{ // reply }); fail Vert.X cluster

Vert.x microservice framework B A G H F I DEMO Vert.x microservice framework

C E B A G H F I any questions?

C E B A G H F I Thank you

[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/