Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //var config = Orleans.Runtime.Configuration.ClusterConfiguration.LocalhostPrimarySilo();

            var host = new Orleans.Runtime.Host.SiloHost("Default");

            host.LoadOrleansConfig();

            host.InitializeOrleansSilo();
            host.StartOrleansSilo();


            //var config = Orleans.Runtime.Configuration.ClientConfiguration.LocalhostSilo();
            //GrainClient.Initialize(config);

            //var userID = Guid.NewGuid();
            //IHello pub = Orleans.GrainClient.GrainFactory.GetGrain<IHello>(userID);

            while (true)
            {
                var msg = Console.ReadLine();

                if (msg == "quit")
                {
                    break;
                }
                //pub.SendUpdateMessage(msg);
            }

            host.StopOrleansSilo();

            Console.ReadLine();
        }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     using (var host = new Orleans.Runtime.Host.SiloHost("Default"))
     {
         host.LoadOrleansConfig();
         host.InitializeOrleansSilo();
         host.StartOrleansSilo();
         Console.WriteLine("Starting...");
         Console.Read();
         host.StopOrleansSilo();
     }
 }
Exemplo n.º 3
0
        public OrleansHostWrapper(ClusterConfiguration config, string[] args)
        {
            var siloArgs = SiloArgs.ParseArguments(args);
            if (siloArgs == null)
            {
                return;
            }

            if (siloArgs.DeploymentId != null)
            {
                config.Globals.DeploymentId = siloArgs.DeploymentId;
            }

            siloHost = new Orleans.Runtime.Host.SiloHost(siloArgs.SiloName, config);
            siloHost.LoadOrleansConfig();
        }
Exemplo n.º 4
0
        public OrleansHostWrapper(ClusterConfiguration config, string[] args)
        {
            var siloArgs = SiloArgs.ParseArguments(args);

            if (siloArgs == null)
            {
                return;
            }

            if (siloArgs.DeploymentId != null)
            {
                config.Globals.DeploymentId = siloArgs.DeploymentId;
            }

            siloHost = new Orleans.Runtime.Host.SiloHost(siloArgs.SiloName, config);
            siloHost.LoadOrleansConfig();
        }
Exemplo n.º 5
0
 private void Init()
 {
     siloHost.LoadOrleansConfig();
     siloHost.Config.Globals.FallbackSerializationProvider = typeof(ILBasedSerializer).GetTypeInfo();
 }
Exemplo n.º 6
0
 private void Init()
 {
     _siloHost.LoadOrleansConfig();
 }
Exemplo n.º 7
0
 private void Init(string configFile)
 {
     siloHost.ConfigFileName = configFile;
     siloHost.LoadOrleansConfig();
 }