Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Kallio Chipster Bosc2009

1,179 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Kallio Chipster Bosc2009

  1. 1. Software patterns for better bioinformatics applications: some experiences with Chipster Aleksi Kallio CSC - IT Center for Science [email_address]
  2. 2. Background <ul><li>For several years, our team has been developing and providing service on top of Chipster </li></ul><ul><li>Chipster is a client centric distributed system for bioinformatics data analysis, with a focus on microarrays </li></ul><ul><ul><li>User friendly full graphical interface </li></ul></ul><ul><ul><li>Supports major array types (Illumina, Affymetrix, Agilent, cDNA)‏ </li></ul></ul><ul><ul><li>Comprehensive selection of analysis tool, mostly based on R/Bioconductor </li></ul></ul><ul><ul><li>Possibility to construct (and share) analysis workflows‏ </li></ul></ul><ul><ul><li>Written in Java </li></ul></ul><ul><li>I will present two software patterns that I consider useful in the context of bioinformatics applications, even though they are purely generic </li></ul>
  3. 4. Pattern: Graceful GUI blocking <ul><li>Motivation </li></ul><ul><ul><li>It is not feasible to do all GUI actions concurrently (loading previous sessions, for example)‏ </li></ul></ul><ul><ul><li>It is ok for an application to be busy as long as user understands what's happening </li></ul></ul><ul><li>Problem statement </li></ul><ul><ul><li>How to gracefully block GUI? </li></ul></ul><ul><ul><li>GUI should be updated normally to keep it in sync </li></ul></ul><ul><ul><li>User should not be able to mess with the GUI </li></ul></ul><ul><ul><li>It should look nice and informative </li></ul></ul>
  4. 5. Pattern: Graceful GUI blocking <ul><li>Solution </li></ul><ul><ul><li>Place an opaque layer on top of the main window, with information on what's happening </li></ul></ul><ul><ul><li>The opaque layer consumes all GUI events, blocking user out </li></ul></ul><ul><ul><li>Supported by Swing with glass pane feature </li></ul></ul><ul><li>Pros </li></ul><ul><ul><li>Looks nice </li></ul></ul><ul><ul><li>GUI feels more responsive </li></ul></ul><ul><ul><li>Simple to implement, also when refactoring old code </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>UI is blocked (but that was the motivation for this in the first place)‏ </li></ul></ul>
  5. 6. Pattern: Graceful GUI blocking // setting up JRootPane rootPane = SwingUtilities.getRootPane(mainFrame); rootPane.setGlassPane(waitPanel); // implementing wait waitPanel.startWaiting(&quot;Please wait...&quot;); Thread backgroundThread = new Thread(new Runnable() { public void run() { try { // do your stuff } finally { waitPanel.stopWaiting(); } } }).start();
  6. 7. Pattern: Graceful GUI blocking <ul><li>Use SwingUtilities.invokeAndWait inside the Runnable.run </li></ul><ul><li>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 </li></ul>
  7. 14. Pattern: Self service distributed state management <ul><li>Motivation </li></ul><ul><ul><li>Making a heavily distributed system easy also for administrators (that's us!)‏ </li></ul></ul><ul><ul><li>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 </li></ul></ul><ul><li>Problem statement </li></ul><ul><ul><li>System should be distributable (for load balancing, multitier networks / firewalls / DMZ's, ...) WITHOUT a single point of failure </li></ul></ul><ul><ul><li>Typical solutions (brokers, RPC, ...) introduce a single point of failure unless complicated tweaks are done </li></ul></ul>
  8. 15. Pattern: Self service distributed state management <ul><li>Solution </li></ul><ul><ul><li>At very low level, use existing technology for distribution with failover support: message oriented middleware ActiveMQ / JMS </li></ul></ul><ul><ul><li>Distribute application level state management to clients: every client manages distributed state that is related to it (“self-service”)‏ </li></ul></ul><ul><li>Examples </li></ul><ul><ul><li>When a job is submitted compute services offer to process it and client decides who will get it </li></ul></ul><ul><ul><li>If a file broker is dropped out the client will reload missing data files to other file brokers if needed </li></ul></ul><ul><li>Pros </li></ul><ul><ul><li>No complex patterns such as 2-phase commits need to be implemented </li></ul></ul><ul><ul><li>State management lifecycle same as the client lifecycle </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Not possible without fat clients </li></ul></ul>
  9. 16. <ul><li>Conclusion: in my opinion bioinformatics will benefit from software patterns, both generic and bioinformatics specific </li></ul><ul><li>Acknowledgements: Jarno Tuimala, Taavi Hupponen, Petri Klemelä, Mikko Koski, Janne Käki and Eija Korpelainen </li></ul><ul><li>For more information see chipster.sourceforge.net </li></ul><ul><li>Or mail us at chipster@csc.fi </li></ul><ul><li>Or meet us at poster N23 (or E21) on Monday's session </li></ul>Conclusion

×