SlideShare a Scribd company logo
1 of 72
Download to read offline
Bot 甘苦談,使用者至上
Maxis Kao @ Yahoo Search
什麼是 Bot
程序員鼓勵師
Nov. 6, 2015
PTT 表特版
Heroku + MongoLab + Slack API
Node MongoDB Webhook
Heroku + MongoLab + Slack API
Node MongoDB Webhook
Heroku + MongoLab + Slack API
Node MongoDB Webhook
> db.beauty.lists.findOne()
{
"_id" : ObjectId("563b17bef26ec7b20aabe962"),
"push" : 26,
"full_title" : "[正妹] 又正又會讀書",
"tag" : "正妹",
"title" : "又正又會讀書",
"url" : "https://www.ptt.cc/bbs/Beauty/M.1446701090.A.658.html",
"post_id" : "M.1446701090.A.658",
"mark" : "",
"fetched" : true,
"raw_meta" : {
"作者" : "pk698326889 (JiMiHua)",
"看板" : "Beauty",
"標題" : "[正妹] 又正又會讀書",
"時間" : "Thu Nov 5 13:24:47 2015"
},
"author" : "pk698326889 (JiMiHua)",
"image_count" : 8,
"datetime" : ISODate("2015-11-05T05:24:47Z"),
"display" : 2
}
> db.beauty.posts.findOne()
{
"_id" : ObjectId("563b5a3af3526d750e61f5ad"),
"img_total" : 35,
"post_id" : "M.1446558454.A.167",
"img_idx" : 0,
"img_url" : "http://i.imgur.com/h4f2E15.jpg",
"display" : 1
}
鼓勵 +長腿 >50
4,735 posts
37,849 images
But
Side effects
鼓勵 + 新加坡 = 悲劇
> db.beauty.lists.findOne()
{
"_id" : ObjectId("563b17bef26ec7b20aabe962"),
"push" : 26,
"full_title" : "[正妹] 又正又會讀書",
"tag" : "正妹",
"title" : "又正又會讀書",
"url" : "https://www.ptt.cc/bbs/Beauty/M.1446701090.A.658.html",
"post_id" : "M.1446701090.A.658",
"mark" : "",
"fetched" : true,
"raw_meta" : {
"作者" : "pk698326889 (JiMiHua)",
"看板" : "Beauty",
"標題" : "[正妹] 又正又會讀書",
"時間" : "Thu Nov 5 13:24:47 2015"
},
"author" : "pk698326889 (JiMiHua)",
"image_count" : 8,
"datetime" : ISODate("2015-11-05T05:24:47Z"),
"display" : 2
}
使用者要什麼,就給他什麼
「X,給我男的是要鼓勵什麼?」
版本控制也救不了你
$ git checkout tags/v1.7
$ npm install slack-monkey@1.7.0
BDD
Behavior-driven development
重質不重量
Quality
VolumeRevenue
Quality
VolumeRevenue
Quality
VolumeRevenue
為使用者設想
$ clear
https://www.npmjs.com/package/lorem-ipsum
簡化常見的指令
4,600
searches in the query log
> _________
> _________Alan
> _________Conrad
> _________布萊恩
user log 是珍貴的資產
看著儀表板開車
鼓勵師 v2.0
Heroku + MongoLab + Slack API
Heroku + MongoLab + Slack API
3~5 s (including dyno sleeping)
Heroku + MongoLab + Slack API
3~5 s 1 s3~5 s
Heroku + MongoLab + Slack API
1 s3~5 s
NodeMongoDB
PREPROCESSING: 0ms
DB_CONNECT: 8ms
QUERY_LOGGING: 4ms
RECORD_COUNT: 1ms
CONDITION_SEARCH: 57ms
Ping: 8ms Webhook: 30ms
server mongodb slack
30x faster
3s → 100ms
鼓勵師 v3.0
Elasticsearch
● Full-text search
● Analytics
● High Availability
Feedback
● Personalization
● User preference
Recommendation
preprocessor
slackbot
middleware

More Related Content

Similar to Bot 甘苦談,使用者至上

Back to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDBBack to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDBMongoDB
 
Back to Basics Webinar 2 - Your First MongoDB Application
Back to  Basics Webinar 2 - Your First MongoDB ApplicationBack to  Basics Webinar 2 - Your First MongoDB Application
Back to Basics Webinar 2 - Your First MongoDB ApplicationJoe Drumgoole
 
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationMongoDB
 
JWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and MicroservicesJWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and MicroservicesStormpath
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...MongoDB
 
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...Luciano Mammino
 
Bots are the New Apps: Building with the Bot Framework & Language Understanding
Bots are the New Apps: Building with the Bot Framework & Language UnderstandingBots are the New Apps: Building with the Bot Framework & Language Understanding
Bots are the New Apps: Building with the Bot Framework & Language UnderstandingNick Landry
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011djdunlop
 
2016 pycontw web api authentication
2016 pycontw web api authentication 2016 pycontw web api authentication
2016 pycontw web api authentication Micron Technology
 
Streaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comStreaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comMongoDB
 
MongoDB - Back to Basics - La tua prima Applicazione
MongoDB - Back to Basics - La tua prima ApplicazioneMongoDB - Back to Basics - La tua prima Applicazione
MongoDB - Back to Basics - La tua prima ApplicazioneMassimo Brignoli
 
Nk API - examples
Nk API - examplesNk API - examples
Nk API - examplesnasza-klasa
 
前端MVC之BackboneJS
前端MVC之BackboneJS前端MVC之BackboneJS
前端MVC之BackboneJSZhang Xiaoxue
 
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoPutting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoMongoDB
 
Building Your First MongoDB Application
Building Your First MongoDB ApplicationBuilding Your First MongoDB Application
Building Your First MongoDB ApplicationTugdual Grall
 
Chatting with HIpChat: APIs 101
Chatting with HIpChat: APIs 101Chatting with HIpChat: APIs 101
Chatting with HIpChat: APIs 101colleenfry
 
BlockChain implementation by python
BlockChain implementation by pythonBlockChain implementation by python
BlockChain implementation by pythonwonyong hwang
 
Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...
Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...
Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...WithTheBest
 
Building serverless applications on azure
Building serverless applications on azureBuilding serverless applications on azure
Building serverless applications on azureJoe Raio
 
Back to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationBack to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationJoe Drumgoole
 

Similar to Bot 甘苦談,使用者至上 (20)

Back to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDBBack to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDB
 
Back to Basics Webinar 2 - Your First MongoDB Application
Back to  Basics Webinar 2 - Your First MongoDB ApplicationBack to  Basics Webinar 2 - Your First MongoDB Application
Back to Basics Webinar 2 - Your First MongoDB Application
 
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB Application
 
JWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and MicroservicesJWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and Microservices
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
 
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - FullSt...
 
Bots are the New Apps: Building with the Bot Framework & Language Understanding
Bots are the New Apps: Building with the Bot Framework & Language UnderstandingBots are the New Apps: Building with the Bot Framework & Language Understanding
Bots are the New Apps: Building with the Bot Framework & Language Understanding
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011
 
2016 pycontw web api authentication
2016 pycontw web api authentication 2016 pycontw web api authentication
2016 pycontw web api authentication
 
Streaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comStreaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.com
 
MongoDB - Back to Basics - La tua prima Applicazione
MongoDB - Back to Basics - La tua prima ApplicazioneMongoDB - Back to Basics - La tua prima Applicazione
MongoDB - Back to Basics - La tua prima Applicazione
 
Nk API - examples
Nk API - examplesNk API - examples
Nk API - examples
 
前端MVC之BackboneJS
前端MVC之BackboneJS前端MVC之BackboneJS
前端MVC之BackboneJS
 
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoPutting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
 
Building Your First MongoDB Application
Building Your First MongoDB ApplicationBuilding Your First MongoDB Application
Building Your First MongoDB Application
 
Chatting with HIpChat: APIs 101
Chatting with HIpChat: APIs 101Chatting with HIpChat: APIs 101
Chatting with HIpChat: APIs 101
 
BlockChain implementation by python
BlockChain implementation by pythonBlockChain implementation by python
BlockChain implementation by python
 
Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...
Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...
Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnat...
 
Building serverless applications on azure
Building serverless applications on azureBuilding serverless applications on azure
Building serverless applications on azure
 
Back to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationBack to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB Application
 

More from Maxis Kao

User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖Maxis Kao
 
優化開發環境 無料提升戰鬥力
優化開發環境 無料提升戰鬥力優化開發環境 無料提升戰鬥力
優化開發環境 無料提升戰鬥力Maxis Kao
 
2016 前端潮玩意兒
2016 前端潮玩意兒2016 前端潮玩意兒
2016 前端潮玩意兒Maxis Kao
 
Enjoy privacy on Gitlab
Enjoy privacy on GitlabEnjoy privacy on Gitlab
Enjoy privacy on GitlabMaxis Kao
 
Timelapse News
Timelapse NewsTimelapse News
Timelapse NewsMaxis Kao
 
[Frontend 101] JavaScript OOP
[Frontend 101] JavaScript OOP[Frontend 101] JavaScript OOP
[Frontend 101] JavaScript OOPMaxis Kao
 

More from Maxis Kao (6)

User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖User first! 前端的最後一塊拼圖
User first! 前端的最後一塊拼圖
 
優化開發環境 無料提升戰鬥力
優化開發環境 無料提升戰鬥力優化開發環境 無料提升戰鬥力
優化開發環境 無料提升戰鬥力
 
2016 前端潮玩意兒
2016 前端潮玩意兒2016 前端潮玩意兒
2016 前端潮玩意兒
 
Enjoy privacy on Gitlab
Enjoy privacy on GitlabEnjoy privacy on Gitlab
Enjoy privacy on Gitlab
 
Timelapse News
Timelapse NewsTimelapse News
Timelapse News
 
[Frontend 101] JavaScript OOP
[Frontend 101] JavaScript OOP[Frontend 101] JavaScript OOP
[Frontend 101] JavaScript OOP
 

Recently uploaded

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementDr. Deepak Mudgal
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 

Recently uploaded (20)

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 

Bot 甘苦談,使用者至上