public CloudController(String componentName, Config config, InputStream userRequestStream, PrintStream userResponseStream) {
		this.componentName = componentName;
		this.controllerConfig = config;
		this.userRequestStream = userRequestStream;
		this.userResponseStream = userResponseStream;

		/*
		 * Initialize the user map
		 */
		userMap = new UserConcurrentHashMap();

		/*
		 * Initialize the node lists
		 */
		nodeMap = new NodeConcurrentHashMap();

		/*
		 * Read out all of the config information for the controller and initialize the variables
		 */
		tcpPort = controllerConfig.getInt("tcp.port");
		udpPort = controllerConfig.getInt("udp.port");
		nodeTimeout = controllerConfig.getInt("node.timeout");
		nodeCheckPeriod = controllerConfig.getInt("node.checkPeriod");

		/*
		 * Read user list from user.properties, build userMap and assign user attributes (password, credits)
		 */
		userConfig = new Config("user");
		Set<String> userKeys = userConfig.listKeys();

		for (String key : userKeys) {
			String[] parts = key.split("\\.");
			String userName = parts[0];
			String attr = parts[1];
			if (!userMap.containsKey(userName)) {
				UserData user = new UserData();
				user.setUserName(userName);
				if (attr.equals("credits"))
					user.setCredits(userConfig.getInt(userName + "." + attr));
				if (attr.equals("password"))
					user.setPassword(userConfig.getString(userName + "." + attr));
				userMap.put(userName, user);
			} else {
				if (attr.equals("credits"))
					userMap.get(userName).setCredits(userConfig.getInt(userName + "." + attr));
				if (attr.equals("password"))
					userMap.get(userName).setPassword(userConfig.getString(userName + "." + attr));
			}
		}

		/*
		 * Instantiate thread pool
		 */
		pool = Executors.newCachedThreadPool();

		/*
		 * Instantiate ServerSocket and DatagramSocket
		 */
		try {
			serverSocket = new ServerSocket(tcpPort);
			datagramSocket = new DatagramSocket(udpPort);
		} catch (SocketException e) {
			System.out.println("ERROR: " + e.getMessage());
		} catch (IOException e) {
			System.out.println("ERROR: " + e.getMessage());
		}

		aliveTimer = new Timer();
		aliveTimerTask = new AliveTimerTask(nodeMap, nodeTimeout);
	}