コード例 #1
0
        static void Main(string[] args)
        {
            Repo.Repo repo = new Repo.Repo("http://localhost", 8082);
            MotherBuilder.MotherBuilder mbldr = new MotherBuilder.MotherBuilder("http://localhost", 8081, 3);
            //mbldr.StartChildProc();

            repo.sendBR("http://localhost:8082/IPluggableComm", "http://localhost:8081/IPluggableComm");
        }
コード例 #2
0
        // Main process of the Mother Builder
        static void Main(string[] args)
        {
            Console.WriteLine("\n ************************************************ \n");
            Console.WriteLine(" Starting MotherBuilder at: http://localhost:{0} ", 8081);
            Console.WriteLine("\n ************************************************ \n");
            int numProcess = Int32.Parse(args[0]);

            Console.WriteLine(" Number of child builders spawned: {0}", numProcess);

            // Starting Mother Builder at "http://localhost:8081"
            MotherBuilder mb = new MotherBuilder("http://localhost", 8081, numProcess);
        }
コード例 #3
0
        static void Main(string[] args)
        {
            MotherBuilder mb = new MotherBuilder();

            mb.instances = Int32.Parse(args[0]);
            mb.CreateChildBuilders(mb.instances, "" + mb.port);
            Thread sortThread = new Thread(mb.sort);

            sortThread.Start();
            Thread requestDelegateThread = new Thread(mb.delegateRequest);

            requestDelegateThread.Start();
        }
コード例 #4
0
        static void Main(string[] args)
        {
            Console.Title = "Mother Builder";
            int count = 0;

            if (args.Count() == 0)
            {
                Console.WriteLine("\n  please enter number of processes to create on command line");
                return;
            }
            else
            {
                count = Int32.Parse(args[0]);
                for (int i = 1; i <= count; ++i)
                {
                    createProcess(portNumber + i);
                    Console.WriteLine(portNumber + i);
                    ready.enQ((portNumber + i).ToString());
                }
            }
            MotherBuilder mother = new MotherBuilder(count);
        }
コード例 #5
0
        static void Main(string[] args)
        {
            Console.Write("\n  Mother Builder");
            Console.Write("\n ================\n");

            Console.Title           = "MotherBuilder";
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.White;
            MotherBuilder Server = new MotherBuilder();

            Console.Write("\n  Requirement2: Using a Message-Passing Communication Service built with WCF\n");

            Console.Write("\n  Requirement 5: This module provides a Process Pool component that creates a specified number of processes on command\n");

            ProcessPool.ProcessPool pp = new ProcessPool.ProcessPool();
            if (args.Count() == 0)
            {
                Console.Write("\n  please enter number of processes to create on command line");
                return;
            }
            else
            {
                int count = Int32.Parse(args[0]);
                if (count > 10 || count < 0)
                {
                    Console.WriteLine("\n  Please enter a value between 1 to 10");
                    return;
                }
                portsCreated = pp.processPool(count);
            }

            Message msg = Server.makeMessage("Nupur", Server.endPoint, Server.endPoint);

            Console.ReadKey();
            Console.Write("\n\n");
        }
コード例 #6
0
 static void Main(string[] args)
 {
     Console.Title = "Mother Builder";
     MotherBuilder mbuilder = new MotherBuilder();   //starts mother builder
 }