public MyriadSocketReader(SocketReaderParameters parameters) {
		// read input parameters from job config
		this.nodePath = parameters.getDGenNodePath().getAbsolutePath();
		this.outputBase = parameters.getOutputBase().getAbsolutePath();
		this.datasetID = parameters.getDatasetID();
		this.stage = parameters.getStage();
		this.scalingFactor = parameters.getScalingFactor();
		this.nodeCount = parameters.getNodeCount();
		this.nodeID = parameters.getNodeID();

		// open SocketReader server at input socket number
		try {
			this.serverSocket = new ServerSocket(0);
			this.serverSocketPort = this.serverSocket.getLocalPort();
		} catch (IOException e) {
			cleanup();
			throw new RuntimeException("Could not open reader server socket.");
		}

		// open heartbeat HTTP server
		try {
			org.mortbay.log.Log.setLog(null); // disable the jetty log
			this.heartBeatServer = new Server(0);
			this.heartBeatServer.setHandler(new HeartBeatHandler());
			this.heartBeatServer.start();
			this.heartBeatServerPort = this.heartBeatServer.getConnectors()[0].getLocalPort();
		} catch (Exception e) {
			cleanup();
			throw new RuntimeException("Could not open heart beat server socket.");
		}

		// start data generator process
		try {
			this.dgenProcess = Runtime.getRuntime().exec(getDGenCommand());
		} catch (IOException e) {
			cleanup();
			throw new RuntimeException("Failed to start data generator process.");
		}

		// create client socket from socket server
		try {
			this.clientSocket = this.serverSocket.accept();
		} catch (IOException e) {
			cleanup();
			throw new RuntimeException("Failed to open receiver socket.");
		}

		// create input reader for client socket
		try {
			this.inputReader = new BufferedReader(new InputStreamReader(this.clientSocket.getInputStream()),
				MyriadSocketReader.BUFFER_SIZE);
		} catch (IOException e) {
			cleanup();
			throw new RuntimeException("Failed to open input stream.");
		}

		// create reader thread for the process (ignores the stdout)
		this.dgenReaderThread = new Thread(new MyriadDGenRunner());
		this.dgenReaderThread.start();
	}