The emergence of mobile ad hoc sensor networks has brought new challenges to traditional network design. This paper focuses on the study at the application layer. In specific, it compares the performance of two distributed computing paradigms, the client/server-based paradigm and the mobile-agent-based paradigm, through mathematical modeling and simulation. The differences between the two computing paradigms can be characterized by what is transferred over the network and correspondingly, where data processing is carried out. In the client/server-based computing, clients send data to a server and data processing is done at the server; while in the mobileagent-based computing, the server dispatches mobile agents which carry executable codes to clients and data processing is done locally. Previous works have shown that the mobile-agent-based paradigm is more appropriate to handle computations in ad hoc sensor networks. However, no simulation work has done to quantitatively measure ∗...