Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
Ranch Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 162
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 162
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 162
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 40748
827
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 40748
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Monica Shiralkar
Ranch Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Salil Wadnerkar wrote:
In case of serverless, nothing is provisioned, unless the triggering event arrives.
And you get charged per event and per unit of consumption time.


Thanks.
 
Monica Shiralkar
Ranch Hand
Posts: 2513
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was under misconception that serverless means without a web/application server like tomcat/jboss/web logic whereas now I came to know that serverless actually means without a server machine.
 
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic