Looking for advice with resources and link relations
Simon Guindon <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CAL3-C2YTRGsXafEWevZ8J84smAeuu4vL7BPPYaGZ3ke1+MAtDA@mail.gmail.com> |
Hey all, I'm looking for some ideas on how to model the resources and link relations for a Dynamic Distributed Service Locator where services register in a directory with information like: - Service Name - Service Version (multiple versions of the service can exist in the directory) - Data Center Location - Service Endpoint address - Service Quality (multiple instances of the service may exist, some on better hardware than others) A service will register itself with the directory but also query it for dependencies. ServiceA may require to locate ServiceB using version 2.0 but here's where I start to get confused how I might model this, it may also decide it prefers data center locality as a primary preference and service quality as a secondary preference. Administration UI's may also do broader queries to show a dashboard. My first thoughts was something like this when ServiceA queries for ServiceB. /services/ServiceB/2.0?prefer=datacenter,quality This would list all versions of ServiceB. /services/ServiceB Would a good idea then be to have something like this for querying what services exist in a data center? /DataCenterA And maybe to get a specific version of an instance from a data center. /DataCenterA/ServiceB/2.0 With the results returning multiple listings, I would use links so that the client can choose the right one to use, and if its unavailable it could fallback using another link. Any feedback is appreciated.