This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Serverless Applications with Node.js: serverless vs microservice

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Slobodan Stojanovic & Aleksandar Simovic,

Currently, I am trying to learn microservices and node.js. I googled a bit about the serverless vs microservices and got confused. I'd like to hear from you experts about what the differences between these two.

thanks a lot
 
Author
Posts: 13
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Eric,

You can use microservices and serverless together, it's not one vs other.

Serverless is basically a managed infrastructure for you. You write your business logic, deploy it to any serverless provider (i.e., as a combination of functions, queues, databases, etc.) and then cloud provider manage it automatically. You'll get auto-scaling, auto-failover, full isolation, and many other things out-of-the box.

You can deploy a monolithic application to a single serverless function (for example, AWS Lambda), but as we describe in the chapter 14 of our book, that's not an ideal use case. Much better is to split your application in multiple services (micro or even nano services) and let AWS manage them automatically. You'll see case studies in the last chapter of our book (how MindMup and CodePen are using serverless), both apps are using some kind of micro services.

For my product, Vacation Tracker, high-level infrastructure looks similar to the attached diagram. You can see a few services there, but in reality they are split into even more small functions and other pieces. We have more than 60 functions, and they communicate via Amazon Simple Notification Service messages, queues, and many other triggers.

So, short answer to your question is that you can't compare microservices and serverless, as they are different things and you can use them together. I hope that answers your question.


Cheers,
Slobodan


vacation-tracker.png
[Thumbnail for vacation-tracker.png]
 
eric guo
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your quick reply.

It makes sense to me now. In the Serverless box of the picture, everything seems independent (except many components are depending on the database). I'd like to read more about serverless now.

Thanks
Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!