View Slide
@listochkin
<3 Ruby
No Ruby today
RustFavorite languageRuby ExtensionsWASM
RustFestWorkshopsIntroAdvancedAdoption
MozillaTravis CISamsungChefCloudFlareEvo
Steve KlabniklislisIngvar StepanyanPaul Colomiets
Rust is for Rubyists
http://bit.ly/rustfest2017ruby50% off
I’ll talk about my work
Bot building system
Conceived about6 years ago
We’ve been building botsbefore it was cool
Bot
IRCWoW botsWeb Scrapers
Chatbots
ConversationalCommerce
A bot pretends to bea human
Makes stuff happen
Emphasison “Human” aspect
Wit.aiAPI.aiMotion.aiMicrosoft Bot FrameworkInit.ai.ai
Can you to instead?
What to do whenthere’s no match?
GuessBail out
AI + Human
Facebook M70% required human
Leaky abstraction
Bots are DeadEnd of story
“Human”-likeis a red herring
How vs What
GoalScenarioGuidance
Humanize later
Scenario
Workflow
Do XDo YDo Z
Customer case:PeopleReady
Workforce matching
“Uber for Workers”
I’m a construction workerI’m free next Friday
I need 5 extra constructionworkers on site next Friday
Phone Decision Tree
“If you need X press 1”
IVR“Interactive VoiceResponse”
Step 1: Static Tree
Step 2-∞:RefinementsShortcutsA/B tests
Identify a person/roleReduce tree
Known pending request:top-level notification
Global shortcuts
Keywords, numbers, etc.
Bot-to-BotIVR-to-IVR
Pass context
Session storageHTTP/SIP headersForward DTMFs
DumbBoring
EfficientPredictableLess frustrating
Workflow BuilderExecution ServicesOperator AppsReporting
Many competitorsNot a winner-takes-all
Lessons Learned
1. Providers
Slack, Messenger,Telegram, Skype, Email,sms, HipChat, WeChat,LINE, etc
The more the better?
SMSPhoneEmail
No middle man appsBrand <=> Phone
2. Execution model
State Machine
State Machine as Data
Flow Tree => Data StructureExecutor
State Machine as Code
Flow Tree => Data => Code
Separate InfrastructureSeparate DeploysSeparate Load
AWS Lambda
3. Steps are the key
if … elseChoice10-15
Smart Steps100s
Phone Transfer
Transfer to XBackup number?Voicemail?Transcode?
Feature discovery
Higher quality Botsby default
Programmable steps
Flow => Step
Step = Logic + UIboth programmable
Custom JS Step
4. Service Flows
Pick up the phoneIdentify a UserVoice Choice…
Number ProvisioningAPI AdapterReporting EventsHide Secrets…
Service flowsGlobal Events with ACL
5. Dogfooding
Everything is a bot
Admin toolsMonitoringReportingBilling
6. UI and Reporting SellPlatform retains
UI!So many capabilities!
“Can you set it up for us?”
Typical Customer:sets thing up oncereceives reports
7. Reporting!
SQL ServerOLAPDirect access
Let customersplay with the data
8. AWS Lambda
async (req, context) => { ... }
Node 4.3 (6!)PythonJava
Use Large
1 request = 1 new process
Dynamo & Redis :)Mongo, SQL :(
Dynamo is amazing!
9. Voice
Voice is inherently hard!
TwilioBest API and DevToolsStill hard :(
Larger customersneed cheaper voice
TwiMLTwilio SIP + Custom VoiceDirect SIP-to-SIP
SIP + RTP
SIPCommands & EventsBi-directional
RTP - audio
Often Arcanepractices
Huge Risk
Opens doors
10. Small thingsBig Impact
Haiti EarthquakeSMS Fundraiser
Suicide Prevention Hotline
Washington DCcity bot
Roadside assistanceMatch-makingMarketingCustomer supportSales
OneReach
29-30 RustFesthttp://bit.ly/rustfest2017ruby50% off
29-30 RustFesthttp://bit.ly/rustfest2017ruby50% off2 free tickets today