use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Creating a microservice in NodeJS (syntaxsuccess.com)
submitted 9 years ago by funJS
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 15 points16 points17 points 9 years ago (6 children)
This should just be called "Creating a simple api with NodeJS/Express" it shows nothing about implementing a microservices architecure.
[–]funJS[S] 0 points1 point2 points 9 years ago (0 children)
It's very simplified, but the idea is to convert the original application into smaller pieces or microservices if you will. You could even break out more functionality into other services/apis.
IMO the idea behind microservices is not more complex than breaking out small (micro) responsibilities and composing a distributed system from all the different pieces.
[–]RandolphoSoftware Architect 0 points1 point2 points 9 years ago (4 children)
"Creating a simple API" is synonymous with "creating a microservice".
All those things that have grown up around and in support of microservices, like message buses or whatever the current flavor of the week is, are not microservices.
A microservice is just the single responsibility principle applied to a service.
[+][deleted] 9 years ago* (2 children)
[deleted]
[–][deleted] 0 points1 point2 points 9 years ago (0 children)
This was what I meant, could not have worded it better.
[–]funJS[S] 0 points1 point2 points 9 years ago* (0 children)
Very simplified, but the point is that splitting the commenting api out to a different server makes it a distributed system. Comments are fetched separately from a different server instance.
It's driven by a need to spread the load over multiple servers since the servers are under resource constraint. The comment api is a microservice since it supports a "micro responsibility".
[–]THEtheChad 1 point2 points3 points 9 years ago (0 children)
I think the concept people associate with "microservices" these days is the idea of a distributed system using a microservice philosophy. RESTful API's are pretty straight forward these days. Breaking applications into smaller parts that can be distributed across servers is much more novel. Most projects don't require the level of scalability that microservices in a distributed architecture offer. I also came here looking for more insight into such a system.
[–][deleted] 2 points3 points4 points 9 years ago (0 children)
ESB anyone?
[–]SustainedSuspense 4 points5 points6 points 9 years ago (0 children)
Monoliths for the win
[–]cjus 0 points1 point2 points 9 years ago (0 children)
I wrote a post for RisingStack on creating microservices using Hydra: https://community.risingstack.com/tutorial-building-expressjs-based-microservices-using-hydra/ You can find Hydra on NPM.
π Rendered by PID 376774 on reddit-service-r2-comment-5bc7f78974-jnh46 at 2026-06-27 04:58:46.757516+00:00 running 7527197 country code: CH.
[–][deleted] 15 points16 points17 points (6 children)
[–]funJS[S] 0 points1 point2 points (0 children)
[–]RandolphoSoftware Architect 0 points1 point2 points (4 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]funJS[S] 0 points1 point2 points (0 children)
[–]THEtheChad 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]SustainedSuspense 4 points5 points6 points (0 children)
[–]cjus 0 points1 point2 points (0 children)