lates the mean value. This mean value is written to
the GAE log as a warning. Figure 5 shows an exam-
ple of such a Java code.
Each measurement program is performed many
times to obtain the variance and to estimate the proper
distribution function. As for the Datastore access
APIs, the elapsed time would vary with the size of the
kind and the number of the propertiess in the kind.
Therefore, we have to measure the parameters vary-
ing these factors. Table 1 shows a sample result of
such a measurement. All the obtained parameters are
Query query = pm. newQuery ( Buch20 . cl as s ) ;
long s t a r t = System . cu rren tTi meM illi s () ;
for ( in t i = 1; i <=200; i ++){
St r i n g s = ” bookId ==\”” + i + ” \” ” ;
query . s e t F i l t e r ( s ) ;
r t . s e t F i l t e r ( f i l t e r ) ;
bookList = ( L is t<Buch20>)query . execute ( ) ;
}
long st o p = System . cur rent Tim eMi llis ( ) ;
long t = s top − s t a r t ;
log . warning ( ” Elapse d Time = ” + t /2 00) ;
Figure 5: Measurement Program Example.
embedded into the “Delay” component to produce the
appropriate delay.
Table 1: Mean Value – Elapsed Time.
Size Sel Mod Del Ins
3 × 10000 3.54 94.34 73.13 77.03
5 × 8000 2.74 90.65 71.70 64.04
10 × 4000 3.99 48.38 94.99 96.90
20 × 2000 2.80 101.38 80.80 64.67
50 × 1000 2.69 76.09 62.80 105.57
Since the above performanceparameters vary over
time, or in other words, they are time varying fac-
tors, we have to measure them periodically, and re-
flect them in the “Delay” component in order to keep
the prediction framework up to date.
5 CONCLUSIONS
A simulation based performance prediction frame-
work for GAE is proposed, which uses the Timed Col-
ored Petri Net (Timed CPN). In order to increase the
modularity, the framework is composed of four func-
tionally independent components connected together
by CPN places, namely, “Generation”, “Application”,
“Delay” and “Evaluation” components.
Since GAE is almost a black-box from the per-
formance prediction viewpoint, most performancepa-
rameters have to be obtained through the measure-
ment using user written programs. Using the obtained
parameters, that is, the mean and variance values with
the estimated distribution functions, “Delay” compo-
nents produces the delay for each API, then add it to
the timestamp attribute of each token that has issued
the API.
At the end of the simulation, the “Evaluation”
component examines the resultant tokens to calculate
the performance indices. The performance parame-
ters change over time, or they are the time-varying
factors, therefore the above measurement must be
done periodically,so that the latest parameters are em-
bedded into the “Delay” component.
ACKNOWLEDGEMENTS
This work was supported by JSPS KAKENHI Grant
Number 25330094.
REFERENCES
Chang, F., Dean, J., Ghemawat, S., Hsieh, W. C., Wallach,
D. A., Burrows, M., Chandra, T., Fikes, A., and Gru-
ber, R. E. (2006). Bigtable: A Distributed Storage
System for Structured Data. In Proc. the 7th Con-
ference on USENIX Symposium on Operating Systems
Design and Implementation - Volume 7, pages 205–
218.
de Jonge, A. (2011). Essential App Engine: Building
High-Performance Java Apps with Google App En-
gine. Addison-Wesley Professional.
Gnedenko, B. V. and Kovalenko, I. N. (1989). Intro-
duction to Queuing Theory (Mathematical Modeling).
Birkhaeuser Boston.
Howard, S. G., Gobioff, H., and Leung, S. (2004). The
Google File System.
Jensen, K. and Kristensen, L. (2009). Coloured Petri
Nets: Modeling and Validation of Concurrent Sys-
tems. Springer-Verlag.
Jensen, K., Kristensen, L. M., and Wells, L. (2007).
Coloured Petri Nets and CPN Tools for Modelling
and Validation of Concurrent Systems. In Inter-
national Journal on Software Tools for Technology
Transfer (STTT) Volume 9, Numbers 3-4, pages 213–
254. Springer-Verlag.
Sadalage, P. J. and Fowler, M. (2012). NoSQL Distilled: A
Brief Guide to the Emerging World of Polyglot Persis-
tence. Addison-Wesley Professional.
Sanderson, D. (2009). Programming Google App Engine.
Oreilly & Associates Inc.
Wang, J. (1998). Timed Petri Nets: Theory and Application
(The International Series on Discrete Event Dynamic
Systems). Springer.
ICSOFT-EA2014-9thInternationalConferenceonSoftwareEngineeringandApplications
406