[Iplant-api-dev] About the new Apps service update...
Rion Dooley
dooley at tacc.utexas.edu
Thu Nov 1 23:23:01 MST 2012
Dear Devs,
Over the past few weeks many of you have expressed your concern about the performance of the Apps service when querying for lists of your shared applications. We heard and understood your frustration. Originally our app permissions were tied to the underlying file system in hopes that it would make it easier for you to share and collaborate on your apps from the command line. We found that due to the way permissions were implemented in IRODS, that caused a bottleneck as the number of apps grew. We tried several different workarounds over the last month to try to speed shared app listings up, but as more apps were registered the end result was the same. We realized we simply had to address the core problem and rework how we handled app permissions.
Today we pushed out an udpate to the service that replaces the old permission system with a new one. For those of you who just want to know how this will impact your existing code, the short answer is that for app queries and listings, it won't. If you're registering new apps, you will do so with the Apps service now instead of the IO service or command line. The new Apps permissions endpoints are self-documented at:
https://foundation.iplantcollaborative.org/apps-v1/
Full documentation is available at:
https://pods.iplantcollaborative.org/wiki/display/docs/FoundationalAPI.APPS.Basic.1.0.
For those of you who want more details, keep reading.
The first thing you will notice is an performance increase in your queries. App listings and searches should be nearly instantaneous. As before, your shared apps can be found using the /apps-v1/apps/share/list endpoint. However, starting with this update, we've added optional authentication support all the listing and search endpoints to the /apps-v1/apps/list endpoint so you can get a combined list of your private, shared, and public apps all in one query. This means that by making an authenticated request to /apps-v1/apps/list, you will get back a list of every app you have access to. This query should respond nearly instantaneously and reduce the number of queries many of you are making to the service.
Second, the Apps service now supports a new /apps-v1/apps/{$app_name}-{$app_version} endpoint that gives every application a unique url. This endpoint has optional authentication. When requesting a public app, no authentication is needed. When requesting a shared app, authentication is required. This endpoint supports the following methods:
GET - returns a JSON app description
POST - accepts a file upload containing the updated app description
DELETE - deregisters the app
To enable the speedup on shared app listings, we rebuild the permission system from the ground up. The new Apps permission ssytem is modeled after the permissions used in the Jobs service. This means that you will manage app permissions directly from the Apps service rather than the IO service. The new functionality is demonstrated below with several examples using curl.
List permissions for an individual app:
curl -sku "$IPLANTUSER:$TOKEN" \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/share
Set permissions for an app:
curl -sku "$IPLANTUSER:$TOKEN" \
-X POST -d "username=mrsmith&permission=READ_EXECUTE" \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/share
* a shortcut:
curl -sku "$IPLANTUSER:$TOKEN" \
-X POST -d "permission=READ_EXECUTE" \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/share/mrsmith
Delete permission for a user:
curl -sku "$IPLANTUSER:$TOKEN" \
-X POST -d "username=mrsmith&permission=" \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/
* a shortcut:
curl -sku "$IPLANTUSER:$TOKEN" \
-X POST -d "permission=" \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/share/mrsmith
* a shorter shortcut:
curl -sku "$IPLANTUSER:$TOKEN" \
-X DELETE \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/share/mrsmith
Delete all permissions for the app:
curl -sku "$IPLANTUSER:$TOKEN" \
-X DELETE \
https://foundation.iplantcollaborative.org/apps-v1/apps/helloworld-1.0.0/share
Thanks again for all the great feedback. We're listening with open ears. We hear what you're saying and we're striving to continually deliver a better product to you.
Sincerely,
The iPlant Foundation API Dev Team
https://foundation.iplantcollaborative.org/forums
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20121102/a89e9a28/attachment.html
More information about the Iplant-api-dev
mailing list