I need a service of a certain type, but i don't know where it is.
I need to get access to restricted features of that service
Service discovery always happens in relation to another service, even if that service is the Host service
DreamService gets a new default feature @discovery for requesting information about services it knows about by SID and optionally a key (unique name, could be namespace in the case of an extension).
The search for discovery favors services that the called service knows about, but upon failure, it will propagate the query to it's child and parent services. So that the discovery search only travels along the branch of the current service, and not into siblings, requests to parents and children use a query argument specifying the direction in which further propagation is permitted.
The default implementation will register every child service a service it creates for discovery and since by default all services respond to all uri's, services will be registered to be discoverable on *:* for host:port.
Deki would override the feature to prevent extensions from going into the general pool that it knows about. Child services such as lucene, emailer, etc. would go into a global pool for the Deki service, which each instance keeps it own pool of extensions. Deki would also register services that it knows about but didn't create itself, such as a passed in Lucene service, or a remote extension. Deki instances would register extensions for every host:port combination that it is configured to respond to, so that a propagated query only discovers extension for the host:port queried
Request information about services that the current service knows about.
| Name | Type | Defaut | Description |
| sid | string | required | The SID of the service to discover |
| name | string? | none | Optional unique name of the service |
| direction | string? | none | Search either up or down the hierarchy, just up or just down, or search only queried service (up|down|local) |
| Response | Response Body | Description |
| Ok (200) | see below | operation completed successfully |
| Not Found (404) | text/html | request could not be completed, because of invalid data in the request |
<services> <service> <sid>...</sid> <name>...</name> <uri>...</name> </service> ... </services>
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by