<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Colabrativ, Inc. &#187; iExperiment</title>
	<atom:link href="http://www.colabrativ.com/tag/iexperiment/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.colabrativ.com</link>
	<description>An Experiment Documentation and Electronic Notebook Provider</description>
	<lastBuildDate>Tue, 28 Oct 2014 04:44:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>iExperiment Version 1.1 is Now Available</title>
		<link>http://www.colabrativ.com/iexperiment-enterprise-electronic-notebook-version-1-1/</link>
		<comments>http://www.colabrativ.com/iexperiment-enterprise-electronic-notebook-version-1-1/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 20:43:17 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[electronic notebook]]></category>
		<category><![CDATA[ELN]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[iExperiment]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=430</guid>
		<description><![CDATA[We are pleased to announce the release of version 1.1 of iExperiment, Colabrativ&#8217;s enterprise electronic notebook. Changes to iExperiment an Enterprise Electronic Notebook The following changes have been made to version 1.1 of iExperiment Enterprise Electronic Notebook (ELN): The options &#8230; <a href="http://www.colabrativ.com/iexperiment-enterprise-electronic-notebook-version-1-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are pleased to announce the release of version 1.1 of iExperiment, Colabrativ&#8217;s enterprise electronic notebook.  </p>
<h3 style="margin: 0">Changes to iExperiment an Enterprise Electronic Notebook</h3>
<p>The following changes have been made to version 1.1 of iExperiment Enterprise Electronic Notebook (ELN): </p>
<ul>
<li>The options for viewing records under the Select tab have been changed.  There are now four &ldquo;List of Records I Can&rdquo; options: read, edit, delete and download.<br />
<table style="border:0px solid white;">
<caption style="font-size: 11pt; padding: 4px;">Figure 1 <br />New View Record Options under Select Tab</caption>
<tr>
<td style="border:0px solid white; padding: 0px; test-align: center;"><img src="http://www.colabrativ.com/images/view_record_read_option_1.1.png" width="622" alt="Top of Select tab in iExperiment, Colabrativ's enterprise electronic notebook, showing the four new &ldquo;List of Records I Can&rdquo; options: read, edit, delete and download. The read option has been selected."/></td>
</tr>
<tr>
<td style="border:1px solid #606060; test-align: center; font-size: 10pt; color: #606060; line-height: 115%;">Top of Select tab in iExperiment showing the four new &ldquo;List of Records I Can&rdquo; options: read, edit, delete and download.  The read option has been selected.</td>
</tr>
</table style="border:0px solid white;">
  </li>
<li>Copy Record, Download Record Archive and Download PDF Archive buttons have been added to the tops of records.<br />
<table style="border:0px solid white;">
<caption style="font-size: 11pt; padding: 4px;">Figure 2 <br />New Copy Record, Download Record Archive and Download PDF Archive Buttons</caption>
<tr>
<td style="border:0px solid white; padding: 0px; test-align: center;"><img src="http://www.colabrativ.com/images/record_buttons_1.1.png" width="624" alt="Copy Record, Download Record Archive and Download PDF Archive buttons at the top of a record in iExperiment, Colabrativ's enterprise electronic notebook. "/></td>
</tr>
<tr>
<td style="border:1px solid #606060; test-align: center; font-size: 10pt; color: #606060; line-height: 115%;">New Copy Record, Download Record Archive and Download PDF Archive buttons at the top of a record in iExperiment.</td>
</tr>
</table>
</li>
<li>Sponsoring Institution options have been added to the experiment properties file.  The options are:
<ul style="list-style-type: circle;">
<li>admin:  Where the sponsored institution will be the primary administrator (institution key = 1).</li>
<li>author:  Where the institution of the author&#8217;s active research period will be used.</li>
<li>key=:  The sponsoring institution key will be identified by its database key; Example key=23</li>
</ul>
<p>      In this AMI the sponsoring institution option is &#8220;admin&#8221;.</li>
<li>Bug Fix: The material Oracle was failing to add materials that lacked a lot or serial number.</li>
<li>Bug Fix: Sections containing no text, such as a Summary section with only the material produced, were not being displayed from a record archive in a web browser, despite being contained in the record archive.</li>
</ul>
<h3 style="margin: 0">Evaluating iExperiment an Enterprise Electronic Notebook</h3>
<p>It&#8217;s easy for you to evaluate iExperiment through <a target="_blank" href="http://aws.amazon.com">Amazon Web Services</a>.  A <a target="_blank" href="http://www.colabrativ.com/free-61-day-trial-of-iexperiment-enterprise-electronic-notebook/">three-part tutorial</a> is available, under the Free Trial tab in the navigation bar above, to guide you through  i) the creation of an <a target="_blank" href="http://aws.amazon.com/ec2/">Amazon Elastic Compute Cloud</a> instance using the <a target="_blank" href="http://www.colabrativ.com/61-day-iexperiment-v1-1-evaluation-ami-4f5c070a/">iExperiment AMI</a>,  ii) configuration of iExperiment, and iii) adding your first researcher.</p>
<h3 style="margin: 0">Browser Compatibility of iExperiment</h3>
<p>iExperiment is built on <a target="_blank" href="http://code.google.com/webtoolkit/overview.html">Google Web Toolkit</a> and is not compatible with all browsers.  Currently, iExperiment works with <a target="_blank" href="http://www.mozilla.org/en-US/firefox/new/">Mozilla&#8217;s FireFox</a> and <a target="_blank" href="https://www.google.com/chrome">Google&#8217;s Chrome</a>, but does not work with Microsoft&#8217;s Internet Explorer or Apple&#8217;s Safari.  Both Safari and Internet Explorer suffer from the same two problems: </p>
<ol>
<li>The text editor fails to maintain preexisting text.</li>
<li>The file drag-and-drop capability introduces characters into the file names in Safari, and does not work at all in Internet Explorer.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/iexperiment-enterprise-electronic-notebook-version-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iExperiment Version 1.0 is Now Available</title>
		<link>http://www.colabrativ.com/iexperiment-version-1-0-is-now-available/</link>
		<comments>http://www.colabrativ.com/iexperiment-version-1-0-is-now-available/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 05:16:04 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[digital signature]]></category>
		<category><![CDATA[electronic notebook]]></category>
		<category><![CDATA[ELN]]></category>
		<category><![CDATA[iExperiment]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=341</guid>
		<description><![CDATA[We are pleased to announce the release of version 1.0 of iExperiment, Colabrativ&#8217;s enterprise electronic notebook. iExperiment is now capable of creating PDF versions of experiment records, in addition to structured archives containing an XML version of the record, along &#8230; <a href="http://www.colabrativ.com/iexperiment-version-1-0-is-now-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are pleased to announce the release of version 1.0 of iExperiment, Colabrativ&#8217;s enterprise electronic notebook.  iExperiment is now capable of creating PDF versions of experiment records, in addition to structured archives containing an XML version of the record, along with all figures and attachments.  In addition, iExperiment now works with <a target="_blank" href="https://www.google.com/chrome">Google&#8217;s Chrome</a> browser, in addition to <a target="_blank" href="http://www.mozilla.org/en-US/firefox/new/">Mozilla&#8217;s FireFox</a>.</p>
<p>It&#8217;s easy for you to evaluate iExperiment through <a target="_blank" href="http://aws.amazon.com">Amazon Web Services</a>.  A <a target="_blank" href="http://www.colabrativ.com/free-61-day-trial-of-iexperiment-enterprise-electronic-notebook/">three-part tutorial</a> is available, under the Free Trial tab in the navigation bar above, to guide you through  i) the creation of an <a target="_blank" href="http://aws.amazon.com/ec2/">Amazon Elastic Compute Cloud</a> instance using the iExperiment AMI,  ii) configuration of iExperiment, and iii) adding your first researcher.</p>
<h3>Completed PDF Records Implemented in iExperiment</h3>
<p>iExperiment is now capable of generating an Adobe PDF document upon the completion of an experiment record.  On the first page of the PDF record there is a signature area where both the author of the record and a witness can sign; see figure below.  This is suitable for digital signatures, but may not be appropriate if you are still using hand-written signatures.  Fortunately, the PDF creation process can be modified to meet these needs. </p>
<table style="border:1px solid black;">
<caption style="font-size: 14pt; padding: 4px;">Figure:  Top of a Completed PDF Record</caption>
<tr>
<td style="border:1px solid black;"><img src="http://www.colabrativ.com/images/PDF_record_signed.png" width="600" alt="The top of a completed PDF record prepared by iExperiment, Colabrativ's enterprise electronic notebook.  The record has been signed by the author, but has not been witnessed yet."/></td>
</tr>
<tr>
<td style="border:1px solid black; test-align: center; font-size: 10pt; color: #333333; ">The top of a completed PDF record prepared by iExperiment, Colabrativ&#8217;s enterprise electronic notebook.  The record has been signed by the author, but has not been witnessed yet.</td>
</tr>
</table>
<p>The creation of the completed record PDF is controlled by an EXtensible Stylesheet Language transformation (XSLT) file that can be modifed to meet the specific needs of the research organization.  It is possible to change the XSLT file on the iExperiment server to: </p>
<ul>
<li>Add or remove signature lines. </li>
<li>Change the styling for the record, including the font and font size. </li>
<li>Add a watermark. </li>
<li>If the signatures need to be placed on each page, the footer could be changed to contain the signature lines.</li>
</ul>
<h3>Browser Compatibility of iExperiment</h3>
<p>iExperiment is built on <a target="_blank" href="http://code.google.com/webtoolkit/overview.html">Google Web Toolkit</a> and is not compatible with all browsers.  Currently, iExperiment works with <a target="_blank" href="http://www.mozilla.org/en-US/firefox/new/">Mozilla&#8217;s FireFox</a> and <a target="_blank" href="https://www.google.com/chrome">Google&#8217;s Chrome</a>, but does not work with Microsoft&#8217;s Internet Explorer or Apple&#8217;s Safari.  Both Safari and Internet Explorer suffer from the same two problems: </p>
<ol>
<li>The text editor fails to maintain preexisting text.</li>
<li>The file drag-and-drop capability introduces characters into the file names in Safari, and does not work at all in Internet Explorer.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/iexperiment-version-1-0-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File Drag and Drop onto a Google Web Toolkit Application</title>
		<link>http://www.colabrativ.com/file-drag-and-drop-onto-a-google-web-toolkit-application/</link>
		<comments>http://www.colabrativ.com/file-drag-and-drop-onto-a-google-web-toolkit-application/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 03:29:31 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[drag & drop]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[iExperiment]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[XMLSttpRequest]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=316</guid>
		<description><![CDATA[Users increasingly expect to be able to drag and drop objects in applications, including web applications. I would like to show you how we recently added the ability to drop files on to our enterprise electronic notebook iExperiment. iExperiment&#8217;s client &#8230; <a href="http://www.colabrativ.com/file-drag-and-drop-onto-a-google-web-toolkit-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Users increasingly expect to be able to drag and drop objects in applications, including web applications.  I would like to show you how we recently added the ability to drop files on to our enterprise electronic notebook iExperiment. iExperiment&#8217;s client side is built on Google Web Toolkit (GWT).  GWT currently does not support file drag and drop. </p>
<p>The work flow for file drag and drop is as follows: </p>
<ol>
<li>The user drops a file on to the client.</li>
<li>The client sends the drop element id and the file to the server in a multipart POST for storage and analysis.</li>
<li>The server sends back the POST response to the client with information on how to display the dropped file.</li>
<li>The client presents the uploaded file&#8217;s information to the user.</li>
</ol>
<p>We are using cutting edge HTML5 APIs in our drag and drop implementation.  Support of these APIs is not available in all browsers. </p>
<ul>
<li>This code works today in recent versions of Chrome and FireFox. </li>
<li>In Safari there is an issue with extra characters being added to the file names, which also complicates the file type assignment. </li>
<li>Internet Explorer does not currently support the required APIs. </li>
</ul>
<p>The file drop event is handled by adding an &#8220;ondrop&#8221; attribute to the HTML elements.  The &#8220;ondrop&#8221; attribute calls the droppedFile JavasScript routine that creates and sends an HTTP POST request to the server.  Note that the first argument in the droppedFile JavaScript call is an &#8220;element-id&#8221;, and the event is the second argument.  The drop element ID allows us to identify where the file was dropped on the page.</p>
<div class="codeBox">
  <strong>Example of &#8220;ondrop&#8221; Attribute in an HTML Table Element</strong></p>
<pre>&lt;table ondrop="event.stopPropagation();
               event.preventDefault();
               droppedFile('element-id', event);"&gt;</pre>
</div>
<p>The &#8220;ondrop&#8221; element is created by the static addOnDrop method in a client side class (DropFileConnector). </p>
<div class="codeBox">
  <strong>addOnDrop Method</strong></p>
<pre>/** Add an ondrop attribute to an element in the DOM, for example:
 * ondrop="event.stopPropagation(); droppedFile('element-id', event);"
 *
 * @param element DOM element
 * @param elementID Element Id to be sent to droppedFile routine.
 */
 public static void addOnDrop(Element element, String elementID) {
     element.setAttribute("ondrop",
         "event.stopPropagation(); droppedFile(\'" + elementID + "\', event);");
 }</pre>
</div>
<p>The droppedFile JavaScript routine creates a FormData element which is transferred to the server using a multipart HTTP POST request.  The first two items appended to the form are the drop element ID (dropElementID) and boundary that is used by the request onreadystatechange function.  Two appends are made to the form for each file that is uploaded; the file length (line 16), and the file itself (line 17) are appended to the form.  On lines 20-24 the information needed for the POST is created, and the upload handlers are attached to the request.  Note that by using a FormData element we are able to eliminate the deprecated FireFox specific methods <code>files[i].getAsBinary()</code>, and replace <code>request.sendAsBinary(postContent)</code> with request.send(formData).  These methods were used in our <a target="_blank" href=""http://www.colabrativ.com/drag-and-drop-onto-a-google-web-toolkit-application-utdated">original post</a> to added the files to the POST, and to send the POST, respectively. </p>
<p>The POST responses are handled by the request.onreadystatechange function on line 26-40, and are sent to the client through <code>window.top.dropFileListener.droppedFile method</code> (calls on lines 34 and 38.)  Initially when the read state is 1 (<code>readyState == 1</code>) the file name and the MIME boundary are sent to GWT client application on lines 28-35.  After succesful completion of the POST (<code>readyState == 4</code>), the POST response is forwarded to the GWT client application.</p>
<div class="codeBox">
  <strong>droppedFile JavaScript Routine</strong></p>
<pre>01  var boundary = null;
02
03  function droppedFile(dropElementID, event) {
04      if (window.File &amp;&amp; window.FileList &amp;&amp; window.top.dropFileListener) {
05          if (event.dataTransfer) {
06              url = secureURL + "upload";
07              boundary = "Colabrativ-" + Math.floor(999999999999999 * Math.random());
08
09              var formData = new FormData();
10              formData.append("drop-element-id", dropElementID);
11              formData.append("boundary", boundary);
12
13              var files = event.dataTransfer.files;
14
15              for (var i = 0; i < files.length; i++) {
16                  formData.append("file-length-" + i, files[i].size);
17                  formData.append("file-"        + i, files[i]);
18              }
19
20              var request = new XMLHttpRequest();
21              request.upload.onprogress = updateProgress;
22              request.upload.onload     = loaded;
23              request.upload.onerror    = loadError;
24              request.open("POST", url, true);
25
26              request.onreadystatechange = function() {
27                  if (this.readyState == 1) {
28                      var filesJSON = '"files":[';
29                      for (var i = 0; i < files.length; i++) {
30                          filesJSON = filesJSON + '"' + files[i].name + '"';
31                          if (i < files.length - 1) filesJSON = filesJSON + ', ';
32                      }
33                      filesJSON = filesJSON + ']'
34                      window.top.dropFileListener.droppedFile( '{' +
35                          '"requestBoundary": "' + boundary + '", ' + filesJSON + '}');
36                  }
37                  if (this.readyState == 4) {
38                     window.top.dropFileListener.droppedFile( request.responseText );
39                  }
40              }
41
42              request.send(formData);
43          }
44          else {
45              alert("Your browser does not support file drag and drop.  " +
46                    "We recommend that you upgrade your browser to one that supports HTML5, " +
47                    "such as Mozilla's FireFox or Google's Chrome.");
48          }
49      }
50      else {
51          alert("window.top.dropFileListener not found!");
52      }
53  }</pre>
</div>
<p>The DropFileConnector class connects the dropFileListener in the JavaScript to the GWT code.  The DropFileConnector class has a ClientSideDropFileSupport interface that defines the droppedFile method in the JavaScript.  The observer (theObserver) is a static ClientSideDropFileSupport incidence that connects to the JavaScript droppedFile method to ClientSideDropFile&#8217;s droppedFile method. </p>
<div class="codeBox">
  <strong>DropFileConnector class</strong></p>
<pre>package com.colabrativ.common.client; 

import com.google.gwt.dom.client.Element; 

public class DropFileConnector {
    /** Used to pass information to the GWT application. Register your implementations with
      *  {@link com.colabrativ.common.client.DropFileConnector#connect( ClientSideDropFileSupport)}
      */
    public interface ClientSideDropFileSupport {
        /** The page calls this method to send dropped file information to application
          *
          * @param json JSON string containing the file name information.
          */
        void droppedFile(String json);
    } 

    /** An observer of drop file events, supplied by the GWT application. */
    static private ClientSideDropFileSupport theObserver; 

    /**
      * Connect the GWT application to the drop file JavaScript. The observer is notified
      * whenever the user drops a file on the application area (id="app-area").
      *
      * @param observer
      */
     public static void connect( ClientSideDropFileSupport observer ) {
         theObserver = observer;
         connectToPanel();
     }

     // These methods are "glue" methods that let the simple JNDI call talk to the observer through its interface.
     @SuppressWarnings("all")
     private static void droppedFile(String s) { theObserver.droppedFile(s); }

     private static native void connectToPanel() /*-{
         var listener = new Object();
         listener.droppedFile = function(json) {
             json = unescape( json );
             @com.colabrativ.common.client.DropFileConnector::droppedFile( Ljava/lang/String;)( json );
         };

         $wnd.top.dropFileListener = listener;
     }-*/; 

     /**
       * Add an ondrop attribute to an element in the DOM, for example:
       * ondrop="event.stopPropagation(); droppedFile('element-id', event);"
       *
       * @param element DOM element
       * @param elementId Element Id to be sent to droppedFile routine.
       */
      public static void addOnDrop(Element element, String elementId) {
          element.setAttribute("ondrop",
              "event.stopPropagation(); droppedFile(\'" + elementId + "\', event);");
      }
} </pre>
</div>
<p>Finally, a <code>DropFileConnector.connect</code> call is made in a client class that handles the POST responses.  Our upload servlet adds either an OKAY or a FAIL to the POST response that the DropFileConnector handles.  In our implementation, the POST responses are encapsulated in JSON.  The upload progress monitoring is also handled by the DropFileConnector.  In our implementation, the MIME boundary is used as an Id for the upload, and the monitoring is managed by the singleton of the UploadManager class. </p>
<div class="codeBox">
  <strong>DropFileConnector Connection</strong></p>
<pre>DropFileConnector.connect(
    new DropFileConnector.ClientSideDropFileSupport() {
        public void droppedFile(String response) {
            if (response.startsWith("OKAY:")) {
                String json = response.substring( response.indexOf(": ") + 2); // Remove OKAY:
                determineWhatToDoWithResponse(json);
            }
            else if (response.startsWith("FAIL:")) {
                // Do Nothing?
            }
            else {
                JSONObject responseJSON = (JSONObject) JSONParser.parseStrict( response );
                JSONString boundaryJSON = (JSONString) responseJSON.get( UploadResponse.requestBoundary);

                if (boundaryJSON != null) {
                    String boundary = boundaryJSON.toString();
                    JSONArray filesJSON = (JSONArray) responseJSON.get( UploadResponse.files);

                    if (filesJSON != null) {
                        UploadManager.getInstance().addProgressDialog( boundary, filesJSON);
                    }
                    else {
                        UploadManager.getInstance().update( boundary, responseJSON);
                    }
                }
            }
        }
    }
); </pre>
</div>
<p>Several resources helped us create our file drag and drop; these included: </p>
<ol>
<li>W3C XMLHttpRequest Level 2 <a target="_blank" href="http://www.w3.org/TR/XMLHttpRequest2/">http://www.w3.org/TR/XMLHttpRequest2/</a></li>
<li>W3C File API <a target="_blank" href="http://www.w3.org/TR/file-upload/">http://www.w3.org/TR/file-upload/</a></li>
<li>Using FormData object in Mozilla&#8217;s Developers Network page on Using XMLHttpRequest at <a target="_blank" href="https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Using_FormData_objects">https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Using_FormData_objects</a></li>
<li>How to Use HTML5 File Drag &amp; Drop by Craig Buckler at <a target="_blank" href="http://www.sitepoint.com/html5-file-drag-and-drop/">http://www.sitepoint.com/html5-file-drag-and-drop/</a></li>
<li>XHR progress and rich file upload feedback by Austin King at <a target="_blank" href="http://hacks.mozilla.org/2009/06/xhr-progress-and-richer-file-uploading-feedback/">http://hacks.mozilla.org/2009/06/xhr-progress-and-richer-file-uploading-feedback/</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/file-drag-and-drop-onto-a-google-web-toolkit-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Public iExperiment Amazon Machine Image is Now Available</title>
		<link>http://www.colabrativ.com/public-iexperiment-amazon-machine-image-now-available/</link>
		<comments>http://www.colabrativ.com/public-iexperiment-amazon-machine-image-now-available/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 18:14:27 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Amazon Machine Image]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Elastic Compute Cloud]]></category>
		<category><![CDATA[electronic notebook]]></category>
		<category><![CDATA[ELN]]></category>
		<category><![CDATA[iExperiment]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=305</guid>
		<description><![CDATA[We are pleased to announce that we have made public an Amazon Machine Image (AMI) of our enterprise electronic notebook iExperiment. The creation of the iExperiment public AMI is based on two of our earlier posts Setup of Amazon’s Elastic &#8230; <a href="http://www.colabrativ.com/public-iexperiment-amazon-machine-image-now-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are pleased to announce that we have made <strong>public</strong> an <a href="http://aws.amazon.com/amis" target="_blank">Amazon Machine Image</a> (AMI) of our enterprise electronic notebook iExperiment. The creation of the iExperiment public AMI is based on two of our earlier posts <a href="http://www.colabrativ.com/setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment/" target="_blank">Setup of Amazon’s Elastic Compute Cloud (EC2) Server for iExperiment</a> and <a href="http://www.colabrativ.com/setup-of-iexperiment-on-amazons-elastic-compute-cloud-ec2-server/" target="_blank">Setup of iExperiment on Amazon’s Elastic Compute Cloud (EC2) Server</a>. A <a href="http://www.colabrativ.com/free-61-day-trial-of-iexperiment-enterprise-electronic-notebook/" target="_blank">three-part tutorial</a> is available to guide you through the creation of an <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon Elastic Compute Cloud</a> (EC2) instance from the iExperiment AMI, configuration of iExperiment, and adding your first researcher.</p>
<p><strong>iExperiment Public Machine Image on the Amazon Management Console</strong><br />
<img src="http://www.colabrativ.com/images/iExperiment_public_AMI.png" alt="Enterprise Electronic Notebook, iExperiment, Public Machine Image on the Amazon Web Services (AWS) Management Console - US West - Launch Instance Wizard - Community AMIs.  This image has been edited to fit in this post." width="600" /></p>
<h3>Why We Choose to Use Amazon Web Services</h3>
<ol>
<li><strong>Control of Experiment Information:</strong> A research organization&#8217;s experiment records are the foundation of its intellectual property, and, as such, must be stored in a way that allows the research organization to maintain control over these records. We feel that Software as a Service (SAAS) electronic notebook solutions do not offer the same level of control as having your experimental data on a server you control.</li>
<li><strong>Convenience of Cloud Computing:</strong> Using an Amazon Machine Image allows us to set up the iExperiment server for you. All you need to do is configure the instance and start the instance&#8217;s services. In addition, Amazon&#8217;s <a href="http://aws.amazon.com/ec2/" target="_blank">Elastic Compute Cloud (EC2)</a> is one of the lower cost cloud service providers.</li>
<li><strong>Support:</strong> Amazon has one of the largest cloud services user communities to draw upon to answer questions that you may have about running your EC2 instance. You can also always contact us at here at <a href="http://www.colabrativ.com/contact-colabrativ-inc/">colabrativ.com</a>.</li>
<li><strong>Server Security:</strong> Amazon facilities are <a href="http://sas70.com/sas70_overview.html" target="_blank">Statement on Auditing Standard No. 70 (SAS70)</a> compliant. <a href="http://aws.amazon.com/about-aws/whats-new/2009/11/11/aws-completes-sas70-type-ii-audit/" target="_blank">They completed the Type II audit in 2009</a>, so you know they are doing everything they can to keep your data secure.</li>
</ol>
<h3>Other iExperiment Hosting Options</h3>
<p>Amazon Web Services may not be the right solution for you for any number of reasons, including: AWS places the responsibility of the enterprise application setup and maintenance on the client&#8217;s administrator; or, you may not be comfortable with the security in a cloud computing environment. If this is the case, you can <a href="http://www.colabrativ.com/contact-colabrativ-inc/">contact us</a> and we can work with you to install our electronic notebook, iExperiment, either at your facility or at another full-service SAS70-compliant cloud service provider.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/public-iexperiment-amazon-machine-image-now-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setup of iExperiment on Amazon&#8217;s Elastic Compute Cloud (EC2) Server</title>
		<link>http://www.colabrativ.com/setup-of-iexperiment-on-amazons-elastic-compute-cloud-ec2-server/</link>
		<comments>http://www.colabrativ.com/setup-of-iexperiment-on-amazons-elastic-compute-cloud-ec2-server/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 05:27:56 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Elastic Compute Cloud]]></category>
		<category><![CDATA[iExperiment]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=246</guid>
		<description><![CDATA[A research organization&#8217;s experiment records are the foundation of its intellectual property, and, as such, must be stored in a way that allows the research organization to maintain control over these records. Enterprise electronic notebooks, such as our iExperiment, store &#8230; <a href="http://www.colabrativ.com/setup-of-iexperiment-on-amazons-elastic-compute-cloud-ec2-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A research organization&#8217;s experiment records are the foundation of its intellectual property, and, as such, must be stored in a way that allows the research organization to maintain control over these records.  Enterprise electronic notebooks, such as our iExperiment, store their experiment records on a server.  Many organizations, including Colabrativ, Inc., are using cloud computing to lower the cost of a server and IT costs in general.  Amazon&#8217;s <a target="_blank" href="http://aws.amazon.com/ec2/">Elastic Compute Cloud (EC2)</a> is one of the lower cost cloud service providers.  Amazon is <a target="_blank" href="http://sas70.com/sas70_overview.html">Statement on Auditing Standards No. 70 (SAS70)</a> compliant.  They completed the Type II audit in 2009 (see <a target="_blank" href="http://aws.amazon.com/about-aws/whats-new/2009/11/11/aws-completes-sas70-type-ii-audit/">AWS Completes SAS70 Type II Audit</a> announcement).  Thus, one can be comfortable that they are doing everything they can to keep one&#8217;s data secure.  Amazon Web Services places the responsibility of the enterprise application setup and maintenance on the client&#8217;s administrator.  Other full-service SAS70-compliant cloud service providers will happily take on these responsibilities for you, for a fee. </p>
<p>In my previous post, I described the <a traget="_blank" href="./setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment">Setup of Amazon&#8217;s Elastic Compute Cloud (EC2) Server for iExperiment</a>, our enterprise electronic notebook application.  That post covered the following topics:</p>
<ul>
<li><a href="./setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment#requirements">iExperiment Server Requirements</a></li>
<li><a href="./setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment#ec2-instance-setup">Setup of Amazon Web Services EC2 Instance</a></li>
<li><a href="./setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment#attaching-ebs">Creating and Attaching an Elastic Block Storage Volume (optional)</a></li>
<li><a href="./setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment#dns-server">Assigning URL of the iExperiment EC2 Server on the DNS Server</a></li>
</ul>
<p>You may want to take a quick look at <a href="./setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment#requirements">iExperiment Server Requirements</a>. </p>
<p>In this post we will go over the setup and configuration of the EC2 server and the installation and setup of iExperiment on it.  Topics in this post include: </p>
<ul>
<li><a href="#update-server">Updating the EC2 Server</a></li>
<li><a href="#mounting-ebs">Mounting Elastic Block Storage Volume (optional)</a></li>
<li><a href="#installing-MySQL">Installing MySQL</a></li>
<li><a href="#database-setup">iExperiment Database Setup</a></li>
<li><a href="#SSL-certificate">SSL Certificate Creation</a></li>
<li><a href="#apache-tomcat">Set Up of Apache and Tomcat</a></li>
<li><a href="#index-html">Adding index.html</a></li>
<li><a href="#iExperiment-applications">iExperiment Applications Installation</a></li>
<li><a href="#removing-8443">Removing Port 8443 from HTTPS Requests</a></li>
</ul>
<p>The majority of these tasks are preformed on the iExperiment EC2.  Tests of the server&#8217;s operation were made using Firefox 5.  We use <a target="_blank" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> to log onto our EC2 server (Instructions can be found in an Amazon appendix on <a target="_blank" href="http://docs.amazonwebservices.com/AmazonEC2/gsg/2007-01-19/putty.html">PuTTY</a>. </p>
<div class="codeBox">
<h3 id="update-server">Updating the EC2 Server using Amazon&#8217;s Yum repository</h3>
<p>The update of the EC2 server from Amazon&#8217;s <a target="_blank" href="http://yum.baseurl.org/">Yum</a> repository takes only a single command &#8220;sudo yum update&#8221;.  It produces a large output.  During the update you will be asked two yes-no question.  You should answer &#8220;yes&#8221; to both of these questions.  Below I have edited the session to only include the yum command and text around the two questions.</p>
<pre>> sudo yum update
...
===============================================================================
Install       1 Package(s)
Upgrade      47 Package(s)

Total download size: 113 M
Is this ok [y/N]: Y
...
Importing GPG key 0x21C0F39F "Amazon Linux AMI (Beta)
<linux-security@amazon.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-beta
Is this ok [y/N]: Y
</pre>
</div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="mounting-ebs">Mounting Elastic Block Storage Volume (optional)</h3>
<p>In order to format the elastic block storage (EBS) volume, we need to install XFS filesystem utilities (xfsprogs) from the Amazon Yum repository.</p>
<p>The /proc/partitions file contains a list of the volumes associated with the EC2 instance.  The /dev/xvda1 device is the system volume.  The other volume is the unformatted EBS volume we associated with the EC2 instance.  The EBS volume has two related device names; the system refers to the device as dev/xvd[f-p], but mkds.xfs takes /dev/sd[f-p].  In the case below, the device names are /dev/xsdf and /dev/sdf, respectively. </p>
<ol>
<li>Format the EBS volume using mkfs.xfs and the device name (/dev/sdf)</li>
<li>Create a mount point for the volume (/ebs1).</li>
<li>Add the mount point to the /etc/fstab file.</li>
<li>Mount the volume. </li>
</ol>
<pre>> sudo yum install xfsprogs
Is this ok [y/N]: y

> more /proc/partitions
major  minor  #blocks  name
 202        1    8388608 xvda1
 202       80   10485760 xvdf

> sudo mkfs.xfs /dev/sdf
meta-data=/dev/sdf               isize=256    agcount=4, agsize=65536 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=2621440, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0sudo vi /etc/fstab

> sudo mkdir /ebs1

> sudo cp -p /etc/fstab /etc/fstab.orig
> sudo vi /etc/fstab
> more /etc/fstab
#
LABEL=/     /           ext4    defaults,noatime  1   1
tmpfs       /dev/shm    tmpfs   defaults        0   0
devpts      /dev/pts    devpts  gid=5,mode=620  0   0
sysfs       /sys        sysfs   defaults        0   0
proc        /proc       proc    defaults        0   0
/dev/xvdf   /ebs1       xfs     noatime         0   0

> sudo mount /ebs1
</pre>
<p>After mounting the EBS volume on /ebs1, we create and link both the iExperiment and MySQL directories.  We add the mounts to the /etc/fstab file, then mount the directories.</p>
<pre>> sudo mkdir /ebs1/etc
> sudo mkdir /ebs1/etc/mysql
> sudo mkdir /ebs1/lib
> sudo mkdir /ebs1/lib/mysql
> sudo mkdir /ebs1/log
> sudo mkdir /ebs1/log/mysql
> sudo mkdir /ebs1/log/iexperiment
> sudo mkdir /ebs1/local/iexperiment

> sudo mkdir /etc/mysql
> sudo mkdir /var/lib/mysql
> sudo mkdir /var/log/mysql
> sudo mkdir /var/log/iexperiment
> sudo mkdir /var/local/iexperiment

> sudo vi /etc/fstab
> more /etc/fstab
#
LABEL=/     /           ext4    defaults,noatime  1   1
tmpfs       /dev/shm    tmpfs   defaults        0   0
devpts      /dev/pts    devpts  gid=5,mode=620  0   0
sysfs       /sys        sysfs   defaults        0   0
proc        /proc       proc    defaults        0   0
/dev/xvdf   /ebs1       xfs     noatime         0   0
/ebs1/etc/mysql          /etc/mysql              none    bind
/ebs1/lib/mysql          /var/lib/mysql          none    bind
/ebs1/log/mysql          /var/log/mysql          none    bind
/ebs1/log/iexperiment    /var/log/iexperiment    none    bind
/ebs1/local/iexperiment  /var/local/iexperiment  none    bind

> sudo mount /etc/mysql
> sudo mount /var/lib/mysql
> sudo mount /var/log/mysql
> sudo mount /var/log/iexperiment
> sudo mount /var/local/iexperiment
</pre>
<p>If MySQL has already been installed and setup, then instead of making the /mysql directories, we would move (mv) the existing MySQL directories to the EBS volume.  We continue from the snippet above remaking mysql directories that are used as mount bind points. </p>
<pre>> sudo mkdir /ebs1/etc
> sudo mkdir /ebs1/lib
> sudo mkdir /ebs1/log
> sudo mv /etc/mysql     /vol/etc/
> sudo mv /var/lib/mysql /vol/lib/
> sudo mv /var/log/mysql /vol/log/

> sudo mkdir /etc/mysql
...
</pre>
</div>
<div class="codeBox">
<h3 id="installing-MySQL">Installing MySQL</h3>
<p>MySQL and MySQL Server (mysqld) are available from the Amazon Yum repository.  Like update snippets above, the snippet below has been edited to show only what is necessary.</p>
<pre>> sudo yum install mysql
Is this ok [y/N]: y

> sudo yum install mysql-server
Is this ok [y/N]: y
</pre>
<p>After installing MySQL and MySQL Server, we start the MySQL service. </p>
<pre>
> sudo service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h ip-10-176-31-62 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &#038;

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[  OK  ]
Starting mysqld:                                           [  OK  ]
</pre>
<p>Finally the mysql_secure_installation script is run.</p>
<pre>
> /usr/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!
    </pre>
</div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="database-setup">Set Up the iExperiment Database</h3>
<ol>
<li>Log in as root to the MySQl database.  We recommend that you not put the root password in the mysql command, so that it does not end up in .bash_history.</li>
<li>Create a user &lsquo;iexperiment&lsquo;@&lsquo;localhost&lsquo;. </li>
<li>Grant the iexperiment user appropriate privileges.</li>
</ol>
<pre>> mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create user 'iexperiment'@'localhost' identified by 'iexperimentpassword';
Query OK, 0 rows affected (0.00 sec)

mysql> grant usage on *.* to 'iexperiment'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to 'iexperiment'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
    </pre>
<ol start="4">
<li>Create the /var/log/iexperiment, /var/local/iexperiment and /var/local/iexperiment/ddl directories.</li>
<li>Upload the iExperiment SQL files to the /var/local/iexperiment/ddl directory using an FTP application that supports SSL, such at <a target="_blank" href="http://filezilla-project.org/">FileZilla</a>. </li>
</ol>
<pre>> sudo mkdir /var/log/iexperiment
> sudo mkdir /var/local/iexperiment
> sudo mkdir /var/local/iexperiment/ddl
    </pre>
<ol start="6">
<li>Log in to MySQL as iexperiment.</li>
<li>Create a database named iexperiment. </li>
<li>Load the database by sourcing the initial_setup.sql file. </li>
</ol>
<pre>
> pushd /var/local/iexperiment/ddl
/var/local/iexperiment/ddl ~
> ls -lt
total 136
-rw-rw-r-- 1 root root   917 Jul 17 21:22 initial_setup.sql
-rw-rw-r-- 1 root root  3465 Jul 17 21:08 insert_permissions_START-UP.sql
-rw-rw-r-- 1 root root   944 Jul 17 21:08 insert_admin_START-UP.sql
-rw-rw-r-- 1 root root 22612 Jul 14 17:33 create_tables.sql
-rw-rw-r-- 1 root root 73893 Jul 14 17:09 insert_record_categories.sql
-rw-rw-r-- 1 root root 18355 Jul 14 17:09 create_constraints.sql
-rw-rw-r-- 1 root root   932 Jul 14 17:08 insert_admin.sql

> mysql -h localhost -u iexperiment -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show grants;
+-----------------------------------------------------------------------------------------------------------------------------+
| Grants for iexperiment@localhost                                                                                            |
+-----------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'iexperiment'@'localhost' IDENTIFIED BY PASSWORD '*BAA33824FACE624B5B0AAC8A604733A5648A7A6B' |
+-----------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> create database iexperiment;
Query OK, 1 row affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| iexperiment        |
| mysql              |
+--------------------+
3 rows in set (0.00 sec)

mysql> use iexperiment;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> source initial_setup.sql;

Query OK, 1 row affected (0.00 sec)
.
.
.
Query OK, 1 row affected (0.00 sec)

mysql> show tables;
+------------------------+
| Tables_in_iexperiment  |
+------------------------+
| admin_group_member     |
| ...
| version                |
+------------------------+
55 rows in set (0.00 sec)

mysql> select * from version;
+-------------+----------------------------------+
| version_num | comment                          |
+-------------+----------------------------------+
|           6 | May 25, 2010 - Switch to Records |
+-------------+----------------------------------+
1 row in set (0.00 sec)

mysql> exit
Bye
  </pre>
</div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="SSL-certificate">Create SSL Certificate</h3>
<p>iExperiment runs under the secure HTTPS protocol; thus, we need a Secure Sockets Layer (SSL) certificate.  If you already have a wildcard certificate for your domain, then you can skip this step. </p>
<p>Note, that if you use a self-signing certificate, then your iExperiment users will be notified of this.  In FireFox they will see a &#8220;This Connection is Untrusted&#8221; page, in which they will need to open the &#8220;I understand the Risks&#8221; link and click on the &#8220;Add Exception&#8230;&#8221; button. </p>
<ol>
<li>Make a directory for the SSL certificate.</li>
<li>Generate the self-signing SSL certificate.  In the snippet below, the certificate&#8217;s file name, temp.iexperiment.bin, reflects the URL we are using.</li>
</ol>
<pre>
> sudo mkdir /usr/etc/cert
> cd /usr/etc/cert

> sudo keytool -genkey -alias tomcat -keypass sslcert1 -keystore temp.iexperiment.bin -storepass sslcert1
What is your first and last name?
[Unknown]:  Marc Whitlow
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:  Colabrativ, Inc.
What is the name of your City or Locality?
[Unknown]:  El Sobrante
What is the name of your State or Province?
[Unknown]:  California
What is the two-letter country code for this unit?
[Unknown]:  US
Is CN=Marc Whitlow, OU=Unknown, O="Colabrativ, Inc.", L=El Sobrante, ST=California, C=US correct?
[no]:  y

> ls -l
total 4
-rw-r--r-- 1 root root 1292 Jul 18 02:30 temp.iexperiment.bin
    </pre>
<p>Write down the certificate &#8220;keypass&#8221; as you will need it to set up Tomcat.</p>
</div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="apache-tomcat">Setup Apache &amp; Tomcat</h3>
<ol>
<li>Install <a target="_blank" href="http://httpd.apache.org/docs/2.0/programs/httpd.html">Apache Hypertext Transfer Protocol Server</a> (httpd), <a target="_blank" href="http://tomcat.apache.org/tomcat-6.0-doc/index.html">Apache Tomcat 6</a> (tomcat6), Tomcat&#8217;s web application service (tomcat6-webapps) and <a target="_blank" href="http://www.modssl.org/">Apache Interface to OpenSSL</a> (mod_ssl) from Amazon&#8217;s Yum repository.</li>
<li>Start the Apache (httpd) and Tomcat (tomcat6) services. </li>
</ol>
<pre>> sudo yum install httpd
Is this ok [y/N]: y

> sudo yum install tomcat6
Is this ok [y/N]: y

> sudo yum install tomcat6-webapps
Is this ok [y/N]: y

> sudo yum install mod_ssl
Is this ok [y/N]: y

> sudo service httpd start
Starting httpd:                                            [  OK  ]
> sudo service tomcat6 start
Starting tomcat6:                                          [  OK  ]
    </pre>
<p>Now we can check to see if the “Amazon Linux AMI Test Page” loads in a Browser using:</p>
<ul>
<li>EC2 Instance&#8217;s public URL that is found in the EC2 Instance information on the AWS Management Console, e.g. http://ec2-204-236-137-138.us-west-1.compute.amazonaws.com</li>
<li>The URL that was assigned to the Elastic IP address associated with the EC2 Instance in the Domain Name Server (DNS), e.g. http://temp.iexperiment.net/</li>
</ul>
<p>Next, we will configure Tomcat to support applications and services under the secure https protocol on port 8443.  We do this by editing the server.xml file in /etc/tomcat.</p>
<pre>
> cd /etc/tomcat6
> sudo cp -p server.xml server.xml.orig
> sudo vi server.xml
> diff server.xml.orig server.xml
83,88c83,92
<     <!--
<     <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
<                maxThreads="150" scheme="https" secure="true"
<                clientAuth="false" sslProtocol="TLS" />
<     -->
<
---
>
>     <Connector port="8443"
>                protocol="HTTP/1.1"
>                SSLEnabled="true"
>                maxThreads="150"
>                scheme="https" secure="true"
>                clientAuth="false" sslProtocol="TLS"
>                keystoreFile="/usr/etc/cert/temp.iexperiment.bin"
>                keystorePass="sslcert1" />

> sudo service tomcat6 restart
Stopping tomcat6:                                          [  OK  ]
Starting tomcat6:                                          [  OK  ]
    </pre>
<p>We should now beable to see the sample web applications supplied with the tomcat6-webapps Yum distribution found in /var/lib/tomcat6/webapps/sample, using the following URLs: </p>
<ul>
<li>&#8220;EC2 Public URL&#8221;:8080/sample e.g. http://ec2-204-236-137-138.us-west-1.compute.amazonaws.com:8080/sample </li>
<li>http://&#8221;iExperiment Domain&#8221;:8080/sample, e.g. http://temp.iexperiment.net:8080/sample</li>
<li>https://&#8221;iExperiment Domain&#8221;:8443/sample, e.g. https://temp.iexperiment.net:8443/sample</li>
</ul>
</div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="index-html">Adding index.html</h3>
<p>Upload the iExperiment index.html page and any images associated with the page to the /var/www/html directory.  You can either overwrite the existing index.html page or rename it.
</p></div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="iExperiment-applications">iExperiment Applications Installation</h3>
<p>iExperiment has three applications: Admin, Record and ResetPassword.</p>
<ol>
<li>Upload the iExperiment applications .war files (admin.war, record.war and resetPassword.war) to the /var/lib/tomcat6/webapps/ directory in the EC2 server. </li>
<li>Stop the Tomcat service.</li>
<li>Create directories for the attachments and the Lucene search engine index.</li>
<li>For each of the iExperiment applications.
<ol>
<li>Create a directory for the application in /var/lib/tomcat6/webapps/ </li>
<li>Change the group to tomcat.</li>
<p>            li>Unzip the contents of the war file into the newly created directory.</li>
<li>Upload and replace the &#8220;application&#8221;.html file with deployment specific version. </li>
<li>Add deployment specific images to the images directory.</li>
<li>Upload and replace existing iexperiment.properties, dbpool.properties and log4j.properties with files specific for this deployment.</li>
</ol>
</li>
<li>Start the Tomcat service.</li>
</ol>
<pre>> sudo service tomcat6 stop
Stopping tomcat6:                                          [  OK  ]

> sudo mkdir /var/local/iexperiment/attachments
> sudo mkdir /var/local/iexperiment/lucene
> sudo chown -R tomcat:tomcat /var/local/iexperiment/*

> cd /var/lib/tomcat6/webapps/
> ls -lt
total 12
drwxrwxr-x 5 root tomcat 4096 Jul 14 14:53 sample
drwxrwxr-x 5 root tomcat 4096 Jul 14 14:53 examples
drwxrwxr-x 3 root tomcat 4096 Jul 14 14:53 ROOT

> sudo mkdir record
> sudo mkdir admin
> sudo mkdir resetPassword
> sudo chgrp tomcat *

# Begein of admin application configuration.
> pushd admin
> sudo unzip ../admin.war

# After uploading Admin.html
> sudo chown -R root:root *.html

# After uploading deployment specific images to the images diectory.
> pushd images
> sudo chown -R root:root *
> popd

# After uploading the deployment specific properties files
# to the WEB-INF/classes directory
> pushd WEB-INF/classes/
> sudo chown -R root:root *.properties
> ls -lt
total 28
-rw-rw-r-- 1 root root 1287 Jul 14 18:33 log4j.properties
-rw-rw-r-- 1 root root 2020 Jul 14 18:33 iexperiment.properties
-rw-rw-r-- 1 root root 1514 Jul 14 18:33 dbpool.properties
drwxr-xr-x 3 root root 4096 Jul 14 17:49 net
drwxr-xr-x 3 root root 4096 Jul 14 17:49 org
drwxr-xr-x 4 root root 4096 Jul 14 17:49 com
-rw-r--r-- 1 root root 1370 May  3 19:05 mail.properties

# End of admin application configuration.
# Repeat for the record and resetPassword applications. 

> sudo service tomcat6 start
Starting tomcat6:                                          [  OK  ]
    </pre>
</div>
<p><!-- codeBox  --></p>
<div class="codeBox">
<h3 id="removing-8443">Removing Port 8443 from HTTPS Requests</h3>
<p>The final task in setting up the iExperiment Server is to remove the port number from the secure https requests.  We do this by relay the port 443 TCP connections to port 8443 using iptables in the <a target="_blank" href="http://www.netfilter.org/">Netfilter package</a> that already installed on the EC2 instance. </p>
<ol>
<li>Using iptables redirect the incoming port 443 request to port 8443.</li>
<li>Using iptables redirect the output from the incoming port 443 request to port 8443.</li>
<li>We can see these rules in the &#8220;nat&#8221; table using the command &#8220;sudo iptables -t nat -L&#8221;.</li>
<li>Save the iptable in /etc/iptables.conf, and change ownership to root.</li>
<li>Finally, add &#8220;/sbin/iptables-restore &lt; /etc/iptables.conf&#8221; to the bottom to /etc/rc.local file.</li>
</ol>
<pre>> sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
> sudo iptables -t nat -I OUTPUT -p tcp --dport 443 -j REDIRECT --to-ports 8443

> sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere            tcp dpt:https redir ports 8443

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere            tcp dpt:https redir ports 8443

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination

> sudo iptables-save > iptables.conf
> more iptables.conf
# Generated by iptables-save v1.4.7 on Thu Sep  8 03:32:23 2011
*nat
&#58;PREROUTING ACCEPT [5:300]
:OUTPUT ACCEPT [50:3801]
&#58;POSTROUTING ACCEPT [50:3801]
-A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A OUTPUT -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
COMMIT
# Completed on Thu Sep  8 03:32:23 2011

> sudo cp -p iptables.conf /etc/.
> sudo chown -R root:root /etc/iptables.conf
> sudo ls -l /etc/iptables.conf
-rw-rw-r-- 1 root root 332 Sep  8 03:32 /etc/iptables.conf

> sudo vi /etc/rc.local
> more /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/sbin/iptables-restore &lt; /etc/iptables.conf
    </pre>
</div>
<p><!-- codeBox  --></p>
<h3>Closing Remarks</h3>
<p>iExperiment run on a typical AWS Apache Tomcat deployment. </p>
<h3>Resources</h3>
<ol>
<li>&ldquo;Configuring MySQL to use the EBS volume&rdquo; section of Eric Hammond&#8217;s article on <a target="_blank" href="http://aws.amazon.com/articles/1663?_encoding=UTF8&amp;jiveRedirect=1">Running MySQL on Amazon EC2 with EBS (Elastic Block Store)</a>.</li>
<li><a target="_blank" href="http://www.puschitz.com/InstallingTomcat.html">Installing Apache Tomcat on Linux</a> by Werner Puschitz.</li>
<li><a target="_blank" href="http://www.cyberciti.biz/faq/how-do-i-save-iptables-rules-or-settings/">How Do I Save Iptables Rules or Settings?</a> by Vivek Gite. </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/setup-of-iexperiment-on-amazons-elastic-compute-cloud-ec2-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup of Amazon&#8217;s Elastic Compute Cloud (EC2) Server for iExperiment</title>
		<link>http://www.colabrativ.com/setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment/</link>
		<comments>http://www.colabrativ.com/setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 17:37:23 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Elastic Compute Cloud]]></category>
		<category><![CDATA[electronic notebook]]></category>
		<category><![CDATA[ELN]]></category>
		<category><![CDATA[iExperiment]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=226</guid>
		<description><![CDATA[A research organization&#8217;s experiment records are the foundation of its intellectual property, and, as such, must be stored in a way that allows the research organization to maintain control over these records. Enterprise electronic notebooks, such as our iExperiment, store &#8230; <a href="http://www.colabrativ.com/setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A research organization&#8217;s experiment records are the foundation of its intellectual property, and, as such, must be stored in a way that allows the research organization to maintain control over these records.  Enterprise electronic notebooks, such as our iExperiment, store their experiment records on a server.  Many organizations, including Colabrativ, Inc., are using cloud computing to lower the cost of a server and IT costs in general.  Amazon&#8217;s <a target="_blank" href="http://aws.amazon.com/ec2/">Elastic Compute Cloud (EC2)</a> is one of the lower cost cloud service providers.  Amazon is <a target="_blank" href="http://sas70.com/sas70_overview.html">Statement on Auditing Standards No. 7 (SAS70)</a> compliant.  <a target="_blank" href="http://aws.amazon.com/about-aws/whats-new/2009/11/11/aws-completes-sas70-type-ii-audit/">They completed the Type II audit in 2009</a>, so you know they are doing everything they can to keep our data secure.  Amazon Web Services places the responsibility of the enterprise application setup and maintenance on the client&#8217;s administrator.  Other full-service SAS70-complaint cloud service providers will happily take on these responsibilities for you, for a fee. </p>
<p>In this post and in the following post, I will show you how we setup our enterprise electronic notebook application, iExperiment, on an Amazon EC2 server.  This first post covers the launch of the Amazon EC2 server and attachment of <a target="_blank" href="http://aws.amazon.com/ebs/">Elastic Block Storage</a> volume to the server.  The cloud equivalent of purchasing a server and disk, plugging it in, and connecting it to the network.  Experienced Amazon EC2 administrators may want to take a quick look at <a href="#requirements">iExperiment Server Requirements</a> and then move on to the second post on the setup and configuring of an EC2 server for iExperiment. </p>
<ul>
<li><a href="#requirements">iExperiment Server Requirements</a></li>
<li><a href="#ec2-instance-setup">Setup of Amazon Web Services EC2 Instance</a></li>
<li><a href="#attaching-ebs">Creating and Attaching an Elastic Block Storage Volume (optional)</a></li>
<li><a href="#dns-server">Assigning URL of the iExperiment EC2 Server on the DNS Server</a></li>
</ul>
<p>In the second post we will go over the setup and configuration of the EC2 server and the installation and setup of iExperiment on it.  Topic in the post include: </p>
<ul>
<li>Updating the Server</li>
<li>Installing MySQL</li>
<li>iExperiment Database Setup</li>
<li>Mounting Elastic Block Storage Volume (optional)</li>
<li>SSL Certificate Creation</li>
<li>Setup Apache &amp; Tomcat</li>
<li>Adding index.html</li>
<li>iExperiment Applications Installation</li>
</ul>
<h3 id="requirements">iExperiment Server Requirements</h3>
<p>The requirements of our enterprise electronic notebook application, iExperiment, are: </p>
<ol>
<li>Linux hosting web environment:  We normally use Apache and Tomcat.</li>
<li>MySQL database.</li>
<li>Mail server:  By default iExperiment uses the iExperiment.net mail server.</li>
</ol>
<p>In addition to these requirements, we recommend that you have the following before setting up iExperiment.</p>
<ol>
<li>A subdomain name under your domain name for iExperiment, for example iexperiment.example.org. </li>
<li>An administrator mail address on your mail server, e.g. admin@example.org.</li>
</ol>
<h3 id="ec2-instance-setup">Setup of Amazon Web Services EC2 Instance</h3>
<p>If you are not familiar with Amazon Web Services, we recommend that you read the <a target="_blank" href="http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/">Amazon Elastic Compute Cloud Getting Started Guide</a>.  There you can find instructions on how to sign up for Amazon EC2, which tell you to &#8220;Go to <a target="_blank" href="http://aws.amazon.com/ec2">http://aws.amazon.com/ec2</a>, click on the <strong>Sign Up for Amazon EC2</strong>, and follow the on-screen instructions.&#8221; </p>
<p>After signing on in the <a target="_blank" href="http://aws.amazon.com/console/">Amazon Management Console</a>, and selecting a region, the following tasks are performed. </p>
<ol>
<li>
<h4>Select an Amazon Region for the iExperiment Server</h4>
<p>Select a <strong>Region</strong> from the region pull-down menu at the top of the Navigation panel.  We are in Northern California, so we normally select the <span style="color:#004B91">US West (N. California)</span> region.
  </li>
<li>
<h4>Create Security Group</h4>
<p>Open the <strong>Security Groups</strong> panel by clicking on its link under <span style="color:gray">NETWORK &amp; SECURITY</span> in the Navigation panel. </p>
<ol>
<li>Click on the &#8220;Create Security Group&#8221; button at the top of the Security Group panel.<br />
         This will bring up the &#8220;Create Security Group&#8221; popup.
       </li>
<li>In the &#8220;Create Security Group&#8221; popup, fill in the following information:<br />
<table>
<tr>
<td>Name:</td>
<td>iExperiment</td>
</tr>
<tr>
<td>Description:</td>
<td>iExperiment open ports: 22 (SSH), 80 and 8080 (HTTP), and 443 and 8443 (HTTPS)</td>
</tr>
<tr>
<td>VPC:</td>
<td>No VPC</td>
</tr>
</table>
<p>         Then click on the &#8220;<span style="color:#004B91">Yes, Create</span>&#8221; button.
        </li>
<li>Click on the iExperiment security group, and click on the &#8220;Inbound&#8221; tab.</li>
<li>In the &#8220;Inbound&#8221; tab add the following rules:
<ol>
<li>From the &#8220;Create a new rule&#8221; pull-down menu, select &#8220;SSH&#8221;,<br />
                then click on the &#8220;Add Rule&#8221; button.</li>
<li>From the &#8220;Create a new rule&#8221; pull-down menu, select &#8220;HTTP&#8221;,<br />
                then click on the &#8220;Add Rule&#8221; button.</li>
<li>From the &#8220;Create a new rule&#8221; pull-down menu, select &#8220;HTTPS&#8221;,<br />
                then click on the &#8220;Add Rule&#8221; button.</li>
<li>From the &#8220;Create a new rule&#8221; pull-down menu, select &#8220;Custom TCP rule&#8221;,<br />
                enter the &#8220;port range&#8221; of 8080,<br />
                then click on the &#8220;Add Rule&#8221; button.</li>
<li>From the &#8220;Create a new rule&#8221; pull-down menu, select &#8220;Custom TCP rule&#8221;,<br />
                enter the &#8220;port range&#8221; of 8443,<br />
                then click on the &#8220;Add Rule&#8221; button.<br />
                <br/>The resulting security table contains the following rules: <br/><br />
                <img src="http://www.colabrativ.com/images/iExperiment_EC2_security_group.png" alt="The enterprise iExperiment electronic notebook Amazon EC2 security group." />
            </li>
<li>After adding all of the Rules, click on the &#8220;Apply Rule Changes&#8221; button at the bottom of the Inbound* tab.</li>
</ol>
</li>
</ol>
<p>&nbsp;</p>
</li>
<li>
<h4>Create Key Pair</h4>
<p>Open the <strong>Key Pairs</strong> panel by click on its link under <span style="color:gray">NETWORK &amp; SECURITY</span> in the Navigation panel. </p>
<ol>
<li>Click on the &#8220;Create Key Pair&#8221; button at the top of the Key Pairs panel.<br />
          This will bring up the &#8220;Create Key Pair&#8221; popup.
      </li>
<li>Supply a &#8220;Key Pair Name&#8221;, then click on the &#8220;<span style="color:#004B91">Create</span>&#8221; button.<br />
          Amazon will create the key pair and download the file to you.<br />
          Save the .pem file somewhere accessible to you.
      </li>
</ol>
<p>&nbsp;</p>
</li>
<li>
<h4>Launch EC2 Instance</h4>
<p>Open the <strong>Instances</strong> panel by clicking on its link under <span style="color:gray">INSTANCES</span> in the Navigation panel. </p>
<ol>
<li>Click on the &#8220;Launch Instance&#8221; button at the top of the My Instances panel.<br />
           This will bring up the &#8220;Request Instances Wizard&#8221; popup. </li>
<li>Click the &#8220;Select&#8221; button to the right of the &#8220;Basic 32-bit Amazon Linux AMI 2011.02.1 Beta&#8221; under the &#8220;Quick Start&#8221; tab in the Request Instances Wizard.</li>
<li>Fill in the Instance Details:<br />
<table>
<caption>Instance Details</caption>
<tr>
<td>Number of Instances:</td>
<td>1</td>
</tr>
<tr>
<td>Availability Zone:</td>
<td>us-west-1a</td>
</tr>
<tr>
<td>Instance Type:</td>
<td>Small (m1.small, 1.7 GB)</td>
</tr>
</table>
<p>           Then click on the &#8220;<span style="color:#004B91">Continue</span>&#8221; button at the bottom of the popup.
       </li>
<li>We normally change nothing in the &#8220;<span style="color:#004B91">Advanced Instance Options</span>&#8220;.<br />
           Click on the &#8220;<span style="color:#004B91">Continue</span>&#8221; button at the bottom of the popup. </li>
<li>If you have multiple EC2 instances, you may want to add Tags to the iExperiment instance.<br />
           Click on the &#8220;<span style="color:#004B91">Continue</span>&#8221; button at the bottom of the popup. </li>
<li>Choose the &#8220;Choose from your existing Key Pairs&#8221; option, then select the key pair for iExperiment from a &#8220;Your existing Key Pair&#8221; pull-down menu.<br />
           Click on the &#8220;<span style="color:#004B91">Continue</span>&#8221; button at the bottom of the popup. </li>
<li>Choose the iExperiment security group using the &#8220;Choose one or more of your existing Security Groups&#8221; option from list of security groups, then<br />
           click on the &#8220;<span style="color:#004B91">Continue</span>&#8221; button at the bottom of the popup. </li>
<li>Review the configuration of your EC2 Instance request, then<br />
           click on the &#8220;<span style="color:#004B91">Launch</span>&#8221; button at the bottom of the &#8220;Request Instances Wizard&#8221; popup.<br />
           <img width="580px" src="http://www.colabrativ.com/images/Amazon_EC2_Instance_Review.png" alt="Review section Amazon EC2 Request Instances Wizard popup for a server capable of running Colabrativ's enterprise electronic notebook, iExpertiment." />
        </li>
</ol>
<p>It&#8217;s worth noting the id, Availability Zone, and Public DNS of the EC2 instance you created by clicking on the instance in the &#8220;My Instances&#8221; panel.
  </li>
<li>
<h4>Create an Elastic IP</h4>
<p>Amazon&#8217;s <a target="_blank" href="http://aws.amazon.com/articles/1346">Elastic IP Addresses</a> are static IP addresses that you can associate with an Amazon EC2 server.  Open the Addresses panel by clicking on the <strong>Elastic IPs</strong> link under <span style="color:gray">NETWORK &amp; SECURITY</span> in the Navigation panel. </p>
<ol>
<li>Click on the &#8220;Allocate New Address&#8221; button at the top of the &#8220;Addresses&#8221; panel.<br />
          This will bring up the &#8220;Allocate New Address&#8221; popup.<br />
          Click on the &#8220;<span style="color:#004B91">Yes, Allocate</span>&#8221; button in the popup.<br />
          This will create a new address.
      </li>
<li>Click on the new Elastic IP address and select Associate Address.<br />
          This will bring up the &#8220;Associate Address&#8221; popup.<br />
          Select the iExperiment EC2 Instance from the &#8220;Instance&#8221; pull-down list and<br />
          click on the &#8220;<span style="color:#004B91">Yes, Associate</span>&#8221; button in the popup.
      </li>
</ol>
<p>The eleastic IP address will be needed when setting up the Domain Name Server, below, so make a note of it.
  </li>
</ol>
<h3 id="attaching-ebs">Creating and Attaching an Elastic Block Storage Volume (optional)</h3>
<p>We highly recommend that you place your experiment records created in iExperiment on an EC2 server in an <a target="_blank" href="http://aws.amazon.com/ebs/">Elastic Block Storage (EBS)</a> volume.  EBS isolates your data from the server failures and its scalable.  An existing volume can be copied to a large volume as your iExperiment records increase.  From the Amazon Management Console open the EBS Volumes panel by clicking on the <strong>Volumes</strong> link under <span style="color:gray">ELASTIC BLOCK STORE</span> in the Navigation panel. </p>
<ol>
<li>Click on the &#8220;Create Volume&#8221; button at the top of the &#8220;EBS Volumes&#8221; panel.<br />
      This will bring up the &#8220;Create Volume&#8221; popup.
  </li>
<li>In the &#8220;Create Volume&#8221; popup enter a volume <strong>Size</strong>, and <strong>Availability Zone</strong>.<br />
      The volume <strong>Size</strong> you choose will primarily depend on the size of the figures and attachment the researchers using iExperiment plan to associate with their experiment records.  10 GiB is a good starting size.  The <strong>Availability Zone</strong> must be the same as the iExperiment instance.<br />
      Click on &#8220;<span style="color:#004B91">Yes, Create</span>&#8221; button in the popup.
  </li>
<li>Click on the EBS volume you just created and select &#8220;Attach Volume&#8221;.<br />
      This will bring up the &#8220;Attach Volume&#8221; popup with <strong>Volume</strong> already filled in.<br />
      Select the iExperiment EC2 instance, shown by id, from the <strong>Instances</strong> pull-down menu.<br />
      Click on the &#8220;<span style="color:#004B91">Yes, Attach</span>&#8221; button in the popup to attach the EBS volume to the iExperiment instance.
  </li>
</ol>
<h3 id="dns-server">Assigning URL of the iExperiment EC2 Server on the DNS Server</h3>
<p>Here we will use the domain name temp.iExperiment.net, but you will be using a sub-domain of your domain such as iexperiment.example.com.  We are using Kattare Internet Services for our DNS server.  There we associate the AWS Elastic IP address with both the sub-domain and its secure variant in the iExperiment Zone File:</p>
<table>
<tr>
<td>temp</td>
<td>IN</td>
<td>A</td>
<td>50.18.109.21</td>
</tr>
<tr>
<td>www.temp</td>
<td>IN</td>
<td>A</td>
<td>50.18.109.21</td>
</tr>
<tr>
<td>securetemp</td>
<td>IN</td>
<td>A</td>
<td>50.18.109.21</td>
</tr>
<tr>
<td>www.securetemp</td>
<td>IN</td>
<td>A</td>
<td>50.18.109.21</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/setup-of-amazons-elastic-compute-cloud-ec2-server-for-iexperiment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Innovative Uses of Enterprise Electronic Notebook iExperiment</title>
		<link>http://www.colabrativ.com/innovative-uses-of-enterprise-electronic-notebook-iexperiment/</link>
		<comments>http://www.colabrativ.com/innovative-uses-of-enterprise-electronic-notebook-iexperiment/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 04:07:17 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[electronic notebook]]></category>
		<category><![CDATA[ELN]]></category>
		<category><![CDATA[iExperiment]]></category>
		<category><![CDATA[innovation]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=194</guid>
		<description><![CDATA[There are several uses of enterprise electronic notebooks beyond their everyday use to document and protect an organization’s intellectual property as contained in their experiments.  These innovative uses all take advantage of the ability to access the experimental information from &#8230; <a href="http://www.colabrativ.com/innovative-uses-of-enterprise-electronic-notebook-iexperiment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are several uses of enterprise electronic notebooks beyond their everyday use to document and protect an organization’s intellectual property as contained in their experiments.  These innovative uses all take advantage of the ability to access the experimental information from anywhere, through the world wide web, that applications such as our enterprise electronic notebook, iExperiment, enable.  Some of the innovative uses are described below, along with a discussion of how to implement them in iExperiment.</p>
<p><strong>1. Collaborations with Researchers in Other Organizations</strong></p>
<p>Research is increasingly done on a contract or collaborative basis.  There are even virtual companies that contract out all of their experimentation.  A key feature of our enterprise electronic notebook is iExperiment’s permission management system, which facilitates several ways in which permissions can be set up for collaborations.</p>
<ul>
<li>The iExperiment administrator creates a separate institution group for the members of the collaboration in iExperiment’s permission management system. Researchers from the collaborating institution are added to that group. Permissions are set for the collaboration group in such a way that researchers in the group can only view records in that group.  In addition, the administrator can allow researchers and mangers in the sponsoring organization the ability to view the experimental records created during the research.  This allows the team real time access to the progress made by the collaborators on the research.</li>
<li>The permission management system allows the administrator to assign administrative permissions to a member of a collaborating institution.  This collaborating administrator is only given permission to view records in their organization.  They can add researchers to their organization within iExperiment, thus enabling the necessary personnel to enter experiments.  Again, the collaborator’s researcher will only have access to view records in their organization.  The primary iExperiment administrator can examine who the collaborating administrator has added and what permission they have assigned to various people, including who has been assigned as the project manager.  As described above, the administrator can allow researchers and mangers in sponsoring organizations the ability to view the experimental records created during the research.</li>
<li>The collaboration enterprise electronic notebook system can be isolated from the internal notebook system, by placing it on a separate server.  Completed records can be easily transferred from the collaboration system to the internal system.</li>
</ul>
<p>If you are engaged in collaborative research or a virtual company out-sourcing your research, then investing in an enterprise electronic notebook will reduce the time you spend in saving your experimental results, and the experimental information will be more accurate and complete, due to avoidance of a transfer process.</p>
<p><strong>2. </strong><strong>Contract Research Organization’s Customer Data </strong></p>
<p>If you are a Contract Research Organization that is interested in helping your customer obtain the greatest value out of the research you provide for them, then you should consider delivering semantic/structure experiment records in addition to human readable research reports.  In iExperiment, the record download method creates a record archive that is a zipped directory containing the XML record and all of the figures and attachments associated with the experiment, i.e. a complete structured documentation of an experiment.  The unzipped record archive can be easily displayed in any web browser using the XSLT transformation supplied in the archive.</p>
<p>The iExperiment administrator in the Contract Research Organization can create a customer group in iExperiment, and add the customer to the group, along with the researchers in their organization performing the research to the group.  The customer access can be restricted to only reading and downloading the completed experimental records or extended to viewing the record in the planning and in-progress states.</p>
<p>Many customers are extremely sensitive to having the research results that the Contract Research Organization is supplying to them mixed with other customer’s information.  This issue can be addressed by setting up a deployment of our enterprise electronic notebook, iExperiment, on a separate server.  A nice customization that can be employed is to use the subdomain of your domain as the URL for this server, e.g. customer_name.CRO_domain.com.</p>
<p><strong>3. </strong><strong>Distribution of Sales and Marketing Technical Information </strong></p>
<p>There are a number of situations in which a scientific vendor may want to share technical information with their customers and potential customers, such as:</p>
<ul>
<li>Protocols, reagent descriptions and example experiments for kits</li>
<li>Instrument testing protocols and example results</li>
<li>Innovative uses of their instrument or kit</li>
</ul>
<p>For a variety of reasons a scientific vendor may want to control who can view this information.  Our enterprise electronic notebook, iExperiment, allows its administrator to add customers and control the content they can view.  Each test or experiment example can be assigned to one or more categories, and each customer can be granted access to any or all of these categories.</p>
<p>There can be more than one iExperiment administrator.  Sales personnel could be set up as secondary administrators, thereby allowing them to quickly add a potential customer to iExperiment, and send an email containing links to tests or example experiments that the potential customer would be interested in.  In addition, an automated procedure could be created that allows a potential customer to gain access to particular tests or example experiments by signing up on the scientific vendor’s web site.</p>
<p>iExperiment has several functionalities that would be useful to a customer.  First, they can create a new experiment record based on an existing record using the “Copy Record” method.  The “Copy Record” method does not copy the record’s results, summary or conclusion sections.  Second, they can download the complete experiment record including all of its figures and attachments.  This allows the customer to perform additional analysis on the data in the experiment record.  The iExperiment administrator controls the ability to download a complete experiment record, so it can be turned off completely or only granted under certain circumstances.</p>
<p>If the scientific vendor’s development lab is also using our enterprise electronic notebook, iExperiment, then their experiment records can easily be made available to the customers.  This can be done within a single deployment of iExperiment, through the use of an additional experiment state “release to customers” that could require sign-off by someone other than the researcher that worked on the experiment.  This could also be implemented using a transfer protocol between the development lab’s iExperiment deployment and a second iExperiment deployment that the customers have access to.</p>
<p>Finally, a customer community could be set up using iExperiment.  Customers could post and share the details of innovative new uses of the vendor’s equipment or kits.</p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/innovative-uses-of-enterprise-electronic-notebook-iexperiment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File Drag and Drop in iExperiment</title>
		<link>http://www.colabrativ.com/file-drag-and-drop-in-iexperiment/</link>
		<comments>http://www.colabrativ.com/file-drag-and-drop-in-iexperiment/#comments</comments>
		<pubDate>Thu, 12 May 2011 21:15:52 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[drag & drop]]></category>
		<category><![CDATA[electronic notebook]]></category>
		<category><![CDATA[ELN]]></category>
		<category><![CDATA[iExperiment]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=89</guid>
		<description><![CDATA[Colabrativ is pleased to announce that we have added file drag and drop capability to our enterprise electronic notebook iExperiment. The video below demonstrates a number of different ways files can be dropped on to a record. A more detailed &#8230; <a href="http://www.colabrativ.com/file-drag-and-drop-in-iexperiment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Colabrativ is pleased to announce that we have added file drag and drop capability to our enterprise electronic notebook iExperiment.</strong> The video below demonstrates a number of different ways files can be dropped on to a record. A more detailed tutorial can be found on our <a href="http://www.colabrativ.com/file-drag-and-drop/">file drag and drop help page</a>.</p>
<div id="video">
<object width="640" height="378"><param name="movie" value="http://www.colabrativ.com/videos/File-Drag-and-Drop-Announcement_controller.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#1a1a1a" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="scale" value="showall" /><param name="flashvars" value="autostart=false&amp;thumb=http://www.colabrativ.com/help/videos/DragAndDropFirstFrameArrow360p.png&amp;thumbscale=55&amp;color=0x1A1A1A,0x1A1A1A" /><embed type="application/x-shockwave-flash" width="640" height="378" src="http://www.colabrativ.com/help/videos/File-Drag-and-Drop-Announcement_controller.swf" allowfullscreen="true" scale="showall" flashvars="autostart=false&amp;thumb=http://www.colabrativ.com/help/videos/DragAndDropFirstFrameArrow360p.png&amp;thumbscale=55&amp;color=0x1A1A1A,0x1A1A1A"></embed></object>
</div>
<p>When a file is dropped on an iExperiment record, the application examines both the file type and dropped file location on the experiment record to determine how to handle the dropped file. Generally, the contents of a dropped file are added below the section it was dropped on. If iExperiment cannot determine where to place the information, a popup message informs the user of this issue, and the dropped file is not included in the record.  A number of file types can be processed by iExperiment including: </p>
<table>
<tbody>
<tr>
<td><img src="http://www.colabrativ.com/images/OxygenTeam_image-x-photo128x128.png" alt="Oxygen Team image file icon" /></td>
<td style="vertical-align: top;"><strong>Image Files: </strong>When an image file is dropped on to an experiment record, the file is placed in a figure box.  iExperiment will give a default  title above the image and a default caption below the image.  Both the title and the caption can be edited.  Most image file extensions are recognized and placed in figures, except for TIFF files due to the lack of support in web browsers for this file type.</td>
</tr>
<tr>
<td><img src="http://www.colabrativ.com/images/128x128_text-enriched.png" alt="Oxygen Team text file icon" /></td>
<td style="vertical-align: top;"><strong>Image Files: </strong>Text Files:  When a simple .TXT text file is dropped on to an experiment record, three options are offered:&nbsp;</p>
<ol>
<li>The file can be stored as an attachment and displayed in an attachment box with a title to the right of the file icon and a caption below the icon and title.  Like figures, both the title and the caption can be edited.</li>
<li>The file can be saved as an attachment and the contents added as the attachment caption.</li>
<li>The file can be placed in a text section. In this case, the file will not be saved as an attachment but added as part of the text.</li>
</ol>
</td>
</tr>
<tr>
<td><img src="http://www.colabrativ.com/images/OxygenTeam_text-xml_128x128.png" alt="Oxygen Team text- XML file icon" /></td>
<td style="vertical-align: top;"><strong>XML Files using iExperiment’s Schema: </strong>Full records, parts and materials can be added using iExperiment&#8217;s XML schema, which can be found at www.iExperiment.net/XML.</td>
</tr>
<tr>
<td><img src="http://www.colabrativ.com/images/OxygenTeam_speadsheet+CSV_128x128.png" alt="Oxygen Team spreadsheet file icon plus CSV" /></td>
<td style="vertical-align: top;"><strong>iExperiment CSV Files: </strong>Lists and tables are added to experiment records using a comma-separated values (CSV) format.  The CSV file can be dragged and dropped on to a section in a record, or added using a menu.  A tutorial on the creation of CSV files for iExperiment can be found at <a href="../../csv-table-creation/">www.colabrativ.com/csv-table-creation/</a>.</td>
</tr>
<tr>
<td><img src="http://www.colabrativ.com/images/OxygenTeam_upload_128x128.png" alt="Oxygen Team upload file icon" /></td>
<td style="vertical-align: top;"><strong>Other Files: </strong>All other files that are dropped on to an experiment record are stored as attachments.  Attachments have a title and a caption, both of which can be edited.  iExperiment recognizes and displays the appropriate icon for a number of file extensions, including Microsoft Office, Adobe’s PDF, VectorNTI and Protein Data Bank files.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/file-drag-and-drop-in-iexperiment/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>File Drag and Drop onto a Google Web Toolkit Application &#8211; Outdated</title>
		<link>http://www.colabrativ.com/drag-and-drop-onto-a-google-web-toolkit-application-utdated/</link>
		<comments>http://www.colabrativ.com/drag-and-drop-onto-a-google-web-toolkit-application-utdated/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 22:11:21 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[drag & drop]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[iExperiment]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=18</guid>
		<description><![CDATA[Users increasingly expect to be able to drag and drop objects in applications, including web applications. I would like to show you how we recently added the ability to drop files on to our enterprise electronic notebook iExperiment. iExperiment&#8217;s client &#8230; <a href="http://www.colabrativ.com/drag-and-drop-onto-a-google-web-toolkit-application-utdated/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Users increasingly expect to be able to drag and drop objects in applications, including web applications.  I would like to show you how we recently added the ability to drop files on to our enterprise electronic notebook iExperiment. iExperiment&#8217;s client side is built on Google Web Toolkit (GWT).  GWT currently does not support file drag and drop. </p>
<p>The work flow for file drag and drop is as follows: </p>
<ol>
<li>The user drops a file on to the client.</li>
<li>The client sends the drop element id and the file to the server in a multipart POST for storage and analysis.</li>
<li>The server sends back the POST response to the client with information on how to display the dropped file.</li>
<li>The client presents the upload file&#8217;s information to the user.</li>
</ol>
<p>The file drop event is handled by adding &#8220;ondrop&#8221; attribute to the HTML elements.  The &#8220;ondrop&#8221; attribute calls the droppedFile Javascript routine that creates and sends an HTTP POST request to the server. Note, that the first argument in the droppedFile Javascript call is an &#8220;element-id&#8221;, and the event as the second argument.  The drop element ID allows us to identify where the file was drop on the page.</p>
<div class="codeBox">
<strong>Example of &#8220;ondrop&#8221; Attribute in an HTML Table Element</strong></p>
<pre>&lt;table ondrop="event.stopPropagation();
               event.preventDefault();
               droppedFile('element-id', event);"&gt;</pre>
</div>
<p>The &#8220;ondrop&#8221; element is created by the static addOnDrop method in a client side class (DropFileConnector). </p>
<div class="codeBox">
<strong>addOnDrop Method</strong></p>
<pre>
/** Add a ondrop attribute to an element in the DOM, example:
 * ondrop="event.stopPropagation(); droppedFile('element-id', event);"
 *
 * @param element DOM element
 * @param elementID Element Id to be sent to droppedFile joutine.
 */
public static void addOnDrop(Element element, String elementID) {
    element.setAttribute("ondrop",
        "event.stopPropagation(); droppedFile(\'" + elementID + "\', event);");
}
</pre>
</div>
<p>The droppedFile Javascript routine creates a multipart HTTP POST request.  On lines 6-9 the information needed for the POST is gathered and created, including the URL, files and boundary.  The XMLHttpRequest is created on line 10 and upload progress monitoring is set up in lines 12-14.  The POST is created on lines 16-35 and sent on line 43.  The first part of the POST contains the element Id (dropElementID) and the subsequent parts (lines 26-33) contain the files that were drop on the page.  Note, that a binary file get <code>.getAsBinary()</code> is used on line 32. </p>
<p>The POST responses are handled by the request.onreadystatechange function on line 37-51, and are sent to the client through <code>window.top.dropFileListener.droppedFile( );</code> calls on lines 45 and 49.  Initially (<code>readyState == 1</code>) the file name being uploaded along with the MIME boundary are sent to the client on lines 39-46.  After succesful completion of the POST (<code>readyState == 4</code>), the POST response is forward to the GWT application.</p>
<div class="codeBox">
<strong>droppedFile Javascript Routine</strong></p>
<pre>
01  var boundary = null;
02
03  function droppedFile(dropElementID, event) {
04      if( window.top.dropFileListener ) {
05          if (event.dataTransfer) {
06              var url = secureURL + "upload";
07              var token = document.cookie.substring( 26, document.cookie.indexOf("userName") - 12);
08              var files = event.dataTransfer.files;
09              boundary = "BoUnDaRy_._-_._-_._" + Math.floor(999999999999999 * Math.random());
10              var request = new XMLHttpRequest();
11
12              request.upload.onprogress = updateProgress;
13              request.upload.onload 	  = loaded;
14              request.upload.onerror 	  = loadError;
15
16              request.open("POST", url, true); // open asynchronous post
17              request.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary);
18              request.setRequestHeader("Session-Token", token);
19
20              var postContent = "--" + boundary + "\r\n" +
21                  "Content-Disposition: info; name=\"drop-element-id\"\r\n" +
22                  "\r\n" +
23                  dropElementID + "\r\n" +
24                  "--" + boundary;
25
26              for (var i = 0; i &lt; files.length; i++) {
27                  postContent = postContent + &quot;\r\n&quot; +
28                      &quot;Content-Disposition: file; name=\&quot;file\&quot;; filename=\&quot;&quot; + files[i].name + &quot;\&quot;\r\n&quot; +
29                      &quot;Content-Type: application/xml\r\n&quot; +
30                      &quot;File-Length: &quot; + files[i].size + &quot;\r\n&quot; +
31                      &quot;\r\n&quot; +
32                      files[i].getAsBinary() + &quot;\r\n&quot; +
33                      &quot;--&quot; + boundary;
34              }
35              postContent = postContent + &quot;--\r\n&quot;;
36
37              request.onreadystatechange = function() {
38                  if(this.readyState == 1) {
39                      var filesJSON = &#039;&quot;files&quot;:[&#039;;
40                      for (var i = 0; i &lt; files.length; i++) {
41                          filesJSON = filesJSON + &#039;&quot;&#039; + files[i].name + &#039;&quot;&#039;;
42                          if (i &lt; files.length - 1) filesJSON = filesJSON + &#039;, &#039;;
43                      }
44                      filesJSON = filesJSON + &#039;]&#039;
45                      window.top.dropFileListener.droppedFile( &#039;{&#039; +
46                          &#039;&quot;requestBoundary&quot;: &quot;&#039; + boundary + &#039;&quot;, &#039; + filesJSON + &#039;}&#039;);
47                  }
48                  if(this.readyState == 4) {
49                      window.top.dropFileListener.droppedFile( request.responseText );
50                  }
51              }
62
53              request.sendAsBinary(postContent);
54          }
55          else {
56              alert(&quot;Your browser does not support file drag and drop. &quot; +
57                      &quot;We recommend that upgrade your browser to one that support HTML5, &quot; +
58                      &quot;such as Mozella&#039;s FireFox or Apple&#039;s Safari or Google&#039;s Chrome.&quot;);
59          }
60      }
61      else {
62          alert(&quot;window.top.dropFileListener not found!&quot;);
63      }
64  }
</pre>
</div>
<p>The DropFileConnector class connects the dropFileListener in the Javascript to the GWT code. DropFileConnector class has a ClientSideDropFileSupport interface that defines the droppedFile method in the JavaScript.  theObserver is a static ClientSideDropFileSupport incidence that connects to Javascript droppedFile method to ClientSideDropFile&#8217;s droppedFile method. </p>
<div class="codeBox">
<strong>DropFileConnector class</strong></p>
<pre>
package com.colabrativ.common.client; 

import com.google.gwt.dom.client.Element; 

public class DropFileConnector {
    /** Used to pass information to the GWT application. Register your implementations with
     *  {@link com.colabrativ.common.client.DropFileConnector#connect( ClientSideDropFileSupport)}
     */
    public interface ClientSideDropFileSupport {
        /** The page calls this method to send dropped file information to application
         *
         * @param json JSON string containing the file name information.
         */
        void droppedFile(String json);
    } 

    /** An observer of drop file events, supplied by the GWT application. */
    static private ClientSideDropFileSupport theObserver; 

    /**
     * Connect the GWT application to the drop file JavaScript. The observer is notified
     * whenever the user drops a file on the application area (id="app-area").
     *
     * @param observer
     */
    public static void connect( ClientSideDropFileSupport observer ) {
        theObserver = observer;
        connectToPanel();
    }

    // This method are "glue" methods that let the simple JNDI call talk to the observer through its interface.
    @SuppressWarnings("all")
    private static void droppedFile(String s) { theObserver.droppedFile(s); }

    private static native void connectToPanel() /*-{
        var listener = new Object();
        listener.droppedFile = function(json) {
            json = unescape( json );
            @com.colabrativ.common.client.DropFileConnector::droppedFile( Ljava/lang/String;)( json );
        };

        $wnd.top.dropFileListener = listener;
    }-*/; 

    /**
     * Add a ondrop attribute to an element in the DOM, example:
     * ondrop="event.stopPropagation(); droppedFile('element-id', event);"
     *
     * @param element DOM element
     * @param elementId Element Id to be sent to droppedFile routine.
     */
    public static void addOnDrop(Element element, String elementId) {
        element.setAttribute("ondrop",
            "event.stopPropagation(); droppedFile(\'" + elementId + "\', event);");
    }
}
</pre>
</div>
<p>Finally, a <code>DropFileConnector.connect</code> call is made in a client class that handles the POST responses.  Our upload servlet adds either a OKAY or a FAIL to the POST response that the DropFileConnector handles.  In our implementation the POST responces are encapsulated in JSON.  The upload progress monitoring is also handled by the DropFileConnector.  In our implementation the MIME boundary is used as an Id for the upload, and the monitoring is managed by the singleton of the UploadManager class.</p>
<div class="codeBox">
<strong>DropFileConnector Connection</strong></p>
<pre>
DropFileConnector.connect
(
    new DropFileConnector.ClientSideDropFileSupport() {
        public void droppedFile(String response) {
            if (response.startsWith("OKAY:")) {
                String json = response.substring( response.indexOf(": ") + 2); // Remove OKAY:
                determineWhatToDoWithResponse(json);
            }
            else if (response.startsWith("FAIL:")) {
                // Do Nothing?
            }
            else {
            	JSONObject responseJSON = (JSONObject) JSONParser.parseStrict( response );
                JSONString boundaryJSON = (JSONString) responseJSON.get( UploadResponse.requestBoundary);

                if (boundaryJSON != null) {
                    String boundary = boundaryJSON.toString();
                    JSONArray filesJSON = (JSONArray) responseJSON.get( UploadResponse.files);

                    if (filesJSON != null) {
                        UploadManager.getInstance().addProgressDialog( boundary, filesJSON);
                    }
                    else {
                        UploadManager.getInstance().update( boundary, responseJSON);
                    }
                }
            }
        }
    }
);
</pre>
</div>
<p>Several resources helped us create our file drag and drop; these included: </p>
<ol>
<li>Box.net and html5 drag and drop blog by Christopher Blizzasrd at <a href="http://hacks.mozilla.org/2010/06/html5-adoption-stories-box-net-and-html5-drag-and-drop/">http://hacks.mozilla.org/2010/06/html5-adoption-stories-box-net-and-html5-drag-and-drop/</a></li>
<li>Mozilla&#8217;s developers Network page on Using XMLHttpRequest <a href="https://developer.mozilla.org/En/Using_XMLHttpRequest">https://developer.mozilla.org/En/Using_XMLHttpRequest</a></li>
<li>XHR progress and rich file upload feedback by Austin King at <a href="http://hacks.mozilla.org/2009/06/xhr-progress-and-richer-file-uploading-feedback/">http://hacks.mozilla.org/2009/06/xhr-progress-and-richer-file-uploading-feedback/</a>	</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/drag-and-drop-onto-a-google-web-toolkit-application-utdated/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Introduction of iExperiment Search</title>
		<link>http://www.colabrativ.com/introduction-of-iexperiment-search/</link>
		<comments>http://www.colabrativ.com/introduction-of-iexperiment-search/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 22:51:05 +0000</pubDate>
		<dc:creator>Marc Whitlow</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[iExperiment]]></category>
		<category><![CDATA[Lucene]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.colabrativ.com/?p=13</guid>
		<description><![CDATA[We are pleased to announce that iExperiment now has the ability to search your experiment record. iExperiment&#8217;s search is built on the open source Apache Lucene search engine library. &#160; iExperiment electronic notebook search user interface showing a carboxypeptidase purification &#8230; <a href="http://www.colabrativ.com/introduction-of-iexperiment-search/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are pleased to announce that iExperiment now has the ability to search your experiment record.  iExperiment&#8217;s search is built on the open source <a href="http://lucene.apache.org/java/docs/index.html" target="_blank">Apache Lucene</a> search engine library.</p>
<div style="text-align: center"><img src="../images/carboxypeptidase_purification_search_600.gif" alt="iExperiment electronic notebook search user interface showing a carboxypeptidase purification example" />&nbsp;</p>
<p><span style="font-size: 11px">iExperiment electronic notebook search user interface showing a carboxypeptidase purification example.</span></p>
</div>
<p>iExperiment&#8217;s new search interface is shown above. Like all search interfaces, ours has a query box and a submit query button. You can search specific fields in your experiment results. The specific fields are provided for you in the Add Field pull-down menu. In the example above, a general search is being performed on &#8220;carboxypeptidase&#8221; and a specific search on &#8220;purification&#8221; in the category &#8220;technique&#8221;.  For your convenience a &#8220;Clear Query&#8221; button is provided to begin new searches.  Each result contains the title and authors of the experiments found in the search, along with text fragments highlighting the search words.  The record title is linked to the full record.</p>
<div>
<p><strong>Search Fields</strong> are arranged in a hierarchical manner. The basis for the hierarchy is as follows:</p>
<p></p>
<div style="text-align: center;float: left"><img src="../images/add_field_pulldown.gif" alt="The top portion of the Add Field pull down menu in iExperiment electronic notebook search user interface." />&nbsp;<br />
<span style="font-size: 11px">The top portion of the Add Field pull down menu.</span>
</div>
<p><strong>Meta Data:</strong></p>
<ul style="list-style-type: none;">
<li>title, authors, institutions, last modified, projects,</li>
<li>state, and categories</li>
</ul>
<p><strong>Sections:</strong></p>
<ul style="list-style-type: none;">
<li>purpose, introduction, plan, methods, results,</li>
<li>summary, and conclusions</li>
</ul>
<p><strong>Materials:</strong></p>
<ul style="list-style-type: none;">
<li>animals, strain, species, consumables, lot number,</li>
<li>expiration date, equipment, serial number,</li>
<li>reagents, formula, pH, samples, part number,</li>
<li>suppliers names, address and URL</li>
</ul>
<p><strong>Content:</strong></p>
<ul style="list-style-type: none;>
<li></li>
<li>and data category
<ul style="list-style-type: none;>
<li>attachment, figure, file name, caption, sample set, </li>
<li>and data category</li>
</ul>
<p><strong>Search Tips:</strong> The <a href="http://lucene.apache.org/java/3_0_3/queryparsersyntax.html" target="_blank">Lucene query parser syntax</a> used in iExperiment&#8217;s search function is summarized in the table below.</p>
<table>
<thead>
<tr>
<th width="75">Qurey Type</th>
<th width="140">Example</th>
<th>Discussion</th>
</tr>
</thead>
<tbody>
<tr>
<td>Single Term</td>
<td>protein</td>
<td>For a single term like &#8220;protein&#8221;, the program will be searched for the word &#8220;protein&#8221; in all of the records the user has permission to view.</td>
</tr>
<tr>
<td>Single Character Wildcard</td>
<td>te?t</td>
<td>The single character wildcard is a question mark (?).  Our example &#8220;te?t&#8221; will match both &#8220;te<span style="color: red">s</span>t&#8221; or &#8220;te<span style="color: red">x</span>t&#8221;.  A wildcard cannot be the first character of a search term.  If you do place a wildcard at the beginning of a word, you will receive a message reminding you about this limitation.</td>
</tr>
<tr>
<td>Multiple Character Wildcard</td>
<td>carbo*</td>
<td>The multiple character wildcard is an asterisk (*).  Our example &#8220;carbo*&#8221; will match &#8220;carbon&#8221;, &#8220;carbonic&#8221;, &#8220;carbonyl&#8221;, and many other similar words.</td>
</tr>
<tr>
<td>Fuzzy Searches</td>
<td>carbo~</td>
<td>Lucene fuzzy search uses the tilde character (~).  Our example &#8220;carbo~&#8221; will match both &#8220;carbon&#8221; and &#8220;harbor&#8221;.</td>
</tr>
<tr>
<td>Phrase</td>
<td>&#8220;protein purification&#8221;</td>
<td>A phrase is a group of words enclosed within quotes.  The search returns exact matches to the phrase.  Without the quotes, the search looks for any records that contain any of the words.</td>
</tr>
<tr>
<td>Proximity Searches</td>
<td>&#8220;phosphate sodium&#8221;~3</td>
<td>A proximity search contains a group of words in quotes with a tilde character (~) after the last quote mark, followed by an integer.  The integer is the number of hops a word must make to match the phrase.  Our example will find &#8220;phosphate sodium&#8221;, &#8220;sodium phosphate&#8221;, and &#8220;sodium dihydrogen phosphate&#8221;.</td>
</tr>
<tr>
<td>Field</td>
<td>author:david</td>
<td>A field is denoted by a colon (:) after the field name followed by the field search term.  Field names must match exactly.  If the field is not exact, the search will return no matches.  We have provided an &#8220;Add Field&#8221; pull down menu, so the user do not have to remember the field names.</td>
</tr>
<tr>
<td>Range Searches</td>
<td>[2011-01-01 TO 2011-01-31]</td>
<td>Range searches are contained in a pair of square brackets[], and include a pair of terms separated by a &#8220;TO&#8221;.  Range searches are useful for searching dates.  Due to the <a href="http://en.wikipedia.org/wiki/Lexicographical_order" target="_blank">lexigraphical ordering</a> of words the year must proceed the month which proceeds the day.  Dates in iExperiment are stored as YYYY-MM-DD, where the YYYY is the year, MM is the numerical month, and DD is the numerical day.  Our example search will return experiments that have dates in January 2011.</td>
</tr>
<tr>
<td>AND Operator</td>
<td>protein AND purification</td>
<td>The default operator between search terms is OR.  Using the AND operator requires that the search return results that match both terms.</td>
</tr>
<tr>
<td>Required (<strong>+</strong>) Operator</td>
<td>protein +purification</td>
<td>The required operator is a plus sign (<strong>+</strong>) before a search term.  Our example will return results that contain &#8220;purification&#8221;, and may contain &#8220;protein&#8221;.</td>
</tr>
<tr>
<td>NOT Operator</td>
<td>purification NOT &#8220;lipid purification&#8221;</td>
<td>The NOT operator allows you to exclude terms from your searches.  A minus sign (<strong>-</strong>) can also be used as a NOT operator.  The example could be expressed as &#8216;purification -&#8221;lipid purification&#8221;.&#8217;</td>
</tr>
<tr>
<td>Grouping</td>
<td>title:(carboxypeptidae AND purification)</td>
<td>Terms can be grouped by enclosing the terms with parentheses ().  This is useful for performing both multiple term field searches, as shown in the example, and for controlling the logic of a search with AND and OR operators.</td>
</tr>
</tbody>
</table>
<p>For more details see <a href="http://lucene.apache.org/java/3_0_3/queryparsersyntax.html" target="_blank">http://lucene.apache.org/java/3_0_3/queryparsersyntax.html</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colabrativ.com/introduction-of-iexperiment-search/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
