# Presentation: 931639

## Electronic Laboratory Notebook

- Elena S. Mendoza
- 5/19/98
- Environmental Molecular Sciences Laboratory
- Computing & Information Sciences
- Pacific Northwest National Laboratory

## Overview

- Project Background
- What is an “Electronic Notebook”?
- How does it work?
- API’s
- Technologies
- Wrap-up

##       Projects

**Collaboration Management (ANL, PNNL): **Real-Time Session Management from both a session based metaphor and a space based metaphor.
**Electronic Notebooks (LBNL, ORNL, PNNL): ** We’re developing an Electronic Notebook system to provide a shareable, multimedia version of the traditional paper scientific notebook.
**Collaboratory Interoperability Framework (ANL, LBNL, PNNL, SNL): **Technologies to allow scientific instruments, notebooks, and real-time collaboration tools to work together.

_**Structural Biology LDRD**_** **
- Researchers collaborating electronically to perform NMR experiments.

_**DOE2000**_

_**EMSL Operations**_** **
- Use of the Collaboratory tool suite as a portion of the EMSL Research Facility.

## Collaborative Electronic Notebook Systems Association (CENSA)Rich Lysakowski  - www.censa.orgChemical and Pharmaceutical companies promoting the development of commercial EN systems

## DOE2000 Electronic Notebook Project

_**LBNL**_

_**ORNL**_

_**PNNL**_

## DOE2000 EN Approach

- Started with 3 separate prototypes at 3 labs
- Defined common architecture and all are migrating towards it (e.g. editor interface, import/export)
- Providing prototypes and support now(install, docs, help, SDKs, ...)
- New functionality available every ~6 months
- Revolutionize over 3 years

## Types of Notebooks/ Purposes of a Notebook

- Researcher’s Laboratory Notebook (Scientific Observations)
- Design Notebook (New Ideas)
- Instrument Log Book (Maintenance)
- Experiment Log Book (Time/Cost Accounting)
- Legal Record
- Invention Reports (Intellectual Property)
- Sample Tracking
- Notepad
- Group Workspace

## Sources of Notebook Information

- Instruments, Analysis/Visualization/Modeling Software
- Data files/ Results files in ‘native’ format (lossless)
- Summaries - Images, Tables, ...(lossy)
- Metadata/ Processing history/ Parameter files
- Researchers (individual)
- Notes - structured and unstructured text
- Sketches/ Diagrams/ Schematics
- Groups
- Presentations
- Conversations(A/V, Whiteboard, Shared Screeen, ...)

## EMSL Electronic Notebook

**WWW based access to EMSL data and meta-data**
**Automation of data/metadata input from instruments and calculations**
**Querying/ Searching**
**Simple, secure access to full datasets**
**Interactive input of results into notebook from the WWW**
**Rich media types (text, images, files, 3D structures, voice, animations, video, ...)**
**Extensible - 3rd party API for new data types**

## A Common Architecture

-       Notebook Client

- OODBMS

- RDBMS

- Files

- Common
-  Notebook
-  Engine

- Data Storage
-  Interface

- Resource Discovery
- Signing
- ...

- CORBA
- HTTP
- JAVA

- Advanced
- Features

- Data
- Acquisition
- Systems (many)

- Input interfaces (few)

- migrated
- Advanced
- Features

## How Does it Work?

- Server - Perl/cgi
- generates html on the fly
- Client - java
- application and/or applets
- Communication
- Sockets and http

- Security
- DFSWeb/cookies
- Signed Applets/Certificates
- SSL - https
- Export/Import
- multi-part mime

## Object Diagram

- INOb

- INOb

- NOb

- NObList

**1+**

## NOb Interface

- package eln.nob;
- import java.lang.*;
- import java.io.*;
- import java.awt.*;
- import java.util.*;
- public interface INOb {
-   public Object get(String key);
-   public Object put(String key, Object value);
-   public Enumeration keys();
-   public void remove(String key);
- }

## Notebook Object Fields

- String authorName
- String objectID
- String dateTime
- String label
- MIME dataType
- Byte data[]
- URL dataRef

- Version
- OID
- Instrument ID
- Author Certificate
- Author DN
- NB Engine DN
- NB Certificate
- Signature - author
- Signature - witness
- Signature - timestamp

***Defined                                        TBD (non-standard)***

## Notebook Objects and Editors

## Editor/Viewer API

- Bean like
- Extensible - add editors to the CLASSPATH
- Add editors on the fly
- Render any “type” of data

- public interface INBEditor {
-    public Image getIcon();
-    public String getLabel();
-    public void Launch(INOb aNOb);
-    public void setClient(INBClient aClient);
- }

## Viewer Interface

## Signed Applets

- Sandbox - How to get out of it
- Capabilities API

- try {
-          PrivilegeManager.enablePrivilege("UniversalPropertyRead");
-          PrivilegeManager.enablePrivilege("UniversalFileRead");
-       } catch (netscape.security.ForbiddenTargetException e) {
-          System.err.println("\tFailed! Permission to read system properties denied by user.");
-       } catch (Exception e) {
-          System.err.println("\tFailed! Unknown exception while enabling privilege.");
-          e.printStackTrace(System.err);
-       }

**> signtool -k emslCertificate -Z ClientApplet.jar .**

## Certificate Example

## LiveConnect

- Talking from Java to JavaScript
- JSObject jsroot = JSObject.getWindow(theApplet);
-     JSObject jsdocument = (JSObject)jsroot.getMember("document");
- Using JavaScript to get and set cookies

-  public String getCookies() {
-     Object tmpCookies = mJsDocument.getMember("cookie");
-     String cookies = tmpCookies.toString();
-     return cookies;
-   }
-   public void setCookies(String[] theCookies) {
-     mJsDocument.setMember("cookie", theCookies[0]);
-     mJsDocument.setMember("cookie", theCookies[1]);
-   }

## Export/Import

- Export Nobs and NobLists to well-defined multi-part mime
- Read and write Mime from Java
- Use internally written encoders/decoders

## EMSL Collaboratory Details

**EMSL Collaboratory Details**

**Jim Myers**
**Brett Didier**
**Ken Yates**

**Elena Mendoza**
**Shelly Harris**
**Shawn Merriman**

**Debbie Payne**
**Tom Valdez**
**Kelly Keating**
**Ray Bair**

**http://www.emsl.pnl.gov:2080/docs/collab**

**Web Address**

## For more information	

- Java-dev@emsl.pnl.gov
- C&IS Technical Exchange 5/19/98 9:00am EMSL
- Send me mail
- http://www.emsl.pnl.gov:2080/docs/collab

## Acknowledgments

- U.S. Department of Energy
- Mathematical, Information and Computational Sciences Division of the Office of Energy Research
- Office of Biological & Environmental Research of the Office of Energy Research
- Pacific Northwest National Laboratory (PNNL) Laboratory Directed Research and Development (LDRD)

- Pacific Northwest National Laboratory is a multiprogram national laboratory operated by Battelle Memorial Institute for the U.S. Department of Energy under Contract DE-AC06-76RLO 1830.