SlideShare a Scribd company logo
1 of 23
Download to read offline
www.neosperience.com | blog.neosperience.com | info@neosperience.com
April 2017
Serverless chatbot:
from idea to production at blazing speed
Luca Bianchi,
Chief Technology Officer
Who am I? - Luca Bianchi @ Neosperience
CTO @ Neosperience
Working on a lot of bleeding edge technologies. Passionate developer. Love writing code, not Powerpoints.
Full stack developer, CTO, product owner, gamer..
github.com/aletheia
https://it.linkedin.com/in/lucabianchipavia
@bianchiluca
The Digital Customer Experience Company, aims to change the way brands and customers
interact with an approach of a software vendor targeting Digital Customer Experience as the
evolution of Marketing automation.
Neosperience Cloud
Reward
Gamification
Loyalty
Showroom
WishlistCard
Store
Customer
Context
Serverless User Group
• We want you!
Call for Speakers:
http://clda.co/serverless-italy
• 282 members and still growing
• Next Meetups
- Today!
- May, 18th
The Serverless Manifesto
✓ Functions are the unit of development and scaling
✓ No machine, VMs or containers visible in the programming model
✓ Permanent storage lives elsewhere (stateless code)
✓ Scales per request. Users cannot over or under-provision capacity
✓ Never pay for idle
✓ Implicitly fault tolerant
✓ BYOC - Bring Your Own Code
✓ Metrics and logging are an universal right
The Serverless Framework (aka serverless.com)
✓ Fast moving (with a bi-weekly release model)
✓ Funded by a 3M investment
✓ Manages service deployments and provisioning
✓ Vendor independent (in a future release)
✓ Auto-provision of resources
✓ Supports for micro-services
✓ Improved plugin management system
✓ Production ready
Getting started
• Install Serverless locally (trust me, it’s better)

npm install serverless —save
• Create a function in NodeJS (Java and Python supported too)

serverless create —template=aws-nodejs
• Deploy service

serverless deploy
done!
conversate.eu
Conversate's innovative Natural Language Understanding platform powers high quality
chatbots and natural language interfaces
• “Conversation UX platform”
• Natural language understanding: intent recognition, entity extraction
• Conversational engine
• Optionally speech recognition and TTS
• Focused on Italian language
• Leverages Neosperience DCX capabilities to build domain-specific chatbots
Facebook Messenger Platform
• Build chatbots for messenger
• Chatbots are related to a Facebook Page
• Chatbots must be reviewed for approval
• Complex setup, webhook checking
• (new) App and Page users can be tracked together
DEMO Neosperience DCX Bot

http://m.me/neosperience
Architecture Facebook Bot Messenger
Platform
1. send
message
2. HTTP method
call to REST 3. synch HTTP call
to conversate
4.Context
and answer
5. message sent
back to Facebook
6. Message
Messenger Hook
Service
Conversational engine
How to setup?
• Create a project

• Create entities

• Train AI algorithm

• Predict answers
Configure Messenger App
How to setup?
• Create a Facebook Page (chat bots live inside Pages)

• Create a Facebook App (optional)

• Setup webhooks: Messenger will send here the messages of the user

• Security considerations: verify token and page access token

• Subscribe app to page events (eg. new message)

• Receive messages and postbacks, and send structured response

https://developers.facebook.com/docs/messenger-platform/
Serverless
How to setup?
• Start with serverless create

• Write API Gateway endpoint 

• Write Lambda handler (use proxy integration)

• Persist chat context data (i.e. using DynamoDB)

• Implement REST calls to NLP platform
Anatomy of a service
JSON
Request Event
JSON
Response Event
Request
to Api.ai
Response
from Api.ai
Anatomy of a service
• When the webhook is called by Facebook, the lambda is invoked
• Parses Messenger payload and extracts user message
• Assembles conversate message requests and sends it to REST api endpoint
• Parses conversate including recognized intent and bot response
• Assembles Messenger response and sends it back to Messenger
• Administrative functions (verify token authentication, page subscription)
Chatbots are channels, Serverless technologies allow fast prototyping and rollout to
production, microservices enable assembling systems in no time…
An use case for a Loyalty Chatbot
Build a chatbot to support loyalty programs adoption by users.
Loyalty programs are a powerful tool to enhance customer fidelization, but have to overcome the acquisition
limit. Apps are suitable for continuous usage, but have a considerable friction because require installation.
Chatbots could be an easy and fast way to avoid users the need to install apps and provide support for
loyalty logics, rewards retrieval and action performing.
DEMO Meet Gummy

https://gummy.conversate.eu/it
Architecture
Facebook Bot Messenger
Platform
1. send
message
2. HTTP method
call to REST 3. synch HTTP call
to conversate
4.Context
and answer
5. message sent
back to Facebook
6. Message
Gamification / Loyalty
Actions Services
Gamification / Loyalty
Reward Services
Messenger Hook
Service
The good…
• Fast time to market
• Modularity by design
• Functions can run locally
• Everything is contained and versioned
• Serverless avoids a lot of boilerplate
• Incremental deployments
• Supports CI
• Cost-effective (if you already have APIs)
…the bad…
• Architecture has to be enforced (no opinionated view: your code is as good as
the developer who writes it)
• Testing is unavoidable, TDD is encouraged
• Every deploy hits the cloud
• Avoid Lambda cold start issue
• Not everything is supported by CloudFormation
• Many pieces stored in different places
…the ugly
• Testing sometimes is a pain (no Facebook support)
• Users are not logged into the system
• Unclear approval process rules
Slides available on Slideshare

http://bit.ly/thm-20170420

More Related Content

What's hot

Headless commerce for developers - How to start a store
Headless commerce for developers - How to start a storeHeadless commerce for developers - How to start a store
Headless commerce for developers - How to start a storeGiacomo Lamonaco
 
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019AOE
 
How to choose frontend (head) for headless commerce.
How to choose frontend (head) for headless commerce. How to choose frontend (head) for headless commerce.
How to choose frontend (head) for headless commerce. Aureate Labs
 
Bulletproofing Your APIs: Why Users’ Feedback Matters
Bulletproofing Your APIs: Why Users’ Feedback MattersBulletproofing Your APIs: Why Users’ Feedback Matters
Bulletproofing Your APIs: Why Users’ Feedback MattersPronovix
 
apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...
apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...
apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...apidays
 
Gwt development with errai and forge
Gwt development with errai and forgeGwt development with errai and forge
Gwt development with errai and forgefirenze-gtug
 
Magento 2 looks like.
Magento 2 looks like.Magento 2 looks like.
Magento 2 looks like.Magestore
 

What's hot (9)

Headless commerce for developers - How to start a store
Headless commerce for developers - How to start a storeHeadless commerce for developers - How to start a store
Headless commerce for developers - How to start a store
 
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
 
How to choose frontend (head) for headless commerce.
How to choose frontend (head) for headless commerce. How to choose frontend (head) for headless commerce.
How to choose frontend (head) for headless commerce.
 
Bulletproofing Your APIs: Why Users’ Feedback Matters
Bulletproofing Your APIs: Why Users’ Feedback MattersBulletproofing Your APIs: Why Users’ Feedback Matters
Bulletproofing Your APIs: Why Users’ Feedback Matters
 
apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...
apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...
apidays LIVE Helsinki & North - Designing embedded platforms: lessons from in...
 
Gwt development with errai and forge
Gwt development with errai and forgeGwt development with errai and forge
Gwt development with errai and forge
 
Sharepoint introduction
Sharepoint introductionSharepoint introduction
Sharepoint introduction
 
Magento 2 looks like.
Magento 2 looks like.Magento 2 looks like.
Magento 2 looks like.
 
Outlook on Magento 2
Outlook on Magento 2Outlook on Magento 2
Outlook on Magento 2
 

Similar to Serverless chatbot: from idea to production at blazing speed

Serverless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speedServerless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speedLuca Bianchi
 
Microsoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspectiveMicrosoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspectiveThomas Gölles
 
Frankly Chat Competitive Analysis
Frankly Chat Competitive AnalysisFrankly Chat Competitive Analysis
Frankly Chat Competitive AnalysisLauren P. Dodge
 
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveThomas Gölles
 
Build an Intelligent Bot (Node.js)
Build an Intelligent Bot (Node.js)Build an Intelligent Bot (Node.js)
Build an Intelligent Bot (Node.js)Sorin Peste
 
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ..."Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...Tech in Asia ID
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptxGlobal Azure2021 Verona.pptx
Global Azure2021 Verona.pptxLuis Beltran
 
PDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptx
PDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptxPDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptx
PDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptxLuis Beltran
 
Microsoft Teams Development - Conversational AI
Microsoft Teams Development - Conversational AIMicrosoft Teams Development - Conversational AI
Microsoft Teams Development - Conversational AIThomas Gölles
 
What new in Microsoft AI?
What new in Microsoft AI?What new in Microsoft AI?
What new in Microsoft AI?Cheah Eng Soon
 
Chatbot technology- The innovative enterprise collaboration
Chatbot technology- The innovative enterprise collaborationChatbot technology- The innovative enterprise collaboration
Chatbot technology- The innovative enterprise collaborationKushan Lahiru Perera
 
Detailed Technical Portfolio
Detailed Technical PortfolioDetailed Technical Portfolio
Detailed Technical PortfolioTahirMustafa
 
Full Stack Web Development Basics to Know.pdf
Full Stack Web Development Basics to Know.pdfFull Stack Web Development Basics to Know.pdf
Full Stack Web Development Basics to Know.pdfLaura Miller
 
Supriya Saha Resume
Supriya Saha ResumeSupriya Saha Resume
Supriya Saha Resumesupriya saha
 
Anish Gupta CV (UI and SharePoint developer)
Anish Gupta CV (UI and SharePoint developer)Anish Gupta CV (UI and SharePoint developer)
Anish Gupta CV (UI and SharePoint developer)ANISH GUPTA
 

Similar to Serverless chatbot: from idea to production at blazing speed (20)

Serverless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speedServerless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speed
 
Chatbot Meetup
Chatbot MeetupChatbot Meetup
Chatbot Meetup
 
Microsoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspectiveMicrosoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspective
 
Frankly Chat Competitive Analysis
Frankly Chat Competitive AnalysisFrankly Chat Competitive Analysis
Frankly Chat Competitive Analysis
 
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
 
Build an Intelligent Bot (Node.js)
Build an Intelligent Bot (Node.js)Build an Intelligent Bot (Node.js)
Build an Intelligent Bot (Node.js)
 
LUIS and Bots
LUIS and BotsLUIS and Bots
LUIS and Bots
 
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ..."Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptxGlobal Azure2021 Verona.pptx
Global Azure2021 Verona.pptx
 
PDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptx
PDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptxPDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptx
PDCConf2021 - Serverless WhatsApp Chatbot with Azure AI.pptx
 
Microsoft Teams Development - Conversational AI
Microsoft Teams Development - Conversational AIMicrosoft Teams Development - Conversational AI
Microsoft Teams Development - Conversational AI
 
Fastlix
FastlixFastlix
Fastlix
 
Accemy Chatbots expertise
Accemy Chatbots expertiseAccemy Chatbots expertise
Accemy Chatbots expertise
 
What new in Microsoft AI?
What new in Microsoft AI?What new in Microsoft AI?
What new in Microsoft AI?
 
Chatbot technology- The innovative enterprise collaboration
Chatbot technology- The innovative enterprise collaborationChatbot technology- The innovative enterprise collaboration
Chatbot technology- The innovative enterprise collaboration
 
Detailed Technical Portfolio
Detailed Technical PortfolioDetailed Technical Portfolio
Detailed Technical Portfolio
 
Full Stack Web Development Basics to Know.pdf
Full Stack Web Development Basics to Know.pdfFull Stack Web Development Basics to Know.pdf
Full Stack Web Development Basics to Know.pdf
 
Supriya Saha Resume
Supriya Saha ResumeSupriya Saha Resume
Supriya Saha Resume
 
Resume Pritesh Gandhi
Resume Pritesh GandhiResume Pritesh Gandhi
Resume Pritesh Gandhi
 
Anish Gupta CV (UI and SharePoint developer)
Anish Gupta CV (UI and SharePoint developer)Anish Gupta CV (UI and SharePoint developer)
Anish Gupta CV (UI and SharePoint developer)
 

More from Paolo Montrasio

Sviluppare agenti conversazionali con Rasa
Sviluppare agenti conversazionali con RasaSviluppare agenti conversazionali con Rasa
Sviluppare agenti conversazionali con RasaPaolo Montrasio
 
Il Chatbot come guida di viaggio: Travelchat
Il Chatbot come guida di viaggio: TravelchatIl Chatbot come guida di viaggio: Travelchat
Il Chatbot come guida di viaggio: TravelchatPaolo Montrasio
 
Costruire chatbot conversazionali ed intelligenti con Xenioo
Costruire chatbot conversazionali ed intelligenti con XeniooCostruire chatbot conversazionali ed intelligenti con Xenioo
Costruire chatbot conversazionali ed intelligenti con XeniooPaolo Montrasio
 
Voicebot: i Chatbot crescono e imparano a parlare
Voicebot: i Chatbot crescono e imparano a parlareVoicebot: i Chatbot crescono e imparano a parlare
Voicebot: i Chatbot crescono e imparano a parlarePaolo Montrasio
 
IBM Watson, un caso reale
IBM Watson, un caso realeIBM Watson, un caso reale
IBM Watson, un caso realePaolo Montrasio
 
Gardy, un chatbot multilingua
Gardy, un chatbot multilinguaGardy, un chatbot multilingua
Gardy, un chatbot multilinguaPaolo Montrasio
 
Il più intelligente Chatbot Bancario in Italia!
Il più intelligente Chatbot Bancario in Italia!Il più intelligente Chatbot Bancario in Italia!
Il più intelligente Chatbot Bancario in Italia!Paolo Montrasio
 
Chatbot, a chi proporli e come ... scegli il giusto target
Chatbot, a chi proporli e come ... scegli il giusto targetChatbot, a chi proporli e come ... scegli il giusto target
Chatbot, a chi proporli e come ... scegli il giusto targetPaolo Montrasio
 
Cicerus - una piattaforma per lo sviluppo di chatbot
Cicerus - una piattaforma per lo sviluppo di chatbotCicerus - una piattaforma per lo sviluppo di chatbot
Cicerus - una piattaforma per lo sviluppo di chatbotPaolo Montrasio
 
Esplorando Google Assistant e Dialogflow
Esplorando Google Assistant e DialogflowEsplorando Google Assistant e Dialogflow
Esplorando Google Assistant e DialogflowPaolo Montrasio
 
Hubot + wit.ai, un chatbot aziendale per Slack
Hubot + wit.ai, un chatbot aziendale per SlackHubot + wit.ai, un chatbot aziendale per Slack
Hubot + wit.ai, un chatbot aziendale per SlackPaolo Montrasio
 
L'AI per Sales & Marketing B2B
L'AI per Sales & Marketing B2BL'AI per Sales & Marketing B2B
L'AI per Sales & Marketing B2BPaolo Montrasio
 
Innovazione digitale e i chatbot 2017
Innovazione  digitale e i chatbot  2017Innovazione  digitale e i chatbot  2017
Innovazione digitale e i chatbot 2017Paolo Montrasio
 
Trovare clienti con un chatbot
Trovare clienti con un chatbotTrovare clienti con un chatbot
Trovare clienti con un chatbotPaolo Montrasio
 
Innovare la relazione con i clienti nel retail
Innovare la relazione con i clienti nel retailInnovare la relazione con i clienti nel retail
Innovare la relazione con i clienti nel retailPaolo Montrasio
 
I chatbot come sostituti delle app
I chatbot come sostituti delle appI chatbot come sostituti delle app
I chatbot come sostituti delle appPaolo Montrasio
 

More from Paolo Montrasio (20)

Sviluppare agenti conversazionali con Rasa
Sviluppare agenti conversazionali con RasaSviluppare agenti conversazionali con Rasa
Sviluppare agenti conversazionali con Rasa
 
Il Chatbot come guida di viaggio: Travelchat
Il Chatbot come guida di viaggio: TravelchatIl Chatbot come guida di viaggio: Travelchat
Il Chatbot come guida di viaggio: Travelchat
 
Costruire chatbot conversazionali ed intelligenti con Xenioo
Costruire chatbot conversazionali ed intelligenti con XeniooCostruire chatbot conversazionali ed intelligenti con Xenioo
Costruire chatbot conversazionali ed intelligenti con Xenioo
 
Diving deep into NLP
Diving deep into NLPDiving deep into NLP
Diving deep into NLP
 
Voicebot: i Chatbot crescono e imparano a parlare
Voicebot: i Chatbot crescono e imparano a parlareVoicebot: i Chatbot crescono e imparano a parlare
Voicebot: i Chatbot crescono e imparano a parlare
 
IBM Watson, un caso reale
IBM Watson, un caso realeIBM Watson, un caso reale
IBM Watson, un caso reale
 
Gardy, un chatbot multilingua
Gardy, un chatbot multilinguaGardy, un chatbot multilingua
Gardy, un chatbot multilingua
 
Il più intelligente Chatbot Bancario in Italia!
Il più intelligente Chatbot Bancario in Italia!Il più intelligente Chatbot Bancario in Italia!
Il più intelligente Chatbot Bancario in Italia!
 
Chatbot, a chi proporli e come ... scegli il giusto target
Chatbot, a chi proporli e come ... scegli il giusto targetChatbot, a chi proporli e come ... scegli il giusto target
Chatbot, a chi proporli e come ... scegli il giusto target
 
Cicerus - una piattaforma per lo sviluppo di chatbot
Cicerus - una piattaforma per lo sviluppo di chatbotCicerus - una piattaforma per lo sviluppo di chatbot
Cicerus - una piattaforma per lo sviluppo di chatbot
 
Esplorando Google Assistant e Dialogflow
Esplorando Google Assistant e DialogflowEsplorando Google Assistant e Dialogflow
Esplorando Google Assistant e Dialogflow
 
Hubot + wit.ai, un chatbot aziendale per Slack
Hubot + wit.ai, un chatbot aziendale per SlackHubot + wit.ai, un chatbot aziendale per Slack
Hubot + wit.ai, un chatbot aziendale per Slack
 
Making Chatbots
Making ChatbotsMaking Chatbots
Making Chatbots
 
L'AI per Sales & Marketing B2B
L'AI per Sales & Marketing B2BL'AI per Sales & Marketing B2B
L'AI per Sales & Marketing B2B
 
Chatbot per i musei
Chatbot per i museiChatbot per i musei
Chatbot per i musei
 
Innovazione digitale e i chatbot 2017
Innovazione  digitale e i chatbot  2017Innovazione  digitale e i chatbot  2017
Innovazione digitale e i chatbot 2017
 
Trovare clienti con un chatbot
Trovare clienti con un chatbotTrovare clienti con un chatbot
Trovare clienti con un chatbot
 
Innovare la relazione con i clienti nel retail
Innovare la relazione con i clienti nel retailInnovare la relazione con i clienti nel retail
Innovare la relazione con i clienti nel retail
 
I chatbot come sostituti delle app
I chatbot come sostituti delle appI chatbot come sostituti delle app
I chatbot come sostituti delle app
 
Message in a chatbot
Message in a chatbotMessage in a chatbot
Message in a chatbot
 

Recently uploaded

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 

Recently uploaded (20)

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 

Serverless chatbot: from idea to production at blazing speed

  • 1. www.neosperience.com | blog.neosperience.com | info@neosperience.com April 2017 Serverless chatbot: from idea to production at blazing speed Luca Bianchi, Chief Technology Officer
  • 2. Who am I? - Luca Bianchi @ Neosperience CTO @ Neosperience Working on a lot of bleeding edge technologies. Passionate developer. Love writing code, not Powerpoints. Full stack developer, CTO, product owner, gamer.. github.com/aletheia https://it.linkedin.com/in/lucabianchipavia @bianchiluca
  • 3. The Digital Customer Experience Company, aims to change the way brands and customers interact with an approach of a software vendor targeting Digital Customer Experience as the evolution of Marketing automation. Neosperience Cloud Reward Gamification Loyalty Showroom WishlistCard Store Customer Context
  • 4. Serverless User Group • We want you! Call for Speakers: http://clda.co/serverless-italy • 282 members and still growing • Next Meetups - Today! - May, 18th
  • 5. The Serverless Manifesto ✓ Functions are the unit of development and scaling ✓ No machine, VMs or containers visible in the programming model ✓ Permanent storage lives elsewhere (stateless code) ✓ Scales per request. Users cannot over or under-provision capacity ✓ Never pay for idle ✓ Implicitly fault tolerant ✓ BYOC - Bring Your Own Code ✓ Metrics and logging are an universal right
  • 6. The Serverless Framework (aka serverless.com) ✓ Fast moving (with a bi-weekly release model) ✓ Funded by a 3M investment ✓ Manages service deployments and provisioning ✓ Vendor independent (in a future release) ✓ Auto-provision of resources ✓ Supports for micro-services ✓ Improved plugin management system ✓ Production ready
  • 7. Getting started • Install Serverless locally (trust me, it’s better)
 npm install serverless —save • Create a function in NodeJS (Java and Python supported too)
 serverless create —template=aws-nodejs • Deploy service
 serverless deploy done!
  • 8. conversate.eu Conversate's innovative Natural Language Understanding platform powers high quality chatbots and natural language interfaces • “Conversation UX platform” • Natural language understanding: intent recognition, entity extraction • Conversational engine • Optionally speech recognition and TTS • Focused on Italian language • Leverages Neosperience DCX capabilities to build domain-specific chatbots
  • 9. Facebook Messenger Platform • Build chatbots for messenger • Chatbots are related to a Facebook Page • Chatbots must be reviewed for approval • Complex setup, webhook checking • (new) App and Page users can be tracked together
  • 10. DEMO Neosperience DCX Bot
 http://m.me/neosperience
  • 11. Architecture Facebook Bot Messenger Platform 1. send message 2. HTTP method call to REST 3. synch HTTP call to conversate 4.Context and answer 5. message sent back to Facebook 6. Message Messenger Hook Service
  • 12. Conversational engine How to setup? • Create a project • Create entities • Train AI algorithm • Predict answers
  • 13. Configure Messenger App How to setup? • Create a Facebook Page (chat bots live inside Pages) • Create a Facebook App (optional) • Setup webhooks: Messenger will send here the messages of the user • Security considerations: verify token and page access token • Subscribe app to page events (eg. new message) • Receive messages and postbacks, and send structured response https://developers.facebook.com/docs/messenger-platform/
  • 14. Serverless How to setup? • Start with serverless create • Write API Gateway endpoint • Write Lambda handler (use proxy integration) • Persist chat context data (i.e. using DynamoDB) • Implement REST calls to NLP platform
  • 15. Anatomy of a service JSON Request Event JSON Response Event Request to Api.ai Response from Api.ai
  • 16. Anatomy of a service • When the webhook is called by Facebook, the lambda is invoked • Parses Messenger payload and extracts user message • Assembles conversate message requests and sends it to REST api endpoint • Parses conversate including recognized intent and bot response • Assembles Messenger response and sends it back to Messenger • Administrative functions (verify token authentication, page subscription)
  • 17. Chatbots are channels, Serverless technologies allow fast prototyping and rollout to production, microservices enable assembling systems in no time… An use case for a Loyalty Chatbot Build a chatbot to support loyalty programs adoption by users. Loyalty programs are a powerful tool to enhance customer fidelization, but have to overcome the acquisition limit. Apps are suitable for continuous usage, but have a considerable friction because require installation. Chatbots could be an easy and fast way to avoid users the need to install apps and provide support for loyalty logics, rewards retrieval and action performing.
  • 19. Architecture Facebook Bot Messenger Platform 1. send message 2. HTTP method call to REST 3. synch HTTP call to conversate 4.Context and answer 5. message sent back to Facebook 6. Message Gamification / Loyalty Actions Services Gamification / Loyalty Reward Services Messenger Hook Service
  • 20. The good… • Fast time to market • Modularity by design • Functions can run locally • Everything is contained and versioned • Serverless avoids a lot of boilerplate • Incremental deployments • Supports CI • Cost-effective (if you already have APIs)
  • 21. …the bad… • Architecture has to be enforced (no opinionated view: your code is as good as the developer who writes it) • Testing is unavoidable, TDD is encouraged • Every deploy hits the cloud • Avoid Lambda cold start issue • Not everything is supported by CloudFormation • Many pieces stored in different places
  • 22. …the ugly • Testing sometimes is a pain (no Facebook support) • Users are not logged into the system • Unclear approval process rules
  • 23. Slides available on Slideshare
 http://bit.ly/thm-20170420