1 / 29
Why Serverless?
Ridwan Fadjar, Backend Developer
@SenseHealth B.V.
2 / 29
Serverless Concept
The phrase “serverless” doesn’t mean servers are no longer
involved. It simply means that developers no longer have to
think "that much" about them. Computing resources get used
as services without having to manage around physical
capacities or limits. Let's take for example AWS Lambda.
"Lambda allows you to NOT think about servers. Which means
you no longer have to deal with over/under capacity,
deployments, scaling and fault tolerance, OS or language
updates, metrics, and logging."
~ https://www.quora.com/What-is-serverless-computing
3 / 29
Serverless Concept
Serverless computing is a cloud computing execution model in
which the cloud provider dynamically manages the allocation
of machine resources. Pricing is based on the actual amount of
resources consumed by an application, rather than on pre-
purchased units of capacity.[1] It is a form of utility computing.
~ https://en.wikipedia.org/wiki/Serverless_computing
4 / 29
Serverless Concept
Serverless architectures refer to applications that signifcantly
depend on third-party services (knows as Backend as a Service
or "BaaS") or on custom code that's run in ephemeral
containers (Function as a Service or "FaaS"), the best known
vendor host of which currently is AWS Lambda. By using these
ideas, and by moving much behavior to the front end, such
architectures remove the need for the traditional 'always on'
server system sitting behind an application. Depending on the
circumstances, such systems can signifcantly reduce
operational cost and complexity at a cost of vendor
dependencies and (at the moment) immaturity of supporting
services.
~ https://martinfowler.com/articles/serverless.html
5 / 29
Serverless Concept
It’s important to note that this doesn’t mean there aren’t any
servers. Of course there are, but someone else is managing,
securing, maintaining and patching them, taking the load and
responsibility of your shoulders and freeing you up to focus
on building your unique product.
~ https://read.acloud.guru/serverless-the-future-of-software-
architecture-d4473fedd64
6 / 29
Serverless Concept
●
Less confguration in initial setup
●
Less management
●
Auto-scaling, both vertical or horizontal
●
Scaling down, scaling up must be easy
●
Deploy any programming language to the FaaS
●
Confguration as a code
●
Connect with other products within the Provider seamlessly
●
Event-based execution from any sources
●
Pay-as-you-used
7 / 29
Serverless Concept
Its not just only for the computation such as FaaS. As long you perform less interaction
with the server on that services:
●
User Management
●
Message Queue
●
Database
●
Search Engine
●
Caching
●
Push Notifcation
●
IaaC
d / 29
Serverless FaaS Deployment
●
Monolithic
●
Microservice
●
GraphQL
●
Consumer
●
One endpoint one handler (function)
●
Etc.
9 / 29
Who Are Going to Be Serverless
in Indonesia
Gojek, Traveloka, Tokopedia, Bizzy, E-Fishery,
Urbanindo, Tado, Blibli, Kurio, Hacktivd, etc.
10 / 29
Are Sensehealth Ready for
Serverless?
●
AWS S3
●
Urban Airship
●
Mailchimp
●
Gruveo
11 / 29
Use Cases
12 / 29
Use Cases
13 / 29
Use Cases
14 / 29
Use Cases
15 / 29
Use Cases
16 / 29
Real Use Cases
Targeted Campaign System using Serverless
Framework on AWS V.1 (Research purposes)
17 / 29
Real Use Cases
Targeted Campaign System using Serverless
Framework on AWS V.2 (Research purposes)
1d / 29
Real Use Cases
Clickstream Tracker using Azure Function and
MongoDB (Research purposes)
19 / 29
Real Use Cases
Data management platform for MAAS (Production
purposes)
20 / 29
Real Use Cases
Automatic CSV to Orc Conversion (Production
purposes)
21 / 29
Tools
●
Development: Serverless Framework, Zappa, Claudia.js, etc.
●
IaaC: Terraform, SaltStack, AWS Cloud Formation
●
Emulator: GCP Emulator (Cloud Function, Cloud Datastore, Cloud PubSub),
AWS Emulator (DynamoDB, Lambda), Azure (Functions, Service Bus Queue,
SQL Database), LocalStack (for AWS), Serverless-Ofine (for AWS)
●
Calculator: serverlesscalc, serverless.lol
●
Open Source Serverless Infrastructure: OpenFAAS, Kubeless, Apache
OpenWhisk
●
You can fnd anything from this:
https://github.com/anaibol/awesome-serverless
22 / 29
Pricing – AWS Lambda
https://aws.amazon.com/lambda/pricing/
23 / 29
Pricing – GCP Cloud Function
https://cloud.google.com/functions/pricing
24 / 29
Pricing – Azure Function
https://azure.microsoft.com/en-us/pricing/details/functions/
25 / 29
Pros and Cons
Pros:
●
Less confgure, less headache, less managing the apps and infrastructure
●
Security and Software Update managed by the Provider
●
Pay-as-you-used the products from the Provider. If you don’t need that in
periode time. You can tear down the service manually or automatically
●
You can used any language to create the serverless apps. Ex: Node.js, Python,
Java, Go, PHP, C#, etc.
●
You can used any IaaC tools to build the infrastructure. Ex: Terraform,
Ansible, etc.
●
Good documentation that provided by each Cloud Provider
●
There are so many serverless tools and framework that has already proven
26 / 29
Pros and Cons
Cons:
●
Vendor lock-in, Products from some provider could not receive event from
other provider products
●
In current phase, in 201d, the community and provider are still seeking the
open approach for deploying serverless system. At least now the community
have a various serverless framework and tools. Also some IaaC tools. But
every tools has diferent approach for the deployment
●
Sometime there are hidden cost that you must complain to the customer
service
●
Still waiting for the open integration between diferent provider
●
Big guys still dominated the serverless world, we still waiting for the open
initiative
●
Etc.
27 / 29
Demo!
●
Simple Clickstream System on GCP
●
Simple Clickstream System on AWS
●
Serverless Framework Getting Started
2d / 29
References
●
https://cloudplatform.googleblog.com/
●
https://aws.amazon.com/blogs/aws/
●
https://azure.microsoft.com/en-us/blog/
●
https://aws.amazon.com/documentation/
●
https://cloud.google.com/docs/
●
https://docs.microsoft.com/en-us/azure
●
https://aws.amazon.com/documentation/lambda/
●
https://cloud.google.com/nodejs/docs/
●
https://docs.microsoft.com/en-us/azure/azure-functions/
●
https://serverless.com/framework/docs/
●
https://github.com/anaibol/awesome-serverless
29 / 29
Sample Projects
●
https://bitbucket.org/ridwanbejo/clickstreamtrackeraws
●
https://bitbucket.org/ridwanbejo/licenseplatetrackergcp
●
https://bitbucket.org/ridwanbejo/speechtatorgcp
●
https://bitbucket.org/ridwanbejo/clickstreamtrackergcp

Why Serverless?

  • 1.
    1 / 29 WhyServerless? Ridwan Fadjar, Backend Developer @SenseHealth B.V.
  • 2.
    2 / 29 ServerlessConcept The phrase “serverless” doesn’t mean servers are no longer involved. It simply means that developers no longer have to think "that much" about them. Computing resources get used as services without having to manage around physical capacities or limits. Let's take for example AWS Lambda. "Lambda allows you to NOT think about servers. Which means you no longer have to deal with over/under capacity, deployments, scaling and fault tolerance, OS or language updates, metrics, and logging." ~ https://www.quora.com/What-is-serverless-computing
  • 3.
    3 / 29 ServerlessConcept Serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre- purchased units of capacity.[1] It is a form of utility computing. ~ https://en.wikipedia.org/wiki/Serverless_computing
  • 4.
    4 / 29 ServerlessConcept Serverless architectures refer to applications that signifcantly depend on third-party services (knows as Backend as a Service or "BaaS") or on custom code that's run in ephemeral containers (Function as a Service or "FaaS"), the best known vendor host of which currently is AWS Lambda. By using these ideas, and by moving much behavior to the front end, such architectures remove the need for the traditional 'always on' server system sitting behind an application. Depending on the circumstances, such systems can signifcantly reduce operational cost and complexity at a cost of vendor dependencies and (at the moment) immaturity of supporting services. ~ https://martinfowler.com/articles/serverless.html
  • 5.
    5 / 29 ServerlessConcept It’s important to note that this doesn’t mean there aren’t any servers. Of course there are, but someone else is managing, securing, maintaining and patching them, taking the load and responsibility of your shoulders and freeing you up to focus on building your unique product. ~ https://read.acloud.guru/serverless-the-future-of-software- architecture-d4473fedd64
  • 6.
    6 / 29 ServerlessConcept ● Less confguration in initial setup ● Less management ● Auto-scaling, both vertical or horizontal ● Scaling down, scaling up must be easy ● Deploy any programming language to the FaaS ● Confguration as a code ● Connect with other products within the Provider seamlessly ● Event-based execution from any sources ● Pay-as-you-used
  • 7.
    7 / 29 ServerlessConcept Its not just only for the computation such as FaaS. As long you perform less interaction with the server on that services: ● User Management ● Message Queue ● Database ● Search Engine ● Caching ● Push Notifcation ● IaaC
  • 8.
    d / 29 ServerlessFaaS Deployment ● Monolithic ● Microservice ● GraphQL ● Consumer ● One endpoint one handler (function) ● Etc.
  • 9.
    9 / 29 WhoAre Going to Be Serverless in Indonesia Gojek, Traveloka, Tokopedia, Bizzy, E-Fishery, Urbanindo, Tado, Blibli, Kurio, Hacktivd, etc.
  • 10.
    10 / 29 AreSensehealth Ready for Serverless? ● AWS S3 ● Urban Airship ● Mailchimp ● Gruveo
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
    16 / 29 RealUse Cases Targeted Campaign System using Serverless Framework on AWS V.1 (Research purposes)
  • 17.
    17 / 29 RealUse Cases Targeted Campaign System using Serverless Framework on AWS V.2 (Research purposes)
  • 18.
    1d / 29 RealUse Cases Clickstream Tracker using Azure Function and MongoDB (Research purposes)
  • 19.
    19 / 29 RealUse Cases Data management platform for MAAS (Production purposes)
  • 20.
    20 / 29 RealUse Cases Automatic CSV to Orc Conversion (Production purposes)
  • 21.
    21 / 29 Tools ● Development:Serverless Framework, Zappa, Claudia.js, etc. ● IaaC: Terraform, SaltStack, AWS Cloud Formation ● Emulator: GCP Emulator (Cloud Function, Cloud Datastore, Cloud PubSub), AWS Emulator (DynamoDB, Lambda), Azure (Functions, Service Bus Queue, SQL Database), LocalStack (for AWS), Serverless-Ofine (for AWS) ● Calculator: serverlesscalc, serverless.lol ● Open Source Serverless Infrastructure: OpenFAAS, Kubeless, Apache OpenWhisk ● You can fnd anything from this: https://github.com/anaibol/awesome-serverless
  • 22.
    22 / 29 Pricing– AWS Lambda https://aws.amazon.com/lambda/pricing/
  • 23.
    23 / 29 Pricing– GCP Cloud Function https://cloud.google.com/functions/pricing
  • 24.
    24 / 29 Pricing– Azure Function https://azure.microsoft.com/en-us/pricing/details/functions/
  • 25.
    25 / 29 Prosand Cons Pros: ● Less confgure, less headache, less managing the apps and infrastructure ● Security and Software Update managed by the Provider ● Pay-as-you-used the products from the Provider. If you don’t need that in periode time. You can tear down the service manually or automatically ● You can used any language to create the serverless apps. Ex: Node.js, Python, Java, Go, PHP, C#, etc. ● You can used any IaaC tools to build the infrastructure. Ex: Terraform, Ansible, etc. ● Good documentation that provided by each Cloud Provider ● There are so many serverless tools and framework that has already proven
  • 26.
    26 / 29 Prosand Cons Cons: ● Vendor lock-in, Products from some provider could not receive event from other provider products ● In current phase, in 201d, the community and provider are still seeking the open approach for deploying serverless system. At least now the community have a various serverless framework and tools. Also some IaaC tools. But every tools has diferent approach for the deployment ● Sometime there are hidden cost that you must complain to the customer service ● Still waiting for the open integration between diferent provider ● Big guys still dominated the serverless world, we still waiting for the open initiative ● Etc.
  • 27.
    27 / 29 Demo! ● SimpleClickstream System on GCP ● Simple Clickstream System on AWS ● Serverless Framework Getting Started
  • 28.
  • 29.
    29 / 29 SampleProjects ● https://bitbucket.org/ridwanbejo/clickstreamtrackeraws ● https://bitbucket.org/ridwanbejo/licenseplatetrackergcp ● https://bitbucket.org/ridwanbejo/speechtatorgcp ● https://bitbucket.org/ridwanbejo/clickstreamtrackergcp