SlideShare a Scribd company logo
Serverless
LINE
KEVIN LUO
Outline
• LINE Chatbot Enabler - Messaging API
• Serverless Architecture
• Charbot architecture on AWS
• Implementation & Deployment
Who AM I
• Chasing New Technologies
• Principal Application
Analyst @LINE
• Service/Solution
Architecture, BigData,
Software Engineering,
• @Youku @miiiCasa
@Yahoo!Kimo
Messaging API
What’s New
• New Features

• API Design

• Beacon Event
3 New Features
GROUP
/CHAT
Group/Room
Event
Organiser
3 New Features
NEW
MESSAG
E
TYPE
GROUP
/CHAT
Confirm Button Carousel
Imagemap
• Multiple
areas
• Different
actions
More Template Messages
• Template message is HTML type
message
• Develop more templates
• Even work with partners
3 New Features
REPLY
/PUSH
NEW
MESSAG
E
TYPE
GROUP
/CHAT
Reply / Push
user send message
Reply from bot
Push from bot
ne
How Does It Work?
LINE
APP
(channel
)
webhook (https)
API call (https)response (https)
request (https)
Your Bot
LINE
Bot
Platform
API Design
Improvement
Intuitive & Simplicity & Secure
Messaging API Bot API (Deprecated)
Developer Trial Account Trial Account
Webhook event object
Receiving message
Receiving operation
Imagemap message Rich message
Reply message Sending message
Push message Sending message
Template message n/a
Reply token n/a
User_id (different from each Bot provider) Mid
Webhook Event Object
Message Text, Image, Audio, Video, Sticker, Location
Follow Added as friend
Unfollow Blocked
Join Join group/room
Leave new Leave group/room
Postback new From template action
Beacon new Got beacon signal
Location Event Object
Postback Event Object
用Serverless技術快速開發line聊天機器人
Push Message
Additional APIs
• Get Content
• GET https://api.line.me/v2/bot/message/
{messageId}/content
• Get Profile
• GET https://api.line.me/v2/bot/profile/
{userId}
SDK Support
• Easily use
• Wrap up data parsing
• Simplify message composing
• Many languages
• https://github.com/line/
用Serverless技術快速開發line聊天機器人
Develop NOW !!!
(App) https://business.line.me
(Bot) https://developers.line.me
(Bot) https://admin-official.line.me
Terms & Relationship
Personal LINE Account
Business
LINE OA
BC(Business
Connect)
LINE @
Messaging API
Login & Add Company
https://business.line.me/en/
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人
Bot Settings
Features
Disabled:
1-on-1
Enable
用Serverless技術快速開發line聊天機器人
Channel
Channel ID
Channel
Webhook URL
Channel Access
Serviceless
Architecture
What is Serverless?
• NOT no servers, NO maintenances
(setup, monitor, scale, security…)

• Development focus on functions 

• No always-on servers
Example - From
Example - To
Pros
• Reduced Operation Cost

• Reduced Development Cost

• Scaling Cost

• Time to market/Experimentation
Cons
• Vendor Control

• Multi-tenancy

• Vendor Lock-in

• Security Concerns

• No in-server state

• Startup Latency
Serverless in AWS
AWS Lambda
• Deploy functions in Java, Python,
Node.js, C#

• Build-in scalability and high availability

• Well integrated with other AWS services

• Pay as you go
What can you do with AWS
Lambda?
• Build event-driven applications

• Build APIs together with Amazon API
Gateway

• Restful APIs

• Resources, methods
Service Architecture
Setup & Configuration
A simple Lambda function in
Python"
• aws lambda create-function --function-name add --
handler myFunc.lambda_handler --runtime python2.7 --
zip-file fileb://myFunc.zip --memory-size 128 --role
arn:aws:iam::ACCOUNT_NUMBER:role/lambda_basic_execution 

• curl -H "Content-Type: application/json" -X POST -d
"{"value1":5, "value2":7}" https://API_ENDPOINT
That’s great, but…
• No one wants to code in the AWS console (right?) 

• Managing functions with the AWS CLI isn’t dev-friendly 

• Managing APIs with the AWS CLI quite complex (low-
level calls) 

• CloudFormation doesn’t make it easy to deploy and
manage serverless applications (custom resources) 

• So what are the options?
Serverless Tools
• Development

• Serverless Framework

• Gordon

• AWS Chalice

• More frameworks: Kappa, Apex, Zappa, Docker-lambda

• AWS Lambda plugin for Eclipse 

• Deployment 

• AWS Serverless Application Framework (SAM)
Development
https://github.com/xfalcons/serverless-aws
The Severless Framework
• Announced at re:Invent 2015 by Austen Collins and Ryan
Pendergast 

• Supports Node.js, as well as Python and Java (with restrictions) 

• Auto-deploys and runs Lambda functions, locally or remotely 

• Auto-deploys your Lambda event sources: API Gateway, S3,
DynamoDB, etc. 

• Creates all required infrastructure with CloudFormation 

• Simple configuration in YML
https://serverless.com
Serverless: standalone function
$ serverless create --template aws-python
Edit handler.py, serverless.yml
$ serverless deploy
$ serverless invoke 

[ local ]

--function function_name
$ serverless logs --function function_name
Gordon
• Released in Oct’15 by Jorge Batista 

• Supports Python, Javascript, Golang, Java, Scala, Kotlin
(including in the same project) 

• Auto-deploys and runs Lambda functions, locally or remotely 

• Auto-deploys your Lambda event sources: API Gateway,
CloudWatch Events, DynamoDB Streams, Kinesis Streams, S3 

• Creates all required infrastructure with CloudFormation 

• Simple configuration in YML
https://github.com/jorgebastida/gordon
Gordon: “Hello World” API
$ gordon startproject helloworld
$ gordon startapp helloapp
Write hellofunc() function
$ gordon build
$ echo '{"name":"Julien"}' | gordon run helloapp.hellofunc
$ gordon apply --stage stage_name
$ http post $API_ENDPOINT name=Julien
Zappa
"Think of it as "serverless" web hosting for your Python web apps"
• Just add your Python code 

• Deploy with a single call and zero config 

• The API is created automatically, the IAM policy is
auto-generated 

• Run APIs locally on port 8000 (similar to Flask) 

• Fast & lightweight framework 

• 100% boto3 calls (AWS SDK for Python) —> fast
https://github.com/awslabs/chalice
Zappa: “Hello World” API
Write your function in app.py
(flask or django)
$ zappa init
$ zappa deploy dev
$ zappa tail dev
Summing things up
Serverless 

• The most popular
serverless framework 

• Built with and for
Node.js. Python and
Java: YMMV 

• Rich features, many
event sources 

• Not a web
framework
Gordon

• Great challenger! 

• Node.js, Python,
Java, Scala, Golang 

• Comparable to
Serverless feature-
wise 

• Not a web
framework
Zappa 

• Python only 

• Does only one
thing, but does it
great 

• Dead simple, zero
config 

• Flask, Django web
framework
Deployment
AWS Serverless Application Model (SAM)
"formerly known as Project Flourish"
• CloudFormation extension released in Nov’16 to bundle Lambda functions, APIs & events 

• 3 new CloudFormation resource types 

• AWS::Serverless::Function 

• AWS::Serverless::Api 

• AWS::Serverless::SimpleTable 

• 2 new CloudFormation commands 

• aws cloudformation package

• aws cloudformation deploy

• Integration with CodeBuild and CodePipeline for CI/CD 

• Expect SAM to be integrated in most / all frameworks
Demo
- aws cli
- serverless
- zappa
https://github.com/xfalcons/serverless-aws
Thank you and Enjoy!
Ad

More Related Content

What's hot (20)

"It’s not only Lambda! Economics behind Serverless" at Serverless Architectur...
"It’s not only Lambda! Economics behind Serverless" at Serverless Architectur..."It’s not only Lambda! Economics behind Serverless" at Serverless Architectur...
"It’s not only Lambda! Economics behind Serverless" at Serverless Architectur...
Vadym Kazulkin
 
Alfresco tech talk live mobile sdks
Alfresco tech talk live mobile sdksAlfresco tech talk live mobile sdks
Alfresco tech talk live mobile sdks
Alfresco Software
 
Data normalization across API interactions
Data normalization across API interactionsData normalization across API interactions
Data normalization across API interactions
Cloud Elements
 
Patrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to ServicefullPatrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to Servicefull
ServerlessConf
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
Mugunth Kumar
 
Enterprise Implementation & the Experience API
Enterprise Implementation & the Experience APIEnterprise Implementation & the Experience API
Enterprise Implementation & the Experience API
Ali Shahrazad
 
David Max SATURN 2018 - Migrating from Oracle to Espresso
David Max SATURN 2018 - Migrating from Oracle to EspressoDavid Max SATURN 2018 - Migrating from Oracle to Espresso
David Max SATURN 2018 - Migrating from Oracle to Espresso
David Max
 
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: The Role of Enterprise Integration in Digital TransformationWSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
ServerlessConf
 
Serverless Summit - Quiz
Serverless Summit - QuizServerless Summit - Quiz
Serverless Summit - Quiz
CodeOps Technologies LLP
 
SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo
SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo   SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo
SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo
Sencha
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
Domingo Suarez Torres
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
User-percieved performance
User-percieved performanceUser-percieved performance
User-percieved performance
Mike North
 
Domain Driven Design Through Onion Architecture
Domain Driven Design Through Onion ArchitectureDomain Driven Design Through Onion Architecture
Domain Driven Design Through Onion Architecture
BoldRadius Solutions
 
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- ZagrebAPEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
Michael Hichwa
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterWorking with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
DataNext Solutions
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
Manish Pandit
 
Serverless with Azure Functions
Serverless with Azure FunctionsServerless with Azure Functions
Serverless with Azure Functions
Andreas Willich
 
Zero to Sixty with Oracle ApEx
Zero to Sixty with Oracle ApExZero to Sixty with Oracle ApEx
Zero to Sixty with Oracle ApEx
Bradley Brown
 
"It’s not only Lambda! Economics behind Serverless" at Serverless Architectur...
"It’s not only Lambda! Economics behind Serverless" at Serverless Architectur..."It’s not only Lambda! Economics behind Serverless" at Serverless Architectur...
"It’s not only Lambda! Economics behind Serverless" at Serverless Architectur...
Vadym Kazulkin
 
Alfresco tech talk live mobile sdks
Alfresco tech talk live mobile sdksAlfresco tech talk live mobile sdks
Alfresco tech talk live mobile sdks
Alfresco Software
 
Data normalization across API interactions
Data normalization across API interactionsData normalization across API interactions
Data normalization across API interactions
Cloud Elements
 
Patrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to ServicefullPatrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to Servicefull
ServerlessConf
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
Mugunth Kumar
 
Enterprise Implementation & the Experience API
Enterprise Implementation & the Experience APIEnterprise Implementation & the Experience API
Enterprise Implementation & the Experience API
Ali Shahrazad
 
David Max SATURN 2018 - Migrating from Oracle to Espresso
David Max SATURN 2018 - Migrating from Oracle to EspressoDavid Max SATURN 2018 - Migrating from Oracle to Espresso
David Max SATURN 2018 - Migrating from Oracle to Espresso
David Max
 
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: The Role of Enterprise Integration in Digital TransformationWSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
ServerlessConf
 
SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo
SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo   SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo
SenchaCon 2016: An Ext JS Dashboard for IoT Data - Dan Gallo
Sencha
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
User-percieved performance
User-percieved performanceUser-percieved performance
User-percieved performance
Mike North
 
Domain Driven Design Through Onion Architecture
Domain Driven Design Through Onion ArchitectureDomain Driven Design Through Onion Architecture
Domain Driven Design Through Onion Architecture
BoldRadius Solutions
 
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- ZagrebAPEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
Michael Hichwa
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterWorking with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
DataNext Solutions
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
Manish Pandit
 
Serverless with Azure Functions
Serverless with Azure FunctionsServerless with Azure Functions
Serverless with Azure Functions
Andreas Willich
 
Zero to Sixty with Oracle ApEx
Zero to Sixty with Oracle ApExZero to Sixty with Oracle ApEx
Zero to Sixty with Oracle ApEx
Bradley Brown
 

Viewers also liked (20)

БИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖ
БИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖБИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖ
БИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖ
ERKHEMSAIKHAN Altangerel
 
Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...
Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...
Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...
HOUBEN nv
 
Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...
Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...
Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...
WhooTranslate
 
Origen y evolución de la educación infantil
Origen y evolución de la educación infantilOrigen y evolución de la educación infantil
Origen y evolución de la educación infantil
Yovagu
 
Power point abm 2018 ppd ku.pptx
Power point abm 2018   ppd ku.pptxPower point abm 2018   ppd ku.pptx
Power point abm 2018 ppd ku.pptx
vlesmkbbp
 
зош №19 день добровольця
зош №19 день добровольцязош №19 день добровольця
зош №19 день добровольця
Tatyana Novomlinets
 
Textual analysis for batman v superman
Textual analysis for batman v supermanTextual analysis for batman v superman
Textual analysis for batman v superman
Aman Ali
 
20161209 ゼミ プレゼン_ver2
20161209 ゼミ プレゼン_ver220161209 ゼミ プレゼン_ver2
20161209 ゼミ プレゼン_ver2
清峰 孝太
 
Agenda haztodobonito
Agenda haztodobonitoAgenda haztodobonito
Agenda haztodobonito
HIKOO
 
Fashion spread outfit 2
Fashion spread outfit 2Fashion spread outfit 2
Fashion spread outfit 2
bc05093848
 
Método de Orff
Método de OrffMétodo de Orff
Método de Orff
Fundación Bigott
 
Textual analysis for batman v superman
Textual analysis for batman v supermanTextual analysis for batman v superman
Textual analysis for batman v superman
Aman Ali
 
Greece section 5
Greece section 5Greece section 5
Greece section 5
jdpyatt
 
ESL First Letter Game
ESL First Letter GameESL First Letter Game
ESL First Letter Game
English Teaching 101
 
7º ano mat cem - 7.4
7º ano   mat cem - 7.4 7º ano   mat cem - 7.4
7º ano mat cem - 7.4
Paulo André Bezerra de Melo
 
6º ano mat cem - 6.4
6º ano   mat cem - 6.46º ano   mat cem - 6.4
6º ano mat cem - 6.4
Paulo André Bezerra de Melo
 
Excel - Filtros Automáticos e Avançados
Excel - Filtros Automáticos e AvançadosExcel - Filtros Automáticos e Avançados
Excel - Filtros Automáticos e Avançados
Paula Peres
 
Podcasts: Insights From Design Industry Stars - James Swan
Podcasts: Insights From Design Industry Stars - James SwanPodcasts: Insights From Design Industry Stars - James Swan
Podcasts: Insights From Design Industry Stars - James Swan
DesignBloggersConference
 
Podcasts: Insights From Design Industry Stars -LuAnn Nigara
Podcasts: Insights From Design Industry Stars -LuAnn NigaraPodcasts: Insights From Design Industry Stars -LuAnn Nigara
Podcasts: Insights From Design Industry Stars -LuAnn Nigara
DesignBloggersConference
 
Didáctica de las Matemáticas y Ciencias (mediante enfoques: Lúdico y por Des...
Didáctica de las Matemáticas y Ciencias  (mediante enfoques: Lúdico y por Des...Didáctica de las Matemáticas y Ciencias  (mediante enfoques: Lúdico y por Des...
Didáctica de las Matemáticas y Ciencias (mediante enfoques: Lúdico y por Des...
JAVIER SOLIS NOYOLA
 
БИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖ
БИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖБИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖ
БИЗНЕС ИНКУБАТОР ТӨВ БАЙГУУЛЖ АЖИЛЛУУЛАХАД БАРИМТЛАХ ЗӨВЛӨМЖ
ERKHEMSAIKHAN Altangerel
 
Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...
Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...
Vesalius Leuven - Projectbezoek - Organisatorische aanpak en technische uitda...
HOUBEN nv
 
Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...
Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...
Lo que debes de revisar antes de entregar un proyecto a una Empresa de Traduc...
WhooTranslate
 
Origen y evolución de la educación infantil
Origen y evolución de la educación infantilOrigen y evolución de la educación infantil
Origen y evolución de la educación infantil
Yovagu
 
Power point abm 2018 ppd ku.pptx
Power point abm 2018   ppd ku.pptxPower point abm 2018   ppd ku.pptx
Power point abm 2018 ppd ku.pptx
vlesmkbbp
 
зош №19 день добровольця
зош №19 день добровольцязош №19 день добровольця
зош №19 день добровольця
Tatyana Novomlinets
 
Textual analysis for batman v superman
Textual analysis for batman v supermanTextual analysis for batman v superman
Textual analysis for batman v superman
Aman Ali
 
20161209 ゼミ プレゼン_ver2
20161209 ゼミ プレゼン_ver220161209 ゼミ プレゼン_ver2
20161209 ゼミ プレゼン_ver2
清峰 孝太
 
Agenda haztodobonito
Agenda haztodobonitoAgenda haztodobonito
Agenda haztodobonito
HIKOO
 
Fashion spread outfit 2
Fashion spread outfit 2Fashion spread outfit 2
Fashion spread outfit 2
bc05093848
 
Textual analysis for batman v superman
Textual analysis for batman v supermanTextual analysis for batman v superman
Textual analysis for batman v superman
Aman Ali
 
Greece section 5
Greece section 5Greece section 5
Greece section 5
jdpyatt
 
Excel - Filtros Automáticos e Avançados
Excel - Filtros Automáticos e AvançadosExcel - Filtros Automáticos e Avançados
Excel - Filtros Automáticos e Avançados
Paula Peres
 
Podcasts: Insights From Design Industry Stars - James Swan
Podcasts: Insights From Design Industry Stars - James SwanPodcasts: Insights From Design Industry Stars - James Swan
Podcasts: Insights From Design Industry Stars - James Swan
DesignBloggersConference
 
Podcasts: Insights From Design Industry Stars -LuAnn Nigara
Podcasts: Insights From Design Industry Stars -LuAnn NigaraPodcasts: Insights From Design Industry Stars -LuAnn Nigara
Podcasts: Insights From Design Industry Stars -LuAnn Nigara
DesignBloggersConference
 
Didáctica de las Matemáticas y Ciencias (mediante enfoques: Lúdico y por Des...
Didáctica de las Matemáticas y Ciencias  (mediante enfoques: Lúdico y por Des...Didáctica de las Matemáticas y Ciencias  (mediante enfoques: Lúdico y por Des...
Didáctica de las Matemáticas y Ciencias (mediante enfoques: Lúdico y por Des...
JAVIER SOLIS NOYOLA
 
Ad

Similar to 用Serverless技術快速開發line聊天機器人 (14)

Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)
Julien SIMON
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
Julien SIMON
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWS
Julien SIMON
 
Building serverless applications (April 2018)
Building serverless applications (April 2018)Building serverless applications (April 2018)
Building serverless applications (April 2018)
Julien SIMON
 
Lambdaless and AWS CDK
Lambdaless and AWS CDKLambdaless and AWS CDK
Lambdaless and AWS CDK
MooYeol Lee
 
Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.js
Julien SIMON
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWS
Julien SIMON
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)
Julien SIMON
 
AWS Amplify
AWS AmplifyAWS Amplify
AWS Amplify
AWS Riyadh User Group
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
European Collaboration Summit
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
Daniel Zivkovic
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
Julien SIMON
 
How to create a Function App on Cosmos DB
How to create a Function App on Cosmos DBHow to create a Function App on Cosmos DB
How to create a Function App on Cosmos DB
Hansamali Gamage
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless Applications
Chris Munns
 
Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)
Julien SIMON
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
Julien SIMON
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWS
Julien SIMON
 
Building serverless applications (April 2018)
Building serverless applications (April 2018)Building serverless applications (April 2018)
Building serverless applications (April 2018)
Julien SIMON
 
Lambdaless and AWS CDK
Lambdaless and AWS CDKLambdaless and AWS CDK
Lambdaless and AWS CDK
MooYeol Lee
 
Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.js
Julien SIMON
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWS
Julien SIMON
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)
Julien SIMON
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
Daniel Zivkovic
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
Julien SIMON
 
How to create a Function App on Cosmos DB
How to create a Function App on Cosmos DBHow to create a Function App on Cosmos DB
How to create a Function App on Cosmos DB
Hansamali Gamage
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless Applications
Chris Munns
 
Ad

Recently uploaded (20)

How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 

用Serverless技術快速開發line聊天機器人

  • 2. Outline • LINE Chatbot Enabler - Messaging API • Serverless Architecture • Charbot architecture on AWS • Implementation & Deployment
  • 3. Who AM I • Chasing New Technologies • Principal Application Analyst @LINE • Service/Solution Architecture, BigData, Software Engineering, • @Youku @miiiCasa @Yahoo!Kimo
  • 5. What’s New • New Features • API Design • Beacon Event
  • 12. More Template Messages • Template message is HTML type message • Develop more templates • Even work with partners
  • 14. Reply / Push user send message Reply from bot Push from bot ne
  • 15. How Does It Work? LINE APP (channel ) webhook (https) API call (https)response (https) request (https) Your Bot LINE Bot Platform
  • 18. Messaging API Bot API (Deprecated) Developer Trial Account Trial Account Webhook event object Receiving message Receiving operation Imagemap message Rich message Reply message Sending message Push message Sending message Template message n/a Reply token n/a User_id (different from each Bot provider) Mid
  • 19. Webhook Event Object Message Text, Image, Audio, Video, Sticker, Location Follow Added as friend Unfollow Blocked Join Join group/room Leave new Leave group/room Postback new From template action Beacon new Got beacon signal
  • 24. Additional APIs • Get Content • GET https://api.line.me/v2/bot/message/ {messageId}/content • Get Profile • GET https://api.line.me/v2/bot/profile/ {userId}
  • 25. SDK Support • Easily use • Wrap up data parsing • Simplify message composing • Many languages • https://github.com/line/
  • 27. Develop NOW !!! (App) https://business.line.me (Bot) https://developers.line.me (Bot) https://admin-official.line.me
  • 28. Terms & Relationship Personal LINE Account Business LINE OA BC(Business Connect) LINE @ Messaging API
  • 29. Login & Add Company https://business.line.me/en/
  • 39. What is Serverless? • NOT no servers, NO maintenances (setup, monitor, scale, security…) • Development focus on functions • No always-on servers
  • 42. Pros • Reduced Operation Cost • Reduced Development Cost • Scaling Cost • Time to market/Experimentation
  • 43. Cons • Vendor Control • Multi-tenancy • Vendor Lock-in • Security Concerns • No in-server state • Startup Latency
  • 45. AWS Lambda • Deploy functions in Java, Python, Node.js, C# • Build-in scalability and high availability • Well integrated with other AWS services • Pay as you go
  • 46. What can you do with AWS Lambda? • Build event-driven applications • Build APIs together with Amazon API Gateway • Restful APIs • Resources, methods
  • 49. A simple Lambda function in Python" • aws lambda create-function --function-name add -- handler myFunc.lambda_handler --runtime python2.7 -- zip-file fileb://myFunc.zip --memory-size 128 --role arn:aws:iam::ACCOUNT_NUMBER:role/lambda_basic_execution • curl -H "Content-Type: application/json" -X POST -d "{"value1":5, "value2":7}" https://API_ENDPOINT
  • 50. That’s great, but… • No one wants to code in the AWS console (right?) • Managing functions with the AWS CLI isn’t dev-friendly • Managing APIs with the AWS CLI quite complex (low- level calls) • CloudFormation doesn’t make it easy to deploy and manage serverless applications (custom resources) • So what are the options?
  • 51. Serverless Tools • Development • Serverless Framework • Gordon • AWS Chalice • More frameworks: Kappa, Apex, Zappa, Docker-lambda • AWS Lambda plugin for Eclipse • Deployment • AWS Serverless Application Framework (SAM)
  • 53. The Severless Framework • Announced at re:Invent 2015 by Austen Collins and Ryan Pendergast • Supports Node.js, as well as Python and Java (with restrictions) • Auto-deploys and runs Lambda functions, locally or remotely • Auto-deploys your Lambda event sources: API Gateway, S3, DynamoDB, etc. • Creates all required infrastructure with CloudFormation • Simple configuration in YML https://serverless.com
  • 54. Serverless: standalone function $ serverless create --template aws-python Edit handler.py, serverless.yml $ serverless deploy $ serverless invoke 
 [ local ]
 --function function_name $ serverless logs --function function_name
  • 55. Gordon • Released in Oct’15 by Jorge Batista • Supports Python, Javascript, Golang, Java, Scala, Kotlin (including in the same project) • Auto-deploys and runs Lambda functions, locally or remotely • Auto-deploys your Lambda event sources: API Gateway, CloudWatch Events, DynamoDB Streams, Kinesis Streams, S3 • Creates all required infrastructure with CloudFormation • Simple configuration in YML https://github.com/jorgebastida/gordon
  • 56. Gordon: “Hello World” API $ gordon startproject helloworld $ gordon startapp helloapp Write hellofunc() function $ gordon build $ echo '{"name":"Julien"}' | gordon run helloapp.hellofunc $ gordon apply --stage stage_name $ http post $API_ENDPOINT name=Julien
  • 57. Zappa "Think of it as "serverless" web hosting for your Python web apps" • Just add your Python code • Deploy with a single call and zero config • The API is created automatically, the IAM policy is auto-generated • Run APIs locally on port 8000 (similar to Flask) • Fast & lightweight framework • 100% boto3 calls (AWS SDK for Python) —> fast https://github.com/awslabs/chalice
  • 58. Zappa: “Hello World” API Write your function in app.py (flask or django) $ zappa init $ zappa deploy dev $ zappa tail dev
  • 59. Summing things up Serverless • The most popular serverless framework • Built with and for Node.js. Python and Java: YMMV • Rich features, many event sources • Not a web framework Gordon • Great challenger! • Node.js, Python, Java, Scala, Golang • Comparable to Serverless feature- wise • Not a web framework Zappa • Python only • Does only one thing, but does it great • Dead simple, zero config • Flask, Django web framework
  • 61. AWS Serverless Application Model (SAM) "formerly known as Project Flourish" • CloudFormation extension released in Nov’16 to bundle Lambda functions, APIs & events • 3 new CloudFormation resource types • AWS::Serverless::Function • AWS::Serverless::Api • AWS::Serverless::SimpleTable • 2 new CloudFormation commands • aws cloudformation package • aws cloudformation deploy • Integration with CodeBuild and CodePipeline for CI/CD • Expect SAM to be integrated in most / all frameworks
  • 62. Demo - aws cli - serverless - zappa https://github.com/xfalcons/serverless-aws
  • 63. Thank you and Enjoy!