SlideShare a Scribd company logo
1 of 36
Download to read offline
MICROSERVICES ARCHITECTURE
FOR
CONVERSATIONAL INTELLIGENCE PLATFORM_
@Rafael_Casuso
2
A B O U T M E
•CEO @SnowStormIO
•Organizer @BotDevMad
•Software Engineer with +10 years
of experience leading teams and
developing.
•Software Architect looking for
revolutionary ways to change the
world.
•Specialties: JavaScript, NodeJS,
Conversational Intelligences.
CONVERSATIONAL
INTELLIGENCE
PLATFORM
+ BASIC STRUCTURE
WHICH ARE MY FUNCTIONAL REQUIREMENTS?_
‣ A SOFTWARE PLATFORM TO BUILD CHATBOTS ON
‣ MULTIPLE MESSAGING CHANNELS
‣ UNIFIED USER SYSTEM
‣ DATA PERSISTENCE
‣ DIALOG SYSTEM
‣ NATURAL LANGUAGE PROCESSING
‣ MULTI-LANGUAGE SUPPORT
‣ EVENT TRACKING
THE KRAKEN:
MONOLITH
ARCHITECTURE
+ THE PROBLEM
THE DARK TRUTH. A SMALL MONOLITH IS…_
‣ SIMPLE TO DEVELOP
‣ SIMPLE TO DEPLOY
‣ SIMPLE TO SCALE AS A WHOLE
‣ MORE APPROPRIATE FOR A SMALL PLATFORM OR APPLICATION
WHICH ARE THE DANGERS TO AVOID?_
‣ LARGE MONOLITH DIFFICULT TO UNDERSTAND AND MAINTAIN
‣ DEVELOPMENT SLOW DOWN, CODE BASE INTIMIDATION
‣ MODULARITY IS OPTIONAL, NO BOUNDARIES
‣ INFREQUENT, NOT CONTINUOUS DEPLOYMENT
‣ SCALING INDIVIDUAL COMPONENTS IS IMPOSSIBLE
‣ OBSTACLE TO SCALE DEVELOPMENT TEAMS
‣ TECHNOLOGY STACK LOCK-IN
HOW DOES IT LOOK LIKE?_
T
I
E
R
MESSAGING ADAPTER
USER SYSTEM DIALOG SYSTEM
CORE
ADMIN MULTILANGUAGE
CMS
PUBLIC API
DATABASE
INTEGRATION
INTEGRATION
INTEGRATIONTRACKING SYSTEM
CACHE OTHER SERVICES
DATA ACCESS LAYER
THE WHALES:
SPLITTED
ARCHITECTURE
+ THE EVOLUTION
BENEFITS & DRAWBACKS_
‣ MEDIUM SIZE TIERS EASIER TO LEARN AND MAINTAIN
‣ BETTER DEVELOPMENT SCALING
‣ MORE DEPLOYMENT AND SCALING INDEPENDENCE
‣ STILL MANY COMPONENTS IN THE SAME TIER
‣ MORE COMPLEX DEPLOYMENT
‣ TESTING IS MORE DIFFICULT
‣ NETWORK SLOWS DOWN SYSTEM INTERACTIONS
HOW DOES IT LOOK LIKE?_
T
I
E
R
MESSAGING ADAPTER
DIALOG SYSTEM
INTEGRATION
PUBLIC API
ADMIN
CMS
T
I
E
R
T
I
E
R
T
I
E
R
INTEGRATION
INTEGRATION
MESSAGING ADAPTER
POST-NLP
USER SYSTEM MULTILANGUAGE
MESSAGES
A
P
I
DATABASEOTHER SERVICES AI SERVICES
TRACKING SYSTEM
BUSINESS INTEL
THE DOLPHINS:
MICROSERVICES
ARCHITECTURE
+ THE SOLUTION
BENEFITS_
‣ EACH COMPONENT CAN BE A RELATIVELY SMALL MICROSERVICE
‣ COMPONENT INDEPENDENT DEPLOY
‣ EASIER TO SCALE DEVELOPMENT
‣ IMPROVED FAULT ISOLATION
‣ TECHNOLOGY STACK FREEDOM
‣ MODULARITY IS INHERENT TO THE ARCHITECTURE
DRAWBACKS_
‣ HIGH DEPLOYMENT COMPLEXITY
‣ HIGH INFRASTRUCTURE NEEDS
‣ INTER-COMMUNICATION MECANISM NEEDED
‣ IDES ARE NOT BUILT FOR MICROSERVICES
‣ NETWORK SLOWS DOWN SYSTEM INTERACTIONS
‣ INTEGRATION TESTING IS MORE DIFFICULT
DESIGN_
‣ WHICH IS MY STARTING POINT?
‣ IDEALLY MODULAR COMPONENTS
‣ IDENTIFY BOUNDED CONTEXTS
‣ DOES IT NEED DATA PERSISTANCE?
‣ WHICH ARE ITS DEPENDENCIES:
‣ OTHER MICROSERVICES (PROTECTION/COMMUNICATION/MONITORING)
‣ EXTERNAL SERVICES (PROTECTION)
‣ DEFINE PHASES
‣ BREAK THE CORE
‣ DECREASING COMPONENTS SIZE
BOUNDED CONTEXTS AND OPERATIONS_
‣ OPERATIONS ARE BASIC COMMANDS WITHIN A BOUNDED CONTEXT
‣ BOTS: Create, Get, Modify, Delete
‣ USERS: Create, Get, Modify, Delete, Login, External login, etc
‣ MESSAGES: Create, Get, Delete
‣ SEARCH: Search services, search categories, search detail, etc
‣ BOOKINGS: Create, Get detail, Get list, Modify, Delete
‣ NOTIFICATIONS: Push, schedule
‣ STATISTICS: Create, Get, Delete
‣ RECOMMENDED IMPLEMENTATION: OOP, Classes
DIALOG SYSTEM, INTENTS AND ACTIONS_
‣ DIALOG SYSTEM IS THE MOST IMPORTANT COMPONENT
‣ IT USES BOUNDED CONTEXTS
‣ INTENTS: ENTITIES PARSED FROM USER’S MESSAGE FOR A NLP SERVICE
‣ ACTIONS: CROSS-COMPONENT’S VERBS TRIGGERED BY MESSAGES OR FLOW
ELECTIONS WITHIN A CONVERSATION
‣ INTENTS CAN MATCH ACTIONS WITH 1-TO-1, N-TO-1 AND EVEN N-TO-N
RELATIONS, WHERE MULTIPLE INTENTS COMBINATION IS CHALLENGE
‣ RECOMMENDED IMPLEMENTATION: FP, Functions
TESTING, LOGGING AND MONITORING_
‣ UNIT TESTING
‣ FINE-GRAINED LOGGING
‣ MICROSECS TIME TRACKING
‣ UPSTREAM TRACKING
‣ DOWNSTREAM TRACKING
‣ MONITORING
‣ HEALTH CHECKING
‣ SCALING
‣ GUI ADMIN
NODEJS
MICROSERVICES
WITH SENECA
+ THE IMPLEMENTATION
WHAT IS SENECA?_
‣ IT IS A NODEJS TOOLKIT TO DEVELOP MICROSERVICES SYSTEMS
‣ IT OFFERS THREE CORE FEATURES:
‣ PATTERN MATCHING
‣ UNIQUE PATTERNS
‣ TRANSPORT INDEPENDENCE
‣ HTTP, TCP, AMQP, REDIS, etc
‣ COMPONENTIZATION
PATTERN MATCHING_
‣ CAN BE USED WITHOUT SERVICE DISCOVERY (CONSUL, ZOOKEEPER, ETC)
‣ IT IS BASED ON ASYNCHRONOUS MESSAGING OF JSON OBJECTS
‣ ACTIONS ARE DEFINED BY A PATTERN AND A CALLBACK:
‣ PATTERN like ‘role:math,cmd:sum’
‣ CALLBACK gets message and executes a reply
PATTERN MATCHING_
‣ EXECUTIONS SEND A MESSAGE AND RECEIVE A RESPONSE
seneca.act({role: 'math', cmd: 'sum', left: 1, right: 2}, function (err,
result) {
if (err) return console.error(err)
‣ MORE SPECIFIC PATTERN PREVAILS
‣ ACTIONS CAN EXECUTE ANOTHER ACTION FOR CODE RE-USE
‣ ACTIONS CAN BE ENHANCED BY OVERRIDE
PLUGINS_
‣ FUNCTION THAT CONTAINS A SET OF RELATED ACTIONS
‣ IT HAS AN INIT FUNCTION THAT IS CALLED SYNCHRONOUSLY
‣ EACH PLUGIN IS DEFINED IN A MODULE
‣ PLUGINS ARE TRANSPORT-AGNOSTIC
‣ YOU LOAD A PLUGIN WITH .USE
PLUGIN EXAMPLE_
MICROSERVICES_
‣ YOU RUN A MICROSERVICE IN ITS OWN PROCESS WITH .LISTEN
‣ YOU DEFINE:
‣ ITS MESSAGING TRANSPORT (HTTP - HOST, PORT… -, TCP, ETC)
‣ ITS SPECIFIC PATTERN MATCHING FOR PATTERNS (PIN)
‣ YOU INVOKE A MICROSERVICE WITH .CLIENT
‣ ALL EXECUTIONS MATCHING ITS PIN WILL BE EXECUTED REMOTELY
MICROSERVICE EXAMPLE_
LISTENER CLIENT
EXPOSING MICROSERVICES THROUGH WEB SERVER_
‣ YOU USE AN ADAPTER, FOR EXAMPLE, FOR EXPRESS
‣ IN THE PLUGIN INIT YOU DEFINE ROUTES WITH:
‣ PREFIX, like “/API”
‣ PIN, like ‘role:api,path:*’ (you only expose that matching actions)
‣ MAP, list of paths, like “calculate: { GET:true, suffix:'/:operation' }”
‣ MATCHING ACTION CAN EXECUTE OTHER INTERNAL ACTIONS
‣ FINAL ENDPOINT EXAMPLE “/api/calculate/:operation"
MICROSERVICES WEB SERVER EXAMPLE_
MICROSERVICES WEB SERVER EXAMPLE_
/api/calculate/:operation
DATA STORAGE_
‣ YOU CAN USE ANY PERSISTENCE YOU LIKE
‣ BUT YOU CAN DECIDE LATER
‣ USE PATTERN MATCHING AS ORM WITH SENECA-ENTITY:
‣ LOAD: load an entity by identifier
‣ SAVE: create or update (if you provide an identifier) an entity
‣ LIST: list entities matching a simple query
‣ REMOVE: delete an entity by identifier
‣ FINALLY USE A PLUGIN TO IMPLEMENT THIS ACTIONS
GENERAL TIPS_
‣ ONLY IF YOU MASTER THE DOMAIN
‣ DON’T MIGRATE A MONOLITH TO MICROSERVICES AT ONCE
‣ EACH PARTITION IS A BUSINESS CAPABILITY
‣ AUTONOMY OVER COORDINATION, MINIMIZE DEPENDENCIES
‣ NOT SUITABLE FOR SMALL APPLICATIONS OR PLATFORMS
‣ BE READY TO DEAL WITH INFRASTRUCTURE COMPLEXITY
THANK YOU

More Related Content

Viewers also liked

Building a Bank out of Microservices (NDC Sydney, August 2016)
Building a Bank out of Microservices (NDC Sydney, August 2016)Building a Bank out of Microservices (NDC Sydney, August 2016)
Building a Bank out of Microservices (NDC Sydney, August 2016)Graham Lea
 
World of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the WorldWorld of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the WorldElena Gorman
 
Microservices: Architecture to scale Agile
Microservices: Architecture to scale AgileMicroservices: Architecture to scale Agile
Microservices: Architecture to scale AgileEberhard Wolff
 
Microservices: Architecture for the Real-time Organization
Microservices: Architecture for the Real-time OrganizationMicroservices: Architecture for the Real-time Organization
Microservices: Architecture for the Real-time OrganizationKevin Webber
 
Microservices: Architecture for Agile Software Development
Microservices: Architecture for Agile Software DevelopmentMicroservices: Architecture for Agile Software Development
Microservices: Architecture for Agile Software DevelopmentEberhard Wolff
 
Vert.x for Microservices Architecture
Vert.x for Microservices ArchitectureVert.x for Microservices Architecture
Vert.x for Microservices ArchitectureIdan Fridman
 
Scalable Microservices at Netflix. Challenges and Tools of the Trade
Scalable Microservices at Netflix. Challenges and Tools of the TradeScalable Microservices at Netflix. Challenges and Tools of the Trade
Scalable Microservices at Netflix. Challenges and Tools of the TradeC4Media
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioJérôme Petazzoni
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService ArchitectureFred George
 
Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Adrian Cockcroft
 
Principles of microservices velocity
Principles of microservices   velocityPrinciples of microservices   velocity
Principles of microservices velocitySam Newman
 
Down-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEDown-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEReza Rahman
 
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...Somasundram Balakrushnan
 
RabbitMQ 101 : job scheduling, micro service communication, event based data...
 RabbitMQ 101 : job scheduling, micro service communication, event based data... RabbitMQ 101 : job scheduling, micro service communication, event based data...
RabbitMQ 101 : job scheduling, micro service communication, event based data...Quentin Adam
 
Service Oriented Architecture 10 0
Service Oriented Architecture 10 0Service Oriented Architecture 10 0
Service Oriented Architecture 10 0Nigel Tebbutt
 
Nanoservices and Microservices with Java
Nanoservices and Microservices with JavaNanoservices and Microservices with Java
Nanoservices and Microservices with JavaEberhard Wolff
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services ArchitectureRanjan Baisak
 
How Small Can Java Microservices Be?
How Small Can Java Microservices Be?How Small Can Java Microservices Be?
How Small Can Java Microservices Be?Eberhard Wolff
 
Micro Services - Smaller is Better?
Micro Services - Smaller is Better?Micro Services - Smaller is Better?
Micro Services - Smaller is Better?Eberhard Wolff
 

Viewers also liked (20)

Building a Bank out of Microservices (NDC Sydney, August 2016)
Building a Bank out of Microservices (NDC Sydney, August 2016)Building a Bank out of Microservices (NDC Sydney, August 2016)
Building a Bank out of Microservices (NDC Sydney, August 2016)
 
World of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the WorldWorld of Services: Software Architecture That is Eating the World
World of Services: Software Architecture That is Eating the World
 
Microservices: Architecture to scale Agile
Microservices: Architecture to scale AgileMicroservices: Architecture to scale Agile
Microservices: Architecture to scale Agile
 
Microservices: Architecture for the Real-time Organization
Microservices: Architecture for the Real-time OrganizationMicroservices: Architecture for the Real-time Organization
Microservices: Architecture for the Real-time Organization
 
Microservices: Architecture for Agile Software Development
Microservices: Architecture for Agile Software DevelopmentMicroservices: Architecture for Agile Software Development
Microservices: Architecture for Agile Software Development
 
Vert.x for Microservices Architecture
Vert.x for Microservices ArchitectureVert.x for Microservices Architecture
Vert.x for Microservices Architecture
 
Scalable Microservices at Netflix. Challenges and Tools of the Trade
Scalable Microservices at Netflix. Challenges and Tools of the TradeScalable Microservices at Netflix. Challenges and Tools of the Trade
Scalable Microservices at Netflix. Challenges and Tools of the Trade
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService Architecture
 
Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016
 
Principles of microservices velocity
Principles of microservices   velocityPrinciples of microservices   velocity
Principles of microservices velocity
 
Down-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEDown-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EE
 
Bots: ¿Profetas de una nueva era?
Bots: ¿Profetas de una nueva era?Bots: ¿Profetas de una nueva era?
Bots: ¿Profetas de una nueva era?
 
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
 
RabbitMQ 101 : job scheduling, micro service communication, event based data...
 RabbitMQ 101 : job scheduling, micro service communication, event based data... RabbitMQ 101 : job scheduling, micro service communication, event based data...
RabbitMQ 101 : job scheduling, micro service communication, event based data...
 
Service Oriented Architecture 10 0
Service Oriented Architecture 10 0Service Oriented Architecture 10 0
Service Oriented Architecture 10 0
 
Nanoservices and Microservices with Java
Nanoservices and Microservices with JavaNanoservices and Microservices with Java
Nanoservices and Microservices with Java
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
How Small Can Java Microservices Be?
How Small Can Java Microservices Be?How Small Can Java Microservices Be?
How Small Can Java Microservices Be?
 
Micro Services - Smaller is Better?
Micro Services - Smaller is Better?Micro Services - Smaller is Better?
Micro Services - Smaller is Better?
 

Similar to Microservices Architecture For Conversational Intelligence Platform

Making the Most of Customer Data
Making the Most of Customer DataMaking the Most of Customer Data
Making the Most of Customer DataWSO2
 
(Micro?)services architecture in practice
(Micro?)services architecture in practice(Micro?)services architecture in practice
(Micro?)services architecture in practiceThe Software House
 
Open stack gbp final sn-4-slideshare
Open stack gbp final sn-4-slideshareOpen stack gbp final sn-4-slideshare
Open stack gbp final sn-4-slideshareSumit Naiksatam
 
Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...
Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...
Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...Sven Krasser
 
Lambda Architectures in Practice
Lambda Architectures in PracticeLambda Architectures in Practice
Lambda Architectures in PracticeC4Media
 
Transforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOpsTransforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOpsNicolas (Nick) Barcet
 
DevOps LA Meetup Intro to Habitat
DevOps LA Meetup Intro to HabitatDevOps LA Meetup Intro to Habitat
DevOps LA Meetup Intro to HabitatJessica DeVita
 
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019Henning Jacobs
 
21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIONiklaus Hirt
 
mozzle: Monitoring your Cloud Foundry application
mozzle: Monitoring your Cloud Foundry applicationmozzle: Monitoring your Cloud Foundry application
mozzle: Monitoring your Cloud Foundry applicationIvan Borshukov
 
Gab2017 - Logic Apps, the power of new integration
Gab2017  - Logic Apps, the power of new integrationGab2017  - Logic Apps, the power of new integration
Gab2017 - Logic Apps, the power of new integrationMariano Robles Hernández
 
Logic Apps, the power of new integration
Logic Apps, the power of new integrationLogic Apps, the power of new integration
Logic Apps, the power of new integrationFélix Mondelo
 
Angular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSAngular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSIlia Idakiev
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondUgo Landini
 
DevOps Evolutions - Mike Bushong
DevOps Evolutions - Mike BushongDevOps Evolutions - Mike Bushong
DevOps Evolutions - Mike Bushongscoopnewsgroup
 
Paris FOD meetup - koordinator
Paris FOD meetup - koordinatorParis FOD meetup - koordinator
Paris FOD meetup - koordinatorAbdelkrim Hadjidj
 

Similar to Microservices Architecture For Conversational Intelligence Platform (20)

The Voice Interface Revolution
The Voice Interface RevolutionThe Voice Interface Revolution
The Voice Interface Revolution
 
Making the Most of Customer Data
Making the Most of Customer DataMaking the Most of Customer Data
Making the Most of Customer Data
 
(Micro?)services architecture in practice
(Micro?)services architecture in practice(Micro?)services architecture in practice
(Micro?)services architecture in practice
 
Open stack gbp final sn-4-slideshare
Open stack gbp final sn-4-slideshareOpen stack gbp final sn-4-slideshare
Open stack gbp final sn-4-slideshare
 
Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...
Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...
Straight Talk on Machine Learning -- What the Marketing Department Doesn’t Wa...
 
Lambda Architectures in Practice
Lambda Architectures in PracticeLambda Architectures in Practice
Lambda Architectures in Practice
 
Tweak Geeks #FOS15
Tweak Geeks #FOS15Tweak Geeks #FOS15
Tweak Geeks #FOS15
 
Transforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOpsTransforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOps
 
DevOps LA Meetup Intro to Habitat
DevOps LA Meetup Intro to HabitatDevOps LA Meetup Intro to Habitat
DevOps LA Meetup Intro to Habitat
 
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
Developer Experience at Zalando - Handelsblatt Strategisches IT-Management 2019
 
21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO
 
Coral id-python
Coral id-pythonCoral id-python
Coral id-python
 
mozzle: Monitoring your Cloud Foundry application
mozzle: Monitoring your Cloud Foundry applicationmozzle: Monitoring your Cloud Foundry application
mozzle: Monitoring your Cloud Foundry application
 
Gab2017 - Logic Apps, the power of new integration
Gab2017  - Logic Apps, the power of new integrationGab2017  - Logic Apps, the power of new integration
Gab2017 - Logic Apps, the power of new integration
 
Logic Apps, the power of new integration
Logic Apps, the power of new integrationLogic Apps, the power of new integration
Logic Apps, the power of new integration
 
Angular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSAngular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJS
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
Flipping the script
Flipping the scriptFlipping the script
Flipping the script
 
DevOps Evolutions - Mike Bushong
DevOps Evolutions - Mike BushongDevOps Evolutions - Mike Bushong
DevOps Evolutions - Mike Bushong
 
Paris FOD meetup - koordinator
Paris FOD meetup - koordinatorParis FOD meetup - koordinator
Paris FOD meetup - koordinator
 

More from Rafael Casuso Romate

Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRafael Casuso Romate
 
Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Rafael Casuso Romate
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSRafael Casuso Romate
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8Rafael Casuso Romate
 

More from Rafael Casuso Romate (6)

Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend Developer
 
Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)
 
The Core of Agile
The Core of AgileThe Core of Agile
The Core of Agile
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
 
Google Assistant Revolution
Google Assistant RevolutionGoogle Assistant Revolution
Google Assistant Revolution
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
 

Recently uploaded

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 

Recently uploaded (20)

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 

Microservices Architecture For Conversational Intelligence Platform

  • 2. @Rafael_Casuso 2 A B O U T M E •CEO @SnowStormIO •Organizer @BotDevMad •Software Engineer with +10 years of experience leading teams and developing. •Software Architect looking for revolutionary ways to change the world. •Specialties: JavaScript, NodeJS, Conversational Intelligences.
  • 4. WHICH ARE MY FUNCTIONAL REQUIREMENTS?_ ‣ A SOFTWARE PLATFORM TO BUILD CHATBOTS ON ‣ MULTIPLE MESSAGING CHANNELS ‣ UNIFIED USER SYSTEM ‣ DATA PERSISTENCE ‣ DIALOG SYSTEM ‣ NATURAL LANGUAGE PROCESSING ‣ MULTI-LANGUAGE SUPPORT ‣ EVENT TRACKING
  • 6. THE DARK TRUTH. A SMALL MONOLITH IS…_ ‣ SIMPLE TO DEVELOP ‣ SIMPLE TO DEPLOY ‣ SIMPLE TO SCALE AS A WHOLE ‣ MORE APPROPRIATE FOR A SMALL PLATFORM OR APPLICATION
  • 7. WHICH ARE THE DANGERS TO AVOID?_ ‣ LARGE MONOLITH DIFFICULT TO UNDERSTAND AND MAINTAIN ‣ DEVELOPMENT SLOW DOWN, CODE BASE INTIMIDATION ‣ MODULARITY IS OPTIONAL, NO BOUNDARIES ‣ INFREQUENT, NOT CONTINUOUS DEPLOYMENT ‣ SCALING INDIVIDUAL COMPONENTS IS IMPOSSIBLE ‣ OBSTACLE TO SCALE DEVELOPMENT TEAMS ‣ TECHNOLOGY STACK LOCK-IN
  • 8. HOW DOES IT LOOK LIKE?_ T I E R MESSAGING ADAPTER USER SYSTEM DIALOG SYSTEM CORE ADMIN MULTILANGUAGE CMS PUBLIC API DATABASE INTEGRATION INTEGRATION INTEGRATIONTRACKING SYSTEM CACHE OTHER SERVICES DATA ACCESS LAYER
  • 9.
  • 11. BENEFITS & DRAWBACKS_ ‣ MEDIUM SIZE TIERS EASIER TO LEARN AND MAINTAIN ‣ BETTER DEVELOPMENT SCALING ‣ MORE DEPLOYMENT AND SCALING INDEPENDENCE ‣ STILL MANY COMPONENTS IN THE SAME TIER ‣ MORE COMPLEX DEPLOYMENT ‣ TESTING IS MORE DIFFICULT ‣ NETWORK SLOWS DOWN SYSTEM INTERACTIONS
  • 12. HOW DOES IT LOOK LIKE?_ T I E R MESSAGING ADAPTER DIALOG SYSTEM INTEGRATION PUBLIC API ADMIN CMS T I E R T I E R T I E R INTEGRATION INTEGRATION MESSAGING ADAPTER POST-NLP USER SYSTEM MULTILANGUAGE MESSAGES A P I DATABASEOTHER SERVICES AI SERVICES TRACKING SYSTEM BUSINESS INTEL
  • 13.
  • 15. BENEFITS_ ‣ EACH COMPONENT CAN BE A RELATIVELY SMALL MICROSERVICE ‣ COMPONENT INDEPENDENT DEPLOY ‣ EASIER TO SCALE DEVELOPMENT ‣ IMPROVED FAULT ISOLATION ‣ TECHNOLOGY STACK FREEDOM ‣ MODULARITY IS INHERENT TO THE ARCHITECTURE
  • 16. DRAWBACKS_ ‣ HIGH DEPLOYMENT COMPLEXITY ‣ HIGH INFRASTRUCTURE NEEDS ‣ INTER-COMMUNICATION MECANISM NEEDED ‣ IDES ARE NOT BUILT FOR MICROSERVICES ‣ NETWORK SLOWS DOWN SYSTEM INTERACTIONS ‣ INTEGRATION TESTING IS MORE DIFFICULT
  • 17. DESIGN_ ‣ WHICH IS MY STARTING POINT? ‣ IDEALLY MODULAR COMPONENTS ‣ IDENTIFY BOUNDED CONTEXTS ‣ DOES IT NEED DATA PERSISTANCE? ‣ WHICH ARE ITS DEPENDENCIES: ‣ OTHER MICROSERVICES (PROTECTION/COMMUNICATION/MONITORING) ‣ EXTERNAL SERVICES (PROTECTION) ‣ DEFINE PHASES ‣ BREAK THE CORE ‣ DECREASING COMPONENTS SIZE
  • 18. BOUNDED CONTEXTS AND OPERATIONS_ ‣ OPERATIONS ARE BASIC COMMANDS WITHIN A BOUNDED CONTEXT ‣ BOTS: Create, Get, Modify, Delete ‣ USERS: Create, Get, Modify, Delete, Login, External login, etc ‣ MESSAGES: Create, Get, Delete ‣ SEARCH: Search services, search categories, search detail, etc ‣ BOOKINGS: Create, Get detail, Get list, Modify, Delete ‣ NOTIFICATIONS: Push, schedule ‣ STATISTICS: Create, Get, Delete ‣ RECOMMENDED IMPLEMENTATION: OOP, Classes
  • 19. DIALOG SYSTEM, INTENTS AND ACTIONS_ ‣ DIALOG SYSTEM IS THE MOST IMPORTANT COMPONENT ‣ IT USES BOUNDED CONTEXTS ‣ INTENTS: ENTITIES PARSED FROM USER’S MESSAGE FOR A NLP SERVICE ‣ ACTIONS: CROSS-COMPONENT’S VERBS TRIGGERED BY MESSAGES OR FLOW ELECTIONS WITHIN A CONVERSATION ‣ INTENTS CAN MATCH ACTIONS WITH 1-TO-1, N-TO-1 AND EVEN N-TO-N RELATIONS, WHERE MULTIPLE INTENTS COMBINATION IS CHALLENGE ‣ RECOMMENDED IMPLEMENTATION: FP, Functions
  • 20. TESTING, LOGGING AND MONITORING_ ‣ UNIT TESTING ‣ FINE-GRAINED LOGGING ‣ MICROSECS TIME TRACKING ‣ UPSTREAM TRACKING ‣ DOWNSTREAM TRACKING ‣ MONITORING ‣ HEALTH CHECKING ‣ SCALING ‣ GUI ADMIN
  • 21.
  • 23. WHAT IS SENECA?_ ‣ IT IS A NODEJS TOOLKIT TO DEVELOP MICROSERVICES SYSTEMS ‣ IT OFFERS THREE CORE FEATURES: ‣ PATTERN MATCHING ‣ UNIQUE PATTERNS ‣ TRANSPORT INDEPENDENCE ‣ HTTP, TCP, AMQP, REDIS, etc ‣ COMPONENTIZATION
  • 24. PATTERN MATCHING_ ‣ CAN BE USED WITHOUT SERVICE DISCOVERY (CONSUL, ZOOKEEPER, ETC) ‣ IT IS BASED ON ASYNCHRONOUS MESSAGING OF JSON OBJECTS ‣ ACTIONS ARE DEFINED BY A PATTERN AND A CALLBACK: ‣ PATTERN like ‘role:math,cmd:sum’ ‣ CALLBACK gets message and executes a reply
  • 25. PATTERN MATCHING_ ‣ EXECUTIONS SEND A MESSAGE AND RECEIVE A RESPONSE seneca.act({role: 'math', cmd: 'sum', left: 1, right: 2}, function (err, result) { if (err) return console.error(err) ‣ MORE SPECIFIC PATTERN PREVAILS ‣ ACTIONS CAN EXECUTE ANOTHER ACTION FOR CODE RE-USE ‣ ACTIONS CAN BE ENHANCED BY OVERRIDE
  • 26. PLUGINS_ ‣ FUNCTION THAT CONTAINS A SET OF RELATED ACTIONS ‣ IT HAS AN INIT FUNCTION THAT IS CALLED SYNCHRONOUSLY ‣ EACH PLUGIN IS DEFINED IN A MODULE ‣ PLUGINS ARE TRANSPORT-AGNOSTIC ‣ YOU LOAD A PLUGIN WITH .USE
  • 28. MICROSERVICES_ ‣ YOU RUN A MICROSERVICE IN ITS OWN PROCESS WITH .LISTEN ‣ YOU DEFINE: ‣ ITS MESSAGING TRANSPORT (HTTP - HOST, PORT… -, TCP, ETC) ‣ ITS SPECIFIC PATTERN MATCHING FOR PATTERNS (PIN) ‣ YOU INVOKE A MICROSERVICE WITH .CLIENT ‣ ALL EXECUTIONS MATCHING ITS PIN WILL BE EXECUTED REMOTELY
  • 30. EXPOSING MICROSERVICES THROUGH WEB SERVER_ ‣ YOU USE AN ADAPTER, FOR EXAMPLE, FOR EXPRESS ‣ IN THE PLUGIN INIT YOU DEFINE ROUTES WITH: ‣ PREFIX, like “/API” ‣ PIN, like ‘role:api,path:*’ (you only expose that matching actions) ‣ MAP, list of paths, like “calculate: { GET:true, suffix:'/:operation' }” ‣ MATCHING ACTION CAN EXECUTE OTHER INTERNAL ACTIONS ‣ FINAL ENDPOINT EXAMPLE “/api/calculate/:operation"
  • 32. MICROSERVICES WEB SERVER EXAMPLE_ /api/calculate/:operation
  • 33. DATA STORAGE_ ‣ YOU CAN USE ANY PERSISTENCE YOU LIKE ‣ BUT YOU CAN DECIDE LATER ‣ USE PATTERN MATCHING AS ORM WITH SENECA-ENTITY: ‣ LOAD: load an entity by identifier ‣ SAVE: create or update (if you provide an identifier) an entity ‣ LIST: list entities matching a simple query ‣ REMOVE: delete an entity by identifier ‣ FINALLY USE A PLUGIN TO IMPLEMENT THIS ACTIONS
  • 34. GENERAL TIPS_ ‣ ONLY IF YOU MASTER THE DOMAIN ‣ DON’T MIGRATE A MONOLITH TO MICROSERVICES AT ONCE ‣ EACH PARTITION IS A BUSINESS CAPABILITY ‣ AUTONOMY OVER COORDINATION, MINIMIZE DEPENDENCIES ‣ NOT SUITABLE FOR SMALL APPLICATIONS OR PLATFORMS ‣ BE READY TO DEAL WITH INFRASTRUCTURE COMPLEXITY
  • 35.