Before we start the implementation, just to highlight again
Topological sorting only works for DAG (directed acyclic graph) : a directed graph with no directed cycles
This helper function will assign topological number to a given vertex.
Finally, a driver function to trigger topological sorting.
Now each vertex is assigned with a number to form the topological sequence.
package.json is a file holds various metadata relevant to the project. It is usually located at the root directory of a Node.js project.
This file will give information to npm for it to identify the project as well as handle the project’s dependencies.
It lists the packages your project depends…
A typical monolithic server contains all of the codes implemented for all features for our application inside one codebase , and this server interact with a single database.
A microservice contains the codes needed for just one feature of our application.
Each service is self-contained and standalone, it interacts with…
Now you have a MongoDB replica set and decide to downgrade it to a standalone node.
If you don’t have a replica set yet, please refer to my previous post Create a MongoDB replica set to create one to go through this article.
Firstable, Shut down the mongod instance for…
A replica set in MongoDB is a group of mongod instances that maintain the same data set. It contains several data bearing nodes and optionally one arbiter node.
Of the data bearing nodes, one and only one member is deemed the primary node, while the other nodes are deemed secondary…