Grid computing and petecomputing have common roots in efforts aiming at overcoming limitations of supercomputing. This talk, based on the research in the framework of the European Grid projects presents some results which potentiall may be adapted in petacomputing for running large multiscale applications in interactive way, as well as for development of new programming paradigms and tools. First, we present a unified architecture of Grid services and a tool environment for interactive compute- and data-intensive applications together with a tool for online, interactive performance analysis (G-PM) combined with online monitoring of Grid applications (OCM-G). Often large scale applications, which combine both time and event driven simulation may be coupled together with HLA and we have elaborated an integrated framework (G-HLAM) for running High Level Architecture (HLA) distributed large-scale simulations on the Grid. Our solution of abstract workflow composition in an semantic Grid environment as well as a concept and prototype of a distributed, scalable, semantic-based and Grid-enabled registry for storing information about Grid services may be considered as an approach to programming complex application for petascale systems. This workflow system is accompanied by a P2P tool for monitoring of resources and applications (GEMINI). Distributed component approach is an interesting alternative to service oriented architectures and we have elaborated the MOCCA distributed component framework. Our methodology for porting legacy code to Grid systems based on service-oriented architectures (the LGF system) may be also re-used in petacomputing. Finally, we present the Virtual Laboratory which will provide the medical doctors a decision support system to rank drugs targeted at patients, and the virologists - an advanced environment to study trends on an individual, population and epidemiological level.