简体   繁体   English

为什么我们需要RESTful Web服务存储库?

[英]Why do we need RESTful Web Services repository?

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 . 我正在一个项目中使用大量的RESTful Web服务,但是突然我被告知需要为JAX-RS使用存储库。 (it's better to say that I'll have to do this because it's a part of College Project). (最好说我必须这样做,因为它是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. 我已经在Wikipedia上阅读了一些信息,还下载了WSo2 Governance Registry二进制文件。我发现这不是一件容易的技术,有一些用于构建RESTful应用程序的特殊框架。

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. 我记得几年前SOAP非常流行(流行吗?),而WSDL用于将它们发布到UDDI存储库中,如果我说错了什么,因为我从未使用过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). 在我看来,REST Repository是另一个“时尚的最后一句话”(或者我可能完全错了,因为我从未在实践中见过REST Repository)。

Can you give me some examples where REST Repository should be used and why we can't do the same without REST Repository ? 您能给我一些使用REST Repository的示例吗,为什么没有REST Repository我们也不能这样做?

To directly answer your question, there is no requirement for a "repository/directory/registry" for service discovery in REST based systems. 为了直接回答您的问题,在基于REST的系统中发现服务不需要“存储库/目录/注册表”。 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. 诸如可编程Web的搜索引擎,诸如Microsoft的Azure OData服务的市场以及诸如apicommons.org的最新成果。 Also, Microsoft's recent Azure AppService has a marketplace of APIs. 此外,Microsoft最近的Azure AppService拥有API市场。

RESTful services do have the requirement that media types that are used should be registered in IANA registries . RESTful服务确实要求使用的媒体类型应在IANA注册中心进行注册

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. 知道您的老师在使用“存储库”一词时指的是什么具体示例会很有趣,因为我在API世界中根本没有使用过该术语来进行服务发现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么已经需要异步运行异步REST Web服务? - why do we need async rest web services when it is already running asynchronously? 为什么我们可以在Restful服务中使用jsonObject时需要POJO - Why we need POJO when we can use jsonObject in Restful services 在独立的非集群环境中部署的Restful web service中,我们是否需要使用线程安全的数据结构? - In Restful web service deployed in a standalone non cluster environment, do we need to use thread safe data structures? 我们的应用程序中可以同时包含RESTful和SOAP Web服务吗 - Can we have both RESTful and SOAP Web Services in our application 为什么当我测试```repository.delete()``时我们不需要模仿repository.delete()? - Why when I test ``` repository.delete()``` we do not need imitate repository.delete()? 我们需要在Android开发中对输入参数进行服务器端(Web服务)验证吗? - Do we need to do server side(web services) validation for input parameters in Android development? 需要在 Struts2 和 Spring 中实现 RESTful web 服务 - Need to implement RESTful web services in Struts2 and Spring Java中的RESTful Web服务 - RESTful web services in java 为什么要在雷曼语言的静态Web服务中使用post - why to use post in restful web services in Lehman languages RESTful和SOAP Web服务在实践中有何不同? - How do RESTful and SOAP Web Services differ in practice?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM