Grid computing is becoming the preferred basis for large-scale distributed computing and Internet applications. ShanghaiGrid launched in Shanghai, China is a grid infrastructure that aggregates several heterogeneous supercomputers, data centers and other applications scattered in different organizations in Shanghai. One of the major focuses in the ShanghaiGrid project is research and development of an intelligent urban traffic management system based on the ShanghaiGrid system software. The system software provides a platform in a service-oriented way for resource encapsulation and management, service scheduling and accounting, data aggregation and adaptive transmission, as well as service composition and reliability support. This paper presents the main components of the system software, and investigates key techniques for the implementation of ShanghaiGrid and the intelligent urban traffic management system, concentrating on grid transaction and workflow management. Finally, we propose a new wireless sensor network model and routing protocol characteristic to mobile vehicles for dynamical traffic data collection.