1

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

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.

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

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?

Alon Amir
  • 4,913
  • 9
  • 47
  • 86
richard
  • 2,887
  • 5
  • 26
  • 36

1 Answers1

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.

I would see it as equivalent to SOAP which also allows to create client code from meta-information provided as 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.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • Hi Gunter. In this case this question is not about Dart, but about Java - Can I add a Document Discovery service to my existing java Web service application? – richard Jun 09 '15 at 21:20
  • The discovery document describes the API. I haven't checked but I assume it's JSON. You need to provide such a document for your API in "some" way and you need a generator that generates code from this document. Such a client exists for various languages including Java. The `shelf_rpc` package generates the discovery document from the classes you use in the API and annotations you add to classes, methods, and fields. You just have to find or build such a tool for Java (I assume there already exists one but haven't checked). – Günter Zöchbauer Jun 09 '15 at 21:24
  • You could also use Protocol Buffers in a similar way. You describe the API in a text document and generate classes for client and server from the document, but ProtoBuf is a binary format instead of JSON. – Günter Zöchbauer Jun 09 '15 at 21:27