Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20180910_-_BUG_-_Serverless.pdf

Aletheia
September 10, 2018

 20180910_-_BUG_-_Serverless.pdf

Understand what is Serverless and how you can start with these new and amazing technologies

Aletheia

September 10, 2018
Tweet

More Decks by Aletheia

Other Decks in Technology

Transcript

  1. aka don’t take me too seriously.. Safe Harbour Statement Our

    discussion may include predictions, estimates or other information that might be considered forward-looking. While these forward-looking statements represent our current judgment on what the future holds, they are subject to risks and uncertainties that could cause actual results to differ materially. You are cautioned not to place undue reliance on these forward-looking statements, which reflect our opinions only as of the date of this presentation. Please keep in mind that we are not obligating ourselves to revise or publicly release the results of any revision to these forward- looking statements in light of new information or future events. Throughout today’s discussion, we will attempt to present some important factors relating to our business that may affect our predictions.
  2. Luca Bianchi Who am I? • Chief Technology Officer @

    Neosperience • Working on a lot of bleeding edge technologies • Passionate developer: love writing code, hate meetings Neosperience - Empathy in Technology Understand, engage, and delight customers, using personalization to deliver relevant experiences that drive loyalty and increase value. github.com/aletheia @bianchiluca https://it.linkedin.com/in/lucabianchipavia
  3. A cloud platform built on AWS to deliver DCX projects

    Neosperience Cloud • Deeply understand their customers and be more useful to them by delivering relevant digital experiences. • Delight customers by delivering relevant experiences across mobile, web, in-store. • Maintain their Brand identity and increase value as platforms like Amazon, Google and Facebook drive up disintermediation and make companies unintentional utilities. • Keep pace with the variety of devices and interaction models available to customers to overcome complexity and costs associated with the alignment of apps, web apps, social media and conversational interfaces. Neosperience Cloud is the technology platform that allows creating personalized experiences for your customers that drive loyalty and faster paths 
 to purchase. Unlike existing technologies that rely only on demographics data, we use proprietary models, developed with AI, to personalize your offering to the right segment. A compelling experience for each customer at the right time, place, and situational context. …which means fast time to market, machine learning and scalability by design.
  4. a few words about our meetup… Serverless Meetup •662 members

    •Monthly Meetups 
 https://www.meetup.com/Serverless-Italy/members/
 •Serverless OnTheRoad and OnStage
  5. Job Fair & Workshops 
 20 October 2018 @ LUISS

    EnLabs Yan Cui - @theburningmonk
 Principal Engineer @ DAZN Gojko Adzic - @gojkoadzic
 Author of Humans vs Computers, MindMup, and Claudia.js One Day, One Track, One Community
 19 October 2018 @ Fondazione Feltrinelli ServerlessDays are a family of events around the world focused on fostering a community around serverless technologies. Each ServerlessDay is unique, organised by locals and not run for profit providing high quality talks at an affordable price. Job Fair is a FREE event open to everyone, where attendants looking for job opportunities are able to meet companies offering the opportunity to enter Serverless ecosystem from the front door. Workshops are a full day opportunity to learn from the best professionals how to start, grow and scale your Serverless skills at an affordable price. milan.serverlessdays.io
  6. What is Serverless? “Serverless architecture replaces long-running virtual machines with

    ephemeral compute power that comes into existence on request and disappears immediately after use. Use of this architecture can mitigate some security concerns such as security patching and SSH access control, and can make much more efficient use of compute resources. These systems cost very little to operate and can have inbuilt scaling features.” — ThoughtWorks, 2016
  7. The Serverless Manifesto ✓ Function as the unit of deployment

    and scaling ✓ Implicitly fault-tolerant ✓ Metrics ✓ No machines, VMs, or containers ✓ Bring Your Own Code ✓ Stateless ✓ Never pay for idle ✓ Scales per request
  8. It starts with an event • events are a great

    way to decouple services (async message passing) • largely abused in the last decade (EnterpriseServiceBus / SOA) • now revamped with CQRS and Event Sourcing to handle microservices communication • serverless functions handle events • need a different approach on architectures
  9. AWS Lambda AWS Lambda is a compute service that lets

    you run code without provisioning or managing servers. AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second. • Service released on Nov, 2014 • Introduces Event-Driven programming model • Provides a context and an event object
  10. Triggering a function • Provide new levels of empowerment to

    your customers: turn your app on - even if their smartphone is in stand-by mode - and deliver a notification to sell direct or to bring back qualified customers to your venue. • Utilize Facebook and other social media platforms to encourage digital and physical store purchases and prompt customers with personalized messages. Send promotions and relevant product information when they are ready to buy: shopping, close or inside your store, entering your competitor’s store or located in adjacent businesses.
  11. AWS CloudFormation • Cloud Services become a part of your

    project Infrastructure- as-code
 A scripting language for the cloud • Defines AWS resources 
 (Lambda, S3Buckets, DynamoTables, etc) Manages resource lifecycle • Example: creating a DynamoDB Table https://docs.aws.amazon.com/AWSCloudFormation/ latest/UserGuide/Welcome.html
  12. Evaluating a serverless architecture (aka how big is my serverless?)

    • In 2015 Tim Wagner, General Manager @ AWS Serverless Compute, presented to the ServerlessConf the so- called Serverless Manifesto. • In 2017 Danilo Poccia, Technical Evangelist @ AWS, talking at JeffConf asked “what would be having that manifesto translated into a checklist to evaluate Serverless compliance of an architecture?” • So, we turned it into a “Serverless Scorecard”
  13. The Serverless Framework • 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 serverless framework The easy, open way to build 
 Serverless applications The Serverless Framework is an open-source CLI for building and deploying serverless applications. With over 6 million deployments handled, the Serverless Framework is the tool developers trust to build cloud applications.
  14. 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! Getting Started
  15. Who is SAM? “The goal of AWS SAM is to

    define a standard application model for serverless applications.” github.com/awslabs/serverless-application-model
  16. SAM In other (technical) words? AWS::Serverless Transform (CloudFormation) Special serverless

    resources (e.g. AWS::Serverless::Function) Pretty similar to Serverless Framework’s syntax (yaml) Natively supported by AWS SAM Local (github.com/awslabs/aws-sam-local)
  17. AWS SAM Example - Create a function AWS SAM Example

    (Function) (plus policies, VCP config, DLQ, tracing, etc.)
  18. Advantages of SAM - Traffic Shifting AWS SAM Example (Traffic

    Shifting) (plus alarms & pre/post-traffic hooks)
  19. AWS Cloud Development Kit Enhancing Cloud Formation “a framework for

    defining cloud infrastructure in code” https://github.com/awslabs/aws-cdk CloudFornation Custom Transform “support for user defined macros within CF script” https://aws.amazon.com/about-aws/whats- new/2018/09/introducing-aws- cloudformation-macros/
  20. Once upon a time.. ght before Christmas 
 e just

    leaving.. ur manager steps into the office.. …with another great idea: 
 … everyone in your office is gone to the beach.. … the sun is shining, weather is hot, 
 the day is almost over… … then your manager steps into the office, with an idea for a great business product!!
  21. IDEA! Make it Serverless • Focus only on your code

    • No infrastructure to manage (your IT guy has a family, too) Scales up to production requirements • Can be released within minutes • Use DynamoDB and GSI • Serverless does not mean spaghetti-code! adopt a serverless architecture that can scale up to millions and EVOLVE through time