# Timed Colored Petri Net-Based Event Generators for Web Systems Simulation
## 1 Introduction  
Modeling next-generation networks requires designers to prepare a traffic generator tailored to the needs of the generated request parameters. To deliver the required load it is necessary to prepare the load generation system. Our approach to implementing such a system is based on the Timed Colored Petri Nets (TCPN) formalism. We propose a configurable TCPN-based generator that could be used for various real system models. Using simulation, we show the proposed request generator models have expected functionality. It is an adaptation to alternative design demands achievable by minimal configuration changes.  
Workload modeling problems have been addressed over the past years, resulting in models for generation workloads similar to those observed in the real world. Workload characterization plays a key role in many performance engineering studies. The produced workloads could also be used to drive simulations for system prototyping, testing, and benchmarking of computer systems and networks. Today there are many different areas of workload generator application, such as: cloud computing infrastructures, web systems, networking structures, and video services. In the remaining work we will use a term event generator as a generalization of the mentioned concepts of the request generator and workload generator. The event generator will be considered to be a configurable source of a stream of discrete events, similarly as in [1, 2, 3, 4]. Approaches presented in [4, 5, 6] parameterize the system model using measurements gathered from real networks. They use workload models that allow the simulation of the network traffic created by real services in various possible scenarios. On the other hand, we can also find works based on an analytical approach [2, 3, 7, 8].  
Input stream models generated from navigational patterns cause many problems in software engineering. Workload modeling is also challenging when applied in a highly dynamic environment. The derivation of such a model is non-trivial, which is confirmed by [1; 2; 3]. This paper seeks to improve those previous attempts, which are outlined below in Sections 2.1 and 2.2.  
Many works are focused on simulating models of different systems using the generated load. We need an input stream, but it could be obtained only from an actual system [5] or produced artificially [9; 10] also based on the system log [11; 12].  
Workload scenarios may have three basic sources: benchmarks, real traces, and workload models. The objective is to get a workload model as close to the real workload as possible. The best option is to start with measured workload data. Downloading such a stream is not an easy task. Therefore, in most cases, an analytical model is used. When preparing the system model, designers do not study the nature of the input stream. It is mostly general and it is not the representation of reality that we expected. Some existing works have proposed workload prediction [13; 14] or prediction of user behavior [15], but without adapting it to real needs.  
In this context, the main contribution of this paper is a design of a collection of generator models capable of representing the resource demand of the application supported by different user profiles. Different workload classes are known for stressing each resource differently [16]. In addition, the proposed workload generators enable performance analysis and simulation. In the models, we refrain from modeling the physical network and servers. We assume that data transmission delays are negligible and the server model is related with the modeled system, not the requests stream generator.  
The remainder of this article is organized as follows. We discuss related work and introduce our previous models of workload generators in Section 2. Section 3 presents our solution based on Petri nets and shows the numerical simulations. In Section 4, we evaluate the usefulness of our event generator model for performance analysis in the web system domain. Finally, Section 5 presents the conclusions and future work.