• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Node.js Design Patterns: AWS Serverless Lambdas

 
Jon Greenwood
Greenhorn
Posts: 21
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mario and Luciano

Do you consider the underlying platform when it comes to Node.js Design Patterns and if so, does your book adapt/implement or advocate certain design approaches when using AWS serverless Lambdas running a Node environment?

Many Thanks

Jon
 
Luciano Mammino
Author
Posts: 9
jQuery Python TypeScript
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jon Greenwood wrote:Hi Mario and Luciano

Do you consider the underlying platform when it comes to Node.js Design Patterns and if so, does your book adapt/implement or advocate certain design approaches when using AWS serverless Lambdas running a Node environment?

Many Thanks

Jon



Hello Jon,
this is a great question.

In the book Node.js Design Patterns we don't have a dedicate section to serverless, but i personally believe that all the patterns we explore in the book can be used with no change in a serverless context.

I think a serverless context works pretty much like a normal Node.js runtime. The only interesting difference is that you might be a little more constraint in terms of resources (less CPU/memory) and that you will have to "complete" the execution within a certain time limit.

There are some patterns that can be particularly useful (given that serverless encourages you to write small functions) like the middleware pattern. I am one of the main authors of Middy (https://github.com/middyjs/middy), also mentioned in the book. Middy is a good example of how the middleware pattern can be used in the context of AWS Lambda.

I hope this answers your question.

Best regards
 
Jon Greenwood
Greenhorn
Posts: 21
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...........checking out Middy now............


many thanks

jon
 
Jon Greenwood
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jon Greenwood wrote:...........checking out Middy now............


many thanks

jon



So it turns out that some of my colleagues have already started using Middy wrapped in the https://www.npmjs.com/package/@dazn/lambda-powertools-pattern-obfuscate package

looks like its going to be the de facto pattern across our lambda estate
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic