• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

How is serverless programming in Cloud different from using PAAS services?

 
Ranch Foreman
Posts: 2061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Cloud we have the concept of PAAS where developer does not have to get into hassles of worrying about the infrastructure and can directly focus on the code. In serverless programming (using AWS lambda or Azure Functions) too, developer does not have to worry about the server (which also comes under infrastructure). What makes serverless programming different from using PAAS service? Thanks
 
Ranch Hand
Posts: 151
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With PAAS services, you build you ruby on rails/django/spring/express app, and PAAS provider takes care of provisioning this app on its infrastructure. You still have to make your application scalable, and specify to PAAS provider how to scale your app (like you need to provide auto-scaling of database, app servers, etc.

In serverless programming. you split your application into multiple functions (some functionality that needs a few minutes to complete, but not long), each of which will be triggered by some event. Events could be an http request, or message queue event. So, you need to redesign your app to be reactive (event-driven) - and a collections of functions. For example, an http request will trigger a function A, which may emit a message-queue event, which will trigger another function B.
Then you just specify this triggering event to function mapping to your provider, which takes care of scaling each function dynamically, based on the load.
 
Monica Shiralkar
Ranch Foreman
Posts: 2061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. That explains it well. I am just wondering that when serverless is so beneficial then why was it not designed to let all PAAS services have automatic scaling feature by default like the case of serverless service like AWS lambda/ azure functions.
 
Salil Wadnerkar
Ranch Hand
Posts: 151
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can. Just that you need to have minimum number of servers for your application (at least 1), and that consumes resources, and costs money.
In case of serverless, nothing is provisioned, unless the triggering event arrives.
And you get charged per event and per unit of consumption time.
 
Monica Shiralkar
Ranch Foreman
Posts: 2061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I understood what benefits serverless gives over PAAS. But, are there any situations where one would instead not want the benefits of serverless programming but would just want PAAS?
 
Salil Wadnerkar
Ranch Hand
Posts: 151
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Redesigning the application so that it's collection of reactive components, that is, functions is not an easy task. Think of converting your spring MVC app into multiple functions triggered by different API requests.
Also, it takes a few seconds to start a AWS lambda, called cold start time. So, your performance will suffer, if your function is not consistently getting triggered.
 
Monica Shiralkar
Ranch Foreman
Posts: 2061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just thinking that why dont they change the PAAS components like Elastic Bean stack/App service etc to make them like serverless where no scaling would be required. There must be some reason why they dont.
 
author & internet detective
Posts: 40286
819
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Monica Shiralkar wrote:I am just thinking that why dont they change the PAAS components like Elastic Bean stack/App service etc to make them like serverless where no scaling would be required. There must be some reason why they dont.


Not everything is well suited to serverless/functions/lambdas. For example, you could have a process that takes an hour to run.
 
Monica Shiralkar
Ranch Foreman
Posts: 2061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:
Not everything is well suited to cloud. For example, you could have a process that takes an hour to run.



What makes it not suitable to Cloud?
 
Jeanne Boyarsky
author & internet detective
Posts: 40286
819
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Monica Shiralkar wrote:

Jeanne Boyarsky wrote:
Not everything is well suited to cloud. For example, you could have a process that takes an hour to run.



What makes it not suitable to Cloud?


Wow, I'm not good at English today. I meant serverless/functions/lambdas. (Because there's a time limit - at least for AWS lambdas)
 
Monica Shiralkar
Ranch Foreman
Posts: 2061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. Yes, serverless AWS Lambda does have time limit. But what is they reason for which they have kept such time limit?
 
The first person to drink cow's milk. That started off as a dare from this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic