Python for Scientific Gateways Development Randy Heiland 1

  • Slides: 19
Download presentation
Python for Scientific Gateways Development Randy Heiland 1, Sean D. Mooney 1, Keith Jackson

Python for Scientific Gateways Development Randy Heiland 1, Sean D. Mooney 1, Keith Jackson 2, Joshua Boverhof 2, Maciek Swat 1, Ariel Balter 1, Marcus Christie 1, Joseph Insley 3 GCE Workshop Supercomputing 2007 1 -Indiana University, 2 -Lawrence Berkeley Lab, 3 -Argonne National Lab

Gateway Development: A landscape of technologies Java C# OGCE Grid. Sphere Blogs Web Services

Gateway Development: A landscape of technologies Java C# OGCE Grid. Sphere Blogs Web Services Web 2. 0 Globus XML i. Google

Background and Motivation • http: //communitygrids. blogspot. com/2007/02/rethinking-science-gateways. html “Rethinking Science Gateways” …many science

Background and Motivation • http: //communitygrids. blogspot. com/2007/02/rethinking-science-gateways. html “Rethinking Science Gateways” …many science gateways would undoubtedly benefit from “agile development” rather than “enterprise development” practices. This is because many science teams cannot afford specialized Web and Grid developers. They would instead like to build gateways themselves. Such would-be gateway developers typically possess a great deal of programming knowledge but are more likely to be driven by practical applications rather than the desire to build elegantly architected software. …

Gateway Development: A landscape of technologies Python Java C# OGCE Grid. Sphere Blogs Web

Gateway Development: A landscape of technologies Python Java C# OGCE Grid. Sphere Blogs Web Services Web 2. 0 Globus XML i. Google

Python • Released in 1991 by Guido van Rossum (at Google since Dec ‘

Python • Released in 1991 by Guido van Rossum (at Google since Dec ‘ 05; 50% time on Python) • • Dynamically typed, Strongly typed, Auto memory mgt High-level lng; Syntax (minimal, clean) Interpreted; Interactive ( rapid prototyping/development) Glue-iness, Wrap-ability (e. g. , www. swig. org) Ci. SE Introspection May/June 2007 History with science apps Vibrant communities and evolving language

Gateways: Two basic approaches • Web browser-based • Application, client-server Tera. Grid Science Gateway

Gateways: Two basic approaches • Web browser-based • Application, client-server Tera. Grid Science Gateway is defined as “a community interface that enables access to high end resources, usually through a web portal or desktop client server arrangement”

Some Python-related tools for a scientific gateway Num. Py UCSF Chimera, VMD, Py. MOL

Some Python-related tools for a scientific gateway Num. Py UCSF Chimera, VMD, Py. MOL Compu. Cell 3 D ZSI, py. Globus, py. Grid. Ware Sci. Py Biopython VTK, Para. View, matplotlib Turbo. Gears, django SWIG, SIP Pyrex Vis. Trails Numerical module providing array objects Molecular graphics and modeling Environment for cell-based modeling Web services toolkit, Interface to GT, WSRF toolkit Science and engineering modules Tools for computational molecular biology Scientific visualization, 2 D plotting Web development frameworks Tools for wrapping code in Python Tool for writing extension modules in C Scientific workflow system

Application Client-Server using Web services (SOAPpy, ZSI) lifescienceweb. org chembiogrid. org

Application Client-Server using Web services (SOAPpy, ZSI) lifescienceweb. org chembiogrid. org

Web browser gateway: Turbo. Gears - Web dev framework (in Python) • Open source

Web browser gateway: Turbo. Gears - Web dev framework (in Python) • Open source Model-View-Controller • AJAX w/ Mochi. Kit • Model: SQLObject • JSON • View: Kid templating • Controller: Cherry. Py • Apache HTTP, My. SQL In addition to Turbo. Gears, may also try django, another Python Web dev framework.

Getting started - trivial $ tg-admin quickstart - prompted for proj name $ start-<proj>.

Getting started - trivial $ tg-admin quickstart - prompted for proj name $ start-<proj>. py

Turbo. Gears “extras” - usual widgets: input fields, checkboxes, tables, etc. - more complex

Turbo. Gears “extras” - usual widgets: input fields, checkboxes, tables, etc. - more complex widgets

ZSI - Python Web services • Python pkg implementing SOAP 1. 1 spec •

ZSI - Python Web services • Python pkg implementing SOAP 1. 1 spec • Generates stubs for client & server, from a WSDL: $ wsdl 2 py $ wsdl 2 dispatch (refer to Nws example in paper)

Compu. Cell 3 D - NIH funded project • Cell-based tissue simulation environment Testbed

Compu. Cell 3 D - NIH funded project • Cell-based tissue simulation environment Testbed for parameter sweeps on HPC via gateway(s)

Security • Out-of-the-box solution using Grid Security Infrastructure (GSI) authentication • Assumes: GSI file

Security • Out-of-the-box solution using Grid Security Infrastructure (GSI) authentication • Assumes: GSI file systems (e. g. /etc/grid-security) on host computer, a newer version of M 2 Crypto (>=0. 16) installed, client certificate exists and has been imported into browser

Non-Python components using AJAX • Javascript widgets (Mochi. Kit, Yahoo UI, Dojo, etc. )

Non-Python components using AJAX • Javascript widgets (Mochi. Kit, Yahoo UI, Dojo, etc. ) talk to Java backend • Apache HTTP server ~ Apache Tomcat • (rf. paper)

Conclusion • Python (+pkgs) provides viable options for building scientific gateways. • Because Python

Conclusion • Python (+pkgs) provides viable options for building scientific gateways. • Because Python is already being used by many scientific communities, these researchers can build/maintain their own, lightweight, focused gateways. • But wait, there’s more…

Python and Education • OLPC project bundled with Python 2. 5 • Potential new

Python and Education • OLPC project bundled with Python 2. 5 • Potential new generation of Python programmers worldwide • ~1 M/month in 2008 laptopgiving. org

Thanks! Acknowledgements: Partial funding through the IPCRES Initiative grant from the Lilly Endowment.

Thanks! Acknowledgements: Partial funding through the IPCRES Initiative grant from the Lilly Endowment.

Addendum • For a Python IDE, we recommend using Eclipse with the Py. Dev

Addendum • For a Python IDE, we recommend using Eclipse with the Py. Dev plugin. • Other options include Wing (commercial) and IDLE (bundled w/ Python)