As mobile devices become ubiquitous, they will begin to serve purposes beyond email and browsing on the go. Smart phones, vehicular systems, home appliances, and environmental sensors can form heterogeneous mobile networks to provide a new class of distributed services that acquire, process, and disseminate real-time information from systems located in the proximity of people, places, or activities of interest. Considering the scale, heterogeneity, and volatility of these networks, programming such services will require a significant amount of system and networking research. This talk presents systems and protocols for mobile social computing, distributed programming in mobile ad hoc networks, and vehicular networks. MobiSoC is a middleware for mobile social applications, which captures the social state of physical communities, learns previously unknown patterns from emergent geo-social data, and shares these data with applications while respecting users' privacy concerns. Migratory Services provide a high-level distributed service model for ad hoc networks, where services migrate to different network nodes in response to changes in their operating context to maintain a semantically correct and continuous interaction with clients. RBVT routing is a class of routing protocols for vehicular networks that outperforms existing solutions by leveraging real-time vehicular traffic information to create stable road-based paths consisting of road intersections that have network connectivity among them. The talk will also discuss lessons learned from developing prototypes for all these systems and will conclude with a brief overview of two new projects on peer-to-peer socially-aware network infrastructure and traffic safety systems using a symbiosis between vehicular networks and sensor networks.