Revised IDE Resources

To do:

  • Autobuilds: Changes in java/, ivy.xml, zero.config should drive a "build":
    • config check
    • resolve (ivy.xml)
    • compile
    • recycle (if running)
  • Console
    • build log -- last build report (read from .zero/private/ide/build.log)
    • run-time log -- current/last trace (read from logs/trace-log-0)
    • Q: task log -- stderr/out from CLITaskInvoker; e.g. from start/stop; can we put this into the run-time log?
    • command -- outputs are appended (read from .zero/private/ide/command.log)
  • Wire up the "update" command on the Dependencies tab
    • Invokes "update" then kicks off the "build" process; "update" results need to appear in the build log
  • Application copy/move/export; extend /application resource handler

Changes:

  • Application entities to include status
  • "heartbeat" will change to a simple ping
  • change .zero/private/ide to .zero/private/appbuilder
  • application copy/move/export
  • files service should return paths with native separators
  • file service needs to support "promote" to copy from dependency to application
  • cache the mgmt URI at "start"; use that value for stop and recycle
  • merge Brett's file list (combo box) with app/files -- and create /files?
  • is there another way to get app status besides hitting the VM? would allow us to let the app timeout, then browser refresh brings it up again
  • can we append with the logs

Terminology

application name
Both the application name (in ivy.xml) and name of directory containing the application.
application root directory
Path up to, but not including, the application directory.
application home
Application directory. application path/application name

Application references

Each application has a unique ID string (unique to the IDE). Computed once per application; doesn't change.

We'll use the ID for everything.

Resources

URI Method Representation Description
/applications GET application List of all known applications (from /storage/applications)
/applications POST name, desc, path, modulegroup Create new application
/applications/{aid} PUT name, desc, path, modulegroup Update application (e.g. rename, move)
/applications/{aid} DELETE   Delete application
/applications/{aid}/dependencies GET org, module, version List of dependencies for application aid

/applications/{aid}/files     CRUD on files and directories
/applications/{aid}/files/public/index.html GET   Retrieves content of public/index.html
/applications/{aid}/files/public/index.html PUT   Update content of public/index.html
/applications/{aid}/files/public/index.html DELETE   Delete file public/index.html
/applications/{aid}/files/public/foo GET   List of files in directory public/foo
/applications/{aid}/files/public/foo PUT   Rename directory public/foo to path in entity
/applications/{aid}/files/public/foo DELETE   Delete directory public/foo

/modulegroups GET List of modulegroup names  
/modulegroups POST name, uri Invokes zero modulegroup create name uri

  • We need to augment "create" dialogs with a modulegroup select. Execution requires that we "switch" the CLI before invoking "create".
  • "My Repository" manager needs a select for modulegroup.
  • App / Dependencies tab needs a select to change the application's modulegroup.

Representations

application

{ "name"         : "...",
  "description"  : "...",
  "root"         : "...",
  "lastmodified" : "...",
  "modulegroup"  : "...",
  "baseuri"      : "...",
  "port"         : "...",
  "status"       : "..."
}

resources: ====== applications : name, desc, path, lastmodified, modulegroup, baseuri, port, status? dependencies : org, module, version files : CRUD on files and directories

processes : list of app ids GET /processes returns a list of app ids that are running? GET /processes/{appid} returns {baseuri} or 404 POST /processes {appid, debug?} DELETE /processes/{appid} -- makes it seem like a member, which it is DELETE /applications/{appid}/processes -- makes it seem like a collection, which it's not

modulegroups : for the local repository

what can we update about an application? PUT /applications/{appid} : {name, desc, path, modulegroup}

how to search remote repository? how to switch the CLI modulegroup? needed for create; not needed when working on an app?

uris: = /applications /applications/{id}/files/{path_relative_to_app} /applications/{id}/files/{path_relative_to_app}?metadata - If-Range w/ special etags for logs - LRUD

/applications/{id}/process /applications/{id}/dependencies

/modulegroups /modulegroups/{id}

/filelist for browsing the filesystem - could we use /files instead?

drop: = /applications/{id}/builder -> autobuilds; provide rpc to drive manually? /components -> /modulegroups/{id} /console -> /applications/{id}/files/{} with If-Range, special etag gen http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

GET /applications ============= returns summary of all defined apps:

{"members": [ {"href": "1", "entity", {"name":..., "path":..., "modulegroup":...} } ], "next": null }

POST /applications ============= we have a few ways of creating an app: new, open, copy new : open: copy:

in: {"name":..., "path":..., "modulegroup":...}

GET /applications/{id} ================== returns details about the app, or 404 if not found more data than in the summary?

{"name":..., "path":..., "modulegroup":...}

PUT /applications/{id} =================== update application metadata

{"name":..., "path":..., "modulegroup":...}

DELETE /applications/{id} DELETE /applications/{id}?metadata ============================== returns details about the app, or 404 if not found more data than in the summary?

{"name":..., "path":..., "modulegroup":...}

r7 - 23 Apr 2008 - 20:25:02 - steveims
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site