在非app引擎服务上使用Document Discovery服务

时间:2021-04-14 23:09:20

I have been playing around with the RPC package in Dart which makes it easy to add a Document Discovery service to Dart server.

我一直在使用Dart中的RPC包,这使得将文档发现服务添加到Dart服务器变得很容易。

After a bit of Googling I found out about the API Discovery Service https://developers.google.com/discovery/ which explained how to create client code for a given Discovery Document.

经过一段谷歌搜索后,我发现了API发现服务https://developers.google.com/discovery/,其中介绍了如何为给定的发现文档创建客户端代码。

I then found Google Cloud Endpoint which looks like the server end of the a Document Discovery service. Is this true.

然后我找到了Google Cloud Endpoint,它看起来像是Document Discovery服务的服务器端。这是真的。

My real question is that I would like to use the Document Discovery service on a standard web site that is based on (say) Spring and running (say) an embedded Jetty server? Is this possible or would my application be intertwined with the App Engine Technology?

我真正的问题是,我想在标准网站上使用Document Discovery服务,该网站基于(例如)Spring和运行(比如说)嵌入式Jetty服务器?这可能或我的应用程序是否与App Engine技术交织在一起?

1 个解决方案

#1


1  

You application just needs to provide a Document Discovery service. It shouldn't be to hard to get the information what is expected out of the source of https://pub.dartlang.org/packages/discovery_api_client_generator which is the Dart client which generates Dart client code from discovery documents. As far as I know your service doesn't even need to provide the discovery documents. The discovery_api_client_generator package can also use discovery documents stored locally but the service is of course the preferred way if you want to make it available to everyone.

您的应用程序只需提供Document Discovery服务。不应该很难从https://pub.dartlang.org/packages/discovery_api_client_generator的源代码中获取预期的信息,这是从发现文档生成Dart客户端代码的Dart客户端。据我所知,您的服务甚至不需要提供发现文档。 discovery_api_client_generator包还可以使用本地存储的发现文档,但如果您想让所有人都可以使用该服务,那么该服务当然是首选方式。

I would see it as equivalent to SOAP which also allows to create client code from meta-information provided as XML.

我认为它等同于SOAP,它也允许从XML提供的元信息创建客户端代码。

Also the shelf_rpc package doesn't need to run on AppEngine or Managed VM. You can run it locally or on any server you want.

此外,shelf_rpc包不需要在AppEngine或托管VM上运行。您可以在本地或任何所需的服务器上运行它。

#1


1  

You application just needs to provide a Document Discovery service. It shouldn't be to hard to get the information what is expected out of the source of https://pub.dartlang.org/packages/discovery_api_client_generator which is the Dart client which generates Dart client code from discovery documents. As far as I know your service doesn't even need to provide the discovery documents. The discovery_api_client_generator package can also use discovery documents stored locally but the service is of course the preferred way if you want to make it available to everyone.

您的应用程序只需提供Document Discovery服务。不应该很难从https://pub.dartlang.org/packages/discovery_api_client_generator的源代码中获取预期的信息,这是从发现文档生成Dart客户端代码的Dart客户端。据我所知,您的服务甚至不需要提供发现文档。 discovery_api_client_generator包还可以使用本地存储的发现文档,但如果您想让所有人都可以使用该服务,那么该服务当然是首选方式。

I would see it as equivalent to SOAP which also allows to create client code from meta-information provided as XML.

我认为它等同于SOAP,它也允许从XML提供的元信息创建客户端代码。

Also the shelf_rpc package doesn't need to run on AppEngine or Managed VM. You can run it locally or on any server you want.

此外,shelf_rpc包不需要在AppEngine或托管VM上运行。您可以在本地或任何所需的服务器上运行它。