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

Think Big, Start Small, Scale Fast: Develop a M...

Think Big, Start Small, Scale Fast: Develop a Marketplace app using AWS Lambda

Are you planning to develop a new Cloud app? Serverless might be right for you! In this talk, we'll show you what it takes to run an app using a serverless architecture based on AWS Lambda, from design and deployment, to testing, debugging, and most importantly – how to scale. We'll go beyond the basics to demonstrate real use cases, best practices, and explain why serverless might be a good fit for you.

Talk is available online: https://www.youtube.com/watch?v=XfpskCjfBBw

sebastianhesse

September 07, 2018
Tweet

More Decks by sebastianhesse

Other Decks in Programming

Transcript

  1. Think Big, Start Small, Scale Fast Develop a Marketplace app

    using AWS Lambda SEBASTIAN HESSE | SOFTWARE ENGINEER | K15T SOFTWARE | @SEEEBIII
  2. Long Running Tasks Perform bigger tasks, e.g. to initialize data.

    Our Use Cases For Serverless Scheduled Tasks Schedule functions for cleaning up data or other tasks. Webhooks Receive webhooks from Jira, Confluence, etc. and process them.
  3. Local Machine Execute and debug + test your code on

    your local machine. Cloud Upload your code to the cloud and test it there. Testing & Debugging
  4. Quick code updates Wrote our own library lambda-updater to quickly

    update the Lambda code. Write tests Writing unit and integration tests can already identify lots of problems. Real environment No service mocks, latencies don't explode and a better feeling about the execution. Why?!
  5. Quick code updates Wrote our own library lambda-updater to quickly

    update the Lambda code. Write tests Writing unit and integration tests can already identify lots of problems. Real environment No service mocks, latencies don't explode and a better feeling about the execution. Why?!
  6. Quick code updates Wrote our own library lambda-updater to quickly

    update the Lambda code. Write tests Writing unit and integration tests can already identify lots of problems. Real environment No service mocks, latencies don't explode and a better feeling about the execution. Why?!
  7. Programming Language Java for background functions, NodeJS for functions which

    are performance relevant. Function Scope One scope per function. For example, one webhook receiver function, one email sending function, etc. Consider
  8. Collect tenant information from database. < 1 sec 350ms /

    100 issues Retrieve all issues from a project in Jira. Find issues matching your configuration. < 1 sec Example: Retrieve 800 Issues For Sync Perform further steps and update issue data. 350ms / 1 issue 10 sec Store relevant information in database.
  9. Solution #3 Use AWS Step Functions to define an execution

    order of your functions. AWS Step Functions
  10. Example Step Function "Retrieve issues": { "Type": "Task", "Resource": "arn:aws:lambda:...",

    "Next": "All issues?", "Retry": [ { ... } ] } Retrieve issues All issues? Process issues Failed START END
  11. Examples Webhooks Webhooks are not 100% reliable. Catch up missed

    webhooks every day. Weekly Updates Send a status update every week and let your customers know about some numbers. Clean Up Clean up data in your environment, e.g. in your database.
  12. Monitoring Enable monitoring and notification about failures. Learn from it

    and adapt your architecture. Failures Functions can fail quite easily and you might never know, because you don't check the logs or any metrics.
  13. Trade Offs Potentially less operational costs, but more complex architecture.

    Please Remember Scalability Consider scalability for all of your services. Function Scope Focus on one scope per function. Think about the use case of a function.