Abstract. Many pervasive inter-vehicular applications involve the collation, processing and summarisation of sensor data originating from vehicles. When and where such processing takes place is an explicit designstage decision. Often some processing occurs on vehicles, and some on backend servers, but it is hard for the programmer to optimise this distribution for feasibility or performance. This paper investigates automated task assignment: we define a computational model which captures data aggregation and summarisation explicitly, allowing a compiler to automatically optimise the assignment of processing tasks to particular vehicles and servers. Our model allows a compiler to apply program transformations to data processing, which can further improve task assignment.Modern motor vehicles contain a plethora of on-board computing equipment. Today's cars have a variety of microprocessors governing diverse aspects of the vehicle's operation. We believe that trends in decreasing power requirements, size, and cost of manufacture mean that in future we can expect vehicles to provide embedded computing platforms supporting the execution of general applications. As cars become increasingly connected-to each other and to the Internet-these applications will evolve beyond disconnected intra-vehicle applications and will help to improve the safety, efficiency and comfort of using transport [1]. This vision of communicating vehicles will enable applications involving multiple participants, such as:Collection of vehicle position data. Known as floating car data, information regarding the locations and velocities of vehicles using the road network can be used to identify levels of road congestion and used as input to journeytime prediction applications [2]. Real-time weather map. Most modern vehicles already contain thermometers. If data from vehicles' onboard weather sensors could be aggregated, a real-time weather map of high resolution could be composed. Real-time road map updates. Traditional techniques for updating road maps involve manual surveying and data entry. Timely integration of changes to the road network can instead be done automatically based on vehicles' location traces [3]. Road hazard detection. Acceleration data collected from vehicles containing accelerometers can be used to build a map of road hazards by noting points in the road network where many vehicles have been found to swerve or brake sharply [4].