I've updated the sds checked into the trunk of the sds subversion repository to work with Rails v2.0.2 and added an option for the SDS to deliver a Curnit url to a SAIL instance that points to the curnit cached by the SDS instead of the external url.
repository: http://svn.concord.org/svn/sds/trunk/ What was previously in trunk (which worked with Rails 1.1.6) is now archived in this branch: http://svn.concord.org/svn/sds/branches/sds_rails_1_1_6 I don't expect any more work to continue on the Rails 1.1.6 branch. In general the API to this new version of the SDS should work the same. A new functionality for Curnits is described below. It is passing all the tests that the pas-portal runs and a large functional workout when I run a rake task to erase and then rebuild all the SDS attributes for a DIY instance. The production SDS: http://saildataserice.concord.org Has not yet been updated. This version of the SDS also works with JRuby v1.1 (RC1 and later) and can be run directly from Mongrel in JRuby with the command: jruby script/server or packaged into a war file and run in Jetty, Tomcat, or Glassfish. I've tested it with both mysql and derby databases. You can see the changes for the work for this change by browsing the changesets starting at 260 here: http://trac.cosmos.concord.org/sds/log/branches/sds2?rev=260 Changes to Curnit functionality: The SDS can now optionally deliver a Curnit url to a SAIL instance that points to the curnit cached by the SDS instead of using the external url. This functionality is controlled with a new "always_update" attribute for a Curnit that is exposed in both the REST API and in the browser UI. When the value of this attribute is either "true" or "1" then the SDS will render the Curnit external url when generating the config file for the SAIL instance. Specifying the attribute in the REST API is optional. The default for the attribute is true. If the attribute is not present in a Curnit creation request the always_update attribute will be set to true by default. When the Curnit always_update attribute is true then the SDS will function the same as it has in the past. After the SAIL instance starts up it will use the url passed in the <argument> element of the jnlp to request a configuration using the SDS REST API. The Curnit url provided will be the same one that was specified when the SDS Curnit resource was created or updated. When the Curnit always_update attribute is to false then the SDS will deliver a Curnit url in the configuration file to that points to the curnit cached by the SDS instead of using the external url. Doing this results in: * The Curnit actually used by the Offering is frozen. Even if the curnit jar file pointed to the SDS Curnit resource url is updated SAIL instances run from Offerings that use that SDS Curnit resource will still use the curnit jar that existed when the Curnit resource was created or last updated. * Running the SAIL instance no longer is dependent on a successful network connection to the external url where the curnit jar is located. This is one step (of many needed) to implement a system that supports a distributed and off-line version of a complete SAIL deployment system. The <always-update></always-update> element is optional when creating a Curnit resource with the REST API. if the <always-update></always-update> element is either empty or is not present then the always_update attribute of the Curnit resource is set to true. This is the default. The legal values if the <always-update></always-update> element is present in the REST request are: Curnit always_update attribute set to true: <always-update></always-update> <always-update>true</always-update> <always-update>1</always-update> Curnit always_update attribute set to false: <always-update>false</always-update> <always-update>0</always-update> Any other values in the <always-update></always-update> are invalid and will result in a HTTP 400 error and the following validation error in the body of the error response: <validation-errors> <error>Invalid attribute value: "dfslkdfj": always_update attribute must be either 'true', '1', 'false', '0' or not set. Default: true</error> </validation-errors> Here's an example using the unix shell command curl that shows the response to an invalid value in an <always-update></always-update> element in a Curnit resource creation request: $ curl -i -H 'Content-Type: application/xml' -X POST -d '<curnit><name>test2 curnit</name><url>http://rails.dev.concord.org/curnits/otrunk-curnit-external-diytest.jar</url><always-update>dfslkdfj</always-update></curnit>' http://localhost:3001/2/curnit HTTP/1.1 400 Bad Request Connection: close Date: Fri, 18 Jan 2008 12:38:00 GMT Status: 400 Bad Request X-Runtime: 0.26059 Cache-Control: no-cache Server: Mongrel 1.1.3 Content-Type: text/html; charset=utf-8 Content-Length: 186 <validation-errors> <error>Invalid attribute value: "dfslkdfj": always_update attribute must be either 'true', '1', 'false', '0' or not set. Default: true</error> </validation-errors> -- - Stephen Bannasch Concord Consortium, http://www.concord.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SAIL-Dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/SAIL-Dev?hl=en -~----------~----~----~----~------~----~------~--~---
