In this paper we describe R-P2P, a novel system meant to support the search and retrieval of data in a given area. RP2P couples opportunistic wireless communications between mobile devices with an interconnected network of throwboxes. The set of throwboxes implements a distributed and localized data storage. Overall, the system integrates in an on-demand, delaytolerant fashion two main network extensions: a query forwarding engine running on top of the opportunistic network and a data retrieval mechanism performed on throwboxes. We detail the building blocks of the proposed system, describing the functionalities and the interactions of the various middleware modules. Finally we illustrate the current implementation of R-P2P. Keywords Middleware, Opportunistic Communications, Delay Tolerant Networks, DHT