This document summarizes the current state of middleware and operating systems used in wireless sensor networks (WSNs). It discusses the need for middleware to facilitate application development on resource-constrained sensor nodes. It categorizes existing middleware approaches and describes desirable middleware characteristics. It also discusses sensor node hardware, including different sensor platforms and their properties. Challenges in designing operating systems for WSNs given limitations in memory, power, and other resources are outlined. Finally, desirable features for sensor node operating systems are presented.