Master de II. ULL. 1er cuatrimestre. 2020/2021
Lea el CapĂtulo 4 âConnecting Robust Microservicesâ de Node.JS The Right Way ` ` y resuelva los problemas en la secciones
yBidirectional Messaging:
zmq-filer-rep.js
program uses fs.readfile()
to serve up file contents. However it doesnât handle error cases.
SIGINT
to detect the userâs Ctrl-C
in the terminal
SIGTERM
(the termination signal)?uncaughtException
event on the process objectonline
events and logged a message when the workers came up.kill [pid]
from the command linezmq-filer-rep-cluster.js
program to fork a new worker whenever one dies?PUSH
socket and bind it to an IPC endpoint. This socket will be for sending jobs to the workersPULL
socket and bind it to a different IPC endpoint. This socket will receive messages from the workersready
message, increment the ready counter, orresult
message , output it to the consolejob
messages out through the push socketPULL
socket and connect it to the master âs PUSH
endpointPUSH
socket and connect it to the master âs PULL
endpointjob
messages on the PULL
socket, and respond by sending a result
message out on the PUSH
socketready
message out on the PUSH
socket.result
messages include at least the process ID of the worker.
This way you can inspect the console output and confirm that the workload is being balanced among the worker processes.connecting-robust-microservices-chapter-4/microservices
in our repo ULL-MII-CA-1819/nodejs-the-right-way