GFAL: Grid File Access Library Salvatore Scifo INFN - Catania Tutorial TriGrid su gLite 3.0 Catania, 27.07.2006
SUMMARY This presentation covers the following points: GFAL Overview GFAL Available APIs GFAL C API Overview GFAL Java API Overview GFAL C API Practical (hands on session) GFAL Java API Practical (hands on session) GFAL References. Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006
GFAL: Introduction What is GFAL for? Grid storage interactions today require using some existing software components: The replica catalog services to locate valid replicas of files in order to : Download them to the user local machine Move them from a SE to another one Make job running on the worker node able to access and manage files stored on remote storage element. The SRM software to ensure: Files existence on disk or disk pool (they are recalled from mass storage if necessary) Space allocation on disk for new files (they are possibly migrated to mass storage later) Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006
GFAL: Main features The GFAL Features Hides interactions to the SRM to the end user Provides a Posix-like interface for File I/O Operation Based on shared libraries (both threaded e unthreaded version) Needs only one header file (gfal_api.h) to write C applications Supports following protocols : file for local access nfs-like dcap, gsidcap and kdcap for dCache access protocol rfio for CASTOR access protocol. Access to SRMs in secure mode, i.e. using a valid Grid proxy obtained by voms-proxy-init command. Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006
GFAL: File Names GFAL works with all Grid types name: Logical File Name (LFN) lfn:baud/testgfal15 Grid Unique IDentifier (GUID) guid:2cd59291-7ae7-4778-af6d-b1f423719441 File Replica (SURL) srm://wacdr002d.cern.ch:8443/castor/cern.ch/user/b/baud/testgfal Transport file name (TURL). rfio:////castor/cern.ch/user/b/baud/testgfal15 Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006
GFAL: Environment Auxiliary linked libraries Environment Variables libcgsi_plugin_gsoap_2.3 libglobus_gss api_gsi_gcc32dbg libglobus_gss_assist_gcc32dbg). Environment Variables LCG_GFAL_VO LCG_GFAL_INFOSYS LCG_CATALOG_TYPE LCG_RFIO_TYPE LFC_HOST LD_LIBRARY_PATH Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006
GFAL: Available API C API Java API (C API Wrapper) The header file gfal_api.h needs to be included in the application source code to get the prototype of the functions. The function names are obtained by prepending gfal_ to the Posix names,for example gfal_open, gfal_read, gfal_close ... The argument lists and the values returned by the functions are identical. The variable errno is set to the Posix Error Codes in the case of failure. Java API (C API Wrapper) It provides three main Java Objects that need to be imported in the java applications in order to hide the underlying C functions. GFalFile : to handle and read/write files GFalDirectory : to handle and manage directories (create, delete, list) GFalUtilities : to manage file (rename, stat, lstat, delete) Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006
GFAL References Examples in gLite3 User Guide (Appendix F) https://edms.cern.ch/file/722398//gLite-3-UserGuide.pdf GFAL C API Description: http://grid-deployment.web.cern.ch/grid-deployment/documentation/LFC_DPM/gfal/html/ GFAL JAVA API https://grid.ct.infn.it/twiki/bin/view/GILDA/APIGFAL GFAL Java API code and libraries: https://grid.ct.infn.it/twiki/pub/GILDA/APIGFAL/GFAL_Java_API.zip On-line JavaDoc of Java API: https://grid.ct.infn.it/twiki/GFAL/ GFAL Excercises (C/Java): https://grid.ct.infn.it/twiki/bin/view/GILDA/UsingGFAL Catania, Tutorial TriGrid su gLite 3.0, 27.07.2006