MindTouch Dream Service Discovery

    The Problem

    I need a service of a certain type, but i don't know where it is.

    Additional, unresolved problems

    I need to get access to restricted features of that service

    Simplifying Assumption

    Service discovery always happens in relation to another service, even if that service is the Host service

    Solution

    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

    GET:@discovery

    Request information about services that the current service knows about. 

    Accces: Public

    Query Parameters

    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 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

    Response body

    <services>
        <service>
            <sid>...</sid>
            <name>...</name>
            <uri>...</name>
        </service>
        ...
    </services>
    
    Tag page
    Viewing 1 of 1 comments: view all
    what about discovering multiple services? e.g. I want to find the email service and draft service. Is there a way to discover a certain class of services potentially to avoid multiple API calls? edited 09:03, 14 Oct 2009
    Posted 09:02, 14 Oct 2009
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by