Project

General

Profile

Actions

Idea #2525

closed

Generate a Java SDK using Google API tools

Added by Tom Clegg about 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Start date:
04/22/2014
Due date:
Story points:
3.0

Description

Start from the Google API client Java SDK (https://developers.google.com/discovery/libraries)

1. Get the Google API client Java SDK operational against Arvados (this should 'just work', but ymmv). You may have to add an Arvados Java SDK on top of the Google API client Java SDK, just like we have done for Ruby and Python.

2. Basic documentation for using the Java SDK

3. Explore and scope possible usability improvements that could go into an Arvados Java SDK

4. After consultation with (some of) the rest of the team, and perhaps some feedback from the Qiagen developers, implement the most pressing improvements. Document improvements from an SDK user/app developer perspective.

For now,
  • No Keep data support (clients will use arv-mount or arv keep get to read, write to tmp and arv keep put to write)

Subtasks 6 (0 open6 closed)

Task #2675: Learn about Google APIs Client Library for JavaResolvedRadhika Chippada04/22/2014Actions
Task #2713: Add documentationResolvedRadhika Chippada04/22/2014Actions
Task #2712: Setup SDK as a maven projectResolvedRadhika Chippada04/22/2014Actions
Task #2711: Add unit testsResolvedRadhika Chippada04/22/2014Actions
Task #2710: Implement SDK using google discovery service client implementation.ResolvedRadhika Chippada04/22/2014Actions
Task #2714: 2525-java-sdk branch reviewResolvedRadhika Chippada04/22/2014Actions
Actions #1

Updated by Tom Clegg about 10 years ago

  • Subject changed from Java SDK to Generate a Java SDK using Google API tools
  • Story points set to 2.0
Actions #2

Updated by Ward Vandewege about 10 years ago

  • Assigned To set to Radhika Chippada
Actions #3

Updated by Ward Vandewege about 10 years ago

  • Description updated (diff)
Actions #4

Updated by Tom Clegg about 10 years ago

  • Description updated (diff)
Actions #5

Updated by Tom Clegg about 10 years ago

  • Assigned To deleted (Radhika Chippada)
Actions #6

Updated by Radhika Chippada about 10 years ago

  • Assigned To set to Radhika Chippada
  • Story points changed from 2.0 to 3.0
Actions #7

Updated by Radhika Chippada almost 10 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Peter Amstutz almost 10 years ago

Comments for revision 8ee3fe6

  1. "mvn clean package" fails when running tests because I didn't have ARVADOS_API_TOKEN and ARVADOS_API_HOST set up. It should either run the API server in test mode and run the tests against it locally, or it should skip the tests entirely if those environment variables are not available.
  2. The tests make changes to the the database, such as calling users.create. This is definitely something that needs to run against a test server, so as to avoid running against a production server and creating junk data.
  3. Code requires ARVADOS_API_HOST_INSECURE but doesn't do anything with it. ARVADOS_API_HOST_INSECURE is not required, it should not fail if it is missing. The purpose of this environment variable is to signal whether it is allowed to accept self-signed SSL certificates. If the variable is not set, it should reject self-signed certificates.
  4. Jar file should have "arvados" somewhere in the name, e.g. arvados-sdk-1.0.jar
  5. Running "java -cp target/java-1.0-SNAPSHOT-jar-with-dependencies.jar org.arvados.sdk.java.Arvados" with no arguments prints an exception stack trace.
  6. Could we wrap "java -cp target/java-1.0-SNAPSHOT-jar-with-dependencies.jar org.arvados.sdk.java.Arvados" with a small script?
  7. ArvadosSDKJavaUser should have "example" in the name to make it more obvious that it is an example, e.g. ArvadosSDKExample
  8. org.arvados.sdk.java.Arvados constructor should take 'apiVersion', and assume "arvados" to construct the /arvados/v1 prefix
  9. org.arvados.sdk.java.Arvados.call() is very verbose. Change call() so that it takes the 'parameters' HashMap directly, instead of parsing out the list. Accept nested HashMap, List, String and numeric parameters and ensure they are serialized to JSON properly. It should verify that the parameters are compatible with the discovery document, and required parameters are present.
  10. Successful responses from the server should be parsed as JSON, and return a Map to the caller.
  11. POST methods should not require that the payload come from a file. The caller should be able to provide a buffer.
  12. I would like examples of more complex API calls with optional parameters and nested JSON parameters, for example index queries with filters.
  13. Example API documentation that the user will refer to: http://doc.arvados.org/api/methods/pipeline_templates.html
  14. Add a link to http://doc.arvados.org/api/index.html in README
  15. Contents of README should eventually migrate into its own page on http://doc.arvados.org/sdk/index.html
Actions #9

Updated by Peter Amstutz almost 10 years ago

  1. doc/sdk/java/index.html.textile.liquid
    • URL to "maven-in-five-minutes.html" should be an actual link.
    • Link to user/reference/api-tokens.html instead of re-explaining the Arvados environment variables
    • Provide a link or some other information about the "m2eclipse" plugin
  2. Arvados.java
    • "hostInsecure" parameter of constructor should be a boolean, not a String
  3. ArvadosSDKJavaExample.java
    • Please note that ARVADOS_API_HOST_INSECURE should only be set during development, add some text so as not to imply that it is required.
    • Is there an easy way to pretty-print the 'response' Map object?
    • The comments should explain a little bit more about what is going on, for example the first "arv.call()" should document each parameter and what is expected to happen.
Actions #10

Updated by Peter Amstutz almost 10 years ago

(In-person comments)

ArvadosSDKJavaExample repeats the "print each entry in a map" code block three times, should be refactored.

ArvadosSDKJavaExampleWithPrompt would be more useful as a simple java version of the 'arv' command-line. Alternately, it could use the discovery document to list out the acceptable values for each of the resource, method, parameters prompts.

Actions #11

Updated by Radhika Chippada almost 10 years ago

  • Status changed from In Progress to Resolved

Addressed all review feedback and merged into master.

Actions

Also available in: Atom PDF