public static void main(String[] args) throws Exception 
	{
		/*
		gdb.addNode("regionName", null,null);
		gdb.addNode("regionName", "agentName",null);
		gdb.addNode("regionName", "agentName","pluginName");
		gdb.addNode("regionName", "agentName","pluginName2");
		
		gdb.addNode("regionName", "agentName2",null);
		gdb.addNode("regionName", "agentName","pluginName");
		*/
		
		try
    	{
			
			String configFile = checkConfig(args);
        	
			//Make sure config file
        	config = new Config(configFile);
    		
        	commandExec = new CommandExec(); //create command channel
    		
    		gdb = new GraphDBEngine(); //create graphdb connector
    		while(!ControllerEngine.GDBActive)
	    	{
	    		System.out.println("Waiting on DGBActive...");
	    		Thread.sleep(1000);;
	    	}
    		
    		regionalMsgMap = new ConcurrentHashMap<String,ConcurrentLinkedQueue<MsgEvent>>();
    		
    		resourceScheduleQueue = new ConcurrentLinkedQueue<MsgEvent>();
    		
    		System.out.println("Starting Futura");
    		fe = new FuturaEngine();
			Thread fe_thread = new Thread(fe);
	    	fe_thread.start();
	    	
	    	while(!ControllerEngine.FuturaActive)
	    	{
	    		System.out.println("Waiting on FuturaActive...");
	    		Thread.sleep(1000);;
	    	}
	    	
	    	System.out.println("Starting TopologyEngine");
    		te = new TopologyEngine();
			Thread te_thread = new Thread(te);
	    	te_thread.start();
	    	
	    	while(!ControllerEngine.TopologyActive)
	    	{
	    		System.out.println("Waiting on TopologyActive...");
	    		Thread.sleep(1000);;
	    	}
	    	
			/*
    		System.out.println("Starting Broker");
    		BrokerEngine be = new BrokerEngine();
    		*/
	    	
			System.out.println("Starting SR Scheduler");
			se = new SchedulerEngine();
			Thread se_thread = new Thread(se);
	    	se_thread.start();
			
	    	while(!ControllerEngine.SchedulerActive)
	    	{
	    		System.out.println("Waiting on SchedulerActive...");
	    		Thread.sleep(1000);;
	    	}
			
			System.out.println("Starting HTTPInternal Service");
			httpServerEngineDownloads httpEngineDownloads = new httpServerEngineDownloads();
			Thread httpServerThreadDownloads = new Thread(httpEngineDownloads);
	    	httpServerThreadDownloads.start();
	    	
			System.out.println("Starting HTTPInternal Service");
			httpServerEngineInternal httpEngineInternal = new httpServerEngineInternal();
			Thread httpServerThreadInternal = new Thread(httpEngineInternal);
	    	httpServerThreadInternal.start();
	    	
	    	System.out.println("Starting HTTPInternal Service");
			httpServerEngineExternal httpEngineExternal = new httpServerEngineExternal();
			Thread httpServerThreadExternal = new Thread(httpEngineExternal);
	    	httpServerThreadExternal.start();
	    	
	    	System.out.println("Starting HTTPPerf Service");
			httpServerEnginePerf httpEnginePerf = new httpServerEnginePerf();
			Thread httpServerThreadPerf = new Thread(httpEnginePerf);
	    	httpServerThreadPerf.start();
	    	
	    	//
	    	/*
	    	System.out.println("adding msg for test2 and test3");
	    	ConcurrentLinkedQueue<MsgEvent> cmq = new ConcurrentLinkedQueue<MsgEvent>();
	    	MsgEvent me = new MsgEvent(MsgEventType.EXEC,"test2","controller2",null,"test message for test2");
	    	me.setParam("src_region", "test2");
			me.setParam("dst_region", "test2");
			me.setParam("dst_agent", "controller2");
			cmq.add(me);
			regionalMsgMap.put("test2", cmq);
	    	*/
	    	//
	    	
    	}
    	catch(Exception ex)
    	{
    		System.out.println("Unable to Start HTTP Service : " + ex.toString());
    	}
			
	}