Team:Freiburg software/Project

From 2009.igem.org

(Difference between revisions)
(Architecture)
(Sequence file import/export)
 
(356 intermediate revisions not shown)
Line 1: Line 1:
-
<html><style>
+
<div style="display: none;"><html><style>
#tabs a.project_active {
#tabs a.project_active {
background-position:0% -42px;
background-position:0% -42px;
Line 7: Line 7:
color:#213340;
color:#213340;
}
}
-
</style></html>
+
</style></html></div>
{{:Team:Freiburg_software/Templates/Header}}
{{:Team:Freiburg_software/Templates/Header}}
-
=Introduction=
+
<div style="text-align: center; margin-top: 15px; float: right;"><html><body><object width="425" height="344"><param name="movie" value="http://davidn.de/youtube.php?url=small"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://davidn.de/youtube.php?url=small" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></body></html>
-
==Motivation==
+
[http://davidn.de/youtube.php?url=large Watch a high resolution version here]
-
==Google Wave==
+
</div>
-
Google Wave is "a personal communication and collaboration tool" developed by Google. It is a web-based service, computing platform, and communications protocol designed to merge e-mail, instant messaging, wikis, and social networking. It has a strong collaborative and real-time focus and provides several ways to extend its functionality.
+
-
Wave basically consists of an open communication protocol similar to email, and client and server-software. Like Email, the protocol aims to be open, decentralized and easy to adapt, but includes modern achievements like real-time-communication and rich formated text with embedded data as well. At the moment, the only working server and client software for Wave is also written by Google, but with the protocol being open-source already, other - Google independent - servers and clients will soon be available.
+
=Motivation=
-
Practically a typical Wave-conversations - called a wavelet - normally works like this:
+
Nowadays, the web offers a wide range of tools to communicate, collaborate and share personal data. People share their pictures with Flickr, students interact in social networks like Facebook, programmers contribute to software projects using platforms like Sourceforge. In contrast, science communication is still making little use of the collaborative world wide web. In particular, synthetic biology is highly inter-disciplinary and requires many scientists to work together in order to build complex biological systems like genes, gene assemblies, synthetic protein devices or later even genomes. From the outset, the synthetic biology community has made efforts to cross-link the results of their research in open repositories and wikis.
-
User Alice creates a new Wavelet. She than invites his friend Bob to join the conversation. Bob accepts and can now write Messages to the wave. Each message creates a so called Blip. What differentiates Wave from normal instant-messaging is, that if Alice and Bob decide to write an Document together, they can start to edit the same Blip together. Each change they make to the text there is shown to the other on in real time. If they want, they can also use a build-in playback feature similar to the version-history in wikis to review the changes made to the wavelet.
+
We want to push this process to the next level: Why only store and share results? Why not making use of the web to collaborate? Scientist could make the whole process transparent, or even better, design and create data together.
-
Additional Google has published an API for writing so called Robots and Gadgets for Wave. While Robots are small programs written in Python or Java, which can participate in Wave similar to normal users, Gadgets are small Webpages that can be embedded into a wave-conversation.
+
=Highlights=
-
That makes Google Wave quite interesting for Systemic Biology: Synthetic biologist work with text most of the time, Google Wave is made for working with text, synthetic biologist need to work together in order to create artificial sequences, protein and later maybe hole genomes, Google Wave is made for working together, synthetic biologist need automated features for their work, Wave offers them via robots.
+
== A collaborative web based software for synthetic biology research ==
-
== BioJava ==
+
We have created an open-source, synthetic biological software suite called SynBioWave. Based on Google's communication tool Wave, SynBioWave is made for collaborative synthetic biology research comprising parts design and documentation. Moreover, biologists can record and share the process of creating research data and perform basic tasks using SynBioWave.
-
[http://www.biojava.org BioJava] is an open source project dedicated to providing a [http://http://www.java.sun.com Java] framework for processing biological data. It provides analytical and statistical routines, parsers for common file formats and allows the manipulation of sequences and 3D structures. The goal of the [http://www.biojava.org BioJava] project is to facilitate rapid application development for bioinformatics.
+
For example, users can start conversations, invite participants, import sequences from several resources, comment data, perform some tasks and display or export the results. Each participant experiences the others' actions in real time. New participants can track back the whole process using the playback function. And all you need is a browser connected to the internet. Could it be easier to invite colleges to your research?
-
Using the scalable, cross-platform, network-aware power of Java technology, researchers at Great Britain's famed Sanger Institute for genetic study have spawned [http://www.biojava.org BioJava]--an open-source project dedicated to providing genomic researchers with a Java technology-based developer's toolkit.
+
== Creating a software interface on top of Google Wave ==
-
[http://www.biojava.org BioJava] offers bioinformatics developers over 1200 classes and interfaces for manipulating genomic sequences, file parsing, CORBA interoperability, and more. The facility is already being used at major research and pharmaceutical centers, and in over 85 countries around the world.
+
<div style="padding-right: 1.5em;">[[Image:Freiburg_software_SynBioWave-SequenceViews.png|left|300px|Sequence views of SynBioWave]]</div>
-
'''Why BioJava ?'''
+
* We created three ways to [[Team:Freiburg_software/Project#How_to_display_sequences|display sequence data]], a short sequence view, a gadget view and a circular view.
 +
* We extended Wave's user interface (ui) with a highly dynamic menu system and added new ui-elements such as an upload form for sequence files.
 +
* To realize an easy to use interface for generating user interfaces, we invented the [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol|qooxWave protocol]]. This protocol defines a client-to-server and server-to-client communication for building ui-elements, event reporting and data transmission.
 +
* The client-side implementation of the [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol|qooxWave protocol]] makes use of the RIA framework [[Team:Freiburg_software/Project#Qooxdoo|qooxdoo]]. To ensure a proper implementation of [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol|qooxWave]], we designed a robust [[Team:Freiburg_software/Project#Client_side_implementation|store-model-view-controller concept]].
 +
* Even though SynBioWave is a web application, its look and feel reminds the user of a desktop application.
-
There are three major frameworks for processing biological data: BioPerl, [http://www.biojava.org BioJava] and [http://biopython.org/wiki/Main_Page BioPhyton].
+
<br style="clear:both;"/>
-
As google wave provides developer APIs both for the Java and the Phyton programming language, there was the decision between [http://www.biojava.org BioJava] and [http://biopython.org/wiki/Main_Page BioPhyton].
+
== Access to a large pool of sequence data ==
-
Why we have choosen the [www.biojava.org BioJava] framework:
+
[[Image:Freiburg software SynBioWave-Sequence IO.png|250px|right|Sequence I/O]]
-
[http://www.biojava.org BioJava] has grown tremendously since its beginnings. The most recent site statistics show 1,264 public classes and interfaces, with over 200,000 lines of code, and over 14 people regularly contributing to the code.  
+
* SynBioWave inherits Wave's feature to handle common data like rich text documents, graphics, music/video and many more.
-
This huge amount of features are summarized and classified in only about 15 interfaces, so they are really simple and intuitively in use.
+
* We spend much effort to implement support for a large range of sequence formats, such as FASTA, GenBank and EMBL.
 +
* SynBioWave imports and exports sequence data from/into files.
 +
* SynBioWave supports DAS access to the iGEM related BioBrick database.
 +
* SynBioWave uses an internal database to track all sequences produced or imported in the working flow.
-
[http://www.biojava.org BioJava] provides objects for all kind of synthetic biologists needs, which there are:
+
Have a look at the [[Team:Freiburg_software/Project#Extending_Google_Wave_I.2FO|I/O section]] to learn more about the features mentioned above.
-
* Basic manipulation of sequences, like translations, building complements and doing multiple sequence alignments.
+
-
* Viewing sequences in different formats, like feature added sequence presentations and circular views.
+
-
* Import and export sequence data in different file formats.
+
-
* Accessing databases like [[biosql:Main_Page|BioSQL]] and [http://www.ensembl.org Ensembl].
+
-
Unlike [http://biopython.org/wiki/Main_Page BioPhyton], [http://www.biojava.org BioJava] is relatively fast and better suitable for greater applications and the amounts of data.
+
== Extendable software suite  ==
-
=Concept=
+
[[Image:Freiburg_software_SynBioWave-Conceptual-Architecture-flowchart.png|left|220px]]
-
Our concept is to create a collaborative software suite called SynBioWave for synthetic biology purpose. SynBioWave is a Google Wave extension using BioJava to add synthetic biology functionality, giving synthetic biological research access to the collaborative and interactive web 2.0.
+
To lay ground for an successful open source project, we wrapped our efforts into an easy to implement framework, allowing developers to contribute to SynBioWave. One key feature of this framework is an abstract template class that allows the user to create robots, providing new features, without thinking about sequence I/O, GUI or display issues.
-
SynBioWave makes use of Wave's powerful communication and collaboration functionality and is designed to be be easily extended with new synthetic biology functionality. Mashing up the reinvention of the email with a major library for processing synthetic biology data, raises science collaboration to a new level.
+
To demonstrate this extensible concept, we added one additional robot providing the feature of a Blast search. It turned out, that our concept works! The implementation is really easy. Have a look at the [[Team:Freiburg_software/Code/BlastRobotServlet.java|code]].
-
Our small team of three developers will not be able to create a full-value synthetic biology software by iGEM Jamboree 2009. Our goal is to lay the foundation for a robust software suite and to implement some basic synthetic biological functionality.
+
Have a look at the [[Team:Freiburg_software/Project#Architecture|software architecture]] to explore our framework.
-
== SynBioWaves' key features ==
+
<br style="clear:both;"/>
-
* open source, free web application accessible from every computer connected to the internet
+
== Pioneering spirit ==
-
* strong communication and collaboration functionality
+
-
* basic synthetic biology functionality
+
-
* easy to extended with additional synthetic biology functionality
+
-
==The road to success==
+
[[Image:Freiburg software SynBioWave-layers.png|300px|right|Layers of SynBioWave]]
-
For addressing a wide audience of users and contributers, SynBioWave is published under a free licence. This will attract other developers creating new functions or modify the software for their own purpose.
+
To our knowledge, SynBioWave is currently the only approach to write a collaborative web-based biological software, as well as the only bigger project based on Google Wave.  
-
One of the key goals of SynBioWave is the feature of easy-extendibility. We want to create a framework that allows other developers to contribute new biosynthetic functionality with a minimum knowledge of Wave development. For this purpose SynBioWave offers a abstract Robot Class which can be regarded as a template for biosynthetic functions. This concept has very nice side-effect: SynBioWave can be easily customized by adding and removing robots which represent certain function.
+
When we first heard of Google Wave, we instantly noticed it could be the solid basis we were looking for to build such a next level biological software suite. When we got access to its developer preview version later, it confirmed our choice, but soon we noticed that we would need a lot of features not yet build-in in Wave, some not yet even planned.  
-
SynBioWave will not only be a simple mashup, a synthetic biological software running inside a wavelet. It will be a perfect symbioses of Wave and BioJava. The look and feel of SynBiowave will perfectly fit in the Wave concept. Waves real-time-editing, multi-user-editing functions as well as the playback function must work in harmony with SynBioWave. This sounds quite trivial. But looking at the current Wave extensions gives reason to be concerned about this.
+
We are the first (and maybe only) developers creating a project consisting of multiple Wave-Robots and therefore had to think about a way to make these robots communicate with each other. Google has not foreseen this need of Robot-Robot-Communication and has not even decided to add this to their Robot-API.
-
== Benefits of the symbioses==
+
=Existing technologies=
 +
==Google Wave==
-
Building SynBioWave as mashup of Wave and BioJava brings up certain benefits:
 
-
* no need for building the whole application from scratch
 
-
* get the communication and collaboration features for nothing (wave)
 
-
* get multi-user editing for nothing (wave)
 
-
* get real-time editing for nothing (wave)
 
-
* as a web application, SynBioWave can be accessed from any computer connected to the internet.
 
-
* get many key bio features for nothing (biojava)
 
-
* robust and high quality software basis
 
-
* As Google's latest child, wave is going to be talked of a lot. As one of the first application using google wave, SynBioWave has probably a huge audience
 
-
==challenge and difficulties==
+
Google Wave is "a personal communication and collaboration tool" developed by Google. It is a web-based service, computing platform, and communication protocol designed to merge e-mail, instant messaging, wikis, and social networking. It has a strong collaborative and real-time focus and provides several ways to extend its functionality.[[#References|<small><sup>[1]</sup></small>]]
-
* With the begin of SynBioWave's development, wave is in a very unstable Alpha version available. Even the API is still weak and might change. There is not much documentation and discussion yet.
+
-
* developing a collaborative web application faces programmers special challenges and difficulties. For example, multi-user editing and real-time editing issues the challenge of synchronisation user input. What happens, for example, if two user submit contrary input at the same time?
+
-
=The Software=
+
Wave basically consists of an open communication protocol similar to email, as well as of client- and server-software. Like email, the protocol aims to be open, decentralized and easy to adapt, but includes modern achievements like multi-user-, real-time-communication and rich formated text with embedded data as well. At the moment, the only working server and client software for Wave is also written by Google, but with the protocol being open-source already, other - Google independent - servers and clients will soon be available.
 +
 
 +
[[Image:Freiburg_software_Wave-example.png|left|364px]]
 +
 
 +
Practically, a typical Wave-conversations - called a wavelet - usually works like this:
 +
User Alice creates a new Wavelet. She than invites her friend Bob to join the conversation. Bob accepts and can now write messages to the wave. Each message creates a so-called Blip. What differentiates Wave from normal instant-messaging is, that if Alice and Bob decide to write a document together, they can start to edit the same Blip together. Each change they make to the text there is shown to the other one in real time. If they want, they can also use a build-in playback feature similar to the version-history in wikis to review the changes made to the wavelet.
 +
 
 +
In addition, Google has published an API for writing so-called Robots and Gadgets for Wave. While Robots are small programs written in Python or Java, which can participate in Wave similar to normal users, Gadgets are small web pages that can be embedded into a wave conversation.
 +
 
 +
If you want to know more about how we extend and modified this tool to match the needs of synthetic biologists, have a look at the [[Team:Freiburg_software/Project#Software|Software]] section of this document.
 +
 
 +
==BioJava==
 +
 
 +
[http://www.biojava.org BioJava] is an open source project dedicated to providing a Java framework for processing biological data. It provides analytical and statistical routines, parsers for common file formats and allows the manipulation of sequences and 3D structures. The goal of the BioJava project is to facilitate rapid application development for bioinformatics.
 +
 
 +
Having the choice between BioJava und [http://biopython.org BioPhyton] (the only two programming languages supported by Google Wave), we decided to use BioJava because of its faster growing and better supported library and the scalable, cross-platform and network-aware nature of the Java programming language.
 +
 
 +
For insights into the usage of BioJava in our software, have a look at section [[Team:Freiburg_software/Project#Extending_Google_Wave_I.2FO|Extending Google Wave I/O]].
 +
We plan to integrate support for Python in later versions of SynBioWave.
 +
 
 +
==Qooxdoo==
 +
 
 +
[http://www.qooxdoo.org Qooxdoo] is one of the leading frameworks for creating rich internet application (RIAs). RIAs are web applications which are accessed from the browser and commonly made for multi user tasks. In contrast to usual web sites, RIAs look and feel like desktop applications. Building a RIA from scratch is nearly impossible. Therefore qooxdoo provides a platform-independent development tool chain, a state-of-the-art GUI toolkit and an advanced client-server communication layer.
 +
 
 +
Because Wave's user interface is only weakly customizable, qooxdoo is a perfect candidate to extend Wave's user interface with custom toolbars, buttons, forms, context-menus and much more.
 +
 
 +
Have a look at the [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol|qooxWave protocol]] we created to learn more about how we used qooxdoo in our project.
 +
 
 +
=Software=
==Architecture==
==Architecture==
-
SynBioWave is a Google Wave extension, turning Wave into a biosynthetic Software Suite. There are currently two available methods of extending Google Wave (See [[Team:Freiburg_software/Project#Google_Wave]] for an introduction):
+
SynBioWave turns Google Wave into a biosynthetic software suite. There are currently two available methods for extending Google Wave, and we are making use of both (See [[Team:Freiburg_software/Project#Google_Wave | Google Wave]] for an introduction):
# Robots
# Robots
# Gadgets
# Gadgets
-
We are making use of both!
+
===Robots===
-
'''Robots'''
+
[[Image:Freiburg_software_SynBioWave-Conceptual-Architecture-flowchart.png|right|430px]]
-
Robots are automated participants, able to modify the wavelets' contents they have joined and interact with real participants. Using Google's Java Client library for Robots gives us the possibility to implement biosynthetic functionality provided by the BioJava library. The '''SynBioWave Robot''' can be regarded as the core of our extension. Adding this robot to a wavelet activates SynBioWave. There are ''additional robots'' for specific functions, which can added to a wavlet to activate this certain function. The ''SynBioWave Robot'' is responsible for:
+
Robots are automated participants, able to modify the wavelets' contents they have joined and interact with real participants. Using Google's Java client library for Robots gives us the possibility to implement biosynthetic functionality provided by the BioJava library. We created the '''SynBioWave Robot''' as the core of our extension. Adding this robot to a wavelet activates SynBioWave. There are ''additional robots'' providing specific functions when added to a wavelet. The ''SynBioWave Robot'' is responsible for:
* Organization of all SynBioWave functions represented by ''additional robots''
* Organization of all SynBioWave functions represented by ''additional robots''
-
* extending Wave's user Interface with SynBioWave specific elements using the ''qooxWave protocolo''
+
* Extending Wave's user interface with SynBioWave specific elements using our [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol|qooxWave protocol]]
 +
* Storing the important information written to the wave in an external database
* Providing basic functionality like  
* Providing basic functionality like  
** Import/export of sequences
** Import/export of sequences
Line 111: Line 129:
'''Additional robots extending SynBioWave functionality'''
'''Additional robots extending SynBioWave functionality'''
-
To extend SynBioWave with new biosynthetic functions, one can use additional robots. Adding such a robot to an active SynBioWave wavelet (a wavelet that contains the ''SynBioWave Robot''), enables this function to all users participating in this wave. For SynBioWave users it is very easy to customize and extend SynBioWave. A User searches the robot representing a certain function and adds it to the wavelet he is working with. But this is not the only benefit! This modular architectures makes it very easy for other developers to create additional robots. To facilitate contribution, we provide an abstract '''SynBioWave Template''' class. Using this class simplifies additional robot creation a lot. The developer does not need to worry about Wave development and the SynBioWave integration is really easy. There for, one can concentrate on biosynthetic development.
 
-
==qooxWave protocol==
+
To extend SynBioWave with new biosynthetic functions, one can use additional robots. Adding such a robot to an active SynBioWave wavelet (a wavelet that contains the ''SynBioWave Robot''), enables this function to all users participating in this wave. For SynBioWave users it is very easy to customize and extend SynBioWave. A user searches the robot representing a certain function and adds it to the wavelet he is working with. But this is not the only benefit! This modular architectures makes it very easy for other developers to create additional robots. To facilitate contribution, we provide an abstract '''SynBioWave Template''' class. Using this class dramatically simplifies additional robot creation. The developer neither needs to worry about Wave development nor about SynBioWave integration (a minimal understanding of both is still needed). Therefore, one can concentrate on biosynthetic developments.
 +
 
 +
'''Organizing a multi robot system'''
 +
 
 +
As we were testing this concept of multiple robots in one and the same conversation, it became quite clear that we needed to organize the way the robots work and interact: With different robots all listening to different (or maybe even the same) events - editing text, writing messages and so on - we ended up in great chaos in our initial tests. So we decided to extend our framework to provide a standard in- and output for robots.
 +
For the input part, we created a menu, which dynamically displays all the functions of the robots in the current wave. As Google has not foreseen this need of a standardized and easy-to-use input method for Wave robots, we had to create this from scratch and implemented it using a Gadget. Moreover, we invented the so-called [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol|qooxWave protocol]] for a standardized communication between the robots and this menu gadget.
 +
 
 +
To organize the output of the robots, we created a standardized sequence display. At the moment, the user can choose if he likes to have the sequences either directly in the wave, which feels more "natural", or inside a Gadget, which is currently much more usable because of strict limitations to text-formatting inside Google Wave. Most likely, all sequences will be written directly in the wave in the future as Google has announced to boost the layout options of Wave dramatically.
 +
 
 +
===Gadgets===
 +
 
 +
The SynBioWave robots could be thought of some kind of program logic. They are running somewhere in the cloud, process and organize data. Gadgets come into play, when data such as sequences are displayed inside a Wave. Moreover Gadgets offer the possibility to insert custom user interfaces which are essential for manipulating and managing the biological data. Gadgets are little websites included in a wavelet and communicating with it via Google's Wave API. So you could think of gadgets as some kind of visible objects, that are essential for the integration of biological data into Wave.
 +
 
 +
'''SynBioWave's user interface'''
 +
 
 +
The possibilities Google Wave currently provides to customize its user interface are less then weak. To realize some advanced features like upload forms for DNA sequence files or ,toolbars bundling SynBioWave's functionality we used Gadgets. The SynBioWave robot dynamically creates a gadget containing a toolbar. It adds all user-interface-elements that correspond to functions provided by the SynBioWave robot itself and by additional robots. The Gadgets sends events and input data from the user back to the robots. For this purpose, we introduced the [[Team:Freiburg_software/Project#Bring_it_together:_The_qooxWave_protocol| qooxWave protocol]].
 +
<br style="clear:both;"/>
 +
 
 +
==Bring it together: The qooxWave protocol==
 +
 
 +
[[Image:Freiburg_software_qooxWave-flowchart.png|330px|right]]
 +
 
 +
We invented the qooxWave protocol to realize an easy to use interface for creating graphical user interfaces (GUI) inside a wave from a robot. The general goal is to provide one abstract robot class for implementing new function into SynBioWave (each function is provided by a [[Team:Freiburg_software/Project#Robots|robot]]). The programmer who uses this class does not need to worry about the client side GUI implementation. This protocol ensures easy to use server side function, that automatically builds the client side GUI.
 +
 
 +
The protocol defines a server-to-client and client-to-server communication. This communication contains
 +
* a server-to-client communication for building client-side GUI elements from server side (so a server side robot can create a client side button for example)
 +
* a client-to-server communication for reporting events fired in the client side GUI and to transfer user input data to the robots (so the server knows when the user clicks a button for example)
 +
 
 +
The communication is realized via JSON-Strings that are stored inside a gadgets state object. Both, server (robot) and client (gadget) can access the state object and they can both react on changes of this state object (this is provided by the google wave API).
 +
 
 +
For a detailed description/definition of the qooxWave protocol, we created an [[Team:Freiburg_software/Project/qooxWave-details|external page]], which might be interesting for those deeply interested or planning to write SynBioWave robots.
 +
 
 +
===Client side implementation===
 +
 
 +
[[Image:Freiburg_software_qooxwave-screenshot.png|thumb|qooxdoo inside a gadget]]
 +
 
 +
The client-side implementation of qooxWave is based on a [[Team:Freiburg_software/Project#Qooxdoo|qooxdoo]] application loaded into a gadget inside the Wave (have a look at the screenshot on the right). This qooxdoo application - written entirely in JavaScript - communicates with the [[Team:Freiburg_software/Project#Robots|SynBioWave Robot]] via JSON-Strings using a state object provided by the Wave API. The state object is actually designed for gadget-robot communication. But it only supports String-Data. This is why we use JSON to transmit more complex objects.
 +
 
 +
The qooxdoo application receives a JSON-object from the robot containing a GUI-structure. It parses this object and dynamically adds the ui-elements. On the other hand, the application sends user input back to the robot, also in form of JSON-Strings.
 +
 
 +
As an example, the robot could send a JSON-String containing information about a toolbar, its menu items - let's say just a button labeled upload - and information for an upload form that opens when clicking the button. The JSON-String is modeled into a certain JavaScript object (to be precise: qooxdoo objects) and then displayed by the qooxdoo application. When the user submits the upload form, its data is converted back to a model again, than to a JSON-representation and sent to the robot.
 +
 
 +
'''A Model-View-Controller concept (MVC) for a proper implementation'''
 +
 
 +
[[Image:Freiburg_software_qooxwave-client-mvc.png|right|330px]]
 +
 
 +
The qooxWave protocol enables a complex structure of ui-elements containing each other.<br/> Moreover, there are complex events causing complex user input to be sent to the robots. To ensure a proper client-side implementation, we created a model-view-controler concept inside the qooxdoo application. Qooxdoo brings nice classes and interfaces for realizing a MVC layout. To only mention one: you can use data-binding to bind form data to a javascript object automatically. Have a look at the [http://qooxdoo.org/documentation/0.8/data_binding qooxdoo manual] for this fancy feature.
 +
 
 +
Moreover, we created a store object, that converts the application data into a model; this model is converted into a JSON-String and the other way round. The store receives and sends this JSON-String on any server- or client-side event. This is an additional useful abstraction of the application layout. Again, we use data-binding to bind the model (stored in the store) to the actual user interface objects in the qooxdoo application.
 +
 
 +
As you can see, the client side implementation has a very robust layout and can be easily extended with new features.
 +
 
 +
'''Classes related to the client side implementation'''
 +
 
 +
The client-side implementation is actually a whole qooxdoo application. The entire project can be found at the [http://synbiowave.svn.sourceforge.net/viewvc/synbiowave/trunk/gui/qooxwaveClient/ sourcefourge project side]. The main classes we created for this application are the following:
 +
 
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/Application.js|Application.js]] (main application class)
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/Store.js|Store.js]] (store object to handle and transfer model)
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/Upload.js|Upload.js]] (upload gadget)
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/Download.js|Download.js]] (download gadget)
 +
 
 +
In addition, we created some Wave objects for debugging outside the Wave (Thanks to Fabian Jakobs from the qooxdoo developer team):
 +
 
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/Wave.js|Wave.js]]
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/WaveFactory.js|WaveFactory.js]]
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/State.js|State.js]]
 +
* [[Team:Team:Freiburg_software/Code/qooxdoo/Participant.js|Participant.js]]
 +
 
 +
<br style="clear: both;"/>
 +
 
 +
===Server side implementation===
 +
On the server side i.e. in robots the [[Team:Freiburg_software/Code/MenuItem.java|MenuItem.java]] class is used to generate menus, which are just recursively stored MenuItem instances. As the menu system was and is under rapid development, this class is hold as flexible as possible and therefore not as comfortable as it could be.
 +
The class also contains the functions for creating JSON-String out of these menus, which can be sent to the menu gadget via the wave. Currently, our main SynBioWave-Robot reads these strings of all other robots in the Wave, translates them back into a Java object, and merges all these objects into one menu object, which is finally transmitted to the gadget.
 +
All these processes are automatically performed within our abstract robot class, developers writing SynBioWave robots do not have to care about that.
 +
 
 +
==Extending Google Wave I/O==
 +
 
 +
Over the past few decades rapid developments in genomic and other molecular research technologies and developments in information technologies have merged to produce a tremendous amount of information related to molecular biology. These huge amounts of data lay the ground for the work of synthetic biologists. By analyzing, modifying and extending these sequences, the synthetic biologists are enabled to build new functionalities and potentially whole genomes. Consequently, one basic feature for the work in synthetic biology is to have full access to this pool of sequence data, provided in different formats. As only file sharing was intended for Google Wave, we were forced to extend the build-in servlet functionality of the Google Wave Java API with the needs for file import/export as well as methods for database access.
 +
 
 +
===Sequence file import/export===
 +
 
 +
[[Image:Freiburg software SynBioWave-File IO.png|250px|right|SynBioWave file I/O]]
 +
 
 +
Google Wave robots written in the Java programming language are specialized forms of Java HttpServlets.
 +
We extended the Google Wave robot servlet class capabilities not only to serve robot events but to serve file upload and downloads as well. To assure a very threadsave and robust upload functionality, we based the file upload on the well known apache commons-upload project. To avoid any abuse of the file upload, the file upload is directly connected to the sequence creation and is only used if the file contains sequence information in a supported format. Using the newest BioJava classes for parsing the file upload provides an easy way to extend the amount of supported file formats in the near future.
 +
 
 +
Don't be afraid your sequences could be readable to uninvited people.<br>
 +
Although an additional GnuPG encryption is not implemented yet, all data transfers are enciphered by secure Http (SSL/TLS) connections.
 +
 
 +
===Database access===
 +
[[Image:Freiburg_software_SynBioWave_biobrick.png|right|200px|SynBioWave database access]]
 +
 
 +
<br><br>
 +
SynBioWave currently supports DAS access to the iGEM related BioBrick database. SynBioWave implements a simple name browser for the biological parts and allows the user to directly import the fully annotated sequence into the working process.
 +
<br><br><br>
 +
 
 +
===Internal Database===
 +
[[Image:Freiburg_software_SynBioWave_datastore.png|right|300px|SequenceViews of SynBioWave]]
 +
 
 +
<br><br>
 +
SynBioWave uses an internal database to track all sequences produced or imported in the working flow. With the datastore browser, SynBioWave provides an intuitive user interface to search and reload these sequences. In this early state, Google Wave only supports robots hosted on Google's own AppEngine application server. Thus, we are currently using Google's Datastore to store the sequences. Google announced that this restriction will be retreated in the future, and robots can be hosted anywhere. To ensure the compatibility to any other database provided by the chosen host, we make use of Suns JDO specification or more precisely the apache JDO2 library.<br><br>
 +
 
 +
==How to display sequences==
 +
 
 +
[[Image:Freiburg_software_SynBioWave-SequenceViews.png|right|300px|SequenceViews of SynBioWave]]
 +
 
 +
<br><br>
 +
Nowadays, every application displays text and pictures. A lot of of applications additionally play audio and video data. But there is no native support for displaying sequence data. SynBioWave currently supports three different ways to display your sequences. There is a simple view for short sequences typed or copied directly to the Wave and an embedded gadget view for longer sequences and sequence comparisons like for example in multiple sequence alignments. Both views provide a clearly represented scaling and increased readability by automatically coloring the sequences according to the sequence type. And in the end there is a circular view for displaying fully featured circular DNA as needed for example in displaying vectors and plasmids.<br><br>
 +
 
 +
=Perspective=
 +
==Future releases==
 +
 
 +
Currently, we are planing to continue focusing on the improvement of the framework while Google Wave is still a Preview Version, and adapt it to the new functions Wave will hopefully get in the future.
 +
 
 +
===Version 0.2===
 +
By the time when Wave goes to public and has reached final beta state, we will release Version 0.2 of SynBioWave, which will have a mostly completed, stable and well-documented framework that enables developers to create additional robots even more easily than for the iGEM release. 
 +
 
 +
Improvements planed:
 +
 
 +
'''Framework'''
 +
* Improved Robot-Robot communication, both via Wave and direct URL-connections <sup><small>(1)</small></sup>
 +
* Native bidirectional Robot-Gadget communication without refreshing the gadget <sup><small>(1)</small></sup>
 +
* More simple menu creation in robots i.e. changing the MenuItem-class to an interface and create a class implementation for every available menu item.
 +
* Integrate Callback functions for menu items
 +
* Improved sequence display and manipulation, either in a properly-styled<sup><small>(1)</small></sup> Inline-Blip<sup><small>(1)</small></sup> with scroll bar<sup><small>(1)</small></sup> or in a "wave-y" Gadget. 
 +
* Improving the Model-View-Controller-Concept of the menu-Gadget
 +
* Heavily improving the usability with lots of testing and feedback from biologist<sup><small>(1)</small></sup>
 +
* Improving documentation
-
The qooxWave protocol is introduced to realise an easy to use interface for creating graphical user interfaces (GUI) inside a wave from a robot. The general goal is to provide one abstract robot class for implementing new function into SynBioWave (each function is provided by a robot; see ...). The programmer who uses this class does not need to worry about the client side GUI implementation. This protocol ensures some easy to use server side function, that automatically build the client side GUI.
+
'''BioBrick-Robot '''
 +
* Integration of assembly algorithms
 +
* Support for different Biobrick standards
 +
* Direct part upload to the iGEM server
-
The protocol defines a a server-to-client and client-to-server communication. This communication contains
+
'''Blast-Robot'''
-
* a server to client communication for building client-side GUI elements from server side (so a server side robot can create a client side button for example)
+
* Process the received Blast hits
-
* a client to server communication for reporting events in the client side GUI (so the server knows when the user clicks a button for example)
+
-
The communication is realised via JSON-Strings that are stored inside a gadgets state object. Both, server (robot) an client (gadget) can access the state object and they can both react on changes of this state object (this is provided by the google wave API).
+
'''Other'''
 +
* Some more robots to prove the concept and examples for developers
-
===Building a GUI - Server to Client Communication===
+
===Version 0.3===
-
The JSON-object for building a GUI is stored as a String in wave.getState().get("ui.structure") and defined as follows:
+
Versions 0.3 will make SynBioWave attractive to even more developers by offering them the possibility to write additional robots in Python and by further simplifying the creation of robots with a SynBioWave-Eclipse-plugin. With hopefully many more robots being available at that point, this could be the first release that can be used in labs.  
-
<nowiki>
+
* A Python implementation of the SynBioWave framework
-
  { 'type' : 'ui', 'subitem' : ITEMLIST}
+
* An Eclipse-plugin for SynBioWave developing
-
</nowiki>
+
* Many, many more robots
-
where ITEMLIST is associative Array with ids as keys and ITEM objects as values:
+
-
<nowiki>
+
-
  { 'mySubitemId1' : ITEM, 'mySubitemId2' : ITEM, ...}
+
-
</nowiki>
+
-
where ITEM is of the form
+
-
<nowiki>
+
-
  {
+
-
    'label' : STRING <i>label</i>,
+
-
    'type' : ENUM('toolbar', 'button', 'menu', 'checkbox', 'radio', 'label', 'form') [,
+
-
    'subitem' : ITEMLIST ]
+
-
  }
+
-
</nowiki>
+
-
This protocol has a recursive structure. Each item can have an itemlist as subitem. This provides a basis for creating complex menus, forms and ui elements. The type specifies the element. We will extend the available types from time to time. Have a look at [[Team:Freiburg_software#Item_Structure]] for the available types and which combinations are allowed.
+
-
===Item Structure===
+
===Later Versions===
-
This section gives an overview of the available types for the items described above. It also depends on the type which other keys can be used for the object and which types are allowed for the subitem list.
+
-
* ''''type' : 'ui''''
+
-
** available keys:
+
-
** available subitem types: toolbar, menu, button, checkbox,  form, label
+
-
* ''''type' : 'toolbar''''
+
-
** available keys: subitem
+
-
** available subitem types: button, checkbox, menu
+
-
* ''''type' : 'menu''''
+
-
** available keys: label, subitem
+
-
** available subitem types: button, checkbox, menu
+
-
** submits event/data: TODO
+
-
* ''''type' : 'button''''
+
-
** available keys: label
+
-
** available subitem types: -
+
-
** submits event/data: TODO
+
-
* ''''type' : 'checkbox''''
+
-
** available keys: label, value (true|false)
+
-
** available subitem types: -
+
-
** submits event/data: TODO
+
-
* ''''type' : 'radio''''
+
-
** available keys: label, value (true|false), group (to group radio items to one radiogroup)
+
-
** available subitem types: -
+
-
** submits event/data: TODO
+
-
* ''''type' : 'label''''
+
-
** available keys: label
+
-
** available subitem types: -
+
-
* ''''type' : 'form''''
+
-
** available keys: label, subitem
+
-
** available subitem types: textfield, textarea, checkbox, radio, upload, download
+
-
** submits event/data: many, especially on uploads, downloads | TODO
+
-
* ''''type' : 'textarea''''
+
-
** available keys: label, value
+
-
** available subitem types: -
+
-
* ''''type' : 'textfield''''
+
-
** available keys: label, value
+
-
** available subitem types: -
+
-
* ''''type' : 'upload''''
+
-
** available keys: label, target
+
-
** available subitem types: -
+
-
** submits event/data: TODO | submitted, completed
+
-
* ''''type' : 'download''''
+
-
** available keys: label, target
+
-
** available subitem types: -
+
-
** submits event/data: TODO | ?
+
-
[[Image:Freiburg_software_qooxwave_protocol_flowchart.png]]
+
* Support for own Wave- and Robot-Servers <sup><small>(1)</small></sup>
 +
* All functions typically needed in Synthetic Biology <sup><small>(1)</small></sup>
-
===Building GUI Events - Client to Server Communication===
 
-
The JSON-object for submitting a GUI-Event from client to server is stored as a String in wave.getState().get("ui.<i>idofelemt</i>") and defined as follows:
 
-
...
 
-
===Example of qooxWave ===
 
-
<nowiki>
 
-
    {'type':'ui','label':'ui','subitem':{'0':{'type':'toolbar','label':'toolbar','subitem':
 
-
    {'0':{'type':'menu','label':'DNA','subitem':{'0':{'type':'menu','label':'Import','subitem':
 
-
    {'0':{'type':'button','label':'from File'},'1':{'type':'button','label':'from Database'}}},'1':
 
-
    {'type':'button','label':'Translate'},'2':{'type':'button','label':'Rev-Complement'}}},'1':
 
-
    {'type':'menu','label':'Protein','subitem':{'0':{'type':'button','label':'Import'},'1':
 
-
    {'type':'button','label':'Export'},'2':{'type':'button','label':'Backtranslate'}}},'2':
 
-
    {'type':'button','label':'Titel3'},'3':{'type':'button','label':'Titel4'}}}}}
 
-
</nowiki>
 
-
The above JSON-String creates the following GUI:<br>
 
-
[[Image:Freiburg_software_qooxwave_qooxwave-1.png]]
 
-
==iGEM Release==
+
<sup><small>(1)</small></sup> : currently not supported by Google Wave and/or Google AppEngine, but announced for the future.
-
==Road-map==
+
-
=Guids=
+
=References=
-
==User-guide==
+
[1] Inspired by Wikipedia. [http://en.wikipedia.org/w/index.php?title=Google_Wave&oldid=320807113 Link].
-
==Developer-guide==
+

Latest revision as of 03:38, 22 October 2009

[http://davidn.de/youtube.php?url=large Watch a high resolution version here]

Contents

Motivation

Nowadays, the web offers a wide range of tools to communicate, collaborate and share personal data. People share their pictures with Flickr, students interact in social networks like Facebook, programmers contribute to software projects using platforms like Sourceforge. In contrast, science communication is still making little use of the collaborative world wide web. In particular, synthetic biology is highly inter-disciplinary and requires many scientists to work together in order to build complex biological systems like genes, gene assemblies, synthetic protein devices or later even genomes. From the outset, the synthetic biology community has made efforts to cross-link the results of their research in open repositories and wikis. We want to push this process to the next level: Why only store and share results? Why not making use of the web to collaborate? Scientist could make the whole process transparent, or even better, design and create data together.

Highlights

A collaborative web based software for synthetic biology research

We have created an open-source, synthetic biological software suite called SynBioWave. Based on Google's communication tool Wave, SynBioWave is made for collaborative synthetic biology research comprising parts design and documentation. Moreover, biologists can record and share the process of creating research data and perform basic tasks using SynBioWave.

For example, users can start conversations, invite participants, import sequences from several resources, comment data, perform some tasks and display or export the results. Each participant experiences the others' actions in real time. New participants can track back the whole process using the playback function. And all you need is a browser connected to the internet. Could it be easier to invite colleges to your research?

Creating a software interface on top of Google Wave

Sequence views of SynBioWave
  • We created three ways to display sequence data, a short sequence view, a gadget view and a circular view.
  • We extended Wave's user interface (ui) with a highly dynamic menu system and added new ui-elements such as an upload form for sequence files.
  • To realize an easy to use interface for generating user interfaces, we invented the qooxWave protocol. This protocol defines a client-to-server and server-to-client communication for building ui-elements, event reporting and data transmission.
  • The client-side implementation of the qooxWave protocol makes use of the RIA framework qooxdoo. To ensure a proper implementation of qooxWave, we designed a robust store-model-view-controller concept.
  • Even though SynBioWave is a web application, its look and feel reminds the user of a desktop application.


Access to a large pool of sequence data

Sequence I/O
  • SynBioWave inherits Wave's feature to handle common data like rich text documents, graphics, music/video and many more.
  • We spend much effort to implement support for a large range of sequence formats, such as FASTA, GenBank and EMBL.
  • SynBioWave imports and exports sequence data from/into files.
  • SynBioWave supports DAS access to the iGEM related BioBrick database.
  • SynBioWave uses an internal database to track all sequences produced or imported in the working flow.

Have a look at the I/O section to learn more about the features mentioned above.

Extendable software suite

Freiburg software SynBioWave-Conceptual-Architecture-flowchart.png

To lay ground for an successful open source project, we wrapped our efforts into an easy to implement framework, allowing developers to contribute to SynBioWave. One key feature of this framework is an abstract template class that allows the user to create robots, providing new features, without thinking about sequence I/O, GUI or display issues.

To demonstrate this extensible concept, we added one additional robot providing the feature of a Blast search. It turned out, that our concept works! The implementation is really easy. Have a look at the code.

Have a look at the software architecture to explore our framework.


Pioneering spirit

Layers of SynBioWave

To our knowledge, SynBioWave is currently the only approach to write a collaborative web-based biological software, as well as the only bigger project based on Google Wave.

When we first heard of Google Wave, we instantly noticed it could be the solid basis we were looking for to build such a next level biological software suite. When we got access to its developer preview version later, it confirmed our choice, but soon we noticed that we would need a lot of features not yet build-in in Wave, some not yet even planned.

We are the first (and maybe only) developers creating a project consisting of multiple Wave-Robots and therefore had to think about a way to make these robots communicate with each other. Google has not foreseen this need of Robot-Robot-Communication and has not even decided to add this to their Robot-API.

Existing technologies

Google Wave

Google Wave is "a personal communication and collaboration tool" developed by Google. It is a web-based service, computing platform, and communication protocol designed to merge e-mail, instant messaging, wikis, and social networking. It has a strong collaborative and real-time focus and provides several ways to extend its functionality.[1]

Wave basically consists of an open communication protocol similar to email, as well as of client- and server-software. Like email, the protocol aims to be open, decentralized and easy to adapt, but includes modern achievements like multi-user-, real-time-communication and rich formated text with embedded data as well. At the moment, the only working server and client software for Wave is also written by Google, but with the protocol being open-source already, other - Google independent - servers and clients will soon be available.

Freiburg software Wave-example.png

Practically, a typical Wave-conversations - called a wavelet - usually works like this: User Alice creates a new Wavelet. She than invites her friend Bob to join the conversation. Bob accepts and can now write messages to the wave. Each message creates a so-called Blip. What differentiates Wave from normal instant-messaging is, that if Alice and Bob decide to write a document together, they can start to edit the same Blip together. Each change they make to the text there is shown to the other one in real time. If they want, they can also use a build-in playback feature similar to the version-history in wikis to review the changes made to the wavelet.

In addition, Google has published an API for writing so-called Robots and Gadgets for Wave. While Robots are small programs written in Python or Java, which can participate in Wave similar to normal users, Gadgets are small web pages that can be embedded into a wave conversation.

If you want to know more about how we extend and modified this tool to match the needs of synthetic biologists, have a look at the Software section of this document.

BioJava

[http://www.biojava.org BioJava] is an open source project dedicated to providing a Java framework for processing biological data. It provides analytical and statistical routines, parsers for common file formats and allows the manipulation of sequences and 3D structures. The goal of the BioJava project is to facilitate rapid application development for bioinformatics.

Having the choice between BioJava und [http://biopython.org BioPhyton] (the only two programming languages supported by Google Wave), we decided to use BioJava because of its faster growing and better supported library and the scalable, cross-platform and network-aware nature of the Java programming language.

For insights into the usage of BioJava in our software, have a look at section Extending Google Wave I/O. We plan to integrate support for Python in later versions of SynBioWave.

Qooxdoo

[http://www.qooxdoo.org Qooxdoo] is one of the leading frameworks for creating rich internet application (RIAs). RIAs are web applications which are accessed from the browser and commonly made for multi user tasks. In contrast to usual web sites, RIAs look and feel like desktop applications. Building a RIA from scratch is nearly impossible. Therefore qooxdoo provides a platform-independent development tool chain, a state-of-the-art GUI toolkit and an advanced client-server communication layer.

Because Wave's user interface is only weakly customizable, qooxdoo is a perfect candidate to extend Wave's user interface with custom toolbars, buttons, forms, context-menus and much more.

Have a look at the qooxWave protocol we created to learn more about how we used qooxdoo in our project.

Software

Architecture

SynBioWave turns Google Wave into a biosynthetic software suite. There are currently two available methods for extending Google Wave, and we are making use of both (See Google Wave for an introduction):

  1. Robots
  2. Gadgets

Robots

Freiburg software SynBioWave-Conceptual-Architecture-flowchart.png

Robots are automated participants, able to modify the wavelets' contents they have joined and interact with real participants. Using Google's Java client library for Robots gives us the possibility to implement biosynthetic functionality provided by the BioJava library. We created the SynBioWave Robot as the core of our extension. Adding this robot to a wavelet activates SynBioWave. There are additional robots providing specific functions when added to a wavelet. The SynBioWave Robot is responsible for:

  • Organization of all SynBioWave functions represented by additional robots
  • Extending Wave's user interface with SynBioWave specific elements using our qooxWave protocol
  • Storing the important information written to the wave in an external database
  • Providing basic functionality like
    • Import/export of sequences
    • Rendering and displaying of sequences
    • Circular view
    • BioBrick communication (searching and importing biological parts)

Additional robots extending SynBioWave functionality

To extend SynBioWave with new biosynthetic functions, one can use additional robots. Adding such a robot to an active SynBioWave wavelet (a wavelet that contains the SynBioWave Robot), enables this function to all users participating in this wave. For SynBioWave users it is very easy to customize and extend SynBioWave. A user searches the robot representing a certain function and adds it to the wavelet he is working with. But this is not the only benefit! This modular architectures makes it very easy for other developers to create additional robots. To facilitate contribution, we provide an abstract SynBioWave Template class. Using this class dramatically simplifies additional robot creation. The developer neither needs to worry about Wave development nor about SynBioWave integration (a minimal understanding of both is still needed). Therefore, one can concentrate on biosynthetic developments.

Organizing a multi robot system

As we were testing this concept of multiple robots in one and the same conversation, it became quite clear that we needed to organize the way the robots work and interact: With different robots all listening to different (or maybe even the same) events - editing text, writing messages and so on - we ended up in great chaos in our initial tests. So we decided to extend our framework to provide a standard in- and output for robots. For the input part, we created a menu, which dynamically displays all the functions of the robots in the current wave. As Google has not foreseen this need of a standardized and easy-to-use input method for Wave robots, we had to create this from scratch and implemented it using a Gadget. Moreover, we invented the so-called qooxWave protocol for a standardized communication between the robots and this menu gadget.

To organize the output of the robots, we created a standardized sequence display. At the moment, the user can choose if he likes to have the sequences either directly in the wave, which feels more "natural", or inside a Gadget, which is currently much more usable because of strict limitations to text-formatting inside Google Wave. Most likely, all sequences will be written directly in the wave in the future as Google has announced to boost the layout options of Wave dramatically.

Gadgets

The SynBioWave robots could be thought of some kind of program logic. They are running somewhere in the cloud, process and organize data. Gadgets come into play, when data such as sequences are displayed inside a Wave. Moreover Gadgets offer the possibility to insert custom user interfaces which are essential for manipulating and managing the biological data. Gadgets are little websites included in a wavelet and communicating with it via Google's Wave API. So you could think of gadgets as some kind of visible objects, that are essential for the integration of biological data into Wave.

SynBioWave's user interface

The possibilities Google Wave currently provides to customize its user interface are less then weak. To realize some advanced features like upload forms for DNA sequence files or ,toolbars bundling SynBioWave's functionality we used Gadgets. The SynBioWave robot dynamically creates a gadget containing a toolbar. It adds all user-interface-elements that correspond to functions provided by the SynBioWave robot itself and by additional robots. The Gadgets sends events and input data from the user back to the robots. For this purpose, we introduced the qooxWave protocol.

Bring it together: The qooxWave protocol

Freiburg software qooxWave-flowchart.png

We invented the qooxWave protocol to realize an easy to use interface for creating graphical user interfaces (GUI) inside a wave from a robot. The general goal is to provide one abstract robot class for implementing new function into SynBioWave (each function is provided by a robot). The programmer who uses this class does not need to worry about the client side GUI implementation. This protocol ensures easy to use server side function, that automatically builds the client side GUI.

The protocol defines a server-to-client and client-to-server communication. This communication contains

  • a server-to-client communication for building client-side GUI elements from server side (so a server side robot can create a client side button for example)
  • a client-to-server communication for reporting events fired in the client side GUI and to transfer user input data to the robots (so the server knows when the user clicks a button for example)

The communication is realized via JSON-Strings that are stored inside a gadgets state object. Both, server (robot) and client (gadget) can access the state object and they can both react on changes of this state object (this is provided by the google wave API).

For a detailed description/definition of the qooxWave protocol, we created an external page, which might be interesting for those deeply interested or planning to write SynBioWave robots.

Client side implementation

qooxdoo inside a gadget

The client-side implementation of qooxWave is based on a qooxdoo application loaded into a gadget inside the Wave (have a look at the screenshot on the right). This qooxdoo application - written entirely in JavaScript - communicates with the SynBioWave Robot via JSON-Strings using a state object provided by the Wave API. The state object is actually designed for gadget-robot communication. But it only supports String-Data. This is why we use JSON to transmit more complex objects.

The qooxdoo application receives a JSON-object from the robot containing a GUI-structure. It parses this object and dynamically adds the ui-elements. On the other hand, the application sends user input back to the robot, also in form of JSON-Strings.

As an example, the robot could send a JSON-String containing information about a toolbar, its menu items - let's say just a button labeled upload - and information for an upload form that opens when clicking the button. The JSON-String is modeled into a certain JavaScript object (to be precise: qooxdoo objects) and then displayed by the qooxdoo application. When the user submits the upload form, its data is converted back to a model again, than to a JSON-representation and sent to the robot.

A Model-View-Controller concept (MVC) for a proper implementation

Freiburg software qooxwave-client-mvc.png

The qooxWave protocol enables a complex structure of ui-elements containing each other.
Moreover, there are complex events causing complex user input to be sent to the robots. To ensure a proper client-side implementation, we created a model-view-controler concept inside the qooxdoo application. Qooxdoo brings nice classes and interfaces for realizing a MVC layout. To only mention one: you can use data-binding to bind form data to a javascript object automatically. Have a look at the [http://qooxdoo.org/documentation/0.8/data_binding qooxdoo manual] for this fancy feature.

Moreover, we created a store object, that converts the application data into a model; this model is converted into a JSON-String and the other way round. The store receives and sends this JSON-String on any server- or client-side event. This is an additional useful abstraction of the application layout. Again, we use data-binding to bind the model (stored in the store) to the actual user interface objects in the qooxdoo application.

As you can see, the client side implementation has a very robust layout and can be easily extended with new features.

Classes related to the client side implementation

The client-side implementation is actually a whole qooxdoo application. The entire project can be found at the [http://synbiowave.svn.sourceforge.net/viewvc/synbiowave/trunk/gui/qooxwaveClient/ sourcefourge project side]. The main classes we created for this application are the following:

In addition, we created some Wave objects for debugging outside the Wave (Thanks to Fabian Jakobs from the qooxdoo developer team):


Server side implementation

On the server side i.e. in robots the MenuItem.java class is used to generate menus, which are just recursively stored MenuItem instances. As the menu system was and is under rapid development, this class is hold as flexible as possible and therefore not as comfortable as it could be. The class also contains the functions for creating JSON-String out of these menus, which can be sent to the menu gadget via the wave. Currently, our main SynBioWave-Robot reads these strings of all other robots in the Wave, translates them back into a Java object, and merges all these objects into one menu object, which is finally transmitted to the gadget. All these processes are automatically performed within our abstract robot class, developers writing SynBioWave robots do not have to care about that.

Extending Google Wave I/O

Over the past few decades rapid developments in genomic and other molecular research technologies and developments in information technologies have merged to produce a tremendous amount of information related to molecular biology. These huge amounts of data lay the ground for the work of synthetic biologists. By analyzing, modifying and extending these sequences, the synthetic biologists are enabled to build new functionalities and potentially whole genomes. Consequently, one basic feature for the work in synthetic biology is to have full access to this pool of sequence data, provided in different formats. As only file sharing was intended for Google Wave, we were forced to extend the build-in servlet functionality of the Google Wave Java API with the needs for file import/export as well as methods for database access.

Sequence file import/export

SynBioWave file I/O

Google Wave robots written in the Java programming language are specialized forms of Java HttpServlets. We extended the Google Wave robot servlet class capabilities not only to serve robot events but to serve file upload and downloads as well. To assure a very threadsave and robust upload functionality, we based the file upload on the well known apache commons-upload project. To avoid any abuse of the file upload, the file upload is directly connected to the sequence creation and is only used if the file contains sequence information in a supported format. Using the newest BioJava classes for parsing the file upload provides an easy way to extend the amount of supported file formats in the near future.

Don't be afraid your sequences could be readable to uninvited people.
Although an additional GnuPG encryption is not implemented yet, all data transfers are enciphered by secure Http (SSL/TLS) connections.

Database access

SynBioWave database access



SynBioWave currently supports DAS access to the iGEM related BioBrick database. SynBioWave implements a simple name browser for the biological parts and allows the user to directly import the fully annotated sequence into the working process.


Internal Database

SequenceViews of SynBioWave



SynBioWave uses an internal database to track all sequences produced or imported in the working flow. With the datastore browser, SynBioWave provides an intuitive user interface to search and reload these sequences. In this early state, Google Wave only supports robots hosted on Google's own AppEngine application server. Thus, we are currently using Google's Datastore to store the sequences. Google announced that this restriction will be retreated in the future, and robots can be hosted anywhere. To ensure the compatibility to any other database provided by the chosen host, we make use of Suns JDO specification or more precisely the apache JDO2 library.

How to display sequences

SequenceViews of SynBioWave



Nowadays, every application displays text and pictures. A lot of of applications additionally play audio and video data. But there is no native support for displaying sequence data. SynBioWave currently supports three different ways to display your sequences. There is a simple view for short sequences typed or copied directly to the Wave and an embedded gadget view for longer sequences and sequence comparisons like for example in multiple sequence alignments. Both views provide a clearly represented scaling and increased readability by automatically coloring the sequences according to the sequence type. And in the end there is a circular view for displaying fully featured circular DNA as needed for example in displaying vectors and plasmids.

Perspective

Future releases

Currently, we are planing to continue focusing on the improvement of the framework while Google Wave is still a Preview Version, and adapt it to the new functions Wave will hopefully get in the future.

Version 0.2

By the time when Wave goes to public and has reached final beta state, we will release Version 0.2 of SynBioWave, which will have a mostly completed, stable and well-documented framework that enables developers to create additional robots even more easily than for the iGEM release.

Improvements planed:

Framework

  • Improved Robot-Robot communication, both via Wave and direct URL-connections (1)
  • Native bidirectional Robot-Gadget communication without refreshing the gadget (1)
  • More simple menu creation in robots i.e. changing the MenuItem-class to an interface and create a class implementation for every available menu item.
  • Integrate Callback functions for menu items
  • Improved sequence display and manipulation, either in a properly-styled(1) Inline-Blip(1) with scroll bar(1) or in a "wave-y" Gadget.
  • Improving the Model-View-Controller-Concept of the menu-Gadget
  • Heavily improving the usability with lots of testing and feedback from biologist(1)
  • Improving documentation

BioBrick-Robot

  • Integration of assembly algorithms
  • Support for different Biobrick standards
  • Direct part upload to the iGEM server

Blast-Robot

  • Process the received Blast hits

Other

  • Some more robots to prove the concept and examples for developers

Version 0.3

Versions 0.3 will make SynBioWave attractive to even more developers by offering them the possibility to write additional robots in Python and by further simplifying the creation of robots with a SynBioWave-Eclipse-plugin. With hopefully many more robots being available at that point, this could be the first release that can be used in labs.

  • A Python implementation of the SynBioWave framework
  • An Eclipse-plugin for SynBioWave developing
  • Many, many more robots

Later Versions

  • Support for own Wave- and Robot-Servers (1)
  • All functions typically needed in Synthetic Biology (1)


(1) : currently not supported by Google Wave and/or Google AppEngine, but announced for the future.

References

[1] Inspired by Wikipedia. [http://en.wikipedia.org/w/index.php?title=Google_Wave&oldid=320807113 Link].