-
Notifications
You must be signed in to change notification settings - Fork 4
Registry
In the DistributeMe world a server is just a java process, running on a machine somewhere. A client, which is another process, or webserver, or just a class started from eclipse doesn't know where the server is running. To find out the location of the service you need a third player, someone known to both. This is the registry. The server registers itself at the registry (bind) and the client ask the registry about the whereabouts of the service (lookup). This way the client can dynamically lookup a service without a need for hardwired configuration. The CORBA analogy is the NameService.
DistributeMe Registry is a web application. The code expects the registry to response at port 9229 (configurable through distributeme.json).
DistributeMe Registry is available as Docker image.
docker run -p9229:9229 anotheria/distributeme-registry:latest
If you are just DistributeMe user, you don't need to know anything about the registry format. But in case you care: If you call your registry you will get something like this:
<services>
<service serviceId="org_distributeme_test_echo_EchoService" host="192.168.200.107" port="9250" protocol="rmi" instanceId="awodzrtvcp" globalId="rmi://org_distributeme_test_echo_EchoService" registrationString="rmi://org_distributeme_test_echo_EchoService.awodzrtvcp@192.168.200.107:9250"/>
</services>
You will find a service entry for each registered service. The values are explained in following table:
Value | Explanation | Example |
---|---|---|
serviceId | The id of the service which is derived from source interface | org_distributeme_test_echo_EchoService |
host | host on which the service is running. This is typically the first entry in the /etc/hosts | 192.168.200.107 |
port | tcp port on which embedded rmiregistry is listening | Default range is 9250 - 9299 |
protocol | protocol that the service is speaking | rmi, corba or webservice |
instanceId | unique instance id which changes on each restart | awodzrtvcp - 10 digits generated literal string |
globalId | used by the client to obtain a service instance | rmi://org_distributeme_test_echo_EchoService |
registrationString | complete service definition which is sent by the server instance to the registry for registration. Uniquely describes a service instance | rmi://org_distributeme_test_echo_EchoService.awodzrtvcp@192.168.200.107:9250 |