1 / 29

Tools for Developing Grid Applications

Tools for Developing Grid Applications. Ed Seidel, Gabrielle Allen, and GridLab Team Center for Computation & Technology, LSU Albert-Einstein-Institute, Germany. Center for Computation & Technology (CCT), LSU. Ed Seidel, Director Core funding from state of $9M

knoton
Télécharger la présentation

Tools for Developing Grid Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tools for Developing Grid Applications Ed Seidel, Gabrielle Allen, and GridLab Team Center for Computation & Technology, LSU Albert-Einstein-Institute, Germany

  2. Center for Computation & Technology (CCT), LSU • Ed Seidel, Director • Core funding from state of $9M • Drive new efforts in research, education and economic development • Facilities: supermike, NLR, LONI • Research groups in CS and computational sciences, e.g. • Grid computing, Computational frameworks, Scientific visualization, Collaborative environments • Astro, Climate, Bio, Petro, …

  3. GridLab Project Vision • Goals • Enable all Apps to take full advantage of Grids • Develop tools for non-Grid programmers to create Apps, services to enable them • Unlock innovative power of Grids with new paradigms • Automatic resource discovery, distribution of tasks, spawning, migration, reconfiguration, DDDAS, collaboration… • Address growing frustration: Apps don’t receive enough attention, can’t do anything new on Grids • Grid Application Toolkit (GAT) • Abstracts services at application level, for application developers: simple • Makes apps ind. of any infrastructure, endowed with grid capabilities • Tool to enable all our wild SC demos and more for all users, w/o reference to particular infrastructure or services • Lead way for standard • Many such projects now: CoG, DRMAA, GridRPC, dozen talks last week… • Parallel computing ---> MPI; Grid Computing ---> GAT, SAGA

  4. Grid Application Toolkit (GAT) • Application oriented access to Grid capabilities through “standard” API • GATFile_Move(from, to, [details]) • GATResource_FindResource([details]) • GAT_LogicalFile(file, name, [details]) • Independent of Grid infrastructure and available services. • C, C++, Java, [Python], [Perl], [Fortran] • API driver for GGF SAGA-RG

  5. GAT Motivation • Grids and Grid middleware are everywhere • Grid applications are lagging behind, big jump from prototypes and demonstrations to real production use of Grids. • Problems: • Missing or immature grid services • Changing environment • Different and evolving interfaces to the “grid” • Interfaces are not simple for scientific application developers • Application developers accept Grid computing paradigm only slowly

  6. Copy a File: GASS int RemoteFile::GetFile (char const* source, if (source_url.scheme_type == GLOBUS_URL_SCHEME_GSIFTP || char const* target) { source_url.scheme_type == GLOBUS_URL_SCHEME_FTP ) { globus_url_t source_url; globus_ftp_client_operationattr_init (&source_ftp_attr); globus_io_handle_t dest_io_handle; globus_gass_copy_attr_set_ftp (&source_gass_copy_attr, globus_ftp_client_operationattr_t source_ftp_attr; &source_ftp_attr); globus_result_t result; } globus_gass_transfer_requestattr_t source_gass_attr; else { globus_gass_copy_attr_t source_gass_copy_attr; globus_gass_transfer_requestattr_init (&source_gass_attr, globus_gass_copy_handle_t gass_copy_handle; source_url.scheme); globus_gass_copy_handleattr_t gass_copy_handleattr; globus_gass_copy_attr_set_gass(&source_gass_copy_attr, globus_ftp_client_handleattr_t ftp_handleattr; &source_gass_attr); globus_io_attr_t io_attr; } int output_file = -1; output_file = globus_libc_open ((char*) target, if ( globus_url_parse (source_URL, &source_url) != GLOBUS_SUCCESS ) { O_WRONLY | O_TRUNC | O_CREAT, printf ("can not parse source_URL \"%s\"\n", source_URL); S_IRUSR | S_IWUSR | S_IRGRP | return (-1); S_IWGRP); } if ( output_file == -1 ) { printf ("could not open the file \"%s\"\n", target); if ( source_url.scheme_type != GLOBUS_URL_SCHEME_GSIFTP && return (-1); source_url.scheme_type != GLOBUS_URL_SCHEME_FTP && } source_url.scheme_type != GLOBUS_URL_SCHEME_HTTP && /* convert stdout to be a globus_io_handle */ source_url.scheme_type != GLOBUS_URL_SCHEME_HTTPS ) { if ( globus_io_file_posix_convert (output_file, 0, printf ("can not copy from %s - wrong prot\n", source_URL); &dest_io_handle) return (-1); != GLOBUS_SUCCESS) { } printf ("Error converting the file handle\n"); globus_gass_copy_handleattr_init (&gass_copy_handleattr); return (-1); globus_gass_copy_attr_init (&source_gass_copy_attr); } globus_ftp_client_handleattr_init (&ftp_handleattr); result = globus_gass_copy_register_url_to_handle ( globus_io_fileattr_init (&io_attr); &gass_copy_handle, (char*)source_URL, &source_gass_copy_attr, &dest_io_handle, globus_gass_copy_attr_set_io (&source_gass_copy_attr, &io_attr); my_callback, NULL); &io_attr); if ( result != GLOBUS_SUCCESS ) { globus_gass_copy_handleattr_set_ftp_attr printf ("error: %s\n", globus_object_printable_to_string (&gass_copy_handleattr, (globus_error_get (result))); &ftp_handleattr); return (-1); globus_gass_copy_handle_init (&gass_copy_handle, } &gass_copy_handleattr); globus_url_destroy (&source_url); return (0); }

  7. Copy a File: CoG/RFT package org.globus.ogsa.gui; TransferRequestType transferRequest = new TransferRequestType (); transferRequest.setTransferArray (transfers1); import java.io.BufferedReader; import java.io.File; int concurrency = Integer.valueOf import java.io.FileReader; ((String)requestData.elementAt(6)).intValue(); import java.net.URL; import java.util.Date; if (concurrency > transfers1.length) import java.util.Vector; { import javax.xml.rpc.Stub; System.out.println ("Concurrency should be less than the number" import org.apache.axis.message.MessageElement; "of transfers in the request"); import org.apache.axis.utils.XMLUtils; System.exit (0); import org.globus.* } import org.gridforum.ogsi.* transferRequest.setConcurrency (concurrency); import org.gridforum.ogsi.holders.TerminationTimeTypeHolder; import org.w3c.dom.Document; TransferRequestElement requestElement = new TransferRequestElement (); import org.w3c.dom.Element; requestElement.setTransferRequest (transferRequest); public class RFTClient { ExtensibilityType extension = new ExtensibilityType (); public static void copy (String source_url, String target_url) { extension = AnyHelper.getExtensibility (requestElement); try { File requestFile = new File (source_url); OGSIServiceGridLocator factoryService = new OGSIServiceGridLocator (); BufferedReader reader = null; Factory factory = factoryService.getFactoryPort (new URL (source_url)); try { GridServiceFactory gridFactory = new GridServiceFactory (factory); reader = new BufferedReader (new FileReader (requestFile)); } catch (java.io.FileNotFoundException fnfe) { } LocatorType locator = gridFactory.createService (extension); Vector requestData = new Vector (); System.out.println ("Created an instance of Multi-RFT"); requestData.add (target_url); TransferType[] transfers1 = new TransferType[transferCount]; MultiFileRFTDefinitionServiceGridLocator loc RFTOptionsType multirftOptions = new RFTOptionsType (); = new MultiFileRFTDefinitionServiceGridLocator(); RFTPortType rftPort = loc.getMultiFileRFTDefinitionPort (locator); multirftOptions.setBinary (Boolean.valueOf ( ((Stub)rftPort)._setProperty (Constants.AUTHORIZATION, (String)requestData.elementAt (0)).booleanValue ()); NoAuthorization.getInstance()); multirftOptions.setBlockSize (Integer.valueOf ( ((Stub)rftPort)._setProperty (GSIConstants.GSI_MODE, (String)requestData.elementAt (1)).intValue ()); GSIConstants.GSI_MODE_FULL_DELEG); multirftOptions.setTcpBufferSize (Integer.valueOf ( ((Stub)rftPort)._setProperty (Constants.GSI_SEC_CONV, (String)requestData.elementAt (2)).intValue ()); Constants.SIGNATURE); multirftOptions.setNotpt (Boolean.valueOf ( ((Stub)rftPort)._setProperty (Constants.GRIM_POLICY_HANDLER, (String)requestData.elementAt (3)).booleanValue ()); new IgnoreProxyPolicyHandler ()); multirftOptions.setParallelStreams (Integer.valueOf ( (String)requestData.elementAt (4)).intValue ()); int requestid = rftPort.start (); multirftOptions.setDcau(Boolean.valueOf( System.out.println ("Request id: " + requestid); (String)requestData.elementAt (5)).booleanValue ()); } int i = 7; catch (Exception e) for (int j = 0; j < transfers1.length; j++) { { System.err.println (MessageUtils.toString (e)); transfers1[j] = new TransferType (); } } transfers1[j].setTransferId (j); } transfers1[j].setSourceUrl ((String)requestData.elementAt (i++)); transfers1[j].setDestinationUrl ((String)requestData.elementAt (i++)); transfers1[j].setRftOptions (multirftOptions); }

  8. Copy a File: GAT/C++ #include <GAT++.hpp> GAT::Result RemoteFile::GetFile (GAT::Context context, std::string source_url, std::string target_url) { try { GAT::File file (context, source_url); file.Copy (target_url); } catch (GAT::Exception const &e) { std::cerr << "Some error: " << e.what() << std::endl; return e.Result(); } return GAT_SUCCESS; }

  9. GAT API layer between applications and the grid infrastructure: Higher level application oriented APIs, hide complexity, abstract grid functionality Insulate against Rapid evolution of grid infrastructure State of Grid deployment Choose between different grid infrastructures Application developers use and develop for the grid independent of the state of deployment of the grid infrastructure Service developers can make their software available to many different applications. GAT Solution

  10. Example: Remote File Copying Application “Copy my file from there to there ..” SOAP WSDL Corba OGSA Other Monitoring Profiling Information Logging Security Notification Resource Management Application Manager Migration Data Management GLOBUS Other Grid Infrastructure?

  11. Example: Remote File Copy GAT:File.Copy cp scp gsiscp sftp RFT wget gridftp newest Project Specific GridLab GridJIT

  12. Example: Remote File Copy GAT:File.Copy #include <GAT++.hpp> GAT::Result RemoteFile::GetFile (GAT::Context context, std::string source_url, std::string target_url) { try { GAT::File file (context, source_url); file.Copy (target_url); } catch (GAT::Exception const &e) { std::cerr << "Some error: " << e.what() << std::endl; return e.Result(); } return GAT_SUCCESS; } cp scp gsiscp sftp RFT wget gridftp newest Project Specific GridLab GridJIT

  13. Grid Application Toolkit • Standard API and Toolkit for developing portable Grid applications independently of the underlying Grid infrastructure and available services • Implements the GAT-API • Used by applications (different languages) • GAT Adaptors • Connect to capabilities/services • Interchangeable adaptors can be loaded/switched at runtime • GAT Engine • Provides the function bindings for the GAT-API

  14. GridLab Architecture

  15. GAT API Scope • Files (GATLogicalFile, …) • Resource Management (GATResourceDescription...) • Monitoring, Events (GATRequestNotifier) • Information exchange (GATAdvertisable) • Utility classes (error handling, security, preferences) (GATStatus) • ~ Few Dozen APIs. Not more! Keep it simple! • Provide simple functionality which allow us to focus on applications and science.

  16. Example: Spawn a Subtask GAT::Table sdt; sdt.add ("location", "/bin/date"); GAT::Table hdt; hdt.add ("machine.type", "i686"); GAT::SoftwareDescriptionsd (sdt); GAT::HardwareResourceDescriptionhrd (hdt); GAT::JobDescription jd (context, sd, hrd); GAT::ResourceBroker rb (context, prefs); GAT::Job j = rb.submit (jd);

  17. Implementation • C, C++ version fully implemented • Java version 80% complete • Python, Perl, Fortran to follow • Focus: portability, lightness, flexibility, adaptivity • Adaptors • This is where the hard part is! But can be done in week… • Multiple adaptors can be loaded at runtime • Local adaptors done (cp, mv, fork, rm, sockets, etc) • Many remote service adaptors finished (GRAM, gridftp, scp, GRMS, mercury, Unicore, etc) • Other Unicore, Globus, Condor, DRMAA, Sun Grid Engine started or about to be

  18. Dynamic Grid Computing • Migration: “Cactus Worm” demonstrated SC00 • Launch Black Hole Collision Job • Run awhile, write checkpoint • Migrate itself to next site • User tracks/steers • Proof of concept, but dirty hack • No external services! Used ssh! • Created our community! • Spawning: SC01 • App invokes “Spawner” • Analysis tasks outsourced • Globus enabled login, data transfer • It worked! Pioneering application, “grid” hacked…

  19. Many Projects Using GAT now… • UCoMS (Petroleum Engineering, CS) • Deploy sensor networks across Gulf • Data collected to provide input to simulations, tasks farmed out • Results collected (transmitted back) • http://www.ucoms.org • SCOOP • Data coming in from sensors all over Gulf Realtime Operational Grid • Feeds in to models on Grid sites

  20. GGF SAGA-RG • We want an Application standard, available everywhere • So does everyone else: Grid Application Tools Workshop, dozen talks all saying same thing • Current Grid Service APIs too low level, keep changing, not App oriented • Numerous attempts to address: GAT most ambitious, but also CoG, DRMAA, GridRPC, many others • SAGA: Simple API for Grid Applications • Bringing all these efforts together • Chicago, Berlin, Brussels, … • Led by Keith Jackson (LBL), Hrabi Rajic (Intel) (probably), Tom Goodale (LSU), [Stephen Pickles, (Manchester)]

  21. SAGA Brussels Meeting • Very Inspiring! • Wide agreement that this should be done if possible • Strong hope that it can be done • Vendors agreed to implement if it is done • Workshops and panel discussions unanimous • Vendors: Intel, HP, Platform, United Devices, Sun, others • Many large projects interested, some committed: EGEE, GEMMS, GridLab, NAREGI, NextGrid, Simdat, D-Grid, OMII, etc • Design Team • Meet in December for 5 days • 1 group at LSU, 1 group in Europe, perhaps Asia? • Tag team effort via access grid • Try to come up with a spec in advance of GGF13 • GAT should evolve quickly to this

  22. Finally • GridLab: http://www.gridlab.org • Grid Application Toolkit • http://www.gridlab.org/GAT • Documentation, publications, software download • GridSphere: http://www.gridsphere.org • GGF “Simple API for Grid Applications” (SAGA) Research Group • http://forge.gridforum.org/projects/saga-rg • CCT hiring in all areas: Deputy director, Researchers: Grid computing, computational frameworks, portals, scientific visualization, Cluster and Grid administrators, Application scientists, Graduate students

  23. Task Farming on the Grid TFM implemented in Cactus TFM GAT used for starting remote TFMs TFM TFM Designed for the Grid TFM TFM Tasks can be anything

  24. GridLab Project • EU Funded by 5th Framework (January 2002): • $7M project across many countries • PSNC, AEI, ZIB, MASARYK, VU, SZTAKI, ISUFI, Cardiff, NTUA, Chicago, ISI, Wisconsin, Sun, Compaq • Review last Friday in Brussels • 12 Work Packages covering: • Grid Portals • Mobile Users • Different Grid Services • Applications • Numerical Relativity (Cactus) • Gravitational Waves (Triana) • All others… • Europe-wide Test Bed • Grid Application Toolkit (GAT)

  25. Black Holes on the Grid • Task farm small Cactus black hole simulations across testbed • Parameter survey: black hole corotation parameter • Results steer a large production black hole simulation

  26. Demonstration

  27. SCOOP: Hurricanes on Grid • SURA (NOAA) Project • Data coming in from sensors all over Gulf Realtime Operational Grid • Feeds in to models on SuperMike and other Grid sites • Indication of strengthening storm changing direction: Must Act! • Multiple simulations, expertise, and data connected together: FL, LA, notification, steering sensors • Early warning, preparation: • Insurance industry, petroleum industry, local economy all save millions, lives saved LSU, GoMOOS, Texas A&M, UaH, UNC, U. Florida, U. Miami, VIMS

  28. GAT API Subsystems

More Related