1

I'm working on a project where i am using quite a few RESTful web services,but all of a sudden i am told that i need to use a repository for JAX-RS . (it's better to say that I'll have to do this because it's a part of College Project).

I've read some info in Wikipedia and I've also downloaded WSo2 Governance Registry binary.I see that it's not easy technology, there are special frameworks for building RESTful apps.

I remember that several years ago SOAP was very popular (fashionable?) and WSDL for publishing them in UDDI repositories,pardon me if i say anything wrong because have never worked with SOAP.

It seems to me that REST Repository is another 'last word of fashion' (or I can be totally wrong because I haven't ever seen REST Repository in practice).

Can you give me some examples where REST Repository should be used and why we can't do the same without REST Repository ?

salil vishnu Kapur
  • 660
  • 1
  • 6
  • 29
  • 1
    I know nobody and no system that uses such a repository. So I would not call it a fashion. Ask your teacher why he thinks it is necessary. –  Apr 19 '15 at 15:14
  • @Tichodroma my teacher says they are used by microsoft and facebook by maintaining the services in a repository .Though i myself agree with you. – salil vishnu Kapur Apr 19 '15 at 16:11
  • 1
    Ask him to read out loud chapter 5 opf roy fieldings dissertation, and when he has finished, ask for the REST repository. – sschrass Apr 20 '15 at 14:00
  • @Satellite Thanks i would surely mail this chapter to my teacher . – salil vishnu Kapur Apr 20 '15 at 19:06

1 Answers1

2

To directly answer your question, there is no requirement for a "repository/directory/registry" for service discovery in REST based systems. Generally clients discover services via hypermedia links found in previously retrieved representations. This is true for runtime discovery.

For design time discovery by developers there are various mechanisms available for finding new services. Search engines like programmable web, marketplaces like Microsoft's Azure OData services and more recent efforts like apicommons.org. Also, Microsoft's recent Azure AppService has a marketplace of APIs.

RESTful services do have the requirement that media types that are used should be registered in IANA registries.

It would be interesting to know what specific examples your teacher is referring to when they use the word "Repository" because it is not a term I hear used at all in the API world for service discovery.

Darrel Miller
  • 139,164
  • 32
  • 194
  • 243
  • First of all thanks a lot sir for sharing your absolutely insightful opinion on this.Specific example would be like we need web service for weather report ,so my teacher says there has to be a repository where all restful web services for weather are published .As you had given a very nice reply to this http://stackoverflow.com/questions/6383702/is-there-an-uddi-or-any-other-registry-for-restful-webservices somewhat similar to this is what my teacher asks for . – salil vishnu Kapur Apr 20 '15 at 19:04
  • Though i have implemented this by storing all the available restful web services URI's along with other important parameters in SQL server,but would it be complaint according to business standards to use SQL server as repository ? – salil vishnu Kapur Apr 20 '15 at 19:04
  • 1
    @salilvishnuKapur From the perspective of REST it makes zero difference what technology you use for persisting resource state behind the uniform interface. Personally, I use the JSON Home (http://tools.ietf.org/html/draft-nottingham-json-home-03) media type for resource discovery. However, this doesn't serve quite the same purpose that your teacher is describing. – Darrel Miller Apr 20 '15 at 19:28
  • Okay thanks again .Last one ,None of the companies like microsoft or facebook use Repository/registry for restful web services and instead they prefer DNS for this purpose ? – salil vishnu Kapur Apr 20 '15 at 19:34
  • 1
    @salilvishnuKapur To my knowledge, services are found by human beings talking to each other, reading articles, and using google/bing. Programmable Web is probably the most common place that developers find APIs. http://www.programmableweb.com/ But the existence of an API in a directory like this is not a REST requirement. – Darrel Miller Apr 20 '15 at 19:48