With the development of networking technologies and the advent of the peer-to-peer computing paradigm, distributed file-sharing systems like Gnutella are becoming prevalent over time. JXTA, an interoperable and platform independent peer-to-peer computing infrastructure, has been adopted in an increasing number of network applications providing file-sharing and cooperative service. In this paper, we propose the metadata search layer which serves as an enhancement to the CMS (Content Manager Service), a JXTA-based file-sharing service. Through the metadata search layer, more precise search of resources could be conducted as opposed to the inflexible keyword-based search mechanism employed in most of current file-sharing applications in use. A compact general-purpose query language is proposed to facilitate the use of standard metadata schema and bridge the gap between users and metadata descriptions of resources. We exemplify the advantage of the metadata-based search mechanism over the...