Abstract—Wireless sensor networks (WSN) have become a mainstream technology for environmental monitoring and observing various variables of interest over extended periods of time via large-scale networks of sensors. WSNs have a wide range of applications including wildfire detection, healthcare, military, and habitat monitoring. In all such application areas, gathering and then relaying captured data to a central unit is often considered the primary task of the network. Scientific analysis however often requires WSNs to capture and store variables for long periods of time. Storing and managing flows of data tend to be challenging issues because WSNs often consist of nodes with limited processing, memory, and power resources. Therefore the software layer in WSNs needs to implement an efficient data storage allocation mechanism in order to provide sufficient memory space for multiple applications. In this paper we propose a novel statistical approach for estimating applications storage requirements. Our proposed mechanism has been originally developed and implemented in a new WSN middleware called Sensomax, which is an agent-based decentralized middleware with multiple concurrent applications support for dynamic data gathering in WSNs. The mechanism described here proved to be an effective technique for proactively allocating memory to multiple applications with different operational paradigms. Index Terms—Storage, WSN, probability, distribution, concurrency. I. INTRODUCTION Devising storage allocation mechanisms has always been a challenging task for application developers for both conventional systems such as PCs, and for a wide range of embedded devices including wireless sensor networks (WSNs). The most challenging issue often comes in allocating appropriate storage space to different applications based on their current requirement and on how their storage requirement may change over time. In conventional systems such issues are not as problematic as in the embedded world, mainly because in conventional systems storage-space is usually not scarce; on the other hand, embedded devices such as WSNs suffer from extreme scarcity of hardware resources most notably their limited memory and energy resources. This issue of limited resources in WSNs is one of the primary factors that influences programming and deployment of these devices. WSN applications often fall into one of two main categories: either real-time online monitoring, or long-time Manuscript received March 25, 2013; revised May 19, 2013. Mo Haghighi is with the Department of Computer Science, University of Bristol, Bristol, BS8 1UB, UK and Large-Scale Complex IT Systems (LSCITS) (e-mail: Mo.Haghighi@bristol.ac.uk). offline observation. In the latter case, the network is required to observe variables of interest over an extended period of time, storing the captured data for subsequent relaying to a central unit. The captured data may be stored in a raw (or lossless-compressed) form or in some internally-aggregated form such as lossy-compressed or summary statistics. This requires WSN nodes to not only provide reasonable energy longevity for the application, but also to provide enough storage to retain sufficient data for the lifetime of the application. Recent research on WSNs has mostly focused on conserving energy to increase the life of WSNs, yet lack of sufficient storage could make the network as non-operational as a lack of energy does. WSN applications are usually required to operate unattended and in many cases need to be deployed in hostile environments or places where access to nodes is severely constrained, or impossible. Therefore efficient mechanisms with a fair extent of autonomy are a key requirement for WSNs’ operating systems or middleware. Conventional WSNs often consist of tightly coupled hardware and software whereby very application-specific services are coded into the entire software stack running on each node. With recent advances in microelectronics and embedded systems design however, new WSN devices have been manufactured that can offer richer hardware resources and hence pave the way for dynamic general-purpose software to be accommodated in such devices. Middleware is a software layer that lies between the application layer and hardware resources, managing communication, processing, storage and resource allocation amongst hardware resources and applications. Running an autonomous middleware such as Sensomax [1], [2], often requires resources that are capable of multi-tasking and running algorithms for aggregation and decision-making. Probably the most widely used hardware resources in WSN research are the Mica family [3] such as the Micaz and Mica2 motes that are very often used with TinyOS [4], which is an operating system originally developed for Mica nodes. When it comes to memory and processor, Mica motes are extremely resource constrained. For example, the Mica2 hardware includes an Atmel processor operating at 16MHz and its memory includes 4Kb of RAM and 128Kb of flash storage. With such scarce resources, the tasks of developing autonomous software and storing large volume of data are very constrained. New devices such as the SunSpot [5] however provide a resource rich platform in a high-level development environment such as Java. SunSpot devices include a 400MHz ARM processor, 1Mb of RAM and 8Mb of data storage. The hardware features of SunSpot and the programming power of Java motivated us to design and Dynamic Data Storage Estimation for Multiple Concurrent Applications Using Probability Distribution Modeling in WSNs Mo Haghighi Journal of Advances in Computer Network, Vol. 1, No. 3, September 2013 254 DOI: 10.7763/JACN.2013.V1.51