kallio chipster bosc2009

16
Software patterns for better bioinformatics applications: some experiences with Chipster Aleksi Kallio CSC - IT Center for Science [email protected]

Upload: bosc

Post on 05-Feb-2015

1.620 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Kallio Chipster Bosc2009

Software patterns for better bioinformatics applications: some experiences with

Chipster

Aleksi Kallio

CSC - IT Center for Science

[email protected]

Page 2: Kallio Chipster Bosc2009

Background

For several years, our team has been developing and providing service on top of Chipster

Chipster is a client centric distributed system for bioinformatics data analysis, with a focus on microarrays

• User friendly full graphical interface• Supports major array types (Illumina, Affymetrix, Agilent, cDNA)• Comprehensive selection of analysis tool, mostly based on

R/Bioconductor• Possibility to construct (and share) analysis workflows• Written in Java

I will present two software patterns that I consider useful in the context of bioinformatics applications, even though they are purely generic

Page 3: Kallio Chipster Bosc2009
Page 4: Kallio Chipster Bosc2009

Pattern: Graceful GUI blocking

Motivation• It is not feasible to do all GUI actions concurrently (loading

previous sessions, for example)• It is ok for an application to be busy as long as user understands

what's happening Problem statement

• How to gracefully block GUI?• GUI should be updated normally to keep it in sync• User should not be able to mess with the GUI• It should look nice and informative

Page 5: Kallio Chipster Bosc2009

Pattern: Graceful GUI blocking

Solution• Place an opaque layer on top of the main window, with

information on what's happening• The opaque layer consumes all GUI events, blocking user out• Supported by Swing with glass pane feature

Pros• Looks nice• GUI feels more responsive• Simple to implement, also when refactoring old code

Cons• UI is blocked (but that was the motivation for this in the first

place)

Page 6: Kallio Chipster Bosc2009

Pattern: Graceful GUI blocking

// setting upJRootPane rootPane = SwingUtilities.getRootPane(mainFrame);rootPane.setGlassPane(waitPanel);

// implementing waitwaitPanel.startWaiting("Please wait...");Thread backgroundThread = new Thread(new Runnable() { public void run() { try { // do your stuff } finally { waitPanel.stopWaiting(); } }}).start();

Page 7: Kallio Chipster Bosc2009

Pattern: Graceful GUI blocking

Use SwingUtilities.invokeAndWait inside the Runnable.run

WaitGlassPane source available from: http://chipster.svn.sourceforge.net/viewvc/chipster/trunk/src/main/java/fi/csc/microarray/client/waiting/WaitGlassPane.java?revision=111&view=markup

Page 8: Kallio Chipster Bosc2009
Page 9: Kallio Chipster Bosc2009
Page 10: Kallio Chipster Bosc2009
Page 11: Kallio Chipster Bosc2009
Page 12: Kallio Chipster Bosc2009
Page 13: Kallio Chipster Bosc2009
Page 14: Kallio Chipster Bosc2009

Pattern: Self service distributed state management

Motivation• Making a heavily distributed system easy also for administrators

(that's us!)• After 2 years of public service this pattern has proved its worth

and we have been able to concentrate on further development instead of nurturing an ill-behaving service

Problem statement• System should be distributable (for load balancing, multitier

networks / firewalls / DMZ's, ...) WITHOUT a single point of failure

• Typical solutions (brokers, RPC, ...) introduce a single point of failure unless complicated tweaks are done

Page 15: Kallio Chipster Bosc2009

Pattern: Self service distributed state management

Solution• At very low level, use existing technology for distribution with

failover support: message oriented middleware ActiveMQ / JMS• Distribute application level state management to clients: every

client manages distributed state that is related to it (“self-service”) Examples

• When a job is submitted compute services offer to process it and client decides who will get it

• If a file broker is dropped out the client will reload missing data files to other file brokers if needed

Pros• No complex patterns such as 2-phase commits need to be

implemented• State management lifecycle same as the client lifecycle

Cons• Not possible without fat clients

Page 16: Kallio Chipster Bosc2009

Conclusion: in my opinion bioinformatics will benefit from software patterns, both generic and bioinformatics specific

Acknowledgements: Jarno Tuimala, Taavi Hupponen, Petri Klemelä, Mikko Koski, Janne Käki and Eija Korpelainen

For more information see chipster.sourceforge.net Or mail us at [email protected] Or meet us at poster N23 (or E21) on Monday's session

Conclusion