Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add endpoint for service status #116

Closed
buske opened this issue Aug 4, 2015 · 17 comments
Closed

Add endpoint for service status #116

buske opened this issue Aug 4, 2015 · 17 comments

Comments

@buske
Copy link
Member

buske commented Aug 4, 2015

Currently, the API has a single endpoint: .../match. I propose adding a new, public, endpoint, e.g. .../status whereby each system reports the status and configuration of that endpoint. I think this is very important for the scalability of this system.

Specifically, it would report any public data and dynamic attributes about that endpoint in a way that other MME services can consume. These could potentially include:

  • Whether the system is online or not (based on whether it responds)
  • The proper and display names of the organization, contacts, and any other public data the service is willing to disclose (e.g. # of patient records, optionally of course)
  • The disclaimer to be displayed alongside results from that system
  • The supported versions of the API
  • The matching algorithms currently supported (Allow endpoint to support multiple matching algorithm(s) #115)
  • A formal description of the data supported by that endpoint (e.g. genes? phenotypes? variants? these ontologies but not these? etc.)

Having this data be available as the response to a query to a non-authenticated endpoint allows other services and interested parties to see the extent of the network and what data is supported before going through the process of negotiating a key exchange.

@fschiettecatte
Copy link
Contributor

I don't see how this helps scalability, but it goes some way to help discoverability and service selection for search.

@Relequestual
Copy link
Member

I agree this could be interesting, but I'm not sure of the immediate utility, other than current availability. I think we should put this on ice till a few more databases are connected, as we might then better understand our needs.

@fschiettecatte
Copy link
Contributor

fschiettecatte commented Jun 1, 2017

How about this as 'heartbeat' endpoint under "/heartbeat":

{
    "heartbeat": {
        "production": true,
        "version": "software release version",
        "accept": ["application/vnd.ga4gh.matchmaker.v1.0+json", "application/vnd.ga4gh.matchmaker.v1.5+json"]
    }
}

@Relequestual
Copy link
Member

Looks fine to me. However do we need a status property?
I would assume if it's a 200 status, it's alive, otherwise it's down.

@fschiettecatte
Copy link
Contributor

Fine, updated in the comment.

@Relequestual
Copy link
Member

I er meant the resulting HTTP status code of the request to the heartbeat endpoint.

@fschiettecatte
Copy link
Contributor

Sure, that's kinda implied I think given HTTP

@Relequestual
Copy link
Member

Right. So I see no reason to include "status": "up|down", in the endpoint json

@fschiettecatte
Copy link
Contributor

Good point, gone.

@harindra-a
Copy link
Collaborator

looking great guys! For one fine day, probably not the first release, should we also have a field that gives back a "throughput" of a node. For example, the time taken to return a result to a query in milliseconds. Or would that be redundant and should be calculated locally?

@Relequestual
Copy link
Member

@harindra-a looks like a MVP set to me... =/

I'm not really sure what use a "throughput" calcualtion would be. It's totally different based on the data given. It has no meaning at all.

@harindra-a
Copy link
Collaborator

I was thinking an average, given most requests coming in are fairly consistent, and automated answers/matches sent back can be timed. As a network grows, it can be a proxy for efficiency of the network as a whole. Anyway, your point is valid, and this is definitely not needed for now. Scratch it

@Relequestual
Copy link
Member

I've seen a huge difference in time required for requests that contain only phenotypic data and no genes (which is perfectly legal). These types of requests can take a LOT longer depending on phenotypes.
In addition, we see a sizeable difference in speed depending on which genes are given, as we have a lot more variants for some genes vs others, which then all need to be scored before returning.

@fschiettecatte
Copy link
Contributor

fschiettecatte commented Jun 26, 2017

Following the Baltimore MME meeting, this was formalized and accepted for 1.1

@harindra-a
Copy link
Collaborator

yes, nice work everybody!

@Relequestual
Copy link
Member

Pull request required.
Did we formalise this in a google doc?

@fschiettecatte
Copy link
Contributor

fschiettecatte commented Jul 6, 2017

I created branch for it adding a heartbeat-api.md file, see https://github.com/ga4gh/mme-apis/tree/issue-116 . I tend to be pretty brief when it comes to specs, please review and updated as needed. I will generate a pull request for it next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants