Friday, 17 August 2018

A paper on defining and modeling context-awareness

A paper I wrote a few months ago is just published.

"On defining and modeling context-awareness", International Journal of Pervasive Computing and Communications, (2018), https://doi.org/10.1108/IJPCC-D-18-00003

Also there is an Author Accepted Manuscript pdf (or else preprint).

The paper presents a methodology on defining and modeling context-aware systems. These are systems that detect their environment in order to operate and interact with users and other systems. The methodology is based on a computational model, named Networked Turing Machine, that extends the capabilities of classical Turing machines by enclosing interaction on their operation and supports modeling of interactive and distributed computation. Then using this computational model the notion of context-aware systems is defined.
One of the motives of writing this paper is discussing context-awareness using the theory of computation. It is common in the literature of the field to talk about context-awareness using plain language and developing definitions and theoretical frameworks that avoid mathematical definitions. This habit does not allow the connection of any context-aware framework with the rich and valuable literature of computing theory and with fields like computational complexity.
The methodology in the paper describes a useful way of developing models that describe distributed systems focusing on their structure.
A case study is also presented. A model that describes the structure of the web application WMS Map viewer is developed using the methodology of the paper.

Saturday, 5 May 2018

Hacking geoserver.war

One easy and efficient way to setup geoserver is as a standalone servlet on an application server like Apache Tomcat. Geoserver is released in many formats one of them is as a web archive (.war file) which contains all the necessary application and configuration files to run geoserver. This is a particularly convenient way to setup geoserver as application servers are available on cloud platforms like Amazon AWS and Azure with a simple deployment procedures and affordable prices, even free in many cases.
There is only one disadvantage in this approach. The .war file contains files with default configurations and they may not be modified during the execution of the application. So every time you need to install geoserver it is necessary to set up the configuration from scratch; nothing is saved on the web archive. This is quite problematic as you will have to setup geoserver from scratch even after a simple reboot of Tomcat or the cloud container. Luckily you may easily hack it.
Web archives .war files are simple zip files, changing their extension or opening the file on a zipping application is enough to reveal their content. As far as it concerns the configuration files of geoserver they are the same on all formats for all platforms. So this is what to do.
Download the platform independent platform binary version  and run the application on your local machine. Set up the application as you will, setup map layers, wms layers, styles and anything else. Don’t forget to change the passwords and security settings.
Unzip and delete the files from the data directory of the web archive. Then copy the files from the "data_dir" directory of the locally installed application to the "data" directory of the web archive. Zip again the web archive version and change the extension back to .war. You are fine.
Deploying the modified .war file on cloud or on an application server will get you a working geoserver with the setting you have applied locally as default settings.

Wednesday, 14 March 2018

An interestng lecture of Steven Hawking about randomness

There are some scientists that besides their talent in discovering the mysteries of the universe also have a talent in talking in plain and comprehensive language about them.
Steven Hawking definitely had both talents. This lecture of his about randomness is an example.
http://www.hawking.org.uk/does-god-play-dice.html

-RIP

Thursday, 9 November 2017

On line generator of random graphs and trees

Random Graphs
After studying and talking about graphs for so many years I thought I should build an application about them. Here you may find my random graph web application.
You may generate random graphs and trees by inputting parameters like graph density, minimum and maximum node degrees and number of nodes. The graphs are outputted in DIMACS format which I believe is easy to work with. So you may easily produce graphs for experimentation and software testing.
The most interesting part is the random tree generator. The algorithm that I have developed for it is interesting, I believe, and rather easy to understand.  Considering the user inputted Graph Density parameter, for every node in the graph the algorithm decides whether or not to add adjoined nodes. This procedure is iterative until the graph reaches the desired number of nodes. The produced graph is a tree as every new node is adjoined only with one older node so circles may not be formed.

Why a web app?
I believe a web application is the best way to demonstrate a scientific idea, if it is possible to build an application about it. Web applications don’t need installation; they are easy to access; the user may easily get to the point of what they are all about.

The application is partially compatible with IE and Edge, you should better use it with Firefox or Chrome.

https://wms-viewer-online.appspot.com/random/randomgraphs.html

Friday, 22 September 2017

Android Studio vs Eclipse

When it come to Android app development there are really two choices Android Studio and Eclipse. I have been using Eclipse for Java and Android development the last 4 years. Besides the Android emulator disastrous function which makes using emulators a torture, I really have good impressions about working with Eclipse; you could say I am a fan. Nowadays Eclipse lacks official support from Google but it is easy to install Android IDE through the Eclipse marketplace and have your system up to date. In marketplace you may find a huge collection of libraries and development tools that may boost you productivity and potentials.
But then Android Studio arrived. It is really not that new as it is based on IntelliJ platform that has been around for some years. The thing about it is that it is the official Android IDE supported by Google. So you must give it a try.
In comparison to Eclipse, Android Studio has some valuable advantages like better emulator performance, more comprehensive error messages and reports. It also loads almost automatically the required libraries and references and downloads the necessary Android SDK components.
The downside of using Android Studio is its demand in computational and storage resources, at least when used in MS-Windows. Even when performing simple tasks it requires really large amounts of RAM. You can sense your whole system slowing down even in modern computers. Compiling and packaging the same application with Studio and Eclipse is a completely different story and it takes a while or a lot more in Studio, while both produce basically the same product.
In storage requirements things are worse. Apart from its installation files Studio stores strangely large amounts of data in other places. In the AppData folder it stores some gigabytes of data, for some reason . While in operation it creates a few gigabytes of temporary files. In the users folders, Studio also stores some gigabytes of probably personalized data. It really makes you wonder if all these are really necessary, other IDE’s do not ask for so much and certainly Eclipse is one of them. Another thing I noticed is that for the same applications, the project files generated by Studio are even ten times larger in storage space then those generated by Eclipse. Still they produce the same applications.
My opinion based on all these, is that if you don’t need an emulator then Eclipse is a more productive tool for application development.