How to get server endpoints from clients not in the same service?

Mar 4, 2011 at 4:22 PM
Edited Mar 4, 2011 at 4:23 PM

I was able to deploy the "CloudCache_1.0.0.1\Azure Cache" project with its worker roles hosting memcached and the dashboard web role into the azure cloud without problems - great work!

But how am I supposed to get the memcached server endpoints from clients not running in the same service?

In my case I have web and worker roles running in different services - not in the same service/project as the memcached worker roles.  In the dashboard project I do see RoleEnvironmentMemcachedEndpointResolver.cs which implements IMemcachedEndpointResolver - but it gets the endpoints from "RoleEnvironment.Roles[memcachedRoleName].Instances" - like this -

        public List<IPEndPoint> GetEndpoints()
        {
            var list = new List<IPEndPoint>();
            try
            {
                foreach (var endpoint in RoleEnvironment.Roles[memcachedRoleName].Instances)
                {
                    foreach (var epi in endpoint.InstanceEndpoints)
                    {
                        if (epi.Key == "memcached")
                        {
                            list.Add(epi.Value.IPEndpoint);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.TraceError(ex.Message);
            }
            return list;
        }

If I have another web role not running in the same project/service, this would obviously not work.  

How do I get the memcached server endpoints from clients not running in the same service?  We can suppose these clients are running in the same data center as the memcached worker roles.

(btw: I know Microsoft is working on AppFabric Caching, but it is currently in CTP, so I'm looking for distributed caching solution that I could use today)