static void Main(string[] args)
        {
            string msg = "";
            ComputationalNode node;
            string ipAddress = "localhost";
            int port = 12345;

            if (args.Length > 0)
                ipAddress = args[0];
            if (args.Length > 1)
                port = int.Parse(args[1]);

            node = new ComputationalNode(ipAddress, port);

            Console.WriteLine("Node created. Start working...\n");
            Console.WriteLine("Type 'stop' to stop node");

            node.Start();

            while (msg.ToLower() != "stop")
                msg = Console.ReadLine();

            Console.WriteLine("Node's work ended. Closing program.");

            node.Stop();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            var node = new ComputationalNode(ComponentConfig.GetComponentConfig(args));
            
            node.Start();

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            var parser = new ArgumentParser(OptionSetPool.ClientOptionsSet);

            parser.ProcessArguments(args);
            parser.UpdateConfiguration(parser.map);

            IClusterClient statusClient = ClusterClientFactory.Factory.Create(
                Properties.Settings.Default.Address, Properties.Settings.Default.Port);
            IClusterClient problemClient = ClusterClientFactory.Factory.Create(
                Properties.Settings.Default.Address, Properties.Settings.Default.Port);

            IAssemblyResolver resolver = new AssemblyResolver();

            var newCore = ComputationalNodeProcessingModuleFactory.Factory.Create
                              (resolver.GetProblemNamesPossibleToSolve().ToList());

            var creator = new MessageArrayCreator();

            ComputationalNode computationalNode = new ComputationalNode(statusClient, problemClient, creator, newCore);

            computationalNode.Run();
        }