Now my program which uses cluster lib looks like this:
if(cluster.isMaster) {
// here goes Rx subscriptions and workflows for the Master
} else if (cluster.isWorker){
// here goes Rx subscriptions and workflows for a Worker
}
It's looks a little bit ugly and I need to duplicate some code which is common for both Master and Worker. Is there a way to rewrite it in more "reactive" style?