Going SERVERLESS

AMA

  • I'm a 🤓 @Asiance
  • I love 🕸 technology
  • I'm a 🐧 (Ubuntu) user 
  • I'm also doing 👊 (boxing)
  • I miss 🧀

N-Tier architecture

The classic client–server architecture in which presentation, application processing, and data management functions are physically separated.

Source: wikipedia.org

N-Tier representation

Source: https://aws.amazon.com

N-Tier limits

  • Scalability
  • Deployment
  • Price

N-tier might be good for large projects but doesn't always fit everyday's apps or moderate budgets.

In short...

Serverless architecture

It doesn't mean no more servers but rather focusing on your code as a developer. It's a new way to build apps, FaaS way.

Functions as a Service

Break your app into micro services, or functions, that are called from your API.

Serverless representation

Source: https://aws.amazon.com

Serverless pros

  • Scalable

  • Affordable

  • Less setup/maintenance

  • Embrace component logic

In short...

The serverless architecture is great, but deploying it from A to Z might be a tedious task as it involves a lot of web services.

Serverless Framework

Allows you to deploy auto-scaling, pay-per-execution, event-driven functions to any cloud. Supporting AWS Lambda, Azure functions, Google CloudFunctions, etc.

Source: https://serverless.com/framework/docs/

A CLI tool

The serverless framework comes with a CLI tool. You can use it to create, test, push, delete, customize (etc.) your service.

Events & resources

The framework deals with events (e.g. operations on a S3 bucket) and resources (e.g. a DynamoDB stream) to trigger or bind your custom functions.

A configuration file

To describe your environment, simply write a few lines of code in a .yml file. You can define the stage of your service, the region where it runs, the resources and the events it uses, etc.

Writing the code

The second file that is generated by the framework is called handler. It basically lists all the functions of your API and describes your backend logic.

Demo time!

Links & contact

Serverless architecture

By Jean-Loup Trolliard

Serverless architecture

Meetup

  • 642