public Task Init(string name, Orleans.Providers.IProviderRuntime providerRuntime, Orleans.Providers.IProviderConfiguration config)
        {
            this.Name = name;
            this.Log = providerRuntime.GetLogger(this.GetType().FullName, Logger.LoggerType.Application);

            // Create EventStore connection
            var username = config.Properties.ContainsKey("Username") ? config.Properties["Username"] : "******";
            var password = config.Properties.ContainsKey("Password") ? config.Properties["Password"] : "******";

            var settings = ConnectionSettings.Create()
                .KeepReconnecting().KeepRetrying()
                .SetDefaultUserCredentials(new UserCredentials(username, password));

            // Connection string format: <hostName>:<port>
            var connectionStringParts = config.Properties["ConnectionString"].Split(':'); 
            var hostName = connectionStringParts[0];
            var hostPort = int.Parse(connectionStringParts[1]);
            var hostAddress = Dns.GetHostAddresses(hostName).First(a => a.AddressFamily == AddressFamily.InterNetwork);

            this.Connection = EventStoreConnection.Create(settings, new IPEndPoint(hostAddress, hostPort));

            // Connect to EventStore
            return this.Connection.ConnectAsync();
        }