\section{Introduction}
%DBMS (Data Base Management System)
%SQL (Structured Query Language)


The new patterns for the informations systems are increasingly prioritizing the integration of organizational processes and the third partnerships enhancement, which results in distributed business models. 
In this context, the service-oriented architecture (SOA) has supported these new paradigms. 
Concisely, SOA is an architecture focused on heterogeneous environments, in which software components could be executed in platforms with distinct characteristics. Among the advantages achieved by adopting SOA paradigm are component reuse, interoperability, flexibility, integration, etc. 

Within the SOA world, the quality of services (QoS) directly effects the quality of business transactions and the relationships between customers and service providers as well \cite{Casati2003}. Usually, Service Level Agreements (SLA) are used to establish the legal commitments between them, whose breach may entail legal penalties. Among the clauses agreed in a SOA-aware SLA, are those related with databases (DB) spent time, which affect the web services overall performance. 
%For this reason, not rare, it is object of contractual clauses, seeking to exempt vendors of applications from de responsibility for eventual not expected results.

However, the high variability typical of the SOA environments, makes difficult the negotiation of a SLA level that could, in fact, be guaranteed in practice. 
The ratio of the load variation for Internet applications can achieve the order of 300\% \cite{Chase2001}, which makes critical the challenge of managing performance requirements of these systems. 
Moreover, in SOA it is common that the applications are constantly changing, with new services being introduced, updated and/or removed~\cite{Baresi2008} and it is essential to predict the impact of these modifications over the agreed contracts. 
In practice, the designers develop the application and stress it to measure its quality. This approach can be expensive and time consuming, since the analyst needs an executable version for that. 
Thus, estimating SOA metrics prior to develop or change the physical system, is essential to avoid undesirable behavior.
%Proposal

Recently proposed alternatives suggest adopting models for performance prediction in SOA-based systems \cite{Rud2008} \cite{Teixeira2010}, which certainly helps to establish some SLA clauses \cite{Teixeira2011}. 
However, these approaches have basically focused on evaluating SOA network and web service transactions, generalizing that the time spent by DB queries is implicit into the service performance. 
From a SLA point of view it seems a gap, since some clauses can be specifically related with DB spent time. 
Moreover, this important drawback can affect a reliable SOA capacity planning, whereas one can not verify, for example, the DB performance degradation insofar as the workload increases nor the spent time by messages waiting in input and output database buffers, which is common in data-intensive applications. 

Therefore, we propose in this paper a GSPN (Generalized Stochastic Petri Nets ~\cite{gspnbook}) based simulation modeling for estimating the performance of databases operations in SOA-aware scenarios. 
Our model analyses the resource consumption and performance levels degradation in databases with highly variable workloads. Then, based on these information it is possible to elaborate, at modeling time, accurate agreements to be established between services customers and providers.

The main advantage of our proposal, with relation to another similar alternatives, is that it does not require real time measurements nor the complete system implementation to provide useful estimates. 
These information are not always available at design time, when a SOA capacity planning is useful. 
Instead, our model is supported by higher level parameters, collected from the Data Base Management System (DBMS) configuration and from a set of samples containing DB queries executions statistics. 
For this reason, the adopted technology, structure and/or particular type of operation, are irrelevant. 

In order to illustrate our approach and analyze its accuracy, we develop a case study where were compare the estimated results against those measured from an evaluated DB system, performed in a real SOA environment. 
The remainder of this paper is organized as follows: Section \ref{Related} describes some related works; Section \ref{Concepts} introduces the basic concepts of SOA, SLA and GSPN; Sections \ref{Model} presents the proposed performance model. Finally, Section \ref{Case} presents the developed case study and the final comments are discussed in Section \ref{Comments}.
