package servicediscovery
- Alphabetic
- Public
- All
Type Members
-
class
Record
extends AnyRef
Describes a
service
.Describes a
service
. The record is the only piece of information shared between consumer and provider. It should contains enough metadata to let consumer find the service they want. -
class
ServiceDiscovery
extends AnyRef
Service Discovery main entry point.
Service Discovery main entry point.
The service discovery is an infrastructure that let you publish and find
services
. Aservice
is a discoverable functionality. It can be qualified by its type, metadata, and location. So aservice
can be a database, a service proxy, a HTTP endpoint. It does not have to be a vert.x entity, but can be anything. Each service is described by a Record.The service discovery implements the interactions defined in the service-oriented computing. And to some extend, also provides the dynamic service-oriented computing interaction. So, application can react to arrival and departure of services.
A service provider can:
* publish a service record * un-publish a published record * update the status of a published service (down, out of service...)
A service consumer can:
* lookup for services * bind to a selected service (it gets a io.vertx.scala.servicediscovery.ServiceReference) and use it * release the service once the consumer is done with it * listen for arrival, departure and modification of services.
Consumer would 1) lookup for service record matching their need, 2) retrieve the io.vertx.scala.servicediscovery.ServiceReference that give access to the service, 3) get a service object to access the service, 4) release the service object once done.
A state above, the central piece of information shared by the providers and consumers are Record.
Providers and consumers must create their own io.vertx.scala.servicediscovery.ServiceDiscovery instance. These instances are collaborating in background (distributed structure) to keep the set of services in sync.
-
class
ServiceDiscoveryOptions
extends AnyRef
Options to configure the service discovery.
-
class
ServiceReference
extends AnyRef
Once a consumer has chosen a service, it builds a io.vertx.scala.servicediscovery.ServiceReference managing the binding with the chosen service provider.
Once a consumer has chosen a service, it builds a io.vertx.scala.servicediscovery.ServiceReference managing the binding with the chosen service provider.
The reference lets the consumer: * access the service (via a proxy or a client) with the io.vertx.scala.servicediscovery.ServiceReference#get method * release the reference - so the binding between the consumer and the provider is removed
Value Members
- object Record
- object ServiceDiscovery
- object ServiceDiscoveryOptions
- object ServiceReference