Re: [grpc-io] It seems gRPC's has not support for service discovery & registry so far

2016-06-14 Thread 'Eric Anderson' via grpc.io
On Tue, Jun 14, 2016 at 12:54 AM, Benson Wang 
wrote:

> Thanks Eric for your feedback.  Could you give me a clue to use "Name
> Resolvers" to integrate with a service discovery?
>

Implement a NameResolver
. We use
URI schemes to primarily distinguish between resolvers. So a target

of dns:///google.com would generally use the DnsNameResolver. In the
current version you then register a NameResolver.Factory with
NameResolverRegistry.register()
.
In the next version this is changing
. You would make a
NameResolverProvider and we will load it from the classpath using
ServiceLoader, so no static method calls are necessary before use.

You can find some documentation
 in the primary
grpc repo. But probably the best documentation at this point on targets is the
forTarget() method

(that
I also linked to earlier).

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oPwZk0tR-7oAt%3Dh98XBzk2%3DmGsLkWNS%3D5CkVGCBsrrOqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] It seems gRPC's has not support for service discovery & registry so far

2016-06-14 Thread Benson Wang
Thanks Eric for your feedback.  Could you give me a clue to use "Name 
Resolvers" to integrate with a service discovery?


Thanks in advances!

Regards,
Benson

在 2016/6/14 1:48, Eric Anderson 写道:
On Mon, Jun 13, 2016 at 3:03 AM, Benson Wang > wrote:


We register our services by the way below. But we cannot remove
the registered services from gRPC.


If you want to mutate the services after you start the server, you 
need to provide your own HandlerRegistry. For example, you can pass a 
MutableHandlerRegistry 
 (note 
that this will be renamed to io.grpc.util.MutableHandlerRegistry in 
the next release).


It seems gRPC's has not support for service discovery & registry
so far. Is it in your plan?


Is that related to removing services, or is this a completely separate 
question?


If it's a separate question, then you want to look at "Name 
Resolvers." gRPC does not do service discovery itself but allows 
integrating with a service discovery service via Name Resolvers. Is 
there a particular service discovery mechanism you would like to use?


--
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/575FB822.2070605%40symbio.com.
For more options, visit https://groups.google.com/d/optout.