You are on page 1of 9

Experiments with Weather on the Personal Test

Cloud

Doru Rotovei1

University of West Timisoara Romania


doru.rotovei@info.uvt.ro,
WWW home page: http://info.uvt.ro/~doruro/web/welcome.html

Abstract. Testing an application and especially a weather application


before deploying it to the cloud has been always a challenge especially
analyzing all the parameters from actual functionality to the performance
on one side and cloud hosting interaction and parameter adjustments on
the other side.
We know that a weather application that can be deployed anywhere on
Earth and outside Earth is always demanding therefore we present here
an experimental approach to deploy a Weather Application on top of the
Personal Test Cloud. . . .

Keywords: cloud computing, personal test cloud, weather

1 Introduction
Up until now we didn’t have a weather system that can be tested locally and be
adjusted before uploading or promoting it to a paid cloud system. In this paper
we present an exploration experiment where we took Personal Test Cloud and
integrated with a Java application to collect and present weather data vital in
a variety of experiments from biology to socio-economics.

2 Personal Test Cloud (PTC)


Very often when developing a new system that will be hosted in the cloud we
need an ability to test the system in isolation even when connectivity to the
cloud is not available.
The Personal Test Cloud (PTC) [1] was developed to solve this very prob-
lem. PTC is a virtual cluster software that was built on top of VirtualBox [2]
virtualization technology to allow scientists and enthusiasts the ability to test
their hypothesis, construct the virtual configuration, measure performance and
other aspects of the cloud application before deploying to the actual cloud.
PTC is extremely useful in the early stages of research and development
when ideas are not fully crystallized yet, granting researches a very close access
to whole conditions and facets of their experiments by opening a little bit more
the cloud which is usually regarded as a black box. Having the PTC locally
presents the opportunity to adjust some parameters of the cluster itself and to
experiment with the local cloud in conjunction with the cloud application in a
symbiotic way. Having the PTC we don’t only control the cloud application by
also the cloud itself.[3]

3 Weather
Collecting weather data especially temperature is very important socially but
also economically. Business are relying on accurate data to take decisions that
will increase profit and reduce expenses.[7]
”Hottest Day of the Year” and ”Storm of the Decade” are common headlines
in newspapers around the world. Several places compete for the title of ”rainiest
spot on Earth,” while other locations try to avoid the menace of sandstorms.
Extreme weather often is destructive weather. Storms such as hurricanes and
tornadoes can cause deaths and millions of dollars worth of property damage.[5]
Prolonged heat waves and cold spells result in increased illness and death,
particularly among the very young and the elderly. Interactions among three el-
ements heat, air, and water are primarily responsible for weather. For example,
hurricanes often form as an air mass of low pressure that moves from east to west
over tropical seas. Hailstorms form in clouds that contain a lot of water. Torna-
does form because great differences in air pressure cause air to start spinning in
a tight, funnel-shaped formation. Weather scientists, called meteorologists, use
radar and other instruments to locate, track, and determine the extent of storms
and other types of extreme weather. They issue forecasts as well as watches and
warnings of approaching storms, so that people can prepare themselves for bad
weather.[6]
Weather being such an important element of our modern existence it goes
without saying that we need to be able to collect and to give access to the
weather information on Earth and outside Earth and we need a system to test
locally, in a local cloud, the new location before uploading it to a paid cloud.

4 Results
4.1 Installation of Personal Test Cloud
The installation of the PTC was relatively easy. We need just a good computer
that has a lot of RAM to allow creation of Virtual Machines.
Following [1] we can see that we would need to install Virtual Box, the
virtualization technology from Oracle. Once installed we need to deploy a Linux
like virtual machine that has been pre-configured to behave like a virtual cluster
(see Figures 1, 2 and 3 ).

4.2 Weather Application


The weather app has been developed using Eclipse and Java using the Open
Weather Map Web Services [4]. Though for our research we have been using
Fig. 1. PTC console application
Fig. 2. PTC Cluster Nodes
Fig. 3. PTC on VirtualBox
only Timisoara as a city, it can be configured to retrieve data from any place on
earth and also to retrieve data from any sensors we attach to it if necessary.

4.3 Empirical Results

The important question to be answered was if it is possible to create a local


cloud for the weather application with the idea of being able to deploy this
configuration in any place on Earth and outside Earth.
What we wanted to see was the feasibility of a symbiosis of Personal Test
Cloud (PTC) and the weather application.
What we discovered with our experiments is this combination is possible.
Therefore we launched our PTC on a Windows environment with Windows
Server 2012 R2 and 16 GB of RAM see figure 3.

Fig. 4. PTC running in Windows

Weather Cloudlet Once the PTC was up and running (see Figure 4) we
developed a Cloudlet for our Weather Application. The Test Cloudlet is taking
the weather information for the city of Timisoara and is logging this information
during the initialization. Below is the initialize method of the WeatherCloudlet:

@Override
public CallbackCompletion<Void> initialize
(final WeatherCloudletContext context,
final CloudletCallbackArguments<WeatherCloudletContext> arguments)
{
this.logger.info ("WeatherCloudlet initializing...");

String tmWeather = "http://api.openweathermap.org/data/2.5/weather?q=Timisoara


&APPID=5509e09df4f142b24e2683f0e51f0876";
this.logger.info ("Weather in Timisoara is : " + getHTML(tmWeather));

context.cloudlet = arguments.getCloudlet ();


return ICallback.SUCCESS;
}
The most important part of the code is in the below method. This method
is using the Weather Service from Open Weather Web Services to retrieve the
weather information. Note this information can be retrieved from any source
including sensors from below surface or outside the Earth surface. As long as
the Cloudlet has access to the those sources it can execute or use and retrieve
their information in the PTC.
public static String getHTML(String urlToRead) throws Exception {
StringBuilder result = new StringBuilder();
URL url = new URL(urlToRead);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
result.append(line);
}
rd.close();
return result.toString();
}

If we launch our cloudlet we will see the following results in PTC logger:
WeatherCloudlet initializing...

{"coord":{"lon":21.23,"lat":45.75},"weather":[{"id":800,"main":"Clear",
"description":"Sky is Clear","icon":"01d"}],"base":"cmc stations",
"main":{"temp":270.27,"pressure":1025,"humidity":73,"temp_min":270.15,
"temp_max":270.37},"wind":{"speed":3.1,"deg":140},
"clouds":{"all":0},"dt":1451732782,
"sys":{"type":1,"id":6000,"message":0.0026,"country":"RO",
"sunrise":1451715367,"sunset":1451746930},"id":665087,"name":"Timisoara","cod":200}

WeatherCloudlet initialized successfully.


5 Future research

Getting the weather and testing it in Personal Test Cloud was a big step forward.
There is still a lot to be done in this area. Here are few directions were the
research can be expanded:

5.1 Oceans

First of all, with the global warming ([8]) having the right temperature for the
marine life is vital.([9])
We can add temperature sensors in all oceans to monitor temperature changes.
Here we need to note some challenges need to be overcome when sensors mal-
function or temperature are too extreme e.g. South Pole vs Equator. We would
envision a special PTC located most probably at the South Pole where cooling
systems are not necessary.

5.2 Solar System

With temperature control being an important part of our existence as species,


monitoring the temperature right outside Earth is critically important to ob-
serve patterns and prepare our life to be expanded into the solar system and
beyond.([12])

International Space Station The creation of the International Space Station


([10]) is aimed to conduct research in biology, human biology, physics, astronomy
meteorology etc. Furthermore the ISS is suited for testing spacecraft systems
and equipment required for missions to the Moon and Mars ([11]). Here we can
envision a PTC system that will help control and monitor the temperature not
only for the experiments conducted in the ISS habitat but also for the near by
planets and satellites aligning with the long term purpose to help the missions
to the Moon and Mars. Weather on PTC will be the right candidate to help
the ISS research. Also we can see in [13] that the space station switched from
Windows to Linux and PTC is the right candidate for the weather application
as PTC can be run on both systems.

6 Conclusions

In this paper we described a system of weather gathering and reporting that can
be run on PTC Personal Test Cloud with the purpose of expanding the reach of
weather information to any cloud and anywhere on the planet and outside the
planet.
The experiments showed that weather on PTC is a viable solution with long
and future benefits.
References
1. https://wiki.volution.ro/Mosaic/Notes/Platform/Tutorial
2. https://www.virtualbox.org
3. Portable Cloud Applications - from Theory to Practice Type of Publication: Jour-
nal article Publication Ref.: ISSN: 0167-739X Authors: Dana Petcu, Georgiana
Macariu, Silviu Panica, Ciprian Craciun Book/Journal Vol./Number: Future Gen-
eration Computer Systems Publisher: Elsevier Year of publication: 2012 Volume
EditorElsevier
4. http://openweathermap.org
5. Ooyama, K, V, 1990: A thermodynamic foundation for modeling the moist atmo-
sphere
6. Under the Weather: Health, Schooling, and Economic Consequences of Early-Life
Rainfall NBER Working Paper No. 14031 Issued in May 2008
7. Drought and saving in West Africa: are livestock a buffer stock? Journal of Devel-
opment Economics Volume 55, Issue 2, April 1998, Pages 273305
8. Glud, Ronnie; Wenzhfer, Frank; Middleboe, Mathias; Oguri, Kazumasa;
Turnewitsch, Robert; Canfield, Donald E.; Kitazato, Hiroshi (17 March 2013). ”High
rates of microbial carbon turnover in sediments in the deepest oceanic trench on
Earth”. Nature Geoscience.
9. Choi, Charles Q. (17 March 2013). ”Microbes Thrive in Deepest Spot on Earth”.
LiveScience. Retrieved 17 March 2013.
10. About the Space Station:Facts and Figures (October 2015)
11. From earth to the moon and then beyond - Technology and Science (NBC News
27 of May 2014)
12. United Nations Treaties and Principles on Outer Space. (PDF). United Nations.
New York. 2002. ISBN 92-1-100900-6. Retrieved 8 October 2011.
13. Thomson, Iain (10 May 2013). ”Penguins in spa-a-a-ce! ISS dumps Windows for
Linux on laptops”. The Register. Retrieved 15 May 2013.

You might also like