NodeJS Tutorial: Part 1

Installation

Let’s begin by installing NodeJS. Go to the following [link], download the installation package recommended for most users, and while installing, select the default settings provided to you.

After installing, we must ensure that we can run NodeJS. We can do that by opening a command prompt (or terminal) and run the command line:

C:\>node --version
v.6.10.2

Create a folder where to begin working. In my case, I created the following folder:

C:\nodejs\projects\test>
 icon-warning In Windows, you may have to ensure that the environment variable PATH contains the folder where NodeJS was installed. 


Building The Foundations

To begin working, we are going to use NPM which is installed with NodeJS. NPM is short for Node Package Manager which is in charge to for the publishing of open-source NodeJS projects; as well as to be our command-line utility which aids us in dependency management, package installation, and version management. This will be our tool to create and maintain our project.

Share

Microservices: Brownfield: Reporting

 icon-arrow-left Microservices: Brownfield: Transactions

The support reporting for our micro-services architecture system can be a little complex. At difference to a monolithic architecture where you may have a few databases to report from, in the micro-services architecture system, you will have a tons of databases to report from since each micro-service will have its own database.

The report of the data will come from the be split across multiple micro-services and since there is no a central database where you could extract this information you may need to join data across databases. Also, in the micro-service architecture system, reporting can be slow. 

One way to facilitate the reporting is to have a dedicated reporting micro-service which calls all our micro-services and takes care of collecting and consolidate the data. The only disadvantage is when we are reporting large volumes of data or we wish to obtain a report in real-time.

Share