3º. 2º cuatrimestre. Itinerario de Tecnologías de la Información. Grado en Ingeniería Informática. Curso 2019/2020
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