In existing middleware for body sensor networks, energy limitations, hardware heterogeneity, increases in node temperature, and the absence of software reusability are major problems. In this paper, we propose an event-based grid middleware component that solves these problems using distributed resources in in vivo sensor nodes. In our multi-hop communication, we use a lightweight rendezvous routing algorithm in a publish/subscribe system of event-based communication. To facilitate software reuse and application development, a modified open services gateway initiative has been implemented in our middleware architecture. We evaluated our grid middleware in a cancer treatment scenario with combined hyperthermia, chemotherapy, and radiotherapy procedures, using in vivo sensors.