Preview
Description
We present NetAPI, a flexible communications interface. Although the ubiquitous Sockets API lets applications select among a number of mechanisms to accomplish networking tasks, it binds them tightly to their chosen mechanisms. Consequently, the network stack has little freedom in selecting the best protocols and mechanisms for each application, and innovating below the API is extremely difficult. NetAPI allows applications to specify their communication intents against an abstract interface that hides implementation mechanisms, encouraging innovation below the API. Application intents are combined with user policies and environmental conditions to let the network meet application goals in varied ways. We describe the design of NetAPI, comparing it to other system APIs that have supported evolution. We have also implemented a prototype of NetAPI called PANTS for the iPhone platform. We show that PANTS can provide innovative mobile networking features, such as disconnection tolerance, content quality adjustment and powersaving policies, without application modifications.