A bot in minutes with serverless

16
Nome Speaker @twitter \ A Bot in minutes with Serverless Tiago Martinho @martinho_t Alessio Coser @AlessioCoser

Transcript of A bot in minutes with serverless

Page 1: A bot in minutes with serverless

Nome Speaker@twitter

\ A Bot in minutes with Serverless

Tiago Martinho@martinho_t

Alessio Coser@AlessioCoser

Page 2: A bot in minutes with serverless

\ A bot in minutes with Serverless

What is Serverless?Custom code that’s run in an ephemeral context.Aka Function as a Service (FaaS)

Page 3: A bot in minutes with serverless

\ A bot in minutes with Serverless

What is Serverless?Custom code that’s run in an ephemeral context.Aka Function as a Service (FaaS)

● The code that we want to execute● Our Application● The Service we provide to our users

Page 4: A bot in minutes with serverless

\ A bot in minutes with Serverless

What is Serverless?

● It’s an abstraction layer● It’s still a server!● Created only to run your code and then destroyed● Has no state or persistence

Custom code that’s run in an ephemeral context.Aka Function as a Service (FaaS)

Page 5: A bot in minutes with serverless

\ A bot in minutes with Serverless

What is Serverless?Custom code that’s run in an ephemeral context.Aka Function as a Service (FaaS)

Page 6: A bot in minutes with serverless

\

● No ops, just code● Reduced maintenance● Built-in automatic scaling● Only pay for what you use● You have to manage the persistence of the state

A bot in minutes with Serverless

Main features

Page 7: A bot in minutes with serverless

\ A bot in minutes with Serverless

Cloud-Computing Providers● Amazon AWS Lambda● Google Cloud Functions● Azure Functions● Iron.io● IBM Openwisk

Page 8: A bot in minutes with serverless

\ A bot in minutes with Serverless

Frameworks● Serverless● Claudia● Apex

Page 9: A bot in minutes with serverless

\ A bot in minutes with Serverless

Runtimes● NODE.JS● JAVA ● PYTHON ● MORE

Page 10: A bot in minutes with serverless

\ A bot in minutes with Serverless

Let’s create a Bot!

Page 11: A bot in minutes with serverless

\ A bot in minutes with Serverless

1. Install Claudia with Bot Builder2. Define our function3. Deploy to AWS Lambda4. Create a Facebook Messenger App5. Create a Page and get the access token6. Update function with Page access token7. Add Facebook Messenger webhook8. Publish the Facebook App

1. Install Claudia with Bot Builder2. Define our function3. Deploy to AWS Lambda4. Create a Facebook Messenger App5. Create a Page and get the access token6. Update function with Page access token7. Add Facebook Messenger webhook8. Publish the Facebook App

Page 13: A bot in minutes with serverless

\ A bot in minutes with Serverless

Page 14: A bot in minutes with serverless

\ A bot in minutes with Serverless

AWS LAMBDAFree each month:

1 MILLION REQUESTS400,000 GB-SECONDS

$0.20 1 MILLION REQUESTS$0.00001667 EVERY GB-SECONDGithub Student Pack 100$ for Free

Page 15: A bot in minutes with serverless

\ A bot in minutes with Serverless

http://slides.com/pierodibello/lessons-learned-from-aws-lambdahttp://www.xpeppers.com/blog/2017/01/05/serverless-test-driven-development/https://medium.com/@martinho_t/serverless-architecture-a1848cab56f4https://martinfowler.com/articles/serverless.htmlhttps://aws.amazon.com/lambda/https://cloud.google.com/functions/https://azure.microsoft.com/en-us/services/functions/https://github.com/jaws-framework/JAWShttps://github.com/claudiajs/claudiahttps://github.com/claudiajs/claudia-bot-builderhttps://github.com/elit-software/fb-bothttps://claudiajs.com/tutorials/hello-world-chatbot.htmlhttp://www.slideshare.net/AmazonWebServices/getting-started-with-serverless-architectures-63429092

Page 16: A bot in minutes with serverless

www.xpeppers.com

/xpepperssrl@xpeppers